GetAppService

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

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.AppService.GetAppService.InvokeAsync(new Azure.AppService.GetAppServiceArgs
        {
            Name = "search-app-service",
            ResourceGroupName = "search-service",
        }));
        this.AppServiceId = example.Apply(example => example.Id);
    }

    [Output("appServiceId")]
    public Output<string> AppServiceId { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/appservice"
    "github.com/pulumi/pulumi/sdk/v2/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
    })
}
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)
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);

Using GetAppService

function getAppService(args: GetAppServiceArgs, opts?: InvokeOptions): Promise<GetAppServiceResult>
function  get_app_service(name=None, resource_group_name=None, opts=None)
func LookupAppService(ctx *Context, args *LookupAppServiceArgs, opts ...InvokeOption) (*LookupAppServiceResult, error)

Note: This function is named LookupAppService in the Go SDK.

public static class GetAppService {
    public static Task<GetAppServiceResult> InvokeAsync(GetAppServiceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the App Service.

ResourceGroupName string

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

Name string

The name of the App Service.

ResourceGroupName string

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

name string

The name of the App Service.

resourceGroupName string

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

name str

The name of the App Service.

resource_group_name str

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

GetAppService Result

The following output properties are available:

AppServicePlanId string

The ID of the App Service Plan within which the App Service exists.

AppSettings Dictionary<string, string>

A key-value pair of App Settings for the App Service.

ClientAffinityEnabled bool

Does the App Service send session affinity cookies, which route client requests in the same session to the same instance?

ClientCertEnabled bool

Does the App Service require client certificates for incoming requests?

ConnectionStrings List<GetAppServiceConnectionString>

An connection_string block as defined below.

DefaultSiteHostname string

The Default Hostname associated with the App Service - such as mysite.azurewebsites.net

Enabled bool

Is the App Service Enabled?

HttpsOnly bool

Can the App Service only be accessed via HTTPS?

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure location where the App Service exists.

Name string

The name for this IP Restriction.

OutboundIpAddresses string

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

PossibleOutboundIpAddresses string

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

ResourceGroupName string
SiteConfigs List<GetAppServiceSiteConfig>

A site_config block as defined below.

SiteCredentials List<GetAppServiceSiteCredential>
SourceControls List<GetAppServiceSourceControl>
Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

AppServicePlanId string

The ID of the App Service Plan within which the App Service exists.

AppSettings map[string]string

A key-value pair of App Settings for the App Service.

ClientAffinityEnabled bool

Does the App Service send session affinity cookies, which route client requests in the same session to the same instance?

ClientCertEnabled bool

Does the App Service require client certificates for incoming requests?

ConnectionStrings []GetAppServiceConnectionString

An connection_string block as defined below.

DefaultSiteHostname string

The Default Hostname associated with the App Service - such as mysite.azurewebsites.net

Enabled bool

Is the App Service Enabled?

HttpsOnly bool

Can the App Service only be accessed via HTTPS?

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure location where the App Service exists.

Name string

The name for this IP Restriction.

OutboundIpAddresses string

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

PossibleOutboundIpAddresses string

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

ResourceGroupName string
SiteConfigs []GetAppServiceSiteConfig

A site_config block as defined below.

SiteCredentials []GetAppServiceSiteCredential
SourceControls []GetAppServiceSourceControl
Tags map[string]string

A mapping of tags to assign to the resource.

appServicePlanId string

The ID of the App Service Plan within which the App Service exists.

appSettings {[key: string]: string}

A key-value pair of App Settings for the App Service.

clientAffinityEnabled boolean

Does the App Service send session affinity cookies, which route client requests in the same session to the same instance?

clientCertEnabled boolean

Does the App Service require client certificates for incoming requests?

connectionStrings GetAppServiceConnectionString[]

An connection_string block as defined below.

defaultSiteHostname string

The Default Hostname associated with the App Service - such as mysite.azurewebsites.net

enabled boolean

Is the App Service Enabled?

httpsOnly boolean

Can the App Service only be accessed via HTTPS?

id string

The provider-assigned unique ID for this managed resource.

location string

The Azure location where the App Service exists.

name string

The name for this IP Restriction.

outboundIpAddresses string

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

possibleOutboundIpAddresses string

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

resourceGroupName string
siteConfigs GetAppServiceSiteConfig[]

A site_config block as defined below.

siteCredentials GetAppServiceSiteCredential[]
sourceControls GetAppServiceSourceControl[]
tags {[key: string]: string}

A mapping of tags to assign to the resource.

app_service_plan_id str

The ID of the App Service Plan within which the App Service exists.

app_settings Dict[str, str]

A key-value pair of App Settings for the App Service.

client_affinity_enabled bool

Does the App Service send session affinity cookies, which route client requests in the same session to the same instance?

client_cert_enabled bool

Does the App Service require client certificates for incoming requests?

connection_strings List[GetAppServiceConnectionString]

An connection_string block as defined below.

default_site_hostname str

The Default Hostname associated with the App Service - such as mysite.azurewebsites.net

enabled bool

Is the App Service Enabled?

https_only bool

Can the App Service only be accessed via HTTPS?

id str

The provider-assigned unique ID for this managed resource.

location str

The Azure location where the App Service exists.

name str

The name for this IP Restriction.

outbound_ip_addresses str

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12

possible_outbound_ip_addresses str

A comma separated list of outbound IP addresses - such as 52.23.25.3,52.143.43.12,52.143.43.17 - not all of which are necessarily in use. Superset of outbound_ip_addresses.

resource_group_name str
site_configs List[GetAppServiceSiteConfig]

A site_config block as defined below.

site_credentials List[GetAppServiceSiteCredential]
source_controls List[GetAppServiceSourceControl]
tags Dict[str, str]

A mapping of tags to assign to the resource.

Supporting Types

GetAppServiceConnectionString

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Name string

The name of the App Service.

Type string

The type of the Connection String.

Value string

The value for the Connection String.

Name string

The name of the App Service.

Type string

The type of the Connection String.

Value string

The value for the Connection String.

name string

The name of the App Service.

type string

The type of the Connection String.

value string

The value for the Connection String.

name str

The name of the App Service.

type str

The type of the Connection String.

value str

The value for the Connection String.

GetAppServiceSiteConfig

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AlwaysOn bool

Is the app be loaded at all times?

AppCommandLine string

App command line to launch.

Cors List<GetAppServiceSiteConfigCorArgs>

A cors block as defined above.

DefaultDocuments List<string>

The ordering of default documents to load, if an address isn’t specified.

DotnetFrameworkVersion string

The version of the .net framework’s CLR used in this App Service.

FtpsState string

State of FTP / FTPS service for this AppService.

HealthCheckPath string

The health check path to be pinged by App Service.

Http2Enabled bool

Is HTTP2 Enabled on this App Service?

IpRestrictions List<GetAppServiceSiteConfigIpRestrictionArgs>

One or more ip_restriction blocks as defined above.

JavaContainer string

The Java Container in use.

JavaContainerVersion string

The version of the Java Container in use.

JavaVersion string

The version of Java in use.

LinuxFxVersion string

Linux App Framework and version for the AppService.

LocalMysqlEnabled bool

Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

ManagedPipelineMode string

The Managed Pipeline Mode used in this App Service.

MinTlsVersion string

The minimum supported TLS version for this App Service.

PhpVersion string

The version of PHP used in this App Service.

PythonVersion string

The version of Python used in this App Service.

RemoteDebuggingEnabled bool

Is Remote Debugging Enabled in this App Service?

RemoteDebuggingVersion string

Which version of Visual Studio is the Remote Debugger compatible with?

ScmIpRestrictions List<GetAppServiceSiteConfigScmIpRestrictionArgs>

One or more scm_ip_restriction blocks as defined above.

ScmType string

The type of Source Control enabled for this App Service.

ScmUseMainIpRestriction bool

IP security restrictions for scm to use main.

Use32BitWorkerProcess bool

Does the App Service run in 32 bit mode, rather than 64 bit mode?

WebsocketsEnabled bool

Are WebSockets enabled for this App Service?

WindowsFxVersion string

Windows Container Docker Image for the AppService.

AlwaysOn bool

Is the app be loaded at all times?

AppCommandLine string

App command line to launch.

Cors []GetAppServiceSiteConfigCor

A cors block as defined above.

DefaultDocuments []string

The ordering of default documents to load, if an address isn’t specified.

DotnetFrameworkVersion string

The version of the .net framework’s CLR used in this App Service.

FtpsState string

State of FTP / FTPS service for this AppService.

HealthCheckPath string

The health check path to be pinged by App Service.

Http2Enabled bool

Is HTTP2 Enabled on this App Service?

IpRestrictions []GetAppServiceSiteConfigIpRestriction

One or more ip_restriction blocks as defined above.

JavaContainer string

The Java Container in use.

JavaContainerVersion string

The version of the Java Container in use.

JavaVersion string

The version of Java in use.

LinuxFxVersion string

Linux App Framework and version for the AppService.

LocalMysqlEnabled bool

Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

ManagedPipelineMode string

The Managed Pipeline Mode used in this App Service.

MinTlsVersion string

The minimum supported TLS version for this App Service.

PhpVersion string

The version of PHP used in this App Service.

PythonVersion string

The version of Python used in this App Service.

RemoteDebuggingEnabled bool

Is Remote Debugging Enabled in this App Service?

RemoteDebuggingVersion string

Which version of Visual Studio is the Remote Debugger compatible with?

ScmIpRestrictions []GetAppServiceSiteConfigScmIpRestriction

One or more scm_ip_restriction blocks as defined above.

ScmType string

The type of Source Control enabled for this App Service.

ScmUseMainIpRestriction bool

IP security restrictions for scm to use main.

Use32BitWorkerProcess bool

Does the App Service run in 32 bit mode, rather than 64 bit mode?

WebsocketsEnabled bool

Are WebSockets enabled for this App Service?

WindowsFxVersion string

Windows Container Docker Image for the AppService.

alwaysOn boolean

Is the app be loaded at all times?

appCommandLine string

App command line to launch.

cors GetAppServiceSiteConfigCor[]

A cors block as defined above.

defaultDocuments string[]

The ordering of default documents to load, if an address isn’t specified.

dotnetFrameworkVersion string

The version of the .net framework’s CLR used in this App Service.

ftpsState string

State of FTP / FTPS service for this AppService.

healthCheckPath string

The health check path to be pinged by App Service.

http2Enabled boolean

Is HTTP2 Enabled on this App Service?

ipRestrictions GetAppServiceSiteConfigIpRestriction[]

One or more ip_restriction blocks as defined above.

javaContainer string

The Java Container in use.

javaContainerVersion string

The version of the Java Container in use.

javaVersion string

The version of Java in use.

linuxFxVersion string

Linux App Framework and version for the AppService.

localMysqlEnabled boolean

Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

managedPipelineMode string

The Managed Pipeline Mode used in this App Service.

minTlsVersion string

The minimum supported TLS version for this App Service.

phpVersion string

The version of PHP used in this App Service.

pythonVersion string

The version of Python used in this App Service.

remoteDebuggingEnabled boolean

Is Remote Debugging Enabled in this App Service?

remoteDebuggingVersion string

Which version of Visual Studio is the Remote Debugger compatible with?

scmIpRestrictions GetAppServiceSiteConfigScmIpRestriction[]

One or more scm_ip_restriction blocks as defined above.

scmType string

The type of Source Control enabled for this App Service.

scmUseMainIpRestriction boolean

IP security restrictions for scm to use main.

use32BitWorkerProcess boolean

Does the App Service run in 32 bit mode, rather than 64 bit mode?

websocketsEnabled boolean

Are WebSockets enabled for this App Service?

windowsFxVersion string

Windows Container Docker Image for the AppService.

alwaysOn bool

Is the app be loaded at all times?

appCommandLine str

App command line to launch.

cors List[GetAppServiceSiteConfigCor]

A cors block as defined above.

defaultDocuments List[str]

The ordering of default documents to load, if an address isn’t specified.

dotnetFrameworkVersion str

The version of the .net framework’s CLR used in this App Service.

ftpsState str

State of FTP / FTPS service for this AppService.

healthCheckPath str

The health check path to be pinged by App Service.

http2Enabled bool

Is HTTP2 Enabled on this App Service?

ipRestrictions List[GetAppServiceSiteConfigIpRestriction]

One or more ip_restriction blocks as defined above.

javaContainer str

The Java Container in use.

javaContainerVersion str

The version of the Java Container in use.

javaVersion str

The version of Java in use.

linuxFxVersion str

Linux App Framework and version for the AppService.

localMysqlEnabled bool

Is “MySQL In App” Enabled? This runs a local MySQL instance with your app and shares resources from the App Service plan.

managedPipelineMode str

The Managed Pipeline Mode used in this App Service.

minTlsVersion str

The minimum supported TLS version for this App Service.

phpVersion str

The version of PHP used in this App Service.

pythonVersion str

The version of Python used in this App Service.

remoteDebuggingEnabled bool

Is Remote Debugging Enabled in this App Service?

remoteDebuggingVersion str

Which version of Visual Studio is the Remote Debugger compatible with?

scmIpRestrictions List[GetAppServiceSiteConfigScmIpRestriction]

One or more scm_ip_restriction blocks as defined above.

scmType str

The type of Source Control enabled for this App Service.

scmUseMainIpRestriction bool

IP security restrictions for scm to use main.

use32BitWorkerProcess bool

Does the App Service run in 32 bit mode, rather than 64 bit mode?

websocketsEnabled bool

Are WebSockets enabled for this App Service?

windowsFxVersion str

Windows Container Docker Image for the AppService.

GetAppServiceSiteConfigCor

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AllowedOrigins List<string>

A list of origins which are able to make cross-origin calls.

SupportCredentials bool

Are credentials supported?

AllowedOrigins []string

A list of origins which are able to make cross-origin calls.

SupportCredentials bool

Are credentials supported?

allowedOrigins string[]

A list of origins which are able to make cross-origin calls.

supportCredentials boolean

Are credentials supported?

allowedOrigins List[str]

A list of origins which are able to make cross-origin calls.

supportCredentials bool

Are credentials supported?

GetAppServiceSiteConfigIpRestriction

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Action string

Allow or Deny access for this IP range. Defaults to Allow.

IpAddress string

The IP Address used for this IP Restriction in CIDR notation.

Name string

The name of the App Service.

Priority int

The priority for this IP Restriction.

VirtualNetworkSubnetId string

The Virtual Network Subnet ID used for this IP Restriction.

Action string

Allow or Deny access for this IP range. Defaults to Allow.

IpAddress string

The IP Address used for this IP Restriction in CIDR notation.

Name string

The name of the App Service.

Priority int

The priority for this IP Restriction.

VirtualNetworkSubnetId string

The Virtual Network Subnet ID used for this IP Restriction.

action string

Allow or Deny access for this IP range. Defaults to Allow.

ipAddress string

The IP Address used for this IP Restriction in CIDR notation.

name string

The name of the App Service.

priority number

The priority for this IP Restriction.

virtualNetworkSubnetId string

The Virtual Network Subnet ID used for this IP Restriction.

action str

Allow or Deny access for this IP range. Defaults to Allow.

ip_address str

The IP Address used for this IP Restriction in CIDR notation.

name str

The name of the App Service.

priority float

The priority for this IP Restriction.

virtualNetworkSubnetId str

The Virtual Network Subnet ID used for this IP Restriction.

GetAppServiceSiteConfigScmIpRestriction

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Action string

Allow or Deny access for this IP range. Defaults to Allow.

IpAddress string

The IP Address used for this IP Restriction in CIDR notation.

Name string

The name of the App Service.

Priority int

The priority for this IP Restriction.

VirtualNetworkSubnetId string

The Virtual Network Subnet ID used for this IP Restriction.

Action string

Allow or Deny access for this IP range. Defaults to Allow.

IpAddress string

The IP Address used for this IP Restriction in CIDR notation.

Name string

The name of the App Service.

Priority int

The priority for this IP Restriction.

VirtualNetworkSubnetId string

The Virtual Network Subnet ID used for this IP Restriction.

action string

Allow or Deny access for this IP range. Defaults to Allow.

ipAddress string

The IP Address used for this IP Restriction in CIDR notation.

name string

The name of the App Service.

priority number

The priority for this IP Restriction.

virtualNetworkSubnetId string

The Virtual Network Subnet ID used for this IP Restriction.

action str

Allow or Deny access for this IP range. Defaults to Allow.

ip_address str

The IP Address used for this IP Restriction in CIDR notation.

name str

The name of the App Service.

priority float

The priority for this IP Restriction.

virtualNetworkSubnetId str

The Virtual Network Subnet ID used for this IP Restriction.

GetAppServiceSiteCredential

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Password string
Username string
Password string
Username string
password string
username string
password str
username str

GetAppServiceSourceControl

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Branch string
RepoUrl string
Branch string
RepoUrl string
branch string
repoUrl string
branch str
repoUrl str

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.