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

com.pulumi.azure.cosmosdb.inputs.AccountCorsRuleArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.cosmosdb.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AccountCorsRuleArgs Empty = new AccountCorsRuleArgs();

    /**
     * A list of headers that are allowed to be a part of the cross-origin request.
     * 
     */
    @Import(name="allowedHeaders", required=true)
    private Output> allowedHeaders;

    /**
     * @return A list of headers that are allowed to be a part of the cross-origin request.
     * 
     */
    public Output> allowedHeaders() {
        return this.allowedHeaders;
    }

    /**
     * A list of HTTP headers that are allowed to be executed by the origin. Valid options are `DELETE`, `GET`, `HEAD`, `MERGE`, `POST`, `OPTIONS`, `PUT` or `PATCH`.
     * 
     */
    @Import(name="allowedMethods", required=true)
    private Output> allowedMethods;

    /**
     * @return A list of HTTP headers that are allowed to be executed by the origin. Valid options are `DELETE`, `GET`, `HEAD`, `MERGE`, `POST`, `OPTIONS`, `PUT` or `PATCH`.
     * 
     */
    public Output> allowedMethods() {
        return this.allowedMethods;
    }

    /**
     * A list of origin domains that will be allowed by CORS.
     * 
     */
    @Import(name="allowedOrigins", required=true)
    private Output> allowedOrigins;

    /**
     * @return A list of origin domains that will be allowed by CORS.
     * 
     */
    public Output> allowedOrigins() {
        return this.allowedOrigins;
    }

    /**
     * A list of response headers that are exposed to CORS clients.
     * 
     */
    @Import(name="exposedHeaders", required=true)
    private Output> exposedHeaders;

    /**
     * @return A list of response headers that are exposed to CORS clients.
     * 
     */
    public Output> exposedHeaders() {
        return this.exposedHeaders;
    }

    /**
     * The number of seconds the client should cache a preflight response. Possible values are between `1` and `2147483647`.
     * 
     */
    @Import(name="maxAgeInSeconds")
    private @Nullable Output maxAgeInSeconds;

    /**
     * @return The number of seconds the client should cache a preflight response. Possible values are between `1` and `2147483647`.
     * 
     */
    public Optional> maxAgeInSeconds() {
        return Optional.ofNullable(this.maxAgeInSeconds);
    }

    private AccountCorsRuleArgs() {}

    private AccountCorsRuleArgs(AccountCorsRuleArgs $) {
        this.allowedHeaders = $.allowedHeaders;
        this.allowedMethods = $.allowedMethods;
        this.allowedOrigins = $.allowedOrigins;
        this.exposedHeaders = $.exposedHeaders;
        this.maxAgeInSeconds = $.maxAgeInSeconds;
    }

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

    public static final class Builder {
        private AccountCorsRuleArgs $;

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

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

        /**
         * @param allowedHeaders A list of headers that are allowed to be a part of the cross-origin request.
         * 
         * @return builder
         * 
         */
        public Builder allowedHeaders(Output> allowedHeaders) {
            $.allowedHeaders = allowedHeaders;
            return this;
        }

        /**
         * @param allowedHeaders A list of headers that are allowed to be a part of the cross-origin request.
         * 
         * @return builder
         * 
         */
        public Builder allowedHeaders(List allowedHeaders) {
            return allowedHeaders(Output.of(allowedHeaders));
        }

        /**
         * @param allowedHeaders A list of headers that are allowed to be a part of the cross-origin request.
         * 
         * @return builder
         * 
         */
        public Builder allowedHeaders(String... allowedHeaders) {
            return allowedHeaders(List.of(allowedHeaders));
        }

        /**
         * @param allowedMethods A list of HTTP headers that are allowed to be executed by the origin. Valid options are `DELETE`, `GET`, `HEAD`, `MERGE`, `POST`, `OPTIONS`, `PUT` or `PATCH`.
         * 
         * @return builder
         * 
         */
        public Builder allowedMethods(Output> allowedMethods) {
            $.allowedMethods = allowedMethods;
            return this;
        }

        /**
         * @param allowedMethods A list of HTTP headers that are allowed to be executed by the origin. Valid options are `DELETE`, `GET`, `HEAD`, `MERGE`, `POST`, `OPTIONS`, `PUT` or `PATCH`.
         * 
         * @return builder
         * 
         */
        public Builder allowedMethods(List allowedMethods) {
            return allowedMethods(Output.of(allowedMethods));
        }

        /**
         * @param allowedMethods A list of HTTP headers that are allowed to be executed by the origin. Valid options are `DELETE`, `GET`, `HEAD`, `MERGE`, `POST`, `OPTIONS`, `PUT` or `PATCH`.
         * 
         * @return builder
         * 
         */
        public Builder allowedMethods(String... allowedMethods) {
            return allowedMethods(List.of(allowedMethods));
        }

        /**
         * @param allowedOrigins A list of origin domains that will be allowed by CORS.
         * 
         * @return builder
         * 
         */
        public Builder allowedOrigins(Output> allowedOrigins) {
            $.allowedOrigins = allowedOrigins;
            return this;
        }

        /**
         * @param allowedOrigins A list of origin domains that will be allowed by CORS.
         * 
         * @return builder
         * 
         */
        public Builder allowedOrigins(List allowedOrigins) {
            return allowedOrigins(Output.of(allowedOrigins));
        }

        /**
         * @param allowedOrigins A list of origin domains that will be allowed by CORS.
         * 
         * @return builder
         * 
         */
        public Builder allowedOrigins(String... allowedOrigins) {
            return allowedOrigins(List.of(allowedOrigins));
        }

        /**
         * @param exposedHeaders A list of response headers that are exposed to CORS clients.
         * 
         * @return builder
         * 
         */
        public Builder exposedHeaders(Output> exposedHeaders) {
            $.exposedHeaders = exposedHeaders;
            return this;
        }

        /**
         * @param exposedHeaders A list of response headers that are exposed to CORS clients.
         * 
         * @return builder
         * 
         */
        public Builder exposedHeaders(List exposedHeaders) {
            return exposedHeaders(Output.of(exposedHeaders));
        }

        /**
         * @param exposedHeaders A list of response headers that are exposed to CORS clients.
         * 
         * @return builder
         * 
         */
        public Builder exposedHeaders(String... exposedHeaders) {
            return exposedHeaders(List.of(exposedHeaders));
        }

        /**
         * @param maxAgeInSeconds The number of seconds the client should cache a preflight response. Possible values are between `1` and `2147483647`.
         * 
         * @return builder
         * 
         */
        public Builder maxAgeInSeconds(@Nullable Output maxAgeInSeconds) {
            $.maxAgeInSeconds = maxAgeInSeconds;
            return this;
        }

        /**
         * @param maxAgeInSeconds The number of seconds the client should cache a preflight response. Possible values are between `1` and `2147483647`.
         * 
         * @return builder
         * 
         */
        public Builder maxAgeInSeconds(Integer maxAgeInSeconds) {
            return maxAgeInSeconds(Output.of(maxAgeInSeconds));
        }

        public AccountCorsRuleArgs build() {
            if ($.allowedHeaders == null) {
                throw new MissingRequiredPropertyException("AccountCorsRuleArgs", "allowedHeaders");
            }
            if ($.allowedMethods == null) {
                throw new MissingRequiredPropertyException("AccountCorsRuleArgs", "allowedMethods");
            }
            if ($.allowedOrigins == null) {
                throw new MissingRequiredPropertyException("AccountCorsRuleArgs", "allowedOrigins");
            }
            if ($.exposedHeaders == null) {
                throw new MissingRequiredPropertyException("AccountCorsRuleArgs", "exposedHeaders");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy