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

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

import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PlanState Empty = new PlanState();

    /**
     * The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
     * 
     * > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2).
     * 
     */
    @Import(name="appServiceEnvironmentId")
    private @Nullable Output appServiceEnvironmentId;

    /**
     * @return The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
     * 
     * > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2).
     * 
     */
    public Optional> appServiceEnvironmentId() {
        return Optional.ofNullable(this.appServiceEnvironmentId);
    }

    /**
     * Whether to create a xenon App Service Plan.
     * 
     */
    @Import(name="isXenon")
    private @Nullable Output isXenon;

    /**
     * @return Whether to create a xenon App Service Plan.
     * 
     */
    public Optional> isXenon() {
        return Optional.ofNullable(this.isXenon);
    }

    /**
     * The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`.
     * 
     */
    @Import(name="kind")
    private @Nullable Output kind;

    /**
     * @return The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`.
     * 
     */
    public Optional> kind() {
        return Optional.ofNullable(this.kind);
    }

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

    /**
     * The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
     * 
     */
    @Import(name="maximumElasticWorkerCount")
    private @Nullable Output maximumElasticWorkerCount;

    /**
     * @return The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
     * 
     */
    public Optional> maximumElasticWorkerCount() {
        return Optional.ofNullable(this.maximumElasticWorkerCount);
    }

    /**
     * The maximum number of workers supported with the App Service Plan's sku.
     * 
     */
    @Import(name="maximumNumberOfWorkers")
    private @Nullable Output maximumNumberOfWorkers;

    /**
     * @return The maximum number of workers supported with the App Service Plan's sku.
     * 
     */
    public Optional> maximumNumberOfWorkers() {
        return Optional.ofNullable(this.maximumNumberOfWorkers);
    }

    /**
     * Specifies the name of the App Service Plan 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 Plan component. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan.
     * 
     */
    @Import(name="perSiteScaling")
    private @Nullable Output perSiteScaling;

    /**
     * @return Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan.
     * 
     */
    public Optional> perSiteScaling() {
        return Optional.ofNullable(this.perSiteScaling);
    }

    /**
     * Is this App Service Plan `Reserved`.
     * 
     */
    @Import(name="reserved")
    private @Nullable Output reserved;

    /**
     * @return Is this App Service Plan `Reserved`.
     * 
     */
    public Optional> reserved() {
        return Optional.ofNullable(this.reserved);
    }

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

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

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

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

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

    /**
     * Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html).
     * 
     */
    @Import(name="zoneRedundant")
    private @Nullable Output zoneRedundant;

    /**
     * @return Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created.
     * 
     * > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html).
     * 
     */
    public Optional> zoneRedundant() {
        return Optional.ofNullable(this.zoneRedundant);
    }

    private PlanState() {}

    private PlanState(PlanState $) {
        this.appServiceEnvironmentId = $.appServiceEnvironmentId;
        this.isXenon = $.isXenon;
        this.kind = $.kind;
        this.location = $.location;
        this.maximumElasticWorkerCount = $.maximumElasticWorkerCount;
        this.maximumNumberOfWorkers = $.maximumNumberOfWorkers;
        this.name = $.name;
        this.perSiteScaling = $.perSiteScaling;
        this.reserved = $.reserved;
        this.resourceGroupName = $.resourceGroupName;
        this.sku = $.sku;
        this.tags = $.tags;
        this.zoneRedundant = $.zoneRedundant;
    }

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

    public static final class Builder {
        private PlanState $;

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

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

        /**
         * @param appServiceEnvironmentId The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
         * 
         * > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2).
         * 
         * @return builder
         * 
         */
        public Builder appServiceEnvironmentId(@Nullable Output appServiceEnvironmentId) {
            $.appServiceEnvironmentId = appServiceEnvironmentId;
            return this;
        }

        /**
         * @param appServiceEnvironmentId The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
         * 
         * > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2).
         * 
         * @return builder
         * 
         */
        public Builder appServiceEnvironmentId(String appServiceEnvironmentId) {
            return appServiceEnvironmentId(Output.of(appServiceEnvironmentId));
        }

        /**
         * @param isXenon Whether to create a xenon App Service Plan.
         * 
         * @return builder
         * 
         */
        public Builder isXenon(@Nullable Output isXenon) {
            $.isXenon = isXenon;
            return this;
        }

        /**
         * @param isXenon Whether to create a xenon App Service Plan.
         * 
         * @return builder
         * 
         */
        public Builder isXenon(Boolean isXenon) {
            return isXenon(Output.of(isXenon));
        }

        /**
         * @param kind The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`.
         * 
         * @return builder
         * 
         */
        public Builder kind(@Nullable Output kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`.
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Output.of(kind));
        }

        /**
         * @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 maximumElasticWorkerCount The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
         * 
         * @return builder
         * 
         */
        public Builder maximumElasticWorkerCount(@Nullable Output maximumElasticWorkerCount) {
            $.maximumElasticWorkerCount = maximumElasticWorkerCount;
            return this;
        }

        /**
         * @param maximumElasticWorkerCount The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
         * 
         * @return builder
         * 
         */
        public Builder maximumElasticWorkerCount(Integer maximumElasticWorkerCount) {
            return maximumElasticWorkerCount(Output.of(maximumElasticWorkerCount));
        }

        /**
         * @param maximumNumberOfWorkers The maximum number of workers supported with the App Service Plan's sku.
         * 
         * @return builder
         * 
         */
        public Builder maximumNumberOfWorkers(@Nullable Output maximumNumberOfWorkers) {
            $.maximumNumberOfWorkers = maximumNumberOfWorkers;
            return this;
        }

        /**
         * @param maximumNumberOfWorkers The maximum number of workers supported with the App Service Plan's sku.
         * 
         * @return builder
         * 
         */
        public Builder maximumNumberOfWorkers(Integer maximumNumberOfWorkers) {
            return maximumNumberOfWorkers(Output.of(maximumNumberOfWorkers));
        }

        /**
         * @param name Specifies the name of the App Service Plan 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 Plan component. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param perSiteScaling Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan.
         * 
         * @return builder
         * 
         */
        public Builder perSiteScaling(@Nullable Output perSiteScaling) {
            $.perSiteScaling = perSiteScaling;
            return this;
        }

        /**
         * @param perSiteScaling Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan.
         * 
         * @return builder
         * 
         */
        public Builder perSiteScaling(Boolean perSiteScaling) {
            return perSiteScaling(Output.of(perSiteScaling));
        }

        /**
         * @param reserved Is this App Service Plan `Reserved`.
         * 
         * @return builder
         * 
         */
        public Builder reserved(@Nullable Output reserved) {
            $.reserved = reserved;
            return this;
        }

        /**
         * @param reserved Is this App Service Plan `Reserved`.
         * 
         * @return builder
         * 
         */
        public Builder reserved(Boolean reserved) {
            return reserved(Output.of(reserved));
        }

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

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

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

        /**
         * @param sku A `sku` block as documented below.
         * 
         * @return builder
         * 
         */
        public Builder sku(PlanSkuArgs sku) {
            return sku(Output.of(sku));
        }

        /**
         * @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));
        }

        /**
         * @param zoneRedundant Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html).
         * 
         * @return builder
         * 
         */
        public Builder zoneRedundant(@Nullable Output zoneRedundant) {
            $.zoneRedundant = zoneRedundant;
            return this;
        }

        /**
         * @param zoneRedundant Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created.
         * 
         * > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html).
         * 
         * @return builder
         * 
         */
        public Builder zoneRedundant(Boolean zoneRedundant) {
            return zoneRedundant(Output.of(zoneRedundant));
        }

        public PlanState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy