AppServicePlan

class AppServicePlan : KotlinCustomResource

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/v2"
"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

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku

Link copied to clipboard

Extended Location.

Link copied to clipboard

The time when the server farm free offer expires.

Link copied to clipboard
val geoRegion: Output<String>

Geographical location for the App Service plan.

Link copied to clipboard

Specification for the App Service Environment to use for the App Service plan.

Link copied to clipboard
val hyperV: Output<Boolean>?

If Hyper-V container app service plan true, false otherwise.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val isSpot: Output<Boolean>?

If true, this App Service Plan owns spot instances.

Link copied to clipboard
val isXenon: Output<Boolean>?

Obsolete: If Hyper-V container app service plan true, false otherwise.

Link copied to clipboard
val kind: Output<String>?

Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.

Link copied to clipboard

Specification for the Kubernetes Environment to use for the App Service plan.

Link copied to clipboard
val location: Output<String>

Resource Location.

Link copied to clipboard

Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan

Link copied to clipboard

Maximum number of instances that can be assigned to this App Service plan.

Link copied to clipboard
val name: Output<String>

Resource Name.

Link copied to clipboard
val numberOfSites: Output<Int>

Number of apps assigned to this App Service plan.

Link copied to clipboard
val numberOfWorkers: Output<Int>

The number of instances that are assigned to this App Service plan.

Link copied to clipboard
val perSiteScaling: Output<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.

Link copied to clipboard

Provisioning state of the App Service Plan.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val reserved: Output<Boolean>?

If Linux app service plan true, false otherwise.

Link copied to clipboard
val resourceGroup: Output<String>

Resource group of the App Service plan.

Link copied to clipboard

Description of a SKU for a scalable resource.

Link copied to clipboard

The time when the server farm expires. Valid only if it is a spot server farm.

Link copied to clipboard
val status: Output<String>

App Service plan status.

Link copied to clipboard
val subscription: Output<String>

App Service plan subscription.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Resource tags.

Link copied to clipboard
val targetWorkerCount: Output<Int>?

Scaling worker count.

Link copied to clipboard
val targetWorkerSizeId: Output<Int>?

Scaling worker size ID.

Link copied to clipboard
val type: Output<String>

Resource type.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val workerTierName: Output<String>?

Target worker tier assigned to the App Service plan.

Link copied to clipboard
val zoneRedundant: Output<Boolean>?

If true, this App Service Plan will perform availability zone balancing. If false, this App Service Plan will not perform availability zone balancing.