az staticwebapp hostname
Manage custom hostnames of Functions of the static app.
Commands
Name | Description | Type | Status |
---|---|---|---|
az staticwebapp hostname delete |
Delete given hostname of the static app. |
Core | GA |
az staticwebapp hostname list |
List custom hostnames of the static app. |
Core | GA |
az staticwebapp hostname set |
Set given sub-domain hostname to the static app. Please configure CNAME/TXT/ALIAS record with your DNS provider. Use --no-wait to not wait for validation. |
Core | GA |
az staticwebapp hostname show |
Get details for a staticwebapp custom domain. Can be used to fetch validation token for TXT domain validation (see example). |
Core | GA |
az staticwebapp hostname delete
Delete given hostname of the static app.
az staticwebapp hostname delete --hostname
--name
[--no-wait]
[--resource-group]
[--yes]
Examples
Delete given hostname of the static app.
az staticwebapp hostname delete -n MyStaticAppName --hostname HostnameToDelete
Required Parameters
Custom hostname such as www.example.com. Only support sub domain in preview.
Name of the static site.
Optional Parameters
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Do not prompt for confirmation.
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 hostname list
List custom hostnames of the static app.
az staticwebapp hostname list --name
[--resource-group]
Examples
List custom hostnames of the static app.
az staticwebapp hostname list -n MyStaticAppName
Required Parameters
Name of the static site.
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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 hostname set
Set given sub-domain hostname to the static app. Please configure CNAME/TXT/ALIAS record with your DNS provider. Use --no-wait to not wait for validation.
az staticwebapp hostname set --hostname
--name
[--no-wait]
[--resource-group]
[--validation-method {cname-delegation, dns-txt-token}]
Examples
Set a hostname for a static app using CNAME validation (default)
az staticwebapp hostname set -n MyStaticAppName --hostname www.example.com
Set a root domain for a webapp using TXT validation
az staticwebapp hostname set -n MyStaticAppName --hostname example.com --validation-method "dns-txt-token"
Required Parameters
Custom hostname such as www.example.com. Only support sub domain in preview.
Name of the static site.
Optional Parameters
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Validation method for the custom domain.
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 hostname show
Get details for a staticwebapp custom domain. Can be used to fetch validation token for TXT domain validation (see example).
az staticwebapp hostname show --hostname
--name
--resource-group
Examples
Fetch the validation token (if generated) for TXT validation
az staticwebapp hostname show -n MyStaticAppName -g MyResourceGroup --hostname example.com --query "validationToken"
Show all custom domain details for a particular hostname
az staticwebapp hostname show -n MyStaticAppName -g MyResourceGroup --hostname example.com
Required Parameters
Custom hostname such as www.example.com. Only support sub domain in preview.
Name of the static site.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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