All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.apigateway.RestApiPolicyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.66.3
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.apigateway;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;


public final class RestApiPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final RestApiPolicyArgs Empty = new RestApiPolicyArgs();

    /**
     * JSON formatted policy document that controls access to the API Gateway.
     * 
     */
    @Import(name="policy", required=true)
    private Output policy;

    /**
     * @return JSON formatted policy document that controls access to the API Gateway.
     * 
     */
    public Output policy() {
        return this.policy;
    }

    /**
     * ID of the REST API.
     * 
     */
    @Import(name="restApiId", required=true)
    private Output restApiId;

    /**
     * @return ID of the REST API.
     * 
     */
    public Output restApiId() {
        return this.restApiId;
    }

    private RestApiPolicyArgs() {}

    private RestApiPolicyArgs(RestApiPolicyArgs $) {
        this.policy = $.policy;
        this.restApiId = $.restApiId;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(RestApiPolicyArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private RestApiPolicyArgs $;

        public Builder() {
            $ = new RestApiPolicyArgs();
        }

        public Builder(RestApiPolicyArgs defaults) {
            $ = new RestApiPolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param policy JSON formatted policy document that controls access to the API Gateway.
         * 
         * @return builder
         * 
         */
        public Builder policy(Output policy) {
            $.policy = policy;
            return this;
        }

        /**
         * @param policy JSON formatted policy document that controls access to the API Gateway.
         * 
         * @return builder
         * 
         */
        public Builder policy(String policy) {
            return policy(Output.of(policy));
        }

        /**
         * @param restApiId ID of the REST API.
         * 
         * @return builder
         * 
         */
        public Builder restApiId(Output restApiId) {
            $.restApiId = restApiId;
            return this;
        }

        /**
         * @param restApiId ID of the REST API.
         * 
         * @return builder
         * 
         */
        public Builder restApiId(String restApiId) {
            return restApiId(Output.of(restApiId));
        }

        public RestApiPolicyArgs build() {
            if ($.policy == null) {
                throw new MissingRequiredPropertyException("RestApiPolicyArgs", "policy");
            }
            if ($.restApiId == null) {
                throw new MissingRequiredPropertyException("RestApiPolicyArgs", "restApiId");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy