1. Packages
  2. Azure Classic
  3. API Docs
  4. appservice
  5. getServicePlan

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.appservice.getServicePlan

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Use this data source to access information about an existing Service Plan.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.appservice.getServicePlan({
        name: "existing",
        resourceGroupName: "existing",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.appservice.get_service_plan(name="existing",
        resource_group_name="existing")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := appservice.LookupServicePlan(ctx, &appservice.LookupServicePlanArgs{
    			Name:              "existing",
    			ResourceGroupName: "existing",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.AppService.GetServicePlan.Invoke(new()
        {
            Name = "existing",
            ResourceGroupName = "existing",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getServicePlanResult => getServicePlanResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.appservice.AppserviceFunctions;
    import com.pulumi.azure.appservice.inputs.GetServicePlanArgs;
    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) {
            final var example = AppserviceFunctions.getServicePlan(GetServicePlanArgs.builder()
                .name("existing")
                .resourceGroupName("existing")
                .build());
    
            ctx.export("id", example.applyValue(getServicePlanResult -> getServicePlanResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:appservice:getServicePlan
          Arguments:
            name: existing
            resourceGroupName: existing
    outputs:
      id: ${example.id}
    

    Using getServicePlan

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getServicePlan(args: GetServicePlanArgs, opts?: InvokeOptions): Promise<GetServicePlanResult>
    function getServicePlanOutput(args: GetServicePlanOutputArgs, opts?: InvokeOptions): Output<GetServicePlanResult>
    def get_service_plan(name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetServicePlanResult
    def get_service_plan_output(name: Optional[pulumi.Input[str]] = None,
                         resource_group_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetServicePlanResult]
    func LookupServicePlan(ctx *Context, args *LookupServicePlanArgs, opts ...InvokeOption) (*LookupServicePlanResult, error)
    func LookupServicePlanOutput(ctx *Context, args *LookupServicePlanOutputArgs, opts ...InvokeOption) LookupServicePlanResultOutput

    > Note: This function is named LookupServicePlan in the Go SDK.

    public static class GetServicePlan 
    {
        public static Task<GetServicePlanResult> InvokeAsync(GetServicePlanArgs args, InvokeOptions? opts = null)
        public static Output<GetServicePlanResult> Invoke(GetServicePlanInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServicePlanResult> getServicePlan(GetServicePlanArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:appservice/getServicePlan:getServicePlan
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of this Service Plan.
    ResourceGroupName string
    The name of the Resource Group where the Service Plan exists.
    Name string
    The name of this Service Plan.
    ResourceGroupName string
    The name of the Resource Group where the Service Plan exists.
    name String
    The name of this Service Plan.
    resourceGroupName String
    The name of the Resource Group where the Service Plan exists.
    name string
    The name of this Service Plan.
    resourceGroupName string
    The name of the Resource Group where the Service Plan exists.
    name str
    The name of this Service Plan.
    resource_group_name str
    The name of the Resource Group where the Service Plan exists.
    name String
    The name of this Service Plan.
    resourceGroupName String
    The name of the Resource Group where the Service Plan exists.

    getServicePlan Result

    The following output properties are available:

    AppServiceEnvironmentId string
    The ID of the App Service Environment this Service Plan is part of.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    A string representing the Kind of Service Plan.
    Location string
    The Azure Region where the Service Plan exists.
    MaximumElasticWorkerCount int
    The maximum number of workers in use in an Elastic SKU Plan.
    Name string
    OsType string
    The O/S type for the App Services hosted in this plan.
    PerSiteScalingEnabled bool
    Is Per Site Scaling be enabled?
    Reserved bool
    Whether this is a reserved Service Plan Type. true if os_type is Linux, otherwise false.
    ResourceGroupName string
    SkuName string
    The SKU for the Service Plan.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Service Plan.
    WorkerCount int
    The number of Workers (instances) allocated.
    ZoneBalancingEnabled bool
    Is the Service Plan balance across Availability Zones in the region?
    AppServiceEnvironmentId string
    The ID of the App Service Environment this Service Plan is part of.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    A string representing the Kind of Service Plan.
    Location string
    The Azure Region where the Service Plan exists.
    MaximumElasticWorkerCount int
    The maximum number of workers in use in an Elastic SKU Plan.
    Name string
    OsType string
    The O/S type for the App Services hosted in this plan.
    PerSiteScalingEnabled bool
    Is Per Site Scaling be enabled?
    Reserved bool
    Whether this is a reserved Service Plan Type. true if os_type is Linux, otherwise false.
    ResourceGroupName string
    SkuName string
    The SKU for the Service Plan.
    Tags map[string]string
    A mapping of tags assigned to the Service Plan.
    WorkerCount int
    The number of Workers (instances) allocated.
    ZoneBalancingEnabled bool
    Is the Service Plan balance across Availability Zones in the region?
    appServiceEnvironmentId String
    The ID of the App Service Environment this Service Plan is part of.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    A string representing the Kind of Service Plan.
    location String
    The Azure Region where the Service Plan exists.
    maximumElasticWorkerCount Integer
    The maximum number of workers in use in an Elastic SKU Plan.
    name String
    osType String
    The O/S type for the App Services hosted in this plan.
    perSiteScalingEnabled Boolean
    Is Per Site Scaling be enabled?
    reserved Boolean
    Whether this is a reserved Service Plan Type. true if os_type is Linux, otherwise false.
    resourceGroupName String
    skuName String
    The SKU for the Service Plan.
    tags Map<String,String>
    A mapping of tags assigned to the Service Plan.
    workerCount Integer
    The number of Workers (instances) allocated.
    zoneBalancingEnabled Boolean
    Is the Service Plan balance across Availability Zones in the region?
    appServiceEnvironmentId string
    The ID of the App Service Environment this Service Plan is part of.
    id string
    The provider-assigned unique ID for this managed resource.
    kind string
    A string representing the Kind of Service Plan.
    location string
    The Azure Region where the Service Plan exists.
    maximumElasticWorkerCount number
    The maximum number of workers in use in an Elastic SKU Plan.
    name string
    osType string
    The O/S type for the App Services hosted in this plan.
    perSiteScalingEnabled boolean
    Is Per Site Scaling be enabled?
    reserved boolean
    Whether this is a reserved Service Plan Type. true if os_type is Linux, otherwise false.
    resourceGroupName string
    skuName string
    The SKU for the Service Plan.
    tags {[key: string]: string}
    A mapping of tags assigned to the Service Plan.
    workerCount number
    The number of Workers (instances) allocated.
    zoneBalancingEnabled boolean
    Is the Service Plan balance across Availability Zones in the region?
    app_service_environment_id str
    The ID of the App Service Environment this Service Plan is part of.
    id str
    The provider-assigned unique ID for this managed resource.
    kind str
    A string representing the Kind of Service Plan.
    location str
    The Azure Region where the Service Plan exists.
    maximum_elastic_worker_count int
    The maximum number of workers in use in an Elastic SKU Plan.
    name str
    os_type str
    The O/S type for the App Services hosted in this plan.
    per_site_scaling_enabled bool
    Is Per Site Scaling be enabled?
    reserved bool
    Whether this is a reserved Service Plan Type. true if os_type is Linux, otherwise false.
    resource_group_name str
    sku_name str
    The SKU for the Service Plan.
    tags Mapping[str, str]
    A mapping of tags assigned to the Service Plan.
    worker_count int
    The number of Workers (instances) allocated.
    zone_balancing_enabled bool
    Is the Service Plan balance across Availability Zones in the region?
    appServiceEnvironmentId String
    The ID of the App Service Environment this Service Plan is part of.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    A string representing the Kind of Service Plan.
    location String
    The Azure Region where the Service Plan exists.
    maximumElasticWorkerCount Number
    The maximum number of workers in use in an Elastic SKU Plan.
    name String
    osType String
    The O/S type for the App Services hosted in this plan.
    perSiteScalingEnabled Boolean
    Is Per Site Scaling be enabled?
    reserved Boolean
    Whether this is a reserved Service Plan Type. true if os_type is Linux, otherwise false.
    resourceGroupName String
    skuName String
    The SKU for the Service Plan.
    tags Map<String>
    A mapping of tags assigned to the Service Plan.
    workerCount Number
    The number of Workers (instances) allocated.
    zoneBalancingEnabled Boolean
    Is the Service Plan balance across Availability Zones in the region?

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi