Dijeli putem


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

--hostname

Custom hostname such as www.example.com. Only support sub domain in preview.

--name -n

Name of the static site.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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 -n

Name of the static site.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--hostname

Custom hostname such as www.example.com. Only support sub domain in preview.

--name -n

Name of the static site.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--validation-method -m

Validation method for the custom domain.

Accepted values: cname-delegation, dns-txt-token
Default value: cname-delegation
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--hostname

Custom hostname such as www.example.com. Only support sub domain in preview.

--name -n

Name of the static site.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.