AppServicePlanArgs

data class AppServicePlanArgs(val elasticScaleEnabled: Output<Boolean>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val freeOfferExpirationTime: Output<String>? = null, val hostingEnvironmentProfile: Output<HostingEnvironmentProfileArgs>? = null, val hyperV: Output<Boolean>? = null, val isSpot: Output<Boolean>? = null, val isXenon: Output<Boolean>? = null, val kind: Output<String>? = null, val kubeEnvironmentProfile: Output<KubeEnvironmentProfileArgs>? = null, val location: Output<String>? = null, val maximumElasticWorkerCount: Output<Int>? = null, val name: Output<String>? = null, val perSiteScaling: Output<Boolean>? = null, val reserved: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val sku: Output<SkuDescriptionArgs>? = null, val spotExpirationTime: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val targetWorkerCount: Output<Int>? = null, val targetWorkerSizeId: Output<Int>? = null, val workerTierName: Output<String>? = null, val zoneRedundant: Output<Boolean>? = null) : ConvertibleToJava<AppServicePlanArgs>

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}

Constructors

Link copied to clipboard
constructor(elasticScaleEnabled: Output<Boolean>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, freeOfferExpirationTime: Output<String>? = null, hostingEnvironmentProfile: Output<HostingEnvironmentProfileArgs>? = null, hyperV: Output<Boolean>? = null, isSpot: Output<Boolean>? = null, isXenon: Output<Boolean>? = null, kind: Output<String>? = null, kubeEnvironmentProfile: Output<KubeEnvironmentProfileArgs>? = null, location: Output<String>? = null, maximumElasticWorkerCount: Output<Int>? = null, name: Output<String>? = null, perSiteScaling: Output<Boolean>? = null, reserved: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, sku: Output<SkuDescriptionArgs>? = null, spotExpirationTime: Output<String>? = null, tags: Output<Map<String, String>>? = null, targetWorkerCount: Output<Int>? = null, targetWorkerSizeId: Output<Int>? = null, workerTierName: Output<String>? = null, zoneRedundant: Output<Boolean>? = null)

Properties

Link copied to clipboard
val elasticScaleEnabled: Output<Boolean>? = null

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
val freeOfferExpirationTime: Output<String>? = null

The time when the server farm free offer expires.

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>? = null

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

Link copied to clipboard
val isSpot: Output<Boolean>? = null

If true, this App Service Plan owns spot instances.

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

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

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

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>? = null

Resource Location.

Link copied to clipboard
val maximumElasticWorkerCount: Output<Int>? = null

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

Link copied to clipboard
val name: Output<String>? = null

Name of the App Service plan.

Link copied to clipboard
val perSiteScaling: Output<Boolean>? = null

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
val reserved: Output<Boolean>? = null

If Linux app service plan true, false otherwise.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the resource group to which the resource belongs.

Link copied to clipboard
val sku: Output<SkuDescriptionArgs>? = null

Description of a SKU for a scalable resource.

Link copied to clipboard
val spotExpirationTime: Output<String>? = null

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

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

Resource tags.

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

Scaling worker count.

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

Scaling worker size ID.

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

Target worker tier assigned to the App Service plan.

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

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

Functions

Link copied to clipboard
open override fun toJava(): AppServicePlanArgs