az staticwebapp backends
Link or unlink a prexisting backend with a static web app. Also known as "Bring your own API.".
Commands
Name | Description | Type | Status |
---|---|---|---|
az staticwebapp backends link |
Link a backend to a static web app. Also known as "Bring your own API.". |
Core | GA |
az staticwebapp backends show |
Show details on the backend linked to a static web app. |
Core | GA |
az staticwebapp backends unlink |
Unlink backend from a static web app. |
Core | GA |
az staticwebapp backends validate |
Validate a backend for a static web app. |
Core | GA |
az staticwebapp backends link
Link a backend to a static web app. Also known as "Bring your own API.".
Only one backend is available to a single static web app. If a backend was previously linked to another static Web App, the auth configuration must first be removed from the backend before linking to a different Static Web App. Static web app SKU must be "Standard" or "Dedicated". Supported backend types are Azure Functions, Azure API Management, Azure App Service, Azure Container Apps. Backend region must be provided for backends of type Azure Functions and Azure App Service. See https://learn.microsoft.com/azure/static-web-apps/apis-overview to learn more.
az staticwebapp backends link --backend-resource-id
--name
--resource-group
[--backend-region]
[--environment-name]
Examples
Link a backend to a static web app
az staticwebapp backends link -n MyStaticAppName -g MyResourceGroup --backend-resource-id "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/<resource-provider>/<resource-type>/<backend-name>" --backend-region MyBackendRegion
Link a backend to a static web app environment
az staticwebapp backends link -n MyStaticAppName -g MyResourceGroup --environment-name MyEnvironmentName --backend-resource-id "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/<resource-provider>/<resource-type>/<backend-name>" --backend-region MyBackendRegion
Required Parameters
Resource ID of the backend to link.
Name of the static site.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Region of the backend resource.
Name of the environment of static site.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az staticwebapp backends show
Show details on the backend linked to a static web app.
az staticwebapp backends show --name
--resource-group
[--environment-name]
Examples
Show static web app backends.
az staticwebapp backends show -n MyStaticAppName -g MyResourceGroup
Show static web app backends for environment.
az staticwebapp backends show -n MyStaticAppName -g MyResourceGroup --environment-name MyEnvironmentName
Required Parameters
Name of the static site.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Name of the environment of static site.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az staticwebapp backends unlink
Unlink backend from a static web app.
az staticwebapp backends unlink --name
--resource-group
[--environment-name]
[--remove-backend-auth]
Examples
Unlink static app backends.
az staticwebapp backends unlink -n MyStaticAppName -g MyResourceGroup
Unlink backend from static web app environment and remove auth config from backend.
az staticwebapp backends unlink -n MyStaticAppName -g MyResourceGroup --environment-name MyEnvironmentName --remove-backend-auth
Required Parameters
Name of the static site.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Name of the environment of static site.
If set to true, removes the identity provider configured on the backend during the linking process.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az staticwebapp backends validate
Validate a backend for a static web app.
Only one backend is available to a single static web app. If a backend was previously linked to another static Web App, the auth configuration must first be removed from the backend before linking to a different Static Web App. Static web app SKU must be "Standard" or "Dedicated". Supported backend types are Azure Functions, Azure API Management, Azure App Service, Azure Container Apps. Backend region must be provided for backends of type Azure Functions and Azure App Service. See https://learn.microsoft.com/azure/static-web-apps/apis-overview to learn more.
az staticwebapp backends validate --backend-resource-id
--name
--resource-group
[--backend-region]
[--environment-name]
Examples
Validate a backend for a static web app
az staticwebapp backends validate -n MyStaticAppName -g MyResourceGroup --backend-resource-id "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/<resource-provider>/<resource-type>/<backend-name>" --backend-region MyBackendRegion
Validate a backend for a static web app environment
az staticwebapp backends validate -n MyStaticAppName -g MyResourceGroup --environment-name MyEnvironmentName --backend-resource-id "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/<resource-provider>/<resource-type>/<backend-name>" --backend-region MyBackendRegion
Required Parameters
Resource ID of the backend to link.
Name of the static site.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Region of the backend resource.
Name of the environment of static site.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI