你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az appconfig feature

管理存储在应用配置存储区中的功能标志。

命令

名称 说明 类型 Status
az appconfig feature delete

删除功能标志。

核心 加语
az appconfig feature disable

禁用功能标志以将其关闭以供使用。

核心 加语
az appconfig feature enable

启用功能标志以将其打开以供使用。

核心 加语
az appconfig feature filter

管理与存储在应用配置存储区中的功能标志关联的筛选器。

核心 加语
az appconfig feature filter add

将筛选器添加到功能标志。

核心 加语
az appconfig feature filter delete

从功能标志中删除筛选器。

核心 加语
az appconfig feature filter list

列出功能标志的所有筛选器。

核心 加语
az appconfig feature filter show

显示功能标志的筛选器。

核心 加语
az appconfig feature filter update

更新功能标志中的筛选器。

核心 加语
az appconfig feature list

列出功能标志。

核心 加语
az appconfig feature lock

锁定功能标志以禁止写入操作。

核心 加语
az appconfig feature set

设置功能标志。

核心 加语
az appconfig feature show

显示功能标志的所有属性。

核心 加语
az appconfig feature unlock

解锁功能以获取写入操作。

核心 加语

az appconfig feature delete

删除功能标志。

az appconfig feature delete [--auth-mode {key, login}]
                            [--connection-string]
                            [--endpoint]
                            [--feature]
                            [--key]
                            [--label]
                            [--name]
                            [--yes]

示例

使用应用配置存储名称删除功能,而无需确认。

az appconfig feature delete -n MyAppConfiguration --feature color --label MyLabel --yes

使用连接字符串删除功能。

az appconfig feature delete --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --feature color --label MyLabel

使用应用配置存储终结点和“az login”凭据删除功能。

az appconfig feature delete --endpoint https://myappconfiguration.azconfig.io --feature color --auth-mode login

删除名称为“Beta”但密钥为“.appconfig.featureflag/MyApp1:Beta”的功能。

az appconfig feature delete -n MyAppConfiguration --key .appconfig.featureflag/MyApp1:Beta --yes

可选参数

--auth-mode

此参数可用于指示如何授权数据操作。 如果身份验证模式为“密钥”,请提供连接字符串或存储名称,并且将检索帐户访问密钥以进行授权。 如果身份验证模式为“login”,请提供 --endpoint--name,并且“az login”凭据将用于授权。 可以使用 az configure --defaults appconfig_auth_mode=<auth_mode>配置默认身份验证模式。 有关详细信息,请参阅 https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac

接受的值: key, login
默认值: key
--connection-string

应用程序配置存储的访问密钥和终结点的组合。 可以使用“az appconfig credential list”找到。 用户可以使用名称AZURE_APPCONFIG_CONNECTION_STRING az configure --defaults appconfig_connection_string=<connection_string> 或环境变量来预设它。

--endpoint

如果身份验证模式为“登录”,请提供应用配置存储的终结点 URL。 可以使用“az appconfig show”命令检索终结点。 可以使用 az configure --defaults appconfig_endpoint=<endpoint>配置默认终结点。

--feature

要删除的功能的名称。 如果功能标志键与默认键不同,请改为提供 --key 参数。 支持星号作为筛选器,例如 * 表示所有功能和 abc* 表示具有 abc 作为前缀的功能。 不支持逗号分隔功能。 如果功能名称包含逗号,请提供转义字符串。

--key

功能标志的键。 密钥必须以“.appconfig.featureflag/”前缀开头。 键不能包含“%”字符。 如果同时提供键和功能参数,则仅使用密钥。 支持星号作为筛选器,例如“.appconfig.featureflag/”意味着所有功能,“.appconfig.featureflag/abc”意味着具有 abc 作为前缀的功能。 不支持逗号分隔功能。 如果功能名称包含逗号,请提供转义字符串。

--label

如果未指定任何标签,则默认删除具有 null 标签的功能标志。 支持星号作为筛选器,例如 * 表示所有标签和 abc* 表示带有 abc 作为前缀的标签。

--name -n

应用配置存储区的名称。 可以使用 az configure --defaults app_configuration_store=<name>配置默认名称。

--yes -y

不要提示确认。

默认值: False
全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az appconfig feature disable

禁用功能标志以将其关闭以供使用。

az appconfig feature disable [--auth-mode {key, login}]
                             [--connection-string]
                             [--endpoint]
                             [--feature]
                             [--key]
                             [--label]
                             [--name]
                             [--yes]

示例

使用应用配置存储名称禁用功能。

az appconfig feature disable -n MyAppConfiguration --feature color --label test

强制使用连接字符串禁用功能。

az appconfig feature disable --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --feature color --label test --yes

禁用名称为“Beta”但键为“.appconfig.featureflag/MyApp1:Beta”的功能。

az appconfig feature disable -n MyAppConfiguration --key .appconfig.featureflag/MyApp1:Beta

可选参数

--auth-mode

此参数可用于指示如何授权数据操作。 如果身份验证模式为“密钥”,请提供连接字符串或存储名称,并且将检索帐户访问密钥以进行授权。 如果身份验证模式为“login”,请提供 --endpoint--name,并且“az login”凭据将用于授权。 可以使用 az configure --defaults appconfig_auth_mode=<auth_mode>配置默认身份验证模式。 有关详细信息,请参阅 https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac

接受的值: key, login
默认值: key
--connection-string

应用程序配置存储的访问密钥和终结点的组合。 可以使用“az appconfig credential list”找到。 用户可以使用名称AZURE_APPCONFIG_CONNECTION_STRING az configure --defaults appconfig_connection_string=<connection_string> 或环境变量来预设它。

--endpoint

如果身份验证模式为“登录”,请提供应用配置存储的终结点 URL。 可以使用“az appconfig show”命令检索终结点。 可以使用 az configure --defaults appconfig_endpoint=<endpoint>配置默认终结点。

--feature

要禁用的功能的名称。 如果功能标志键与默认键不同,请改为提供 --key 参数。

--key

功能标志的键。 密钥必须以“.appconfig.featureflag/”前缀开头。 键不能包含“%”字符。 如果同时提供键和功能参数,则仅使用密钥。 默认键是保留前缀“.appconfig.featureflag/” + 功能名称。

--label

如果未指定标签,则默认禁用具有 null 标签的功能标志。

--name -n

应用配置存储区的名称。 可以使用 az configure --defaults app_configuration_store=<name>配置默认名称。

--yes -y

不要提示确认。

默认值: False
全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az appconfig feature enable

启用功能标志以将其打开以供使用。

az appconfig feature enable [--auth-mode {key, login}]
                            [--connection-string]
                            [--endpoint]
                            [--feature]
                            [--key]
                            [--label]
                            [--name]
                            [--yes]

示例

使用应用配置存储名称启用功能。

az appconfig feature enable -n MyAppConfiguration --feature color --label test

强制使用连接字符串启用功能。

az appconfig feature enable --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --feature color --label test --yes

启用名称为“Beta”但密钥为“.appconfig.featureflag/MyApp1:Beta”的功能。

az appconfig feature enable -n MyAppConfiguration --key .appconfig.featureflag/MyApp1:Beta

可选参数

--auth-mode

此参数可用于指示如何授权数据操作。 如果身份验证模式为“密钥”,请提供连接字符串或存储名称,并且将检索帐户访问密钥以进行授权。 如果身份验证模式为“login”,请提供 --endpoint--name,并且“az login”凭据将用于授权。 可以使用 az configure --defaults appconfig_auth_mode=<auth_mode>配置默认身份验证模式。 有关详细信息,请参阅 https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac

接受的值: key, login
默认值: key
--connection-string

应用程序配置存储的访问密钥和终结点的组合。 可以使用“az appconfig credential list”找到。 用户可以使用名称AZURE_APPCONFIG_CONNECTION_STRING az configure --defaults appconfig_connection_string=<connection_string> 或环境变量来预设它。

--endpoint

如果身份验证模式为“登录”,请提供应用配置存储的终结点 URL。 可以使用“az appconfig show”命令检索终结点。 可以使用 az configure --defaults appconfig_endpoint=<endpoint>配置默认终结点。

--feature

要启用的功能的名称。 如果功能标志键与默认键不同,请改为提供 --key 参数。

--key

功能标志的键。 密钥必须以“.appconfig.featureflag/”前缀开头。 键不能包含“%”字符。 如果同时提供键和功能参数,则仅使用密钥。 默认键是保留前缀“.appconfig.featureflag/” + 功能名称。

--label

如果未指定任何标签,则默认启用具有 null 标签的功能标志。

--name -n

应用配置存储区的名称。 可以使用 az configure --defaults app_configuration_store=<name>配置默认名称。

--yes -y

不要提示确认。

默认值: False
全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az appconfig feature list

列出功能标志。

az appconfig feature list [--all]
                          [--auth-mode {key, login}]
                          [--connection-string]
                          [--endpoint]
                          [--feature]
                          [--fields {conditions, description, key, label, last_modified, locked, name, state}]
                          [--key]
                          [--label]
                          [--name]
                          [--top]

示例

列出所有功能标志。

az appconfig feature list -n MyAppConfiguration

列出具有 null 标签的所有功能标志。

az appconfig feature list -n MyAppConfiguration --label \0

列出从 v1 开始的任何标签的特定功能。 使用连接字符串。

az appconfig feature list --feature color --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --label v1.*

列出具有任何标签的所有功能,并仅查询键、状态和条件。

az appconfig feature list --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --fields key state conditions

列出包含任何标签的 150 个功能标志。

az appconfig feature list --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx  --top 150

列出具有多个标签的功能标志。

az appconfig feature list --label test,prod,\0 -n MyAppConfiguration

列出以“MyApp1”开头的所有功能。

az appconfig feature list -n MyAppConfiguration --key .appconfig.featureflag/MyApp1*

可选参数

--all

列出所有功能标志。

默认值: False
--auth-mode

此参数可用于指示如何授权数据操作。 如果身份验证模式为“密钥”,请提供连接字符串或存储名称,并且将检索帐户访问密钥以进行授权。 如果身份验证模式为“login”,请提供 --endpoint--name,并且“az login”凭据将用于授权。 可以使用 az configure --defaults appconfig_auth_mode=<auth_mode>配置默认身份验证模式。 有关详细信息,请参阅 https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac

接受的值: key, login
默认值: key
--connection-string

应用程序配置存储的访问密钥和终结点的组合。 可以使用“az appconfig credential list”找到。 用户可以使用名称AZURE_APPCONFIG_CONNECTION_STRING az configure --defaults appconfig_connection_string=<connection_string> 或环境变量来预设它。

--endpoint

如果身份验证模式为“登录”,请提供应用配置存储的终结点 URL。 可以使用“az appconfig show”命令检索终结点。 可以使用 az configure --defaults appconfig_endpoint=<endpoint>配置默认终结点。

--feature

要列出的功能的名称。 如果功能标志键与默认键不同,请改为提供 --key 参数。 支持星号作为筛选器,例如 * 表示所有功能和 abc* 表示具有 abc 作为前缀的功能。 不支持逗号分隔功能。 如果功能名称包含逗号,请提供转义字符串。

--fields

自定义功能标志的输出字段。

接受的值: conditions, description, key, label, last_modified, locked, name, state
--key

功能标志的键。 密钥必须以“.appconfig.featureflag/”前缀开头。 键不能包含“%”字符。 如果同时提供键和功能参数,则仅使用密钥。 支持星号作为筛选器,例如“.appconfig.featureflag/”意味着所有功能,“.appconfig.featureflag/abc”意味着具有 abc 作为前缀的功能。 不支持逗号分隔功能。 如果功能名称包含逗号,请提供转义字符串。

--label

如果未指定任何标签,请列出所有标签。 支持星号作为筛选器,例如 * 表示所有标签和 abc* 表示带有 abc 作为前缀的标签。 将“\0”用于 null 标签。

--name -n

应用配置存储区的名称。 可以使用 az configure --defaults app_configuration_store=<name>配置默认名称。

--top -t

要返回的最大项数。 必须是正整数。 默认值为 100。

全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az appconfig feature lock

锁定功能标志以禁止写入操作。

az appconfig feature lock [--auth-mode {key, login}]
                          [--connection-string]
                          [--endpoint]
                          [--feature]
                          [--key]
                          [--label]
                          [--name]
                          [--yes]

示例

使用应用配置存储名称锁定功能。

az appconfig feature lock -n MyAppConfiguration --feature color --label test

使用连接字符串强制锁定功能。

az appconfig feature lock --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --feature color --label test --yes

锁定名称为“Beta”但键为“.appconfig.featureflag/MyApp1:Beta”的功能。

az appconfig feature lock -n MyAppConfiguration --key .appconfig.featureflag/MyApp1:Beta

可选参数

--auth-mode

此参数可用于指示如何授权数据操作。 如果身份验证模式为“密钥”,请提供连接字符串或存储名称,并且将检索帐户访问密钥以进行授权。 如果身份验证模式为“login”,请提供 --endpoint--name,并且“az login”凭据将用于授权。 可以使用 az configure --defaults appconfig_auth_mode=<auth_mode>配置默认身份验证模式。 有关详细信息,请参阅 https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac

接受的值: key, login
默认值: key
--connection-string

应用程序配置存储的访问密钥和终结点的组合。 可以使用“az appconfig credential list”找到。 用户可以使用名称AZURE_APPCONFIG_CONNECTION_STRING az configure --defaults appconfig_connection_string=<connection_string> 或环境变量来预设它。

--endpoint

如果身份验证模式为“登录”,请提供应用配置存储的终结点 URL。 可以使用“az appconfig show”命令检索终结点。 可以使用 az configure --defaults appconfig_endpoint=<endpoint>配置默认终结点。

--feature

要锁定的功能的名称。 如果功能标志键与默认键不同,请改为提供 --key 参数。

--key

功能标志的键。 密钥必须以“.appconfig.featureflag/”前缀开头。 键不能包含“%”字符。 如果同时提供键和功能参数,则仅使用密钥。 默认键是保留前缀“.appconfig.featureflag/” + 功能名称。

--label

如果未指定任何标签,则默认使用 null 标签锁定功能标志。

--name -n

应用配置存储区的名称。 可以使用 az configure --defaults app_configuration_store=<name>配置默认名称。

--yes -y

不要提示确认。

默认值: False
全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az appconfig feature set

设置功能标志。

az appconfig feature set [--auth-mode {key, login}]
                         [--connection-string]
                         [--description]
                         [--endpoint]
                         [--feature]
                         [--key]
                         [--label]
                         [--name]
                         [--requirement-type {all, any}]
                         [--yes]

示例

使用标签 MyLabel 设置功能标志。

az appconfig feature set -n MyAppConfiguration --feature color --label MyLabel

使用连接字符串设置具有 null 标签的功能标志并设置说明。

az appconfig feature set --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --feature color --description "This is a colorful feature"

使用“az login”凭据设置功能标志。

az appconfig feature set --endpoint https://myappconfiguration.azconfig.io --feature color --label MyLabel --auth-mode login

使用名称“Beta”和自定义密钥“.appconfig.featureflag/MyApp1:Beta”设置功能标志。

az appconfig feature set -n MyAppConfiguration --feature Beta --key .appconfig.featureflag/MyApp1:Beta

可选参数

--auth-mode

此参数可用于指示如何授权数据操作。 如果身份验证模式为“密钥”,请提供连接字符串或存储名称,并且将检索帐户访问密钥以进行授权。 如果身份验证模式为“login”,请提供 --endpoint--name,并且“az login”凭据将用于授权。 可以使用 az configure --defaults appconfig_auth_mode=<auth_mode>配置默认身份验证模式。 有关详细信息,请参阅 https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac

接受的值: key, login
默认值: key
--connection-string

应用程序配置存储的访问密钥和终结点的组合。 可以使用“az appconfig credential list”找到。 用户可以使用名称AZURE_APPCONFIG_CONNECTION_STRING az configure --defaults appconfig_connection_string=<connection_string> 或环境变量来预设它。

--description

要设置的功能标志的说明。

--endpoint

如果身份验证模式为“登录”,请提供应用配置存储的终结点 URL。 可以使用“az appconfig show”命令检索终结点。 可以使用 az configure --defaults appconfig_endpoint=<endpoint>配置默认终结点。

--feature

要设置的功能标志的名称。 功能名称不能包含“%”字符。

--key

功能标志的键。 密钥必须以“.appconfig.featureflag/”前缀开头。 键不能包含“%”字符。 默认键是保留前缀“.appconfig.featureflag/” + 功能名称。

--label

如果未指定任何标签,则默认使用 null 标签设置功能标志。

--name -n

应用配置存储区的名称。 可以使用 az configure --defaults app_configuration_store=<name>配置默认名称。

--requirement-type

要求类型确定筛选器在评估功能状态时是否应使用“Any”或“All”逻辑。

接受的值: all, any
--yes -y

不要提示确认。

默认值: False
全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az appconfig feature show

显示功能标志的所有属性。

az appconfig feature show [--auth-mode {key, login}]
                          [--connection-string]
                          [--endpoint]
                          [--feature]
                          [--fields {conditions, description, key, label, last_modified, locked, name, state}]
                          [--key]
                          [--label]
                          [--name]

示例

使用具有特定标签的应用配置存储名称显示功能标志

az appconfig feature show -n MyAppConfiguration --feature color --label MyLabel

使用连接字符串和字段筛选器显示功能标志

az appconfig feature show --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --feature color --fields key locked conditions state

使用应用配置存储终结点和“az login”凭据显示功能标志。

az appconfig feature show --endpoint https://myappconfiguration.azconfig.io --feature color --auth-mode login

显示名称为“Beta”但键为“.appconfig.featureflag/MyApp1:Beta”的功能。

az appconfig feature show -n MyAppConfiguration --key .appconfig.featureflag/MyApp1:Beta

可选参数

--auth-mode

此参数可用于指示如何授权数据操作。 如果身份验证模式为“密钥”,请提供连接字符串或存储名称,并且将检索帐户访问密钥以进行授权。 如果身份验证模式为“login”,请提供 --endpoint--name,并且“az login”凭据将用于授权。 可以使用 az configure --defaults appconfig_auth_mode=<auth_mode>配置默认身份验证模式。 有关详细信息,请参阅 https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac

接受的值: key, login
默认值: key
--connection-string

应用程序配置存储的访问密钥和终结点的组合。 可以使用“az appconfig credential list”找到。 用户可以使用名称AZURE_APPCONFIG_CONNECTION_STRING az configure --defaults appconfig_connection_string=<connection_string> 或环境变量来预设它。

--endpoint

如果身份验证模式为“登录”,请提供应用配置存储的终结点 URL。 可以使用“az appconfig show”命令检索终结点。 可以使用 az configure --defaults appconfig_endpoint=<endpoint>配置默认终结点。

--feature

要检索的功能标志的名称。 如果功能标志键与默认键不同,请改为提供 --key 参数。

--fields

自定义功能标志的输出字段。

接受的值: conditions, description, key, label, last_modified, locked, name, state
--key

功能标志的键。 密钥必须以“.appconfig.featureflag/”前缀开头。 键不能包含“%”字符。 如果同时提供键和功能参数,则仅使用密钥。 默认键是保留前缀“.appconfig.featureflag/” + 功能名称。

--label

如果未指定任何标签,则显示带有 null 标签的条目。 不支持筛选。

--name -n

应用配置存储区的名称。 可以使用 az configure --defaults app_configuration_store=<name>配置默认名称。

全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。

az appconfig feature unlock

解锁功能以获取写入操作。

az appconfig feature unlock [--auth-mode {key, login}]
                            [--connection-string]
                            [--endpoint]
                            [--feature]
                            [--key]
                            [--label]
                            [--name]
                            [--yes]

示例

使用应用配置存储名称解锁功能。

az appconfig feature unlock -n MyAppConfiguration --feature color --label test

使用连接字符串强制解锁功能。

az appconfig feature unlock --connection-string Endpoint=https://contoso.azconfig.io;Id=xxx;Secret=xxx --feature color --label test --yes

解锁名称为“Beta”但密钥为“.appconfig.featureflag/MyApp1:Beta”的功能。

az appconfig feature unlock -n MyAppConfiguration --key .appconfig.featureflag/MyApp1:Beta

可选参数

--auth-mode

此参数可用于指示如何授权数据操作。 如果身份验证模式为“密钥”,请提供连接字符串或存储名称,并且将检索帐户访问密钥以进行授权。 如果身份验证模式为“login”,请提供 --endpoint--name,并且“az login”凭据将用于授权。 可以使用 az configure --defaults appconfig_auth_mode=<auth_mode>配置默认身份验证模式。 有关详细信息,请参阅 https://learn.microsoft.com/azure/azure-app-configuration/concept-enable-rbac

接受的值: key, login
默认值: key
--connection-string

应用程序配置存储的访问密钥和终结点的组合。 可以使用“az appconfig credential list”找到。 用户可以使用名称AZURE_APPCONFIG_CONNECTION_STRING az configure --defaults appconfig_connection_string=<connection_string> 或环境变量来预设它。

--endpoint

如果身份验证模式为“登录”,请提供应用配置存储的终结点 URL。 可以使用“az appconfig show”命令检索终结点。 可以使用 az configure --defaults appconfig_endpoint=<endpoint>配置默认终结点。

--feature

要解锁的功能的名称。 如果功能标志键与默认键不同,请改为提供 --key 参数。

--key

功能标志的键。 密钥必须以“.appconfig.featureflag/”前缀开头。 键不能包含“%”字符。 如果同时提供键和功能参数,则仅使用密钥。 默认键是保留前缀“.appconfig.featureflag/” + 功能名称。

--label

如果未指定标签,则默认使用 null 标签解锁功能标志。

--name -n

应用配置存储区的名称。 可以使用 az configure --defaults app_configuration_store=<name>配置默认名称。

--yes -y

不要提示确认。

默认值: False
全局参数
--debug

增加日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关详细信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID配置默认订阅。

--verbose

增加日志记录详细程度。 对完整调试日志使用 --debug。