Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Azure Native

v1.41.0 published on Wednesday, Oct 20, 2021 by Pulumi

AppServicePlan

App Service plan. API Version: 2020-12-01.

Example Usage

Create Or Update App Service plan

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var appServicePlan = new AzureNative.Web.AppServicePlan("appServicePlan", new AzureNative.Web.AppServicePlanArgs
        {
            Kind = "app",
            Location = "East US",
            Name = "testsf6141",
            ResourceGroupName = "testrg123",
            Sku = new AzureNative.Web.Inputs.SkuDescriptionArgs
            {
                Capacity = 1,
                Family = "P",
                Name = "P1",
                Size = "P1",
                Tier = "Premium",
            },
        });
    }

}

package main

import (
	web "github.com/pulumi/pulumi-azure-native/sdk/go/azure/web"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := web.NewAppServicePlan(ctx, "appServicePlan", &web.AppServicePlanArgs{
			Kind:              pulumi.String("app"),
			Location:          pulumi.String("East US"),
			Name:              pulumi.String("testsf6141"),
			ResourceGroupName: pulumi.String("testrg123"),
			Sku: &web.SkuDescriptionArgs{
				Capacity: pulumi.Int(1),
				Family:   pulumi.String("P"),
				Name:     pulumi.String("P1"),
				Size:     pulumi.String("P1"),
				Tier:     pulumi.String("Premium"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

import pulumi
import pulumi_azure_native as azure_native

app_service_plan = azure_native.web.AppServicePlan("appServicePlan",
    kind="app",
    location="East US",
    name="testsf6141",
    resource_group_name="testrg123",
    sku=azure_native.web.SkuDescriptionArgs(
        capacity=1,
        family="P",
        name="P1",
        size="P1",
        tier="Premium",
    ))

import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const appServicePlan = new azure_native.web.AppServicePlan("appServicePlan", {
    kind: "app",
    location: "East US",
    name: "testsf6141",
    resourceGroupName: "testrg123",
    sku: {
        capacity: 1,
        family: "P",
        name: "P1",
        size: "P1",
        tier: "Premium",
    },
});

Create a AppServicePlan Resource

new AppServicePlan(name: string, args: AppServicePlanArgs, opts?: CustomResourceOptions);
@overload
def AppServicePlan(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   free_offer_expiration_time: Optional[str] = None,
                   hosting_environment_profile: Optional[HostingEnvironmentProfileArgs] = None,
                   hyper_v: Optional[bool] = None,
                   is_spot: Optional[bool] = None,
                   is_xenon: Optional[bool] = None,
                   kind: Optional[str] = None,
                   kube_environment_profile: Optional[KubeEnvironmentProfileArgs] = None,
                   location: Optional[str] = None,
                   maximum_elastic_worker_count: Optional[int] = None,
                   name: Optional[str] = None,
                   per_site_scaling: Optional[bool] = None,
                   reserved: Optional[bool] = None,
                   resource_group_name: Optional[str] = None,
                   sku: Optional[SkuDescriptionArgs] = None,
                   spot_expiration_time: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   target_worker_count: Optional[int] = None,
                   target_worker_size_id: Optional[int] = None,
                   worker_tier_name: Optional[str] = None)
@overload
def AppServicePlan(resource_name: str,
                   args: AppServicePlanArgs,
                   opts: Optional[ResourceOptions] = None)
func NewAppServicePlan(ctx *Context, name string, args AppServicePlanArgs, opts ...ResourceOption) (*AppServicePlan, error)
public AppServicePlan(string name, AppServicePlanArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppServicePlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AppServicePlanArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AppServicePlanArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppServicePlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AppServicePlan Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AppServicePlan resource accepts the following input properties:

ResourceGroupName string
Name of the resource group to which the resource belongs.
FreeOfferExpirationTime string
The time when the server farm free offer expires.
HostingEnvironmentProfile Pulumi.AzureNative.Web.Inputs.HostingEnvironmentProfileArgs
Specification for the App Service Environment to use for the App Service plan.
HyperV bool
If Hyper-V container app service plan true, false otherwise.
IsSpot bool
If true, this App Service Plan owns spot instances.
IsXenon bool
Obsolete: If Hyper-V container app service plan true, false otherwise.
Kind string
Kind of resource.
KubeEnvironmentProfile Pulumi.AzureNative.Web.Inputs.KubeEnvironmentProfileArgs
Specification for the Kubernetes Environment to use for the App Service plan.
Location string
Resource Location.
MaximumElasticWorkerCount int
Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan
Name string
Name of the App Service plan.
PerSiteScaling bool
If true, apps assigned to this App Service plan can be scaled independently. If false, apps assigned to this App Service plan will scale to all instances of the plan.
Reserved bool
If Linux app service plan true, false otherwise.
Sku Pulumi.AzureNative.Web.Inputs.SkuDescriptionArgs
Description of a SKU for a scalable resource.
SpotExpirationTime string
The time when the server farm expires. Valid only if it is a spot server farm.
Tags Dictionary<string, string>
Resource tags.
TargetWorkerCount int
Scaling worker count.
TargetWorkerSizeId int
Scaling worker size ID.
WorkerTierName string
Target worker tier assigned to the App Service plan.
ResourceGroupName string
Name of the resource group to which the resource belongs.
FreeOfferExpirationTime string
The time when the server farm free offer expires.
HostingEnvironmentProfile HostingEnvironmentProfileArgs
Specification for the App Service Environment to use for the App Service plan.
HyperV bool
If Hyper-V container app service plan true, false otherwise.
IsSpot bool
If true, this App Service Plan owns spot instances.
IsXenon bool
Obsolete: If Hyper-V container app service plan true, false otherwise.
Kind string
Kind of resource.
KubeEnvironmentProfile KubeEnvironmentProfileArgs
Specification for the Kubernetes Environment to use for the App Service plan.
Location string
Resource Location.
MaximumElasticWorkerCount int
Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan
Name string
Name of the App Service plan.
PerSiteScaling bool
If true, apps assigned to this App Service plan can be scaled independently. If false, apps assigned to this App Service plan will scale to all instances of the plan.
Reserved bool
If Linux app service plan true, false otherwise.
Sku SkuDescriptionArgs
Description of a SKU for a scalable resource.
SpotExpirationTime string
The time when the server farm expires. Valid only if it is a spot server farm.
Tags map[string]string
Resource tags.
TargetWorkerCount int
Scaling worker count.
TargetWorkerSizeId int
Scaling worker size ID.
WorkerTierName string
Target worker tier assigned to the App Service plan.
resourceGroupName string
Name of the resource group to which the resource belongs.
freeOfferExpirationTime string
The time when the server farm free offer expires.
hostingEnvironmentProfile HostingEnvironmentProfileArgs
Specification for the App Service Environment to use for the App Service plan.
hyperV boolean
If Hyper-V container app service plan true, false otherwise.
isSpot boolean
If true, this App Service Plan owns spot instances.
isXenon boolean
Obsolete: If Hyper-V container app service plan true, false otherwise.
kind string
Kind of resource.
kubeEnvironmentProfile KubeEnvironmentProfileArgs
Specification for the Kubernetes Environment to use for the App Service plan.
location string
Resource Location.
maximumElasticWorkerCount number
Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan
name string
Name of the App Service plan.
perSiteScaling boolean
If true, apps assigned to this App Service plan can be scaled independently. If false, apps assigned to this App Service plan will scale to all instances of the plan.
reserved boolean
If Linux app service plan true, false otherwise.
sku SkuDescriptionArgs
Description of a SKU for a scalable resource.
spotExpirationTime string
The time when the server farm expires. Valid only if it is a spot server farm.
tags {[key: string]: string}
Resource tags.
targetWorkerCount number
Scaling worker count.
targetWorkerSizeId number
Scaling worker size ID.
workerTierName string
Target worker tier assigned to the App Service plan.
resource_group_name str
Name of the resource group to which the resource belongs.
free_offer_expiration_time str
The time when the server farm free offer expires.
hosting_environment_profile HostingEnvironmentProfileArgs
Specification for the App Service Environment to use for the App Service plan.
hyper_v bool
If Hyper-V container app service plan true, false otherwise.
is_spot bool
If true, this App Service Plan owns spot instances.
is_xenon bool
Obsolete: If Hyper-V container app service plan true, false otherwise.
kind str
Kind of resource.
kube_environment_profile KubeEnvironmentProfileArgs
Specification for the Kubernetes Environment to use for the App Service plan.
location str
Resource Location.
maximum_elastic_worker_count int
Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan
name str
Name of the App Service plan.
per_site_scaling bool
If true, apps assigned to this App Service plan can be scaled independently. If false, apps assigned to this App Service plan will scale to all instances of the plan.
reserved bool
If Linux app service plan true, false otherwise.
sku SkuDescriptionArgs
Description of a SKU for a scalable resource.
spot_expiration_time str
The time when the server farm expires. Valid only if it is a spot server farm.
tags Mapping[str, str]
Resource tags.
target_worker_count int
Scaling worker count.
target_worker_size_id int
Scaling worker size ID.
worker_tier_name str
Target worker tier assigned to the App Service plan.

Outputs

All input properties are implicitly available as output properties. Additionally, the AppServicePlan resource produces the following output properties:

GeoRegion string
Geographical location for the App Service plan.
Id string
The provider-assigned unique ID for this managed resource.
MaximumNumberOfWorkers int
Maximum number of instances that can be assigned to this App Service plan.
NumberOfSites int
Number of apps assigned to this App Service plan.
ProvisioningState string
Provisioning state of the App Service Plan.
ResourceGroup string
Resource group of the App Service plan.
Status string
App Service plan status.
Subscription string
App Service plan subscription.
Type string
Resource type.
GeoRegion string
Geographical location for the App Service plan.
Id string
The provider-assigned unique ID for this managed resource.
MaximumNumberOfWorkers int
Maximum number of instances that can be assigned to this App Service plan.
NumberOfSites int
Number of apps assigned to this App Service plan.
ProvisioningState string
Provisioning state of the App Service Plan.
ResourceGroup string
Resource group of the App Service plan.
Status string
App Service plan status.
Subscription string
App Service plan subscription.
Type string
Resource type.
geoRegion string
Geographical location for the App Service plan.
id string
The provider-assigned unique ID for this managed resource.
maximumNumberOfWorkers number
Maximum number of instances that can be assigned to this App Service plan.
numberOfSites number
Number of apps assigned to this App Service plan.
provisioningState string
Provisioning state of the App Service Plan.
resourceGroup string
Resource group of the App Service plan.
status string
App Service plan status.
subscription string
App Service plan subscription.
type string
Resource type.
geo_region str
Geographical location for the App Service plan.
id str
The provider-assigned unique ID for this managed resource.
maximum_number_of_workers int
Maximum number of instances that can be assigned to this App Service plan.
number_of_sites int
Number of apps assigned to this App Service plan.
provisioning_state str
Provisioning state of the App Service Plan.
resource_group str
Resource group of the App Service plan.
status str
App Service plan status.
subscription str
App Service plan subscription.
type str
Resource type.

Supporting Types

Capability

Name string
Name of the SKU capability.
Reason string
Reason of the SKU capability.
Value string
Value of the SKU capability.
Name string
Name of the SKU capability.
Reason string
Reason of the SKU capability.
Value string
Value of the SKU capability.
name string
Name of the SKU capability.
reason string
Reason of the SKU capability.
value string
Value of the SKU capability.
name str
Name of the SKU capability.
reason str
Reason of the SKU capability.
value str
Value of the SKU capability.

CapabilityResponse

Name string
Name of the SKU capability.
Reason string
Reason of the SKU capability.
Value string
Value of the SKU capability.
Name string
Name of the SKU capability.
Reason string
Reason of the SKU capability.
Value string
Value of the SKU capability.
name string
Name of the SKU capability.
reason string
Reason of the SKU capability.
value string
Value of the SKU capability.
name str
Name of the SKU capability.
reason str
Reason of the SKU capability.
value str
Value of the SKU capability.

HostingEnvironmentProfile

Id string
Resource ID of the App Service Environment.
Id string
Resource ID of the App Service Environment.
id string
Resource ID of the App Service Environment.
id str
Resource ID of the App Service Environment.

HostingEnvironmentProfileResponse

Name string
Name of the App Service Environment.
Type string
Resource type of the App Service Environment.
Id string
Resource ID of the App Service Environment.
Name string
Name of the App Service Environment.
Type string
Resource type of the App Service Environment.
Id string
Resource ID of the App Service Environment.
name string
Name of the App Service Environment.
type string
Resource type of the App Service Environment.
id string
Resource ID of the App Service Environment.
name str
Name of the App Service Environment.
type str
Resource type of the App Service Environment.
id str
Resource ID of the App Service Environment.

KubeEnvironmentProfile

Id string
Resource ID of the Kubernetes Environment.
Id string
Resource ID of the Kubernetes Environment.
id string
Resource ID of the Kubernetes Environment.
id str
Resource ID of the Kubernetes Environment.

KubeEnvironmentProfileResponse

Name string
Name of the Kubernetes Environment.
Type string
Resource type of the Kubernetes Environment.
Id string
Resource ID of the Kubernetes Environment.
Name string
Name of the Kubernetes Environment.
Type string
Resource type of the Kubernetes Environment.
Id string
Resource ID of the Kubernetes Environment.
name string
Name of the Kubernetes Environment.
type string
Resource type of the Kubernetes Environment.
id string
Resource ID of the Kubernetes Environment.
name str
Name of the Kubernetes Environment.
type str
Resource type of the Kubernetes Environment.
id str
Resource ID of the Kubernetes Environment.

SkuCapacity

Default int
Default number of workers for this App Service plan SKU.
ElasticMaximum int
Maximum number of Elastic workers for this App Service plan SKU.
Maximum int
Maximum number of workers for this App Service plan SKU.
Minimum int
Minimum number of workers for this App Service plan SKU.
ScaleType string
Available scale configurations for an App Service plan.
Default int
Default number of workers for this App Service plan SKU.
ElasticMaximum int
Maximum number of Elastic workers for this App Service plan SKU.
Maximum int
Maximum number of workers for this App Service plan SKU.
Minimum int
Minimum number of workers for this App Service plan SKU.
ScaleType string
Available scale configurations for an App Service plan.
default number
Default number of workers for this App Service plan SKU.
elasticMaximum number
Maximum number of Elastic workers for this App Service plan SKU.
maximum number
Maximum number of workers for this App Service plan SKU.
minimum number
Minimum number of workers for this App Service plan SKU.
scaleType string
Available scale configurations for an App Service plan.
default int
Default number of workers for this App Service plan SKU.
elastic_maximum int
Maximum number of Elastic workers for this App Service plan SKU.
maximum int
Maximum number of workers for this App Service plan SKU.
minimum int
Minimum number of workers for this App Service plan SKU.
scale_type str
Available scale configurations for an App Service plan.

SkuCapacityResponse

Default int
Default number of workers for this App Service plan SKU.
ElasticMaximum int
Maximum number of Elastic workers for this App Service plan SKU.
Maximum int
Maximum number of workers for this App Service plan SKU.
Minimum int
Minimum number of workers for this App Service plan SKU.
ScaleType string
Available scale configurations for an App Service plan.
Default int
Default number of workers for this App Service plan SKU.
ElasticMaximum int
Maximum number of Elastic workers for this App Service plan SKU.
Maximum int
Maximum number of workers for this App Service plan SKU.
Minimum int
Minimum number of workers for this App Service plan SKU.
ScaleType string
Available scale configurations for an App Service plan.
default number
Default number of workers for this App Service plan SKU.
elasticMaximum number
Maximum number of Elastic workers for this App Service plan SKU.
maximum number
Maximum number of workers for this App Service plan SKU.
minimum number
Minimum number of workers for this App Service plan SKU.
scaleType string
Available scale configurations for an App Service plan.
default int
Default number of workers for this App Service plan SKU.
elastic_maximum int
Maximum number of Elastic workers for this App Service plan SKU.
maximum int
Maximum number of workers for this App Service plan SKU.
minimum int
Minimum number of workers for this App Service plan SKU.
scale_type str
Available scale configurations for an App Service plan.

SkuDescription

Capabilities List<Pulumi.AzureNative.Web.Inputs.Capability>
Capabilities of the SKU, e.g., is traffic manager enabled?
Capacity int
Current number of instances assigned to the resource.
Family string
Family code of the resource SKU.
Locations List<string>
Locations of the SKU.
Name string
Name of the resource SKU.
Size string
Size specifier of the resource SKU.
SkuCapacity Pulumi.AzureNative.Web.Inputs.SkuCapacity
Min, max, and default scale values of the SKU.
Tier string
Service tier of the resource SKU.
Capabilities []Capability
Capabilities of the SKU, e.g., is traffic manager enabled?
Capacity int
Current number of instances assigned to the resource.
Family string
Family code of the resource SKU.
Locations []string
Locations of the SKU.
Name string
Name of the resource SKU.
Size string
Size specifier of the resource SKU.
SkuCapacity SkuCapacity
Min, max, and default scale values of the SKU.
Tier string
Service tier of the resource SKU.
capabilities Capability[]
Capabilities of the SKU, e.g., is traffic manager enabled?
capacity number
Current number of instances assigned to the resource.
family string
Family code of the resource SKU.
locations string[]
Locations of the SKU.
name string
Name of the resource SKU.
size string
Size specifier of the resource SKU.
skuCapacity SkuCapacity
Min, max, and default scale values of the SKU.
tier string
Service tier of the resource SKU.
capabilities Sequence[Capability]
Capabilities of the SKU, e.g., is traffic manager enabled?
capacity int
Current number of instances assigned to the resource.
family str
Family code of the resource SKU.
locations Sequence[str]
Locations of the SKU.
name str
Name of the resource SKU.
size str
Size specifier of the resource SKU.
sku_capacity SkuCapacity
Min, max, and default scale values of the SKU.
tier str
Service tier of the resource SKU.

SkuDescriptionResponse

Capabilities List<Pulumi.AzureNative.Web.Inputs.CapabilityResponse>
Capabilities of the SKU, e.g., is traffic manager enabled?
Capacity int
Current number of instances assigned to the resource.
Family string
Family code of the resource SKU.
Locations List<string>
Locations of the SKU.
Name string
Name of the resource SKU.
Size string
Size specifier of the resource SKU.
SkuCapacity Pulumi.AzureNative.Web.Inputs.SkuCapacityResponse
Min, max, and default scale values of the SKU.
Tier string
Service tier of the resource SKU.
Capabilities []CapabilityResponse
Capabilities of the SKU, e.g., is traffic manager enabled?
Capacity int
Current number of instances assigned to the resource.
Family string
Family code of the resource SKU.
Locations []string
Locations of the SKU.
Name string
Name of the resource SKU.
Size string
Size specifier of the resource SKU.
SkuCapacity SkuCapacityResponse
Min, max, and default scale values of the SKU.
Tier string
Service tier of the resource SKU.
capabilities CapabilityResponse[]
Capabilities of the SKU, e.g., is traffic manager enabled?
capacity number
Current number of instances assigned to the resource.
family string
Family code of the resource SKU.
locations string[]
Locations of the SKU.
name string
Name of the resource SKU.
size string
Size specifier of the resource SKU.
skuCapacity SkuCapacityResponse
Min, max, and default scale values of the SKU.
tier string
Service tier of the resource SKU.
capabilities Sequence[CapabilityResponse]
Capabilities of the SKU, e.g., is traffic manager enabled?
capacity int
Current number of instances assigned to the resource.
family str
Family code of the resource SKU.
locations Sequence[str]
Locations of the SKU.
name str
Name of the resource SKU.
size str
Size specifier of the resource SKU.
sku_capacity SkuCapacityResponse
Min, max, and default scale values of the SKU.
tier str
Service tier of the resource SKU.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:web:AppServicePlan testsf6141 /subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/testsf6141 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0