Skip to main content

static_sites

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

Overview

Namestatic_sites
TypeResource
Idazure.web.static_sites

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
configurationFilesarrayA list of configuration files associated with this database connection.
connectionIdentitystringIf present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource.
connectionStringstringThe connection string to use to connect to the database.
kindstringKind of resource.
regionstringThe region of the database resource. Required.
resourceIdstringThe resource id of the database. Required.
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
get_build_database_connectionselectresource_group_name, name, environment_name, database_connection_name, subscription_idReturns overview of a database connection for a static site build by name. Returns overview of a database connection for a static site build by name.
get_user_provided_function_app_for_static_site_buildselectresource_group_name, name, environment_name, function_app_name, subscription_idGets the details of the user provided function app registered with a static site build. Description for Gets the details of the user provided function app registered with a static site build.
get_linked_backend_for_buildselectresource_group_name, name, environment_name, linked_backend_name, subscription_idReturns the details of a linked backend linked to a static site build by name. Returns the details of a linked backend linked to a static site build by name.
list_static_site_usersselectresource_group_name, name, authprovider, subscription_idGets the list of users of a static site. Description for Gets the list of users of a static site.
list_static_site_build_functionsselectresource_group_name, name, environment_name, subscription_idGets the functions of a particular static site build. Description for Gets the functions of a particular static site build.
get_private_endpoint_connectionselectresource_group_name, name, private_endpoint_connection_name, subscription_idGets a private endpoint connection. Description for Gets a private endpoint connection.
get_database_connectionselectresource_group_name, name, database_connection_name, subscription_idReturns overview of a database connection for a static site by name. Returns overview of a database connection for a static site by name.
get_user_provided_function_app_for_static_siteselectresource_group_name, name, function_app_name, subscription_idGets the details of the user provided function app registered with a static site. Description for Gets the details of the user provided function app registered with a static site.
get_basic_authselectresource_group_name, name, basic_auth_name, subscription_idGets the basic auth properties for a static site. Description for Gets the basic auth properties for a static site.
get_static_site_custom_domainselectresource_group_name, name, domain_name, subscription_idGets an existing custom domain for a particular static site. Description for Gets an existing custom domain for a particular static site.
get_linked_backendselectresource_group_name, name, linked_backend_name, subscription_idReturns the details of a linked backend linked to a static site by name. Returns the details of a linked backend linked to a static site by name.
list_static_site_functionsselectresource_group_name, name, subscription_idGets the functions of a static site. Description for Gets the functions of a static site.
get_static_sites_by_resource_groupselectresource_group_name, subscription_idGets all static sites in the specified resource group. Description for Gets all static sites in the specified resource group.
listselectsubscription_idGet all Static Sites for a subscription. Description for Get all Static Sites for a subscription.
create_or_update_static_siteinsertresource_group_name, name, subscription_id, locationCreates a new static site in an existing resource group, or updates an existing static site. Description for Creates a new static site in an existing resource group, or updates an existing static site.
update_static_siteupdateresource_group_name, name, subscription_idCreates a new static site in an existing resource group, or updates an existing static site. Description for Creates a new static site in an existing resource group, or updates an existing static site.
create_or_update_static_sitereplaceresource_group_name, name, subscription_id, locationCreates a new static site in an existing resource group, or updates an existing static site. Description for Creates a new static site in an existing resource group, or updates an existing static site.
detach_user_provided_function_app_from_static_site_builddeleteresource_group_name, name, environment_name, function_app_name, subscription_idDetach the user provided function app from the static site build. Description for Detach the user provided function app from the static site build.
unlink_backend_from_builddeleteresource_group_name, name, environment_name, linked_backend_name, subscription_idisCleaningAuthConfigUnlink a backend from a static site build. Unlink a backend from a static site build.
detach_user_provided_function_app_from_static_sitedeleteresource_group_name, name, function_app_name, subscription_idDetach the user provided function app from the static site. Description for Detach the user provided function app from the static site.
unlink_backenddeleteresource_group_name, name, linked_backend_name, subscription_idisCleaningAuthConfigUnlink a backend from a static site. Unlink a backend from a static site.
delete_static_sitedeleteresource_group_name, name, subscription_idDeletes a static site. Description for Deletes a static site.
list_static_site_app_settingsexecresource_group_name, name, subscription_idGets the application settings of a static site. Description for Gets the application settings of a static site.
list_static_site_configured_rolesexecresource_group_name, name, subscription_idLists the roles configured for the static site. Description for Lists the roles configured for the static site.
list_static_site_function_app_settingsexecresource_group_name, name, subscription_idGets the application settings of a static site. Description for Gets the application settings of a static site.
list_static_site_secretsexecresource_group_name, name, subscription_idLists the secrets for an existing static site. Description for Lists the secrets for an existing static site.
list_static_site_build_app_settingsexecresource_group_name, name, environment_name, subscription_idGets the application settings of a static site build. Description for Gets the application settings of a static site build.
list_static_site_build_function_app_settingsexecresource_group_name, name, environment_name, subscription_idGets the application settings of a static site build. Description for Gets the application settings of a static site build.
list_basic_authexecresource_group_name, name, subscription_idGets the basic auth properties for a static site as a collection. Description for Gets the basic auth properties for a static site as a collection.
list_static_site_custom_domainsexecresource_group_name, name, subscription_idGets all static site custom domains for a particular static site. Description for Gets all static site custom domains for a particular static site.
approve_or_reject_private_endpoint_connectionexecresource_group_name, name, private_endpoint_connection_name, subscription_idApproves or rejects a private endpoint connection. Description for Approves or rejects a private endpoint connection.
delete_private_endpoint_connectionexecresource_group_name, name, private_endpoint_connection_name, subscription_idDeletes a private endpoint connection. Description for Deletes a private endpoint connection.
get_private_endpoint_connection_listexecresource_group_name, name, subscription_idGets the list of private endpoint connections associated with a static site. Description for Gets the list of private endpoint connections associated with a static site.
get_static_siteexecresource_group_name, name, subscription_idGets the details of a static site. Description for Gets the details of a static site.
get_private_link_resourcesexecresource_group_name, name, subscription_idGets the private link resources. Description for Gets the private link resources.
get_database_connections_with_detailsexecresource_group_name, name, subscription_idReturns details of database connections for a static site. Returns details of database connections for a static site.
get_static_site_buildexecresource_group_name, name, environment_name, subscription_idGets the details of a static site build. Description for Gets the details of a static site build.
delete_static_site_buildexecresource_group_name, name, environment_name, subscription_idDeletes a static site build. Description for Deletes a static site build.
get_static_site_buildsexecresource_group_name, name, subscription_idGets all static site builds for a particular static site. Description for Gets all static site builds for a particular static site.
get_build_database_connections_with_detailsexecresource_group_name, name, environment_name, subscription_idReturns details of database connections for a static site build. Returns details of database connections for a static site build.
create_or_update_build_database_connectionexecresource_group_name, name, environment_name, database_connection_name, subscription_idCreate or update a database connection for a static site build. Description for Create or update a database connection for a static site build.
update_build_database_connectionexecresource_group_name, name, environment_name, database_connection_name, subscription_idCreate or update a database connection for a static site build. Description for Create or update a database connection for a static site build.
delete_build_database_connectionexecresource_group_name, name, environment_name, database_connection_name, subscription_idDelete a database connection for a static site build. Delete a database connection for a static site build.
get_build_database_connectionsexecresource_group_name, name, environment_name, subscription_idReturns overviews of database connections for a static site build. Returns overviews of database connections for a static site build.
get_build_database_connection_with_detailsexecresource_group_name, name, environment_name, database_connection_name, subscription_idReturns details of a database connection for a static site build by name. Returns details of a database connection for a static site build by name.
create_or_update_database_connectionexecresource_group_name, name, database_connection_name, subscription_idCreate or update a database connection for a static site. Description for Create or update a database connection for a static site.
update_database_connectionexecresource_group_name, name, database_connection_name, subscription_idCreate or update a database connection for a static site. Description for Create or update a database connection for a static site.
delete_database_connectionexecresource_group_name, name, database_connection_name, subscription_idDelete a database connection for a static site. Delete a database connection for a static site.
get_database_connectionsexecresource_group_name, name, subscription_idReturns overviews of database connections for a static site. Returns overviews of database connections for a static site.
get_database_connection_with_detailsexecresource_group_name, name, database_connection_name, subscription_idReturns details of a database connection for a static site by name. Returns details of a database connection for a static site by name.
register_user_provided_function_app_with_static_site_buildexecresource_group_name, name, environment_name, function_app_name, subscription_idisForcedRegister a user provided function app with a static site build. Description for Register a user provided function app with a static site build.
get_user_provided_function_apps_for_static_site_buildexecresource_group_name, name, environment_name, subscription_idGets the details of the user provided function apps registered with a static site build. Description for Gets the details of the user provided function apps registered with a static site build.
register_user_provided_function_app_with_static_siteexecresource_group_name, name, function_app_name, subscription_idisForcedRegister a user provided function app with a static site. Description for Register a user provided function app with a static site.
get_user_provided_function_apps_for_static_siteexecresource_group_name, name, subscription_idGets the details of the user provided function apps registered with a static site. Description for Gets the details of the user provided function apps registered with a static site.
create_or_update_basic_authexecresource_group_name, name, basic_auth_name, subscription_idAdds or updates basic auth for a static site. Description for Adds or updates basic auth for a static site.
create_or_update_static_site_custom_domainexecresource_group_name, name, domain_name, subscription_idCreates a new static site custom domain in an existing resource group and static site. Description for Creates a new static site custom domain in an existing resource group and static site.
delete_static_site_custom_domainexecresource_group_name, name, domain_name, subscription_idDeletes a custom domain. Description for Deletes a custom domain.
link_backendexecresource_group_name, name, linked_backend_name, subscription_idLink backend to a static site. Link backend to a static site.
get_linked_backendsexecresource_group_name, name, subscription_idReturns details of all backends linked to a static site. Returns details of all backends linked to a static site.
link_backend_to_buildexecresource_group_name, name, environment_name, linked_backend_name, subscription_idLink backend to a static site build. Link backend to a static site build.
get_linked_backends_for_buildexecresource_group_name, name, environment_name, subscription_idReturns details of all backends linked to a static site build. Returns details of all backends linked to a static site build.
delete_static_site_userexecresource_group_name, name, authprovider, userid, subscription_idDeletes the user entry from the static site. Description for Deletes the user entry from the static site.
update_static_site_userexecresource_group_name, name, authprovider, userid, subscription_idUpdates a user entry with the listed roles. Description for Updates a user entry with the listed roles.
create_or_update_static_site_app_settingsexecresource_group_name, name, subscription_idCreates or updates the app settings of a static site. Description for Creates or updates the app settings of a static site.
create_or_update_static_site_function_app_settingsexecresource_group_name, name, subscription_idCreates or updates the function app settings of a static site. Description for Creates or updates the function app settings of a static site.
create_user_roles_invitation_linkexecresource_group_name, name, subscription_idCreates an invitation link for a user with the role. Description for Creates an invitation link for a user with the role.
detach_static_siteexecresource_group_name, name, subscription_idDetaches a static site. Description for Detaches a static site.
reset_static_site_api_keyexecresource_group_name, name, subscription_idResets the api key for an existing static site. Description for Resets the api key for an existing static site.
create_zip_deployment_for_static_siteexecresource_group_name, name, subscription_idDeploys zipped content to a static site. Description for Deploys zipped content to a static site.
create_or_update_static_site_build_app_settingsexecresource_group_name, name, environment_name, subscription_idCreates or updates the app settings of a static site build. Description for Creates or updates the app settings of a static site build.
create_or_update_static_site_build_function_app_settingsexecresource_group_name, name, environment_name, subscription_idCreates or updates the function app settings of a static site build. Description for Creates or updates the function app settings of a static site build.
create_zip_deployment_for_static_site_buildexecresource_group_name, name, environment_name, subscription_idDeploys zipped content to a specific environment of a static site. Description for Deploys zipped content to a specific environment of a static site.
validate_custom_domain_can_be_added_to_static_siteexecresource_group_name, name, domain_name, subscription_idValidates a particular custom domain can be added to a static site. Description for Validates a particular custom domain can be added to a static site.
validate_backendexecresource_group_name, name, linked_backend_name, subscription_idValidates that a backend can be linked to a static site. Validates that a backend can be linked to a static site.
validate_backend_for_buildexecresource_group_name, name, environment_name, linked_backend_name, subscription_idValidates that a backend can be linked to a static site build. Validates that a backend can be linked to a static site build.
preview_workflowexeclocation, subscription_idGenerates a preview workflow file for the static site. Description for Generates a preview workflow file for the static site.

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
authproviderstringRequired.
basic_auth_namestringname of the basic auth entry. "default" Required.
database_connection_namestringName of the database connection. Required.
domain_namestringThe custom domain name. Required.
environment_namestringThe stage site identifier. Required.
function_app_namestringName of the function app registered with the static site. Required.
linked_backend_namestringName of the linked backend that should be retrieved. Required.
locationstringThe location name. Required.
namestringName of the static site. Required.
private_endpoint_connection_namestringName of the private endpoint connection. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
useridstringRequired.
isCleaningAuthConfigbooleanDecides if Easy Auth configuration will be removed from backend configuration. Default value is None.
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. Default value is None.

SELECT examples

Returns overview of a database connection for a static site build by name. Returns overview of a database connection for a static site build by name.

SELECT
id,
name,
configurationFiles,
connectionIdentity,
connectionString,
kind,
region,
resourceId,
systemData,
type
FROM azure.web.static_sites
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND name = '{{ name }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND database_connection_name = '{{ database_connection_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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

INSERT INTO azure.web.static_sites (
tags,
location,
properties,
kind,
sku,
identity,
resource_group_name,
name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ kind }}',
'{{ sku }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

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

UPDATE azure.web.static_sites
SET
kind = '{{ kind }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type;

REPLACE examples

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

REPLACE azure.web.static_sites
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
kind = '{{ kind }}',
sku = '{{ sku }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
kind,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Detach the user provided function app from the static site build. Description for Detach the user provided function app from the static site build.

DELETE FROM azure.web.static_sites
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND name = '{{ name }}' --required
AND environment_name = '{{ environment_name }}' --required
AND function_app_name = '{{ function_app_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets the application settings of a static site. Description for Gets the application settings of a static site.

EXEC azure.web.static_sites.list_static_site_app_settings 
@resource_group_name='{{ resource_group_name }}' --required,
@name='{{ name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;