We recommend using Azure Native.
azure.appservice.getAppServicePlan
Explore with Pulumi AI
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.
- Resource
Group stringName - The Name of the Resource Group where the App Service Plan exists.
- Name string
- The name of the App Service Plan.
- Resource
Group stringName - The Name of the Resource Group where the App Service Plan exists.
- name String
- The name of the App Service Plan.
- resource
Group StringName - The Name of the Resource Group where the App Service Plan exists.
- name string
- The name of the App Service Plan.
- resource
Group stringName - The Name of the Resource Group where the App Service Plan exists.
- name str
- The name of the App Service Plan.
- resource_
group_ strname - The Name of the Resource Group where the App Service Plan exists.
- name String
- The name of the App Service Plan.
- resource
Group StringName - The Name of the Resource Group where the App Service Plan exists.
getAppServicePlan Result
The following output properties are available:
- App
Service stringEnvironment Id - 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.
- Is
Xenon 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
- Maximum
Elastic intWorker Count - The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- Maximum
Number intOf Workers - The maximum number of workers supported with the App Service Plan's sku.
- Name string
- Per
Site boolScaling - Can Apps assigned to this App Service Plan be scaled independently?
- Reserved bool
- Is this App Service Plan
Reserved
? - Resource
Group stringName - Sku
Get
App Service Plan Sku - A
sku
block as documented below. - Dictionary<string, string>
- A mapping of tags assigned to the resource.
- Zone
Redundant bool - App Service Plan perform availability zone balancing.
- App
Service stringEnvironment Id - 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.
- Is
Xenon 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
- Maximum
Elastic intWorker Count - The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- Maximum
Number intOf Workers - The maximum number of workers supported with the App Service Plan's sku.
- Name string
- Per
Site boolScaling - Can Apps assigned to this App Service Plan be scaled independently?
- Reserved bool
- Is this App Service Plan
Reserved
? - Resource
Group stringName - Sku
Get
App Service Plan Sku - A
sku
block as documented below. - map[string]string
- A mapping of tags assigned to the resource.
- Zone
Redundant bool - App Service Plan perform availability zone balancing.
- app
Service StringEnvironment Id - 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.
- is
Xenon 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
- maximum
Elastic IntegerWorker Count - The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- maximum
Number IntegerOf Workers - The maximum number of workers supported with the App Service Plan's sku.
- name String
- per
Site BooleanScaling - Can Apps assigned to this App Service Plan be scaled independently?
- reserved Boolean
- Is this App Service Plan
Reserved
? - resource
Group StringName - sku
Get
App Service Plan Sku - A
sku
block as documented below. - Map<String,String>
- A mapping of tags assigned to the resource.
- zone
Redundant Boolean - App Service Plan perform availability zone balancing.
- app
Service stringEnvironment Id - 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.
- is
Xenon 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
- maximum
Elastic numberWorker Count - The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- maximum
Number numberOf Workers - The maximum number of workers supported with the App Service Plan's sku.
- name string
- per
Site booleanScaling - Can Apps assigned to this App Service Plan be scaled independently?
- reserved boolean
- Is this App Service Plan
Reserved
? - resource
Group stringName - sku
Get
App Service Plan Sku - A
sku
block as documented below. - {[key: string]: string}
- A mapping of tags assigned to the resource.
- zone
Redundant boolean - App Service Plan perform availability zone balancing.
- app_
service_ strenvironment_ id - 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_ intworker_ count - The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- maximum_
number_ intof_ workers - The maximum number of workers supported with the App Service Plan's sku.
- name str
- per_
site_ boolscaling - Can Apps assigned to this App Service Plan be scaled independently?
- reserved bool
- Is this App Service Plan
Reserved
? - resource_
group_ strname - sku
Get
App Service Plan Sku - A
sku
block as documented below. - Mapping[str, str]
- A mapping of tags assigned to the resource.
- zone_
redundant bool - App Service Plan perform availability zone balancing.
- app
Service StringEnvironment Id - 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.
- is
Xenon 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
- maximum
Elastic NumberWorker Count - The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan.
- maximum
Number NumberOf Workers - The maximum number of workers supported with the App Service Plan's sku.
- name String
- per
Site BooleanScaling - Can Apps assigned to this App Service Plan be scaled independently?
- reserved Boolean
- Is this App Service Plan
Reserved
? - resource
Group StringName - sku Property Map
- A
sku
block as documented below. - Map<String>
- A mapping of tags assigned to the resource.
- zone
Redundant Boolean - App Service Plan perform availability zone balancing.
Supporting Types
GetAppServicePlanSku
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.