App Service Plan
App Service plan. Uses Azure REST API version 2024-04-01. In version 2.x of the Azure Native provider, it used API version 2022-09-01. Other available API versions: 2016-09-01, 2018-02-01, 2019-08-01, 2020-06-01, 2020-09-01, 2020-10-01, 2020-12-01, 2021-01-01, 2021-01-15, 2021-02-01, 2021-03-01, 2022-03-01, 2022-09-01, 2023-01-01, 2023-12-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native web [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Create Or Update App Service plan
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var appServicePlan = new AzureNative.Web.AppServicePlan("appServicePlan", new()
{
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/web/v3"
"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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.web.AppServicePlan;
import com.pulumi.azurenative.web.AppServicePlanArgs;
import com.pulumi.azurenative.web.inputs.SkuDescriptionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var appServicePlan = new AppServicePlan("appServicePlan", AppServicePlanArgs.builder()
.kind("app")
.location("East US")
.name("testsf6141")
.resourceGroupName("testrg123")
.sku(SkuDescriptionArgs.builder()
.capacity(1)
.family("P")
.name("P1")
.size("P1")
.tier("Premium")
.build())
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:web:AppServicePlan testsf6141 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}
Properties
The Azure API version of the resource.
ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku
Extended Location.
The time when the server farm free offer expires.
Specification for the App Service Environment to use for the App Service plan.
Specification for the Kubernetes Environment to use for the App Service plan.
Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan
Maximum number of instances that can be assigned to this App Service plan.
Number of apps assigned to this App Service plan.
The number of instances that are assigned to this App Service plan.
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.
Provisioning state of the App Service Plan.
Resource group of the App Service plan.
Description of a SKU for a scalable resource.
The time when the server farm expires. Valid only if it is a spot server farm.
App Service plan subscription.
Scaling worker count.
Scaling worker size ID.
Target worker tier assigned to the App Service plan.
If true
, this App Service Plan will perform availability zone balancing. If false
, this App Service Plan will not perform availability zone balancing.