แชร์ผ่าน


az appconfig snapshot

Manage snapshots associated with an app configuration store.

Commands

Name Description Type Status
az appconfig snapshot archive

Archive a snapshot.

Core GA
az appconfig snapshot create

Create an app configuration snapshot.

Core GA
az appconfig snapshot list

List snapshots.

Core GA
az appconfig snapshot recover

Recover an archived snapshot.

Core GA
az appconfig snapshot show

Show all attributes of an app configuration snapshot.

Core GA

az appconfig snapshot archive

Archive a snapshot.

az appconfig snapshot archive --snapshot-name
                              [--auth-mode {key, login}]
                              [--connection-string]
                              [--endpoint]
                              [--name]

Examples

Archive snapshot MySnapshot in configuration store MyAppConfiguration.

az appconfig snapshot archive -s MySnapshot -n MyAppConfiguration

Required Parameters

--snapshot-name -s

Name of the App Configuration snapshot.

Optional Parameters

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

--auth-mode

This parameter can be used for indicating how a data operation is to be authorized. If the auth mode is "key", provide connection string or store name and your account access keys will be retrieved for authorization. If the auth mode is "login", provide the --endpoint or --name and your "az login" credentials will be used for authorization. You can configure the default auth mode using az configure --defaults appconfig_auth_mode=<auth_mode>. For more information, see https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac.

Property Value
Default value: key
Accepted values: key, login
--connection-string

Combination of access key and endpoint of the App Configuration store. Can be found using 'az appconfig credential list'. Users can preset it using az configure --defaults appconfig_connection_string=<connection_string> or environment variable with the name AZURE_APPCONFIG_CONNECTION_STRING.

--endpoint

If auth mode is "login", provide endpoint URL of the App Configuration store. The endpoint can be retrieved using "az appconfig show" command. You can configure the default endpoint using az configure --defaults appconfig_endpoint=<endpoint>.

--name -n

Name of the App Configuration store. You can configure the default name using az configure --defaults app_configuration_store=<name>.

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 appconfig snapshot create

Create an app configuration snapshot.

az appconfig snapshot create --filters
                             --snapshot-name
                             [--auth-mode {key, login}]
                             [--composition-type {key, key_label}]
                             [--connection-string]
                             [--endpoint]
                             [--name]
                             [--retention-period]
                             [--tags]

Examples

Create a snapshot MySnapshot of all keys starting with 'Test' in configuration store MyAppConfiguration.

az appconfig snapshot create -s MySnapshot -n MyAppConfiguration --filters '{\"key\":\"Test*\"}'

Create a snapshot MySnapshot of all keys starting with 'abc' and a retention period of 1 hour.

az appconfig snapshot create -s MySnapshot -n MyAppConfiguration --filters '{\"key\":\"abc*\"}' --retention-period 3600

Create a snapshot of all keys starting with 'app/' and no label as default, then override the key-values with keys with the label 'prod' if they exist.

az appconfig snapshot create -s MySnapshot -n MyAppConfiguration --filters '{\"key\":\"app/*\"}' '{\"key\":\"app/*\", \"label\":\"prod\"}' --composition-type 'key'

Create a snapshot of all keys starting with 'Test' and have tags 'tag1=value1' and 'tag2=value2'.

az appconfig snapshot create -s MySnapshot -n MyAppConfiguration --filters '{\"key\":\"Test*\", \"tags\":[\"tag1=value1\", \"tag2=value2\"]}'

Required Parameters

--filters

Space-separated list of escaped JSON objects that represent the key, label and tag filters used to build an App Configuration snapshot.

--snapshot-name -s

Name of the App Configuration snapshot.

Optional Parameters

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

--auth-mode

This parameter can be used for indicating how a data operation is to be authorized. If the auth mode is "key", provide connection string or store name and your account access keys will be retrieved for authorization. If the auth mode is "login", provide the --endpoint or --name and your "az login" credentials will be used for authorization. You can configure the default auth mode using az configure --defaults appconfig_auth_mode=<auth_mode>. For more information, see https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac.

Property Value
Default value: key
Accepted values: key, login
--composition-type

Composition type used in building App Configuration snapshots. If not specified, defaults to key.

Property Value
Accepted values: key, key_label
--connection-string

Combination of access key and endpoint of the App Configuration store. Can be found using 'az appconfig credential list'. Users can preset it using az configure --defaults appconfig_connection_string=<connection_string> or environment variable with the name AZURE_APPCONFIG_CONNECTION_STRING.

--endpoint

If auth mode is "login", provide endpoint URL of the App Configuration store. The endpoint can be retrieved using "az appconfig show" command. You can configure the default endpoint using az configure --defaults appconfig_endpoint=<endpoint>.

--name -n

Name of the App Configuration store. You can configure the default name using az configure --defaults app_configuration_store=<name>.

--retention-period

Duration in seconds for which a snapshot can remain archived before expiry. A snapshot can be archived for a maximum of 7 days (604,800s) for free and developer tier stores and 90 days (7,776,000s) for standard and premium tier stores. If specified, retention period must be at least 1 hour (3600s).

--tags

Space-separated tags: key[=value] [key[=value] ...].

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 appconfig snapshot list

List snapshots.

az appconfig snapshot list [--all]
                           [--auth-mode {key, login}]
                           [--connection-string]
                           [--endpoint]
                           [--fields {composition_type, created, etag, expires, filters, items_count, name, retention_period, size, status, tags}]
                           [--name]
                           [--snapshot-name]
                           [--status {archived, failed, provisioning, ready}]
                           [--top]

Examples

List all snapshots with names starting with the prefix 'abc'.

az appconfig snapshot list -s abc* -n MyAppConfiguration

List all archived snapshots.

az appconfig snapshot list --status archived -n MyAppConfiguration

List all provisioning snapshots with names starting with the prefix 'app'.

az appconfig snapshot list -s app* --status provisioning -n MyAppConfiguration

List all failed and provisioning snapshots.

az appconfig snapshot list --status failed provisioning -n MyAppConfiguration

Optional Parameters

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

--all

List all items.

--auth-mode

This parameter can be used for indicating how a data operation is to be authorized. If the auth mode is "key", provide connection string or store name and your account access keys will be retrieved for authorization. If the auth mode is "login", provide the --endpoint or --name and your "az login" credentials will be used for authorization. You can configure the default auth mode using az configure --defaults appconfig_auth_mode=<auth_mode>. For more information, see https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac.

Property Value
Default value: key
Accepted values: key, login
--connection-string

Combination of access key and endpoint of the App Configuration store. Can be found using 'az appconfig credential list'. Users can preset it using az configure --defaults appconfig_connection_string=<connection_string> or environment variable with the name AZURE_APPCONFIG_CONNECTION_STRING.

--endpoint

If auth mode is "login", provide endpoint URL of the App Configuration store. The endpoint can be retrieved using "az appconfig show" command. You can configure the default endpoint using az configure --defaults appconfig_endpoint=<endpoint>.

--fields

Customize output fields for Snapshots.

Property Value
Accepted values: composition_type, created, etag, expires, filters, items_count, name, retention_period, size, status, tags
--name -n

Name of the App Configuration store. You can configure the default name using az configure --defaults app_configuration_store=<name>.

--snapshot-name -s

If no name specified, return all snapshots by default. Support star sign as filters, for instance abc* means snapshots with abc as prefix to the name.

Property Value
Default value: *
--status

Filter snapshots by their status. If no status specified, return all snapshots by default.

Property Value
Accepted values: archived, failed, provisioning, ready
--top -t

Maximum number of items to return. Must be a positive integer. Default to 100.

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 appconfig snapshot recover

Recover an archived snapshot.

az appconfig snapshot recover --snapshot-name
                              [--auth-mode {key, login}]
                              [--connection-string]
                              [--endpoint]
                              [--name]

Examples

Recover snapshot MySnapshot in configuration store MyAppConfiguration.

az appconfig snapshot recover -s MySnapshot -n MyAppConfiguration

Required Parameters

--snapshot-name -s

Name of the App Configuration snapshot.

Optional Parameters

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

--auth-mode

This parameter can be used for indicating how a data operation is to be authorized. If the auth mode is "key", provide connection string or store name and your account access keys will be retrieved for authorization. If the auth mode is "login", provide the --endpoint or --name and your "az login" credentials will be used for authorization. You can configure the default auth mode using az configure --defaults appconfig_auth_mode=<auth_mode>. For more information, see https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac.

Property Value
Default value: key
Accepted values: key, login
--connection-string

Combination of access key and endpoint of the App Configuration store. Can be found using 'az appconfig credential list'. Users can preset it using az configure --defaults appconfig_connection_string=<connection_string> or environment variable with the name AZURE_APPCONFIG_CONNECTION_STRING.

--endpoint

If auth mode is "login", provide endpoint URL of the App Configuration store. The endpoint can be retrieved using "az appconfig show" command. You can configure the default endpoint using az configure --defaults appconfig_endpoint=<endpoint>.

--name -n

Name of the App Configuration store. You can configure the default name using az configure --defaults app_configuration_store=<name>.

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 appconfig snapshot show

Show all attributes of an app configuration snapshot.

az appconfig snapshot show --snapshot-name
                           [--auth-mode {key, login}]
                           [--connection-string]
                           [--endpoint]
                           [--fields {composition_type, created, etag, expires, filters, items_count, name, retention_period, size, status, tags}]
                           [--name]

Examples

Show an app configuration snapshot with name MySnapshot in configuration store MyAppConfiguration.

az appconfig snapshot show -s MySnapshot -n MyAppConfiguration

Required Parameters

--snapshot-name -s

Name of the App Configuration snapshot.

Optional Parameters

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

--auth-mode

This parameter can be used for indicating how a data operation is to be authorized. If the auth mode is "key", provide connection string or store name and your account access keys will be retrieved for authorization. If the auth mode is "login", provide the --endpoint or --name and your "az login" credentials will be used for authorization. You can configure the default auth mode using az configure --defaults appconfig_auth_mode=<auth_mode>. For more information, see https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac.

Property Value
Default value: key
Accepted values: key, login
--connection-string

Combination of access key and endpoint of the App Configuration store. Can be found using 'az appconfig credential list'. Users can preset it using az configure --defaults appconfig_connection_string=<connection_string> or environment variable with the name AZURE_APPCONFIG_CONNECTION_STRING.

--endpoint

If auth mode is "login", provide endpoint URL of the App Configuration store. The endpoint can be retrieved using "az appconfig show" command. You can configure the default endpoint using az configure --defaults appconfig_endpoint=<endpoint>.

--fields

Customize output fields for Snapshots.

Property Value
Accepted values: composition_type, created, etag, expires, filters, items_count, name, retention_period, size, status, tags
--name -n

Name of the App Configuration store. You can configure the default name using az configure --defaults app_configuration_store=<name>.

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