Class Plan
Manages an App Service Plan component.
Example Usage (Dedicated)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sku = new Azure.AppService.Inputs.PlanSkuArgs
{
Tier = "Standard",
Size = "S1",
},
});
}
}
Example Usage (Shared / Consumption Plan)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Kind = "FunctionApp",
Sku = new Azure.AppService.Inputs.PlanSkuArgs
{
Tier = "Dynamic",
Size = "Y1",
},
});
}
}
Example Usage (Linux)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Kind = "Linux",
Reserved = true,
Sku = new Azure.AppService.Inputs.PlanSkuArgs
{
Tier = "Standard",
Size = "S1",
},
});
}
}
Example Usage (Windows Container)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var examplePlan = new Azure.AppService.Plan("examplePlan", new Azure.AppService.PlanArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Kind = "xenon",
IsXenon = true,
Sku = new Azure.AppService.Inputs.PlanSkuArgs
{
Tier = "PremiumContainer",
Size = "PC2",
},
});
}
}
Inherited Members
Namespace: Pulumi.Azure.AppService
Assembly: Pulumi.Azure.dll
Syntax
public class Plan : CustomResource
Constructors
View SourcePlan(String, PlanArgs, CustomResourceOptions)
Create a Plan resource with the given unique name, arguments, and options.
Declaration
public Plan(string name, PlanArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| PlanArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAppServiceEnvironmentId
The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created.
Declaration
public Output<string> AppServiceEnvironmentId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
IsXenon
Declaration
public Output<bool?> IsXenon { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Kind
The kind of the App Service Plan to create. Possible values are Windows (also available as App), Linux, elastic (for Premium Consumption) and FunctionApp (for a Consumption Plan). Defaults to Windows. Changing this forces a new resource to be created.
Declaration
public Output<string> Kind { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Location
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Declaration
public Output<string> Location { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MaximumElasticWorkerCount
The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
Declaration
public Output<int> MaximumElasticWorkerCount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
MaximumNumberOfWorkers
The maximum number of workers supported with the App Service Plan's sku.
Declaration
public Output<int> MaximumNumberOfWorkers { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
Specifies the name of the App Service Plan component. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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. Defaults to false.
Declaration
public Output<bool?> PerSiteScaling { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Reserved
Is this App Service Plan Reserved. Defaults to false.
Declaration
public Output<bool?> Reserved { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
ResourceGroupName
The name of the resource group in which to create the App Service Plan component.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Sku
A sku block as documented below.
Declaration
public Output<PlanSku> Sku { get; }
Property Value
| Type | Description |
|---|---|
| Output<PlanSku> |
Tags
A mapping of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
Methods
View SourceGet(String, Input<String>, PlanState, CustomResourceOptions)
Get an existing Plan resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Plan Get(string name, Input<string> id, PlanState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| PlanState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Plan |