We recommend using Azure Native.
Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi
azure.appservice.getStaticWebApp
Explore with Pulumi AI
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/v5/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.
- Resource
Group stringName - The name of the Resource Group where the Static Web App exists.
- Name string
- The name of this Static Web App.
- Resource
Group stringName - The name of the Resource Group where the Static Web App exists.
- name String
- The name of this Static Web App.
- resource
Group StringName - The name of the Resource Group where the Static Web App exists.
- name string
- The name of this Static Web App.
- resource
Group stringName - The name of the Resource Group where the Static Web App exists.
- name str
- The name of this Static Web App.
- resource_
group_ strname - The name of the Resource Group where the Static Web App exists.
- name String
- The name of this Static Web App.
- resource
Group StringName - The name of the Resource Group where the Static Web App exists.
getStaticWebApp Result
The following output properties are available:
- Api
Key string - App
Settings Dictionary<string, string> - Basic
Auths List<GetStatic Web App Basic Auth> - Configuration
File boolChanges Enabled - Default
Host stringName - Id string
- The provider-assigned unique ID for this managed resource.
- Identities
List<Get
Static Web App Identity> - Location string
- Name string
- Preview
Environments boolEnabled - Resource
Group stringName - Sku
Size string - Sku
Tier string - Dictionary<string, string>
- Api
Key string - App
Settings map[string]string - Basic
Auths []GetStatic Web App Basic Auth - Configuration
File boolChanges Enabled - Default
Host stringName - Id string
- The provider-assigned unique ID for this managed resource.
- Identities
[]Get
Static Web App Identity - Location string
- Name string
- Preview
Environments boolEnabled - Resource
Group stringName - Sku
Size string - Sku
Tier string - map[string]string
- api
Key String - app
Settings Map<String,String> - basic
Auths List<GetStatic Web App Basic Auth> - configuration
File BooleanChanges Enabled - default
Host StringName - id String
- The provider-assigned unique ID for this managed resource.
- identities
List<Get
Static Web App Identity> - location String
- name String
- preview
Environments BooleanEnabled - resource
Group StringName - sku
Size String - sku
Tier String - Map<String,String>
- api
Key string - app
Settings {[key: string]: string} - basic
Auths GetStatic Web App Basic Auth[] - configuration
File booleanChanges Enabled - default
Host stringName - id string
- The provider-assigned unique ID for this managed resource.
- identities
Get
Static Web App Identity[] - location string
- name string
- preview
Environments booleanEnabled - resource
Group stringName - sku
Size string - sku
Tier string - {[key: string]: string}
- api_
key str - app_
settings Mapping[str, str] - basic_
auths Sequence[GetStatic Web App Basic Auth] - configuration_
file_ boolchanges_ enabled - default_
host_ strname - id str
- The provider-assigned unique ID for this managed resource.
- identities
Sequence[Get
Static Web App Identity] - location str
- name str
- preview_
environments_ boolenabled - resource_
group_ strname - sku_
size str - sku_
tier str - Mapping[str, str]
- api
Key String - app
Settings Map<String> - basic
Auths List<Property Map> - configuration
File BooleanChanges Enabled - default
Host StringName - id String
- The provider-assigned unique ID for this managed resource.
- identities List<Property Map>
- location String
- name String
- preview
Environments BooleanEnabled - resource
Group StringName - sku
Size String - sku
Tier String - 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
- Identity
Ids List<string> - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- Principal
Id string - Tenant
Id string - Type string
- The Type of Managed Identity assigned to this Static Web App resource.
- Identity
Ids []string - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- Principal
Id string - Tenant
Id string - Type string
- The Type of Managed Identity assigned to this Static Web App resource.
- identity
Ids List<String> - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principal
Id String - tenant
Id String - type String
- The Type of Managed Identity assigned to this Static Web App resource.
- identity
Ids string[] - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principal
Id string - tenant
Id 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.
- identity
Ids List<String> - The list of Managed Identity IDs which are assigned to this Static Web App resource.
- principal
Id String - tenant
Id 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.