Skip to main content

static_sites

Creates, updates, deletes, gets or lists a static_sites resource.

Overview

Namestatic_sites
TypeResource
Idazure.app_service.static_sites

Fields

The following fields are returned by SELECT queries:

OK.

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
identityobjectManaged service identity.
propertiesobjectCore resource properties
skuobjectDescription of a SKU for a scalable resource.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, name, subscriptionIdDescription for Gets the details of a static site.
listselectsubscriptionIdDescription for Get all Static Sites for a subscription.
create_or_updateinsertresourceGroupName, name, subscriptionIdDescription for Creates a new static site in an existing resource group, or updates an existing static site.
updateupdateresourceGroupName, name, subscriptionIdDescription for Creates a new static site in an existing resource group, or updates an existing static site.
deletedeleteresourceGroupName, name, subscriptionIdDescription for Deletes a static site.
preview_workflowexeclocation, subscriptionIdDescription for Generates a preview workflow file for the static site
register_user_provided_function_app_with_static_site_buildexecresourceGroupName, name, environmentName, functionAppName, subscriptionIdisForcedDescription for Register a user provided function app with a static site build
detach_user_provided_function_app_from_static_site_buildexecresourceGroupName, name, environmentName, functionAppName, subscriptionIdDescription for Detach the user provided function app from the static site build
validate_custom_domain_can_be_added_to_static_siteexecresourceGroupName, name, domainName, subscriptionIdDescription for Validates a particular custom domain can be added to a static site.
detach_static_siteexecresourceGroupName, name, subscriptionIdDescription for Detaches a static site.
approve_or_reject_private_endpoint_connectionexecresourceGroupName, name, privateEndpointConnectionName, subscriptionIdDescription for Approves or rejects a private endpoint connection
reset_static_site_api_keyexecresourceGroupName, name, subscriptionIdDescription for Resets the api key for an existing static site.
register_user_provided_function_app_with_static_siteexecresourceGroupName, name, functionAppName, subscriptionIdisForcedDescription for Register a user provided function app with a static site
detach_user_provided_function_app_from_static_siteexecresourceGroupName, name, functionAppName, subscriptionIdDescription for Detach the user provided function app from the static site
validate_backendexecresourceGroupName, name, linkedBackendName, subscriptionId
validate_backend_for_buildexecresourceGroupName, name, environmentName, linkedBackendName, subscriptionId
link_backendexecresourceGroupName, name, linkedBackendName, subscriptionId
unlink_backendexecresourceGroupName, name, linkedBackendName, subscriptionIdisCleaningAuthConfig
link_backend_to_buildexecresourceGroupName, name, environmentName, linkedBackendName, subscriptionId
unlink_backend_from_buildexecresourceGroupName, name, environmentName, linkedBackendName, subscriptionIdisCleaningAuthConfig

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domainNamestringThe custom domain to validate.
environmentNamestringThe stage site identifier
functionAppNamestringName of the function app registered with the static site.
linkedBackendNamestringName of the backend linked to the static site
locationstringLocation where you plan to create the static site.
namestringName of the static site
privateEndpointConnectionNamestringName of the private endpoint connection.
resourceGroupNamestringName of the resource group to which the resource belongs.
subscriptionIdstringYour Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
isCleaningAuthConfigbooleanDecides if auth will be removed from backend configuration
isForcedbooleanSpecify true to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is false.

SELECT examples

Description for Gets the details of a static site.

SELECT
id,
name,
identity,
properties,
sku,
systemData,
type
FROM azure.app_service.static_sites
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND name = '{{ name }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Description for Creates a new static site in an existing resource group, or updates an existing static site.

INSERT INTO azure.app_service.static_sites (
data__properties,
data__sku,
data__identity,
resourceGroupName,
name,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ sku }}',
'{{ identity }}',
'{{ resourceGroupName }}',
'{{ name }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
identity,
properties,
sku,
systemData,
type
;

UPDATE examples

Description for Creates a new static site in an existing resource group, or updates an existing static site.

UPDATE azure.app_service.static_sites
SET
data__kind = '{{ kind }}',
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND name = '{{ name }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
identity,
properties,
sku,
systemData,
type;

DELETE examples

Description for Deletes a static site.

DELETE FROM azure.app_service.static_sites
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND name = '{{ name }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Description for Generates a preview workflow file for the static site

EXEC azure.app_service.static_sites.preview_workflow 
@location='{{ location }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"kind": "{{ kind }}",
"properties": "{{ properties }}"
}'
;