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

com.pulumi.azure.appservice.inputs.AppServiceSiteConfigCorsArgs 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.appservice.inputs;

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


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

    public static final AppServiceSiteConfigCorsArgs Empty = new AppServiceSiteConfigCorsArgs();

    /**
     * A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
     * 
     */
    @Import(name="allowedOrigins", required=true)
    private Output> allowedOrigins;

    /**
     * @return A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
     * 
     */
    public Output> allowedOrigins() {
        return this.allowedOrigins;
    }

    /**
     * Are credentials supported?
     * 
     */
    @Import(name="supportCredentials")
    private @Nullable Output supportCredentials;

    /**
     * @return Are credentials supported?
     * 
     */
    public Optional> supportCredentials() {
        return Optional.ofNullable(this.supportCredentials);
    }

    private AppServiceSiteConfigCorsArgs() {}

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

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

    public static final class Builder {
        private AppServiceSiteConfigCorsArgs $;

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

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

        /**
         * @param allowedOrigins A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
         * 
         * @return builder
         * 
         */
        public Builder allowedOrigins(Output> allowedOrigins) {
            $.allowedOrigins = allowedOrigins;
            return this;
        }

        /**
         * @param allowedOrigins A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
         * 
         * @return builder
         * 
         */
        public Builder allowedOrigins(List allowedOrigins) {
            return allowedOrigins(Output.of(allowedOrigins));
        }

        /**
         * @param allowedOrigins A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
         * 
         * @return builder
         * 
         */
        public Builder allowedOrigins(String... allowedOrigins) {
            return allowedOrigins(List.of(allowedOrigins));
        }

        /**
         * @param supportCredentials Are credentials supported?
         * 
         * @return builder
         * 
         */
        public Builder supportCredentials(@Nullable Output supportCredentials) {
            $.supportCredentials = supportCredentials;
            return this;
        }

        /**
         * @param supportCredentials Are credentials supported?
         * 
         * @return builder
         * 
         */
        public Builder supportCredentials(Boolean supportCredentials) {
            return supportCredentials(Output.of(supportCredentials));
        }

        public AppServiceSiteConfigCorsArgs build() {
            if ($.allowedOrigins == null) {
                throw new MissingRequiredPropertyException("AppServiceSiteConfigCorsArgs", "allowedOrigins");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy