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

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.appservice.getAppServicePlan

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Use this data source to access information about an existing App Service Plan (formerly known as a Server Farm).

    !> Note: The azure.appservice.Plan data source is deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use the azure.appservice.ServicePlan data source instead.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.appservice.getAppServicePlan({
        name: "search-app-service-plan",
        resourceGroupName: "search-service",
    });
    export const appServicePlanId = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.appservice.get_app_service_plan(name="search-app-service-plan",
        resource_group_name="search-service")
    pulumi.export("appServicePlanId", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := appservice.GetAppServicePlan(ctx, &appservice.GetAppServicePlanArgs{
    			Name:              "search-app-service-plan",
    			ResourceGroupName: "search-service",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("appServicePlanId", 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.GetAppServicePlan.Invoke(new()
        {
            Name = "search-app-service-plan",
            ResourceGroupName = "search-service",
        });
    
        return new Dictionary<string, object?>
        {
            ["appServicePlanId"] = example.Apply(getAppServicePlanResult => getAppServicePlanResult.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.GetAppServicePlanArgs;
    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.getAppServicePlan(GetAppServicePlanArgs.builder()
                .name("search-app-service-plan")
                .resourceGroupName("search-service")
                .build());
    
            ctx.export("appServicePlanId", example.applyValue(getAppServicePlanResult -> getAppServicePlanResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:appservice:getAppServicePlan
          Arguments:
            name: search-app-service-plan
            resourceGroupName: search-service
    outputs:
      appServicePlanId: ${example.id}
    

    Using getAppServicePlan

    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 getAppServicePlan(args: GetAppServicePlanArgs, opts?: InvokeOptions): Promise<GetAppServicePlanResult>
    function getAppServicePlanOutput(args: GetAppServicePlanOutputArgs, opts?: InvokeOptions): Output<GetAppServicePlanResult>
    def get_app_service_plan(name: Optional[str] = None,
                             resource_group_name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetAppServicePlanResult
    def get_app_service_plan_output(name: Optional[pulumi.Input[str]] = None,
                             resource_group_name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetAppServicePlanResult]
    func GetAppServicePlan(ctx *Context, args *GetAppServicePlanArgs, opts ...InvokeOption) (*GetAppServicePlanResult, error)
    func GetAppServicePlanOutput(ctx *Context, args *GetAppServicePlanOutputArgs, opts ...InvokeOption) GetAppServicePlanResultOutput

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

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

    The following arguments are supported:

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

    getAppServicePlan Result

    The following output properties are available:

    AppServiceEnvironmentId string
    The ID of the App Service Environment where the App Service Plan is located.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsXenon bool
    A flag that indicates if it's a xenon plan (support for Windows Container)
    Kind string
    The Operating System type of the App Service Plan
    Location string
    The Azure location where the App Service Plan exists
    MaximumElasticWorkerCount int
    The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
    MaximumNumberOfWorkers int
    The maximum number of workers supported with the App Service Plan's sku.
    Name string
    PerSiteScaling bool
    Can Apps assigned to this App Service Plan be scaled independently?
    Reserved bool
    Is this App Service Plan Reserved?
    ResourceGroupName string
    Sku GetAppServicePlanSku
    A sku block as documented below.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the resource.
    ZoneRedundant bool
    App Service Plan perform availability zone balancing.
    AppServiceEnvironmentId string
    The ID of the App Service Environment where the App Service Plan is located.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsXenon bool
    A flag that indicates if it's a xenon plan (support for Windows Container)
    Kind string
    The Operating System type of the App Service Plan
    Location string
    The Azure location where the App Service Plan exists
    MaximumElasticWorkerCount int
    The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
    MaximumNumberOfWorkers int
    The maximum number of workers supported with the App Service Plan's sku.
    Name string
    PerSiteScaling bool
    Can Apps assigned to this App Service Plan be scaled independently?
    Reserved bool
    Is this App Service Plan Reserved?
    ResourceGroupName string
    Sku GetAppServicePlanSku
    A sku block as documented below.
    Tags map[string]string
    A mapping of tags assigned to the resource.
    ZoneRedundant bool
    App Service Plan perform availability zone balancing.
    appServiceEnvironmentId String
    The ID of the App Service Environment where the App Service Plan is located.
    id String
    The provider-assigned unique ID for this managed resource.
    isXenon Boolean
    A flag that indicates if it's a xenon plan (support for Windows Container)
    kind String
    The Operating System type of the App Service Plan
    location String
    The Azure location where the App Service Plan exists
    maximumElasticWorkerCount Integer
    The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
    maximumNumberOfWorkers Integer
    The maximum number of workers supported with the App Service Plan's sku.
    name String
    perSiteScaling Boolean
    Can Apps assigned to this App Service Plan be scaled independently?
    reserved Boolean
    Is this App Service Plan Reserved?
    resourceGroupName String
    sku GetAppServicePlanSku
    A sku block as documented below.
    tags Map<String,String>
    A mapping of tags assigned to the resource.
    zoneRedundant Boolean
    App Service Plan perform availability zone balancing.
    appServiceEnvironmentId string
    The ID of the App Service Environment where the App Service Plan is located.
    id string
    The provider-assigned unique ID for this managed resource.
    isXenon boolean
    A flag that indicates if it's a xenon plan (support for Windows Container)
    kind string
    The Operating System type of the App Service Plan
    location string
    The Azure location where the App Service Plan exists
    maximumElasticWorkerCount number
    The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
    maximumNumberOfWorkers number
    The maximum number of workers supported with the App Service Plan's sku.
    name string
    perSiteScaling boolean
    Can Apps assigned to this App Service Plan be scaled independently?
    reserved boolean
    Is this App Service Plan Reserved?
    resourceGroupName string
    sku GetAppServicePlanSku
    A sku block as documented below.
    tags {[key: string]: string}
    A mapping of tags assigned to the resource.
    zoneRedundant boolean
    App Service Plan perform availability zone balancing.
    app_service_environment_id str
    The ID of the App Service Environment where the App Service Plan is located.
    id str
    The provider-assigned unique ID for this managed resource.
    is_xenon bool
    A flag that indicates if it's a xenon plan (support for Windows Container)
    kind str
    The Operating System type of the App Service Plan
    location str
    The Azure location where the App Service Plan exists
    maximum_elastic_worker_count int
    The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
    maximum_number_of_workers int
    The maximum number of workers supported with the App Service Plan's sku.
    name str
    per_site_scaling bool
    Can Apps assigned to this App Service Plan be scaled independently?
    reserved bool
    Is this App Service Plan Reserved?
    resource_group_name str
    sku GetAppServicePlanSku
    A sku block as documented below.
    tags Mapping[str, str]
    A mapping of tags assigned to the resource.
    zone_redundant bool
    App Service Plan perform availability zone balancing.
    appServiceEnvironmentId String
    The ID of the App Service Environment where the App Service Plan is located.
    id String
    The provider-assigned unique ID for this managed resource.
    isXenon Boolean
    A flag that indicates if it's a xenon plan (support for Windows Container)
    kind String
    The Operating System type of the App Service Plan
    location String
    The Azure location where the App Service Plan exists
    maximumElasticWorkerCount Number
    The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
    maximumNumberOfWorkers Number
    The maximum number of workers supported with the App Service Plan's sku.
    name String
    perSiteScaling Boolean
    Can Apps assigned to this App Service Plan be scaled independently?
    reserved Boolean
    Is this App Service Plan Reserved?
    resourceGroupName String
    sku Property Map
    A sku block as documented below.
    tags Map<String>
    A mapping of tags assigned to the resource.
    zoneRedundant Boolean
    App Service Plan perform availability zone balancing.

    Supporting Types

    GetAppServicePlanSku

    Capacity int
    Specifies the number of workers associated with this App Service Plan.
    Size string
    Specifies the plan's instance size.
    Tier string
    Specifies the plan's pricing tier.
    Capacity int
    Specifies the number of workers associated with this App Service Plan.
    Size string
    Specifies the plan's instance size.
    Tier string
    Specifies the plan's pricing tier.
    capacity Integer
    Specifies the number of workers associated with this App Service Plan.
    size String
    Specifies the plan's instance size.
    tier String
    Specifies the plan's pricing tier.
    capacity number
    Specifies the number of workers associated with this App Service Plan.
    size string
    Specifies the plan's instance size.
    tier string
    Specifies the plan's pricing tier.
    capacity int
    Specifies the number of workers associated with this App Service Plan.
    size str
    Specifies the plan's instance size.
    tier str
    Specifies the plan's pricing tier.
    capacity Number
    Specifies the number of workers associated with this App Service Plan.
    size String
    Specifies the plan's instance size.
    tier String
    Specifies the plan's pricing tier.

    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 v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi