getAppService

Use this data source to access information about an existing App Service. !>Note: The azure.appservice.AppService 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.LinuxWebApp and azure.appservice.WindowsWebApp data sources instead.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.appservice.getAppService({
name: "search-app-service",
resourceGroupName: "search-service",
});
export const appServiceId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.appservice.get_app_service(name="search-app-service",
resource_group_name="search-service")
pulumi.export("appServiceId", example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.AppService.GetAppService.Invoke(new()
{
Name = "search-app-service",
ResourceGroupName = "search-service",
});
return new Dictionary<string, object?>
{
["appServiceId"] = example.Apply(getAppServiceResult => getAppServiceResult.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.LookupAppService(ctx, &appservice.LookupAppServiceArgs{
Name: "search-app-service",
ResourceGroupName: "search-service",
}, nil)
if err != nil {
return err
}
ctx.Export("appServiceId", example.Id)
return nil
})
}
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.GetAppServiceArgs;
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.getAppService(GetAppServiceArgs.builder()
.name("search-app-service")
.resourceGroupName("search-service")
.build());
ctx.export("appServiceId", example.applyValue(getAppServiceResult -> getAppServiceResult.id()));
}
}
variables:
example:
fn::invoke:
function: azure:appservice:getAppService
arguments:
name: search-app-service
resourceGroupName: search-service
outputs:
appServiceId: ${example.id}

Return

A collection of values returned by getAppService.

Parameters

argument

A collection of arguments for invoking getAppService.


suspend fun getAppService(name: String, resourceGroupName: String): GetAppServiceResult

Return

A collection of values returned by getAppService.

Parameters

name

The name of the App Service.

resourceGroupName

The Name of the Resource Group where the App Service exists.

See also


Return

A collection of values returned by getAppService.

Parameters

argument

Builder for com.pulumi.azure.appservice.kotlin.inputs.GetAppServicePlainArgs.

See also