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

We recommend using Azure Native.

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

azure.appservice.getStaticWebApp

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 Static Web App.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.appservice.getStaticWebApp({
        name: "existing",
        resourceGroupName: "existing",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.appservice.get_static_web_app(name="existing",
        resource_group_name="existing")
    
    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 {
    		_, err := appservice.LookupStaticWebApp(ctx, &appservice.LookupStaticWebAppArgs{
    			Name:              "existing",
    			ResourceGroupName: "existing",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.AppService.GetStaticWebApp.Invoke(new()
        {
            Name = "existing",
            ResourceGroupName = "existing",
        });
    
    });
    
    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.GetStaticWebAppArgs;
    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.getStaticWebApp(GetStaticWebAppArgs.builder()
                .name("existing")
                .resourceGroupName("existing")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:appservice:getStaticWebApp
          Arguments:
            name: existing
            resourceGroupName: existing
    

    Using getStaticWebApp

    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 getStaticWebApp(args: GetStaticWebAppArgs, opts?: InvokeOptions): Promise<GetStaticWebAppResult>
    function getStaticWebAppOutput(args: GetStaticWebAppOutputArgs, opts?: InvokeOptions): Output<GetStaticWebAppResult>
    def get_static_web_app(name: Optional[str] = None,
                           resource_group_name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetStaticWebAppResult
    def get_static_web_app_output(name: Optional[pulumi.Input[str]] = None,
                           resource_group_name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetStaticWebAppResult]
    func LookupStaticWebApp(ctx *Context, args *LookupStaticWebAppArgs, opts ...InvokeOption) (*LookupStaticWebAppResult, error)
    func LookupStaticWebAppOutput(ctx *Context, args *LookupStaticWebAppOutputArgs, opts ...InvokeOption) LookupStaticWebAppResultOutput

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

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

    The following arguments are supported:

    Name string
    The name of this Static Web App.
    ResourceGroupName string
    The name of the Resource Group where the Static Web App exists.
    Name string
    The name of this Static Web App.
    ResourceGroupName string
    The name of the Resource Group where the Static Web App exists.
    name String
    The name of this Static Web App.
    resourceGroupName String
    The name of the Resource Group where the Static Web App exists.
    name string
    The name of this Static Web App.
    resourceGroupName string
    The name of the Resource Group where the Static Web App exists.
    name str
    The name of this Static Web App.
    resource_group_name str
    The name of the Resource Group where the Static Web App exists.
    name String
    The name of this Static Web App.
    resourceGroupName String
    The name of the Resource Group where the Static Web App exists.

    getStaticWebApp Result

    The following output properties are available:

    ApiKey string
    AppSettings Dictionary<string, string>
    BasicAuths List<GetStaticWebAppBasicAuth>
    ConfigurationFileChangesEnabled bool
    DefaultHostName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities List<GetStaticWebAppIdentity>
    Location string
    Name string
    PreviewEnvironmentsEnabled bool
    PublicNetworkAccessEnabled bool
    ResourceGroupName string
    SkuSize string
    SkuTier string
    Tags Dictionary<string, string>
    ApiKey string
    AppSettings map[string]string
    BasicAuths []GetStaticWebAppBasicAuth
    ConfigurationFileChangesEnabled bool
    DefaultHostName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities []GetStaticWebAppIdentity
    Location string
    Name string
    PreviewEnvironmentsEnabled bool
    PublicNetworkAccessEnabled bool
    ResourceGroupName string
    SkuSize string
    SkuTier string
    Tags map[string]string
    apiKey String
    appSettings Map<String,String>
    basicAuths List<GetStaticWebAppBasicAuth>
    configurationFileChangesEnabled Boolean
    defaultHostName String
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<GetStaticWebAppIdentity>
    location String
    name String
    previewEnvironmentsEnabled Boolean
    publicNetworkAccessEnabled Boolean
    resourceGroupName String
    skuSize String
    skuTier String
    tags Map<String,String>
    apiKey string
    appSettings {[key: string]: string}
    basicAuths GetStaticWebAppBasicAuth[]
    configurationFileChangesEnabled boolean
    defaultHostName string
    id string
    The provider-assigned unique ID for this managed resource.
    identities GetStaticWebAppIdentity[]
    location string
    name string
    previewEnvironmentsEnabled boolean
    publicNetworkAccessEnabled boolean
    resourceGroupName string
    skuSize string
    skuTier string
    tags {[key: string]: string}
    apiKey String
    appSettings Map<String>
    basicAuths List<Property Map>
    configurationFileChangesEnabled Boolean
    defaultHostName String
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<Property Map>
    location String
    name String
    previewEnvironmentsEnabled Boolean
    publicNetworkAccessEnabled Boolean
    resourceGroupName String
    skuSize String
    skuTier String
    tags Map<String>

    Supporting Types

    GetStaticWebAppBasicAuth

    Environments string
    The Environment types which are configured to use Basic Auth access.
    Environments string
    The Environment types which are configured to use Basic Auth access.
    environments String
    The Environment types which are configured to use Basic Auth access.
    environments string
    The Environment types which are configured to use Basic Auth access.
    environments str
    The Environment types which are configured to use Basic Auth access.
    environments String
    The Environment types which are configured to use Basic Auth access.

    GetStaticWebAppIdentity

    IdentityIds List<string>
    The list of Managed Identity IDs which are assigned to this Static Web App resource.
    PrincipalId string
    TenantId string
    Type string
    The Type of Managed Identity assigned to this Static Web App resource.
    IdentityIds []string
    The list of Managed Identity IDs which are assigned to this Static Web App resource.
    PrincipalId string
    TenantId string
    Type string
    The Type of Managed Identity assigned to this Static Web App resource.
    identityIds List<String>
    The list of Managed Identity IDs which are assigned to this Static Web App resource.
    principalId String
    tenantId String
    type String
    The Type of Managed Identity assigned to this Static Web App resource.
    identityIds string[]
    The list of Managed Identity IDs which are assigned to this Static Web App resource.
    principalId string
    tenantId string
    type string
    The Type of Managed Identity assigned to this Static Web App resource.
    identity_ids Sequence[str]
    The list of Managed Identity IDs which are assigned to this Static Web App resource.
    principal_id str
    tenant_id str
    type str
    The Type of Managed Identity assigned to this Static Web App resource.
    identityIds List<String>
    The list of Managed Identity IDs which are assigned to this Static Web App resource.
    principalId String
    tenantId String
    type String
    The Type of Managed Identity assigned to this Static Web App resource.

    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