We recommend using Azure Native.
Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi
azure.appservice.getServicePlan
Explore with Pulumi AI
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/v6/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.
- Resource
Group stringName - The name of the Resource Group where the Service Plan exists.
- Name string
- The name of this Service Plan.
- Resource
Group stringName - The name of the Resource Group where the Service Plan exists.
- name String
- The name of this Service Plan.
- resource
Group StringName - The name of the Resource Group where the Service Plan exists.
- name string
- The name of this Service Plan.
- resource
Group stringName - The name of the Resource Group where the Service Plan exists.
- name str
- The name of this Service Plan.
- resource_
group_ strname - The name of the Resource Group where the Service Plan exists.
- name String
- The name of this Service Plan.
- resource
Group StringName - The name of the Resource Group where the Service Plan exists.
getServicePlan Result
The following output properties are available:
- App
Service stringEnvironment Id - 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.
- Maximum
Elastic intWorker Count - The maximum number of workers in use in an Elastic SKU Plan.
- Name string
- Os
Type string - The O/S type for the App Services hosted in this plan.
- Per
Site boolScaling Enabled - Is Per Site Scaling be enabled?
- Reserved bool
- Whether this is a reserved Service Plan Type.
true
ifos_type
isLinux
, otherwisefalse
. - Resource
Group stringName - Sku
Name string - The SKU for the Service Plan.
- Dictionary<string, string>
- A mapping of tags assigned to the Service Plan.
- Worker
Count int - The number of Workers (instances) allocated.
- Zone
Balancing boolEnabled - Is the Service Plan balance across Availability Zones in the region?
- App
Service stringEnvironment Id - 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.
- Maximum
Elastic intWorker Count - The maximum number of workers in use in an Elastic SKU Plan.
- Name string
- Os
Type string - The O/S type for the App Services hosted in this plan.
- Per
Site boolScaling Enabled - Is Per Site Scaling be enabled?
- Reserved bool
- Whether this is a reserved Service Plan Type.
true
ifos_type
isLinux
, otherwisefalse
. - Resource
Group stringName - Sku
Name string - The SKU for the Service Plan.
- map[string]string
- A mapping of tags assigned to the Service Plan.
- Worker
Count int - The number of Workers (instances) allocated.
- Zone
Balancing boolEnabled - Is the Service Plan balance across Availability Zones in the region?
- app
Service StringEnvironment Id - 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.
- maximum
Elastic IntegerWorker Count - The maximum number of workers in use in an Elastic SKU Plan.
- name String
- os
Type String - The O/S type for the App Services hosted in this plan.
- per
Site BooleanScaling Enabled - Is Per Site Scaling be enabled?
- reserved Boolean
- Whether this is a reserved Service Plan Type.
true
ifos_type
isLinux
, otherwisefalse
. - resource
Group StringName - sku
Name String - The SKU for the Service Plan.
- Map<String,String>
- A mapping of tags assigned to the Service Plan.
- worker
Count Integer - The number of Workers (instances) allocated.
- zone
Balancing BooleanEnabled - Is the Service Plan balance across Availability Zones in the region?
- app
Service stringEnvironment Id - 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.
- maximum
Elastic numberWorker Count - The maximum number of workers in use in an Elastic SKU Plan.
- name string
- os
Type string - The O/S type for the App Services hosted in this plan.
- per
Site booleanScaling Enabled - Is Per Site Scaling be enabled?
- reserved boolean
- Whether this is a reserved Service Plan Type.
true
ifos_type
isLinux
, otherwisefalse
. - resource
Group stringName - sku
Name string - The SKU for the Service Plan.
- {[key: string]: string}
- A mapping of tags assigned to the Service Plan.
- worker
Count number - The number of Workers (instances) allocated.
- zone
Balancing booleanEnabled - Is the Service Plan balance across Availability Zones in the region?
- app_
service_ strenvironment_ id - 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_ intworker_ count - 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_ boolscaling_ enabled - Is Per Site Scaling be enabled?
- reserved bool
- Whether this is a reserved Service Plan Type.
true
ifos_type
isLinux
, otherwisefalse
. - resource_
group_ strname - sku_
name str - The SKU for the Service Plan.
- Mapping[str, str]
- A mapping of tags assigned to the Service Plan.
- worker_
count int - The number of Workers (instances) allocated.
- zone_
balancing_ boolenabled - Is the Service Plan balance across Availability Zones in the region?
- app
Service StringEnvironment Id - 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.
- maximum
Elastic NumberWorker Count - The maximum number of workers in use in an Elastic SKU Plan.
- name String
- os
Type String - The O/S type for the App Services hosted in this plan.
- per
Site BooleanScaling Enabled - Is Per Site Scaling be enabled?
- reserved Boolean
- Whether this is a reserved Service Plan Type.
true
ifos_type
isLinux
, otherwisefalse
. - resource
Group StringName - sku
Name String - The SKU for the Service Plan.
- Map<String>
- A mapping of tags assigned to the Service Plan.
- worker
Count Number - The number of Workers (instances) allocated.
- zone
Balancing BooleanEnabled - 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.