az cosmosdb identity

此命令群組處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

管理 Azure Cosmos DB 受控服務識別。

命令

名稱 Description 類型 狀態
az cosmosdb identity assign

指派 Azure Cosmos DB 資料庫帳戶的 SystemAssigned 身分識別。

核心 預覽版
az cosmosdb identity remove

移除 Azure Cosmos DB 資料庫帳戶的 SystemAssigned 身分識別。

核心 預覽版
az cosmosdb identity show

顯示 Azure Cosmos DB 資料庫帳戶的身分識別。

核心 預覽版

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

選擇性參數

--identities

要指派的空間分隔身分識別。 使用 '[system]' 來參考系統指派的身分識別。 預設值:'[system]'。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

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

選擇性參數

--identities

要移除的空間分隔身分識別。 使用 '[system]' 來參考系統指派的身分識別。 預設值:'[system]'。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

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

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

Cosmos DB 資料庫帳戶的名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。