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

com.pulumi.azure.appservice.SlotArgs Maven / Gradle / Ivy

// *** 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;

import com.pulumi.azure.appservice.inputs.SlotAuthSettingsArgs;
import com.pulumi.azure.appservice.inputs.SlotConnectionStringArgs;
import com.pulumi.azure.appservice.inputs.SlotIdentityArgs;
import com.pulumi.azure.appservice.inputs.SlotLogsArgs;
import com.pulumi.azure.appservice.inputs.SlotSiteConfigArgs;
import com.pulumi.azure.appservice.inputs.SlotStorageAccountArgs;
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.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SlotArgs Empty = new SlotArgs();

    /**
     * The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="appServiceName", required=true)
    private Output appServiceName;

    /**
     * @return The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created.
     * 
     */
    public Output appServiceName() {
        return this.appServiceName;
    }

    /**
     * The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="appServicePlanId", required=true)
    private Output appServicePlanId;

    /**
     * @return The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created.
     * 
     */
    public Output appServicePlanId() {
        return this.appServicePlanId;
    }

    /**
     * A key-value pair of App Settings.
     * 
     */
    @Import(name="appSettings")
    private @Nullable Output> appSettings;

    /**
     * @return A key-value pair of App Settings.
     * 
     */
    public Optional>> appSettings() {
        return Optional.ofNullable(this.appSettings);
    }

    /**
     * A `auth_settings` block as defined below.
     * 
     */
    @Import(name="authSettings")
    private @Nullable Output authSettings;

    /**
     * @return A `auth_settings` block as defined below.
     * 
     */
    public Optional> authSettings() {
        return Optional.ofNullable(this.authSettings);
    }

    /**
     * Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance?
     * 
     */
    @Import(name="clientAffinityEnabled")
    private @Nullable Output clientAffinityEnabled;

    /**
     * @return Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance?
     * 
     */
    public Optional> clientAffinityEnabled() {
        return Optional.ofNullable(this.clientAffinityEnabled);
    }

    /**
     * An `connection_string` block as defined below.
     * 
     */
    @Import(name="connectionStrings")
    private @Nullable Output> connectionStrings;

    /**
     * @return An `connection_string` block as defined below.
     * 
     */
    public Optional>> connectionStrings() {
        return Optional.ofNullable(this.connectionStrings);
    }

    /**
     * Is the App Service Slot Enabled? Defaults to `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Is the App Service Slot Enabled? Defaults to `true`.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * Can the App Service Slot only be accessed via HTTPS? Defaults to `false`.
     * 
     */
    @Import(name="httpsOnly")
    private @Nullable Output httpsOnly;

    /**
     * @return Can the App Service Slot only be accessed via HTTPS? Defaults to `false`.
     * 
     */
    public Optional> httpsOnly() {
        return Optional.ofNullable(this.httpsOnly);
    }

    /**
     * An `identity` block as defined below.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return An `identity` block as defined below.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * The User Assigned Identity Id used for looking up KeyVault secrets. The identity must be assigned to the application. See [Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) for more information.
     * 
     */
    @Import(name="keyVaultReferenceIdentityId")
    private @Nullable Output keyVaultReferenceIdentityId;

    /**
     * @return The User Assigned Identity Id used for looking up KeyVault secrets. The identity must be assigned to the application. See [Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) for more information.
     * 
     */
    public Optional> keyVaultReferenceIdentityId() {
        return Optional.ofNullable(this.keyVaultReferenceIdentityId);
    }

    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * A `logs` block as defined below.
     * 
     */
    @Import(name="logs")
    private @Nullable Output logs;

    /**
     * @return A `logs` block as defined below.
     * 
     */
    public Optional> logs() {
        return Optional.ofNullable(this.logs);
    }

    /**
     * Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The name of the resource group in which to create the App Service Slot component. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group in which to create the App Service Slot component. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * A `site_config` object as defined below.
     * 
     */
    @Import(name="siteConfig")
    private @Nullable Output siteConfig;

    /**
     * @return A `site_config` object as defined below.
     * 
     */
    public Optional> siteConfig() {
        return Optional.ofNullable(this.siteConfig);
    }

    /**
     * One or more `storage_account` blocks as defined below.
     * 
     */
    @Import(name="storageAccounts")
    private @Nullable Output> storageAccounts;

    /**
     * @return One or more `storage_account` blocks as defined below.
     * 
     */
    public Optional>> storageAccounts() {
        return Optional.ofNullable(this.storageAccounts);
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private SlotArgs() {}

    private SlotArgs(SlotArgs $) {
        this.appServiceName = $.appServiceName;
        this.appServicePlanId = $.appServicePlanId;
        this.appSettings = $.appSettings;
        this.authSettings = $.authSettings;
        this.clientAffinityEnabled = $.clientAffinityEnabled;
        this.connectionStrings = $.connectionStrings;
        this.enabled = $.enabled;
        this.httpsOnly = $.httpsOnly;
        this.identity = $.identity;
        this.keyVaultReferenceIdentityId = $.keyVaultReferenceIdentityId;
        this.location = $.location;
        this.logs = $.logs;
        this.name = $.name;
        this.resourceGroupName = $.resourceGroupName;
        this.siteConfig = $.siteConfig;
        this.storageAccounts = $.storageAccounts;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private SlotArgs $;

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

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

        /**
         * @param appServiceName The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder appServiceName(Output appServiceName) {
            $.appServiceName = appServiceName;
            return this;
        }

        /**
         * @param appServiceName The name of the App Service within which to create the App Service Slot. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder appServiceName(String appServiceName) {
            return appServiceName(Output.of(appServiceName));
        }

        /**
         * @param appServicePlanId The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder appServicePlanId(Output appServicePlanId) {
            $.appServicePlanId = appServicePlanId;
            return this;
        }

        /**
         * @param appServicePlanId The ID of the App Service Plan within which to create this App Service Slot. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder appServicePlanId(String appServicePlanId) {
            return appServicePlanId(Output.of(appServicePlanId));
        }

        /**
         * @param appSettings A key-value pair of App Settings.
         * 
         * @return builder
         * 
         */
        public Builder appSettings(@Nullable Output> appSettings) {
            $.appSettings = appSettings;
            return this;
        }

        /**
         * @param appSettings A key-value pair of App Settings.
         * 
         * @return builder
         * 
         */
        public Builder appSettings(Map appSettings) {
            return appSettings(Output.of(appSettings));
        }

        /**
         * @param authSettings A `auth_settings` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder authSettings(@Nullable Output authSettings) {
            $.authSettings = authSettings;
            return this;
        }

        /**
         * @param authSettings A `auth_settings` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder authSettings(SlotAuthSettingsArgs authSettings) {
            return authSettings(Output.of(authSettings));
        }

        /**
         * @param clientAffinityEnabled Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance?
         * 
         * @return builder
         * 
         */
        public Builder clientAffinityEnabled(@Nullable Output clientAffinityEnabled) {
            $.clientAffinityEnabled = clientAffinityEnabled;
            return this;
        }

        /**
         * @param clientAffinityEnabled Should the App Service Slot send session affinity cookies, which route client requests in the same session to the same instance?
         * 
         * @return builder
         * 
         */
        public Builder clientAffinityEnabled(Boolean clientAffinityEnabled) {
            return clientAffinityEnabled(Output.of(clientAffinityEnabled));
        }

        /**
         * @param connectionStrings An `connection_string` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder connectionStrings(@Nullable Output> connectionStrings) {
            $.connectionStrings = connectionStrings;
            return this;
        }

        /**
         * @param connectionStrings An `connection_string` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder connectionStrings(List connectionStrings) {
            return connectionStrings(Output.of(connectionStrings));
        }

        /**
         * @param connectionStrings An `connection_string` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder connectionStrings(SlotConnectionStringArgs... connectionStrings) {
            return connectionStrings(List.of(connectionStrings));
        }

        /**
         * @param enabled Is the App Service Slot Enabled? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Is the App Service Slot Enabled? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param httpsOnly Can the App Service Slot only be accessed via HTTPS? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder httpsOnly(@Nullable Output httpsOnly) {
            $.httpsOnly = httpsOnly;
            return this;
        }

        /**
         * @param httpsOnly Can the App Service Slot only be accessed via HTTPS? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder httpsOnly(Boolean httpsOnly) {
            return httpsOnly(Output.of(httpsOnly));
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity An `identity` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder identity(SlotIdentityArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param keyVaultReferenceIdentityId The User Assigned Identity Id used for looking up KeyVault secrets. The identity must be assigned to the application. See [Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) for more information.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultReferenceIdentityId(@Nullable Output keyVaultReferenceIdentityId) {
            $.keyVaultReferenceIdentityId = keyVaultReferenceIdentityId;
            return this;
        }

        /**
         * @param keyVaultReferenceIdentityId The User Assigned Identity Id used for looking up KeyVault secrets. The identity must be assigned to the application. See [Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) for more information.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultReferenceIdentityId(String keyVaultReferenceIdentityId) {
            return keyVaultReferenceIdentityId(Output.of(keyVaultReferenceIdentityId));
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param logs A `logs` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder logs(@Nullable Output logs) {
            $.logs = logs;
            return this;
        }

        /**
         * @param logs A `logs` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder logs(SlotLogsArgs logs) {
            return logs(Output.of(logs));
        }

        /**
         * @param name Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the App Service Slot component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the App Service Slot component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the App Service Slot component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param siteConfig A `site_config` object as defined below.
         * 
         * @return builder
         * 
         */
        public Builder siteConfig(@Nullable Output siteConfig) {
            $.siteConfig = siteConfig;
            return this;
        }

        /**
         * @param siteConfig A `site_config` object as defined below.
         * 
         * @return builder
         * 
         */
        public Builder siteConfig(SlotSiteConfigArgs siteConfig) {
            return siteConfig(Output.of(siteConfig));
        }

        /**
         * @param storageAccounts One or more `storage_account` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder storageAccounts(@Nullable Output> storageAccounts) {
            $.storageAccounts = storageAccounts;
            return this;
        }

        /**
         * @param storageAccounts One or more `storage_account` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder storageAccounts(List storageAccounts) {
            return storageAccounts(Output.of(storageAccounts));
        }

        /**
         * @param storageAccounts One or more `storage_account` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder storageAccounts(SlotStorageAccountArgs... storageAccounts) {
            return storageAccounts(List.of(storageAccounts));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy