az site key

Note

This reference is part of the site extension for the Azure CLI (version 2.75.0 or higher). The extension will automatically install the first time you run an az site key command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Site Keys for Azure Edge sites.

Commands

Name Description Type Status
az site key create

Create a site key linked to a site.

Extension Preview
az site key delete

Delete a site key.

Extension Preview
az site key download

Download the token for a site key.

Extension Preview
az site key list

List all site keys in a resource group.

Extension Preview
az site key show

Get details of a specific site key.

Extension Preview

az site key create

Preview

Command group 'az site key' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a site key linked to a site.

az site key create --name --site-key-name
                   --resource-group
                   --site-name
                   [--acquire-policy-token]
                   [--change-reference]
                   [--token-expiry-date]

Examples

Create a site key at resource group scope

az site key create --name TestSiteKeyName --resource-group TestRGName --site-name TestSiteName

Create a site key with custom token expiry

az site key create --name TestSiteKeyName --resource-group TestRGName --site-name TestSiteName --token-expiry-date "2026-05-01T00:00:00Z"

Required Parameters

--name --site-key-name -n

Name of the SiteKey.

--resource-group -g

Name of the resource group.

--site-name

Name of the site to link this key to. Used to construct the site ARM resource ID.

Property Value
Parameter group: Properties Arguments

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--token-expiry-date

Token expiry date in ISO 8601 format (e.g., 2026-05-01T00:00:00Z). Defaults to 7 days from now.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az site key delete

Preview

Command group 'az site key' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a site key.

az site key delete --name --site-key-name
                   --resource-group
                   [--acquire-policy-token]
                   [--change-reference]
                   [--yes]

Examples

Delete a site key at resource group scope

az site key delete --name TestSiteKeyName --resource-group TestRGName

Required Parameters

--name --site-key-name -n

Name of the SiteKey.

--resource-group -g

Name of the resource group.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az site key download

Preview

Command group 'az site key' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Download the token for a site key.

Downloads the site key token and saves it to a file. If --file is not specified, the token is saved to <key-name>.SiteKey in the current directory.

az site key download --name --site-key-name
                     --resource-group
                     [--acquire-policy-token]
                     [--change-reference]
                     [--file]

Examples

Download a site key token

az site key download --name TestSiteKeyName --resource-group TestRGName

Download a site key token to a specific file

az site key download --name TestSiteKeyName --resource-group TestRGName --file ./my-token.SiteKey

Required Parameters

--name --site-key-name -n

Name of the SiteKey.

--resource-group -g

Name of the resource group.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--file -f

Output file path for the downloaded token. Defaults to <key-name>.SiteKey in the current directory.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az site key list

Preview

Command group 'az site key' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all site keys in a resource group.

az site key list --resource-group
                 [--max-items]
                 [--next-token]

Examples

List site keys at resource group scope

az site key list --resource-group TestRGName

Required Parameters

--resource-group -g

Name of the resource group.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az site key show

Preview

Command group 'az site key' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get details of a specific site key.

az site key show --name --site-key-name
                 --resource-group

Examples

Show a site key at resource group scope

az site key show --name TestSiteKeyName --resource-group TestRGName

Required Parameters

--name --site-key-name -n

Name of the SiteKey.

--resource-group -g

Name of the resource group.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False