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

com.pulumi.azurenative.web.inputs.CorsSettingsArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.web.inputs;

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


/**
 * Cross-Origin Resource Sharing (CORS) settings for the app.
 * 
 */
public final class CorsSettingsArgs extends com.pulumi.resources.ResourceArgs {

    public static final CorsSettingsArgs Empty = new CorsSettingsArgs();

    /**
     * Gets or sets the list of origins that should be allowed to make cross-origin
     * calls (for example: http://example.com:12345). Use "*" to allow all.
     * 
     */
    @Import(name="allowedOrigins")
    private @Nullable Output> allowedOrigins;

    /**
     * @return Gets or sets the list of origins that should be allowed to make cross-origin
     * calls (for example: http://example.com:12345). Use "*" to allow all.
     * 
     */
    public Optional>> allowedOrigins() {
        return Optional.ofNullable(this.allowedOrigins);
    }

    /**
     * Gets or sets whether CORS requests with credentials are allowed. See
     * https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
     * for more details.
     * 
     */
    @Import(name="supportCredentials")
    private @Nullable Output supportCredentials;

    /**
     * @return Gets or sets whether CORS requests with credentials are allowed. See
     * https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
     * for more details.
     * 
     */
    public Optional> supportCredentials() {
        return Optional.ofNullable(this.supportCredentials);
    }

    private CorsSettingsArgs() {}

    private CorsSettingsArgs(CorsSettingsArgs $) {
        this.allowedOrigins = $.allowedOrigins;
        this.supportCredentials = $.supportCredentials;
    }

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

    public static final class Builder {
        private CorsSettingsArgs $;

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

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

        /**
         * @param allowedOrigins Gets or sets the list of origins that should be allowed to make cross-origin
         * calls (for example: http://example.com:12345). Use "*" to allow all.
         * 
         * @return builder
         * 
         */
        public Builder allowedOrigins(@Nullable Output> allowedOrigins) {
            $.allowedOrigins = allowedOrigins;
            return this;
        }

        /**
         * @param allowedOrigins Gets or sets the list of origins that should be allowed to make cross-origin
         * calls (for example: http://example.com:12345). Use "*" to allow all.
         * 
         * @return builder
         * 
         */
        public Builder allowedOrigins(List allowedOrigins) {
            return allowedOrigins(Output.of(allowedOrigins));
        }

        /**
         * @param allowedOrigins Gets or sets the list of origins that should be allowed to make cross-origin
         * calls (for example: http://example.com:12345). Use "*" to allow all.
         * 
         * @return builder
         * 
         */
        public Builder allowedOrigins(String... allowedOrigins) {
            return allowedOrigins(List.of(allowedOrigins));
        }

        /**
         * @param supportCredentials Gets or sets whether CORS requests with credentials are allowed. See
         * https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
         * for more details.
         * 
         * @return builder
         * 
         */
        public Builder supportCredentials(@Nullable Output supportCredentials) {
            $.supportCredentials = supportCredentials;
            return this;
        }

        /**
         * @param supportCredentials Gets or sets whether CORS requests with credentials are allowed. See
         * https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
         * for more details.
         * 
         * @return builder
         * 
         */
        public Builder supportCredentials(Boolean supportCredentials) {
            return supportCredentials(Output.of(supportCredentials));
        }

        public CorsSettingsArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy