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

com.pulumi.azurenative.web.StaticSiteArgs 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;

import com.pulumi.azurenative.web.enums.EnterpriseGradeCdnStatus;
import com.pulumi.azurenative.web.enums.StagingEnvironmentPolicy;
import com.pulumi.azurenative.web.inputs.ManagedServiceIdentityArgs;
import com.pulumi.azurenative.web.inputs.SkuDescriptionArgs;
import com.pulumi.azurenative.web.inputs.StaticSiteBuildPropertiesArgs;
import com.pulumi.azurenative.web.inputs.StaticSiteTemplateOptionsArgs;
import com.pulumi.core.Either;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final StaticSiteArgs Empty = new StaticSiteArgs();

    /**
     * <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>.
     * 
     */
    @Import(name="allowConfigFileUpdates")
    private @Nullable Output allowConfigFileUpdates;

    /**
     * @return <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>.
     * 
     */
    public Optional> allowConfigFileUpdates() {
        return Optional.ofNullable(this.allowConfigFileUpdates);
    }

    /**
     * The target branch in the repository.
     * 
     */
    @Import(name="branch")
    private @Nullable Output branch;

    /**
     * @return The target branch in the repository.
     * 
     */
    public Optional> branch() {
        return Optional.ofNullable(this.branch);
    }

    /**
     * Build properties to configure on the repository.
     * 
     */
    @Import(name="buildProperties")
    private @Nullable Output buildProperties;

    /**
     * @return Build properties to configure on the repository.
     * 
     */
    public Optional> buildProperties() {
        return Optional.ofNullable(this.buildProperties);
    }

    /**
     * State indicating the status of the enterprise grade CDN serving traffic to the static web app.
     * 
     */
    @Import(name="enterpriseGradeCdnStatus")
    private @Nullable Output> enterpriseGradeCdnStatus;

    /**
     * @return State indicating the status of the enterprise grade CDN serving traffic to the static web app.
     * 
     */
    public Optional>> enterpriseGradeCdnStatus() {
        return Optional.ofNullable(this.enterpriseGradeCdnStatus);
    }

    /**
     * Managed service identity.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return Managed service identity.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * Kind of resource.
     * 
     */
    @Import(name="kind")
    private @Nullable Output kind;

    /**
     * @return Kind of resource.
     * 
     */
    public Optional> kind() {
        return Optional.ofNullable(this.kind);
    }

    /**
     * Resource Location.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Resource Location.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Name of the static site to create or update.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the static site to create or update.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The provider that submitted the last deployment to the primary environment of the static site.
     * 
     */
    @Import(name="provider")
    private @Nullable Output provider;

    /**
     * @return The provider that submitted the last deployment to the primary environment of the static site.
     * 
     */
    public Optional> provider() {
        return Optional.ofNullable(this.provider);
    }

    /**
     * State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string.
     * 
     */
    @Import(name="publicNetworkAccess")
    private @Nullable Output publicNetworkAccess;

    /**
     * @return State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string.
     * 
     */
    public Optional> publicNetworkAccess() {
        return Optional.ofNullable(this.publicNetworkAccess);
    }

    /**
     * A user's github repository token. This is used to setup the Github Actions workflow file and API secrets.
     * 
     */
    @Import(name="repositoryToken")
    private @Nullable Output repositoryToken;

    /**
     * @return A user's github repository token. This is used to setup the Github Actions workflow file and API secrets.
     * 
     */
    public Optional> repositoryToken() {
        return Optional.ofNullable(this.repositoryToken);
    }

    /**
     * URL for the repository of the static site.
     * 
     */
    @Import(name="repositoryUrl")
    private @Nullable Output repositoryUrl;

    /**
     * @return URL for the repository of the static site.
     * 
     */
    public Optional> repositoryUrl() {
        return Optional.ofNullable(this.repositoryUrl);
    }

    /**
     * Name of the resource group to which the resource belongs.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return Name of the resource group to which the resource belongs.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Description of a SKU for a scalable resource.
     * 
     */
    @Import(name="sku")
    private @Nullable Output sku;

    /**
     * @return Description of a SKU for a scalable resource.
     * 
     */
    public Optional> sku() {
        return Optional.ofNullable(this.sku);
    }

    /**
     * State indicating whether staging environments are allowed or not allowed for a static web app.
     * 
     */
    @Import(name="stagingEnvironmentPolicy")
    private @Nullable Output stagingEnvironmentPolicy;

    /**
     * @return State indicating whether staging environments are allowed or not allowed for a static web app.
     * 
     */
    public Optional> stagingEnvironmentPolicy() {
        return Optional.ofNullable(this.stagingEnvironmentPolicy);
    }

    /**
     * Resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Template options for generating a new repository.
     * 
     */
    @Import(name="templateProperties")
    private @Nullable Output templateProperties;

    /**
     * @return Template options for generating a new repository.
     * 
     */
    public Optional> templateProperties() {
        return Optional.ofNullable(this.templateProperties);
    }

    private StaticSiteArgs() {}

    private StaticSiteArgs(StaticSiteArgs $) {
        this.allowConfigFileUpdates = $.allowConfigFileUpdates;
        this.branch = $.branch;
        this.buildProperties = $.buildProperties;
        this.enterpriseGradeCdnStatus = $.enterpriseGradeCdnStatus;
        this.identity = $.identity;
        this.kind = $.kind;
        this.location = $.location;
        this.name = $.name;
        this.provider = $.provider;
        this.publicNetworkAccess = $.publicNetworkAccess;
        this.repositoryToken = $.repositoryToken;
        this.repositoryUrl = $.repositoryUrl;
        this.resourceGroupName = $.resourceGroupName;
        this.sku = $.sku;
        this.stagingEnvironmentPolicy = $.stagingEnvironmentPolicy;
        this.tags = $.tags;
        this.templateProperties = $.templateProperties;
    }

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

    public static final class Builder {
        private StaticSiteArgs $;

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

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

        /**
         * @param allowConfigFileUpdates <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>.
         * 
         * @return builder
         * 
         */
        public Builder allowConfigFileUpdates(@Nullable Output allowConfigFileUpdates) {
            $.allowConfigFileUpdates = allowConfigFileUpdates;
            return this;
        }

        /**
         * @param allowConfigFileUpdates <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>.
         * 
         * @return builder
         * 
         */
        public Builder allowConfigFileUpdates(Boolean allowConfigFileUpdates) {
            return allowConfigFileUpdates(Output.of(allowConfigFileUpdates));
        }

        /**
         * @param branch The target branch in the repository.
         * 
         * @return builder
         * 
         */
        public Builder branch(@Nullable Output branch) {
            $.branch = branch;
            return this;
        }

        /**
         * @param branch The target branch in the repository.
         * 
         * @return builder
         * 
         */
        public Builder branch(String branch) {
            return branch(Output.of(branch));
        }

        /**
         * @param buildProperties Build properties to configure on the repository.
         * 
         * @return builder
         * 
         */
        public Builder buildProperties(@Nullable Output buildProperties) {
            $.buildProperties = buildProperties;
            return this;
        }

        /**
         * @param buildProperties Build properties to configure on the repository.
         * 
         * @return builder
         * 
         */
        public Builder buildProperties(StaticSiteBuildPropertiesArgs buildProperties) {
            return buildProperties(Output.of(buildProperties));
        }

        /**
         * @param enterpriseGradeCdnStatus State indicating the status of the enterprise grade CDN serving traffic to the static web app.
         * 
         * @return builder
         * 
         */
        public Builder enterpriseGradeCdnStatus(@Nullable Output> enterpriseGradeCdnStatus) {
            $.enterpriseGradeCdnStatus = enterpriseGradeCdnStatus;
            return this;
        }

        /**
         * @param enterpriseGradeCdnStatus State indicating the status of the enterprise grade CDN serving traffic to the static web app.
         * 
         * @return builder
         * 
         */
        public Builder enterpriseGradeCdnStatus(Either enterpriseGradeCdnStatus) {
            return enterpriseGradeCdnStatus(Output.of(enterpriseGradeCdnStatus));
        }

        /**
         * @param enterpriseGradeCdnStatus State indicating the status of the enterprise grade CDN serving traffic to the static web app.
         * 
         * @return builder
         * 
         */
        public Builder enterpriseGradeCdnStatus(String enterpriseGradeCdnStatus) {
            return enterpriseGradeCdnStatus(Either.ofLeft(enterpriseGradeCdnStatus));
        }

        /**
         * @param enterpriseGradeCdnStatus State indicating the status of the enterprise grade CDN serving traffic to the static web app.
         * 
         * @return builder
         * 
         */
        public Builder enterpriseGradeCdnStatus(EnterpriseGradeCdnStatus enterpriseGradeCdnStatus) {
            return enterpriseGradeCdnStatus(Either.ofRight(enterpriseGradeCdnStatus));
        }

        /**
         * @param identity Managed service identity.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity Managed service identity.
         * 
         * @return builder
         * 
         */
        public Builder identity(ManagedServiceIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param kind Kind of resource.
         * 
         * @return builder
         * 
         */
        public Builder kind(@Nullable Output kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind Kind of resource.
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Output.of(kind));
        }

        /**
         * @param location Resource Location.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Resource Location.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name Name of the static site to create or update.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the static site to create or update.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param provider The provider that submitted the last deployment to the primary environment of the static site.
         * 
         * @return builder
         * 
         */
        public Builder provider(@Nullable Output provider) {
            $.provider = provider;
            return this;
        }

        /**
         * @param provider The provider that submitted the last deployment to the primary environment of the static site.
         * 
         * @return builder
         * 
         */
        public Builder provider(String provider) {
            return provider(Output.of(provider));
        }

        /**
         * @param publicNetworkAccess State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(@Nullable Output publicNetworkAccess) {
            $.publicNetworkAccess = publicNetworkAccess;
            return this;
        }

        /**
         * @param publicNetworkAccess State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string.
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(String publicNetworkAccess) {
            return publicNetworkAccess(Output.of(publicNetworkAccess));
        }

        /**
         * @param repositoryToken A user's github repository token. This is used to setup the Github Actions workflow file and API secrets.
         * 
         * @return builder
         * 
         */
        public Builder repositoryToken(@Nullable Output repositoryToken) {
            $.repositoryToken = repositoryToken;
            return this;
        }

        /**
         * @param repositoryToken A user's github repository token. This is used to setup the Github Actions workflow file and API secrets.
         * 
         * @return builder
         * 
         */
        public Builder repositoryToken(String repositoryToken) {
            return repositoryToken(Output.of(repositoryToken));
        }

        /**
         * @param repositoryUrl URL for the repository of the static site.
         * 
         * @return builder
         * 
         */
        public Builder repositoryUrl(@Nullable Output repositoryUrl) {
            $.repositoryUrl = repositoryUrl;
            return this;
        }

        /**
         * @param repositoryUrl URL for the repository of the static site.
         * 
         * @return builder
         * 
         */
        public Builder repositoryUrl(String repositoryUrl) {
            return repositoryUrl(Output.of(repositoryUrl));
        }

        /**
         * @param resourceGroupName Name of the resource group to which the resource belongs.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName Name of the resource group to which the resource belongs.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param sku Description of a SKU for a scalable resource.
         * 
         * @return builder
         * 
         */
        public Builder sku(@Nullable Output sku) {
            $.sku = sku;
            return this;
        }

        /**
         * @param sku Description of a SKU for a scalable resource.
         * 
         * @return builder
         * 
         */
        public Builder sku(SkuDescriptionArgs sku) {
            return sku(Output.of(sku));
        }

        /**
         * @param stagingEnvironmentPolicy State indicating whether staging environments are allowed or not allowed for a static web app.
         * 
         * @return builder
         * 
         */
        public Builder stagingEnvironmentPolicy(@Nullable Output stagingEnvironmentPolicy) {
            $.stagingEnvironmentPolicy = stagingEnvironmentPolicy;
            return this;
        }

        /**
         * @param stagingEnvironmentPolicy State indicating whether staging environments are allowed or not allowed for a static web app.
         * 
         * @return builder
         * 
         */
        public Builder stagingEnvironmentPolicy(StagingEnvironmentPolicy stagingEnvironmentPolicy) {
            return stagingEnvironmentPolicy(Output.of(stagingEnvironmentPolicy));
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param templateProperties Template options for generating a new repository.
         * 
         * @return builder
         * 
         */
        public Builder templateProperties(@Nullable Output templateProperties) {
            $.templateProperties = templateProperties;
            return this;
        }

        /**
         * @param templateProperties Template options for generating a new repository.
         * 
         * @return builder
         * 
         */
        public Builder templateProperties(StaticSiteTemplateOptionsArgs templateProperties) {
            return templateProperties(Output.of(templateProperties));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy