ServicePlanArgs

data class ServicePlanArgs(val appServiceEnvironmentId: Output<String>? = null, val location: Output<String>? = null, val maximumElasticWorkerCount: Output<Int>? = null, val name: Output<String>? = null, val osType: Output<String>? = null, val perSiteScalingEnabled: Output<Boolean>? = null, val premiumPlanAutoScaleEnabled: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val skuName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val workerCount: Output<Int>? = null, val zoneBalancingEnabled: Output<Boolean>? = null) : ConvertibleToJava<ServicePlanArgs>

Manages an App Service: Service Plan.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleServicePlan = new azure.appservice.ServicePlan("example", {
name: "example",
resourceGroupName: example.name,
location: example.location,
osType: "Linux",
skuName: "P1v2",
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_service_plan = azure.appservice.ServicePlan("example",
name="example",
resource_group_name=example.name,
location=example.location,
os_type="Linux",
sku_name="P1v2")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleServicePlan = new Azure.AppService.ServicePlan("example", new()
{
Name = "example",
ResourceGroupName = example.Name,
Location = example.Location,
OsType = "Linux",
SkuName = "P1v2",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = appservice.NewServicePlan(ctx, "example", &appservice.ServicePlanArgs{
Name: pulumi.String("example"),
ResourceGroupName: example.Name,
Location: example.Location,
OsType: pulumi.String("Linux"),
SkuName: pulumi.String("P1v2"),
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appservice.ServicePlan;
import com.pulumi.azure.appservice.ServicePlanArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
.name("example")
.resourceGroupName(example.name())
.location(example.location())
.osType("Linux")
.skuName("P1v2")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleServicePlan:
type: azure:appservice:ServicePlan
name: example
properties:
name: example
resourceGroupName: ${example.name}
location: ${example.location}
osType: Linux
skuName: P1v2

Import

AppServices can be imported using the resource id, e.g.

$ pulumi import azure:appservice/servicePlan:ServicePlan example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/serverFarms/farm1

Constructors

Link copied to clipboard
constructor(appServiceEnvironmentId: Output<String>? = null, location: Output<String>? = null, maximumElasticWorkerCount: Output<Int>? = null, name: Output<String>? = null, osType: Output<String>? = null, perSiteScalingEnabled: Output<Boolean>? = null, premiumPlanAutoScaleEnabled: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, skuName: Output<String>? = null, tags: Output<Map<String, String>>? = null, workerCount: Output<Int>? = null, zoneBalancingEnabled: Output<Boolean>? = null)

Properties

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

The ID of the App Service Environment to create this Service Plan in.

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

The Azure Region where the Service Plan should exist. Changing this forces a new Service Plan to be created.

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

The maximum number of workers to use in an Elastic SKU Plan or Premium Plan that have premium_plan_auto_scale_enabled set to true. Cannot be set unless using an Elastic or Premium SKU.

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

The name which should be used for this Service Plan. Changing this forces a new Service Plan to be created.

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

The O/S type for the App Services to be hosted in this plan. Possible values include Windows, Linux, and WindowsContainer. Changing this forces a new resource to be created.

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

Should Per Site Scaling be enabled. Defaults to false.

Link copied to clipboard

Should automatic scaling be enabled for the Premium SKU Plan. Defaults to false. Cannot be set unless using a Premium SKU.

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

The name of the Resource Group where the Service Plan should exist. Changing this forces a new Service Plan to be created.

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

The SKU for the plan. Possible values include B1, B2, B3, D1, F1, I1, I2, I3, I1v2, I1mv2, I2v2, I2mv2, I3v2, I3mv2, I4v2, I4mv2, I5v2, I5mv2, I6v2, P1v2, P2v2, P3v2, P0v3, P1v3, P2v3, P3v3, P1mv3, P2mv3, P3mv3, P4mv3, P5mv3, S1, S2, S3, SHARED, EP1, EP2, EP3, FC1, WS1, WS2, WS3, and Y1.

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

A mapping of tags which should be assigned to the AppService.

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

The number of Workers (instances) to be allocated.

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

Should the Service Plan balance across Availability Zones in the region. Changing this forces a new resource to be created.

Functions

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