az cosmosdb identity
此命令组处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
管理 Azure Cosmos DB 托管服务标识。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az cosmosdb identity assign |
为 Azure Cosmos DB 数据库帐户分配 SystemAssigned 标识。 |
Core | Preview |
| az cosmosdb identity remove |
删除 Azure Cosmos DB 数据库帐户的 SystemAssigned 标识。 |
Core | Preview |
| az cosmosdb identity show |
显示 Azure Cosmos DB 数据库帐户的标识。 |
Core | Preview |
az cosmosdb identity assign
命令组“cosmosdb 标识”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
为 Azure Cosmos DB 数据库帐户分配 SystemAssigned 标识。
az cosmosdb identity assign [--identities]
[--ids]
[--name]
[--resource-group]
[--subscription]
示例
为 Azure Cosmos DB 数据库帐户分配 SystemAssigned 标识。
az cosmosdb identity assign --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup
为 Azure Cosmos DB 数据库帐户分配一个 UserAssigned 标识。
az cosmosdb identity assign --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --identities /subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/MyRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyID
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
要分配的空间分隔标识。 使用“[system]”引用系统分配的标识。 默认值:“[system]”。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Cosmos DB 数据库帐户的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az cosmosdb identity remove
命令组“cosmosdb 标识”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
删除 Azure Cosmos DB 数据库帐户的 SystemAssigned 标识。
az cosmosdb identity remove [--identities]
[--ids]
[--name]
[--resource-group]
[--subscription]
示例
删除 Azure Cosmos DB 数据库帐户的 SystemAssigned 标识。
az cosmosdb identity remove --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup
删除 Azure Cosmos DB 数据库帐户的 UserAssigned 标识。
az cosmosdb identity remove --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup --identities /subscriptions/00000000-0000-0000-0000-00000000/resourcegroups/MyRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyID
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
要删除的空间分隔标识。 使用“[system]”引用系统分配的标识。 默认值:“[system]”。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Cosmos DB 数据库帐户的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az cosmosdb identity show
命令组“cosmosdb 标识”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
显示 Azure Cosmos DB 数据库帐户的标识。
az cosmosdb identity show [--ids]
[--name]
[--resource-group]
[--subscription]
示例
显示 Azure Cosmos DB 数据库帐户的标识。
az cosmosdb identity show --name MyCosmosDBDatabaseAccount --resource-group MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
Cosmos DB 数据库帐户的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |