az cosmosdb sql role assignment
管理 Azure Cosmos DB SQL 角色指派。
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az cosmosdb sql role assignment create |
在 Azure Cosmos DB 帳戶下建立 SQL 角色指派。 |
Core | GA |
| az cosmosdb sql role assignment delete |
刪除 Azure Cosmos DB 帳戶下的 SQL 角色指派。 |
Core | GA |
| az cosmosdb sql role assignment exists |
檢查 Azure Cosmos DB 角色指派是否存在。 |
Core | GA |
| az cosmosdb sql role assignment list |
列出 Azure Cosmos DB 帳戶下的所有 SQL 角色指派。 |
Core | GA |
| az cosmosdb sql role assignment show |
顯示 Azure Cosmos DB 帳戶下 SQL 角色指派的屬性。 |
Core | GA |
| az cosmosdb sql role assignment update |
更新 Azure Cosmos DB 帳戶下的 SQL 角色指派。 |
Core | GA |
| az cosmosdb sql role assignment wait |
輪詢 SQL 角色指派,直到符合特定條件為止。 |
Core | GA |
az cosmosdb sql role assignment create
在 Azure Cosmos DB 帳戶下建立 SQL 角色指派。
az cosmosdb sql role assignment create --account-name
--principal-id
--resource-group
--scope
[--no-wait]
[--role-assignment-id]
[--role-definition-id]
[--role-definition-name]
範例
使用角色定義名稱,在 Azure Cosmos DB 帳戶下建立 SQL 角色指派。
az cosmosdb sql role assignment create --account-name MyAccount --resource-group MyResourceGroup \
--role-assignment-id cb8ed2d7-2371-4e3c-bd31-6cc1560e84f8 \
--role-definition-name "My Read Only Role" \
--scope "/dbs/mydb/colls/mycontainer" \
--principal-id 6328f5f7-dbf7-4244-bba8-fbb9d8066506
使用角色定義標識碼,在 Azure Cosmos DB 帳戶下建立 SQL 角色指派。
az cosmosdb sql role assignment create --account-name MyAccount --resource-group MyResourceGroup \
--role-assignment-id cb8ed2d7-2371-4e3c-bd31-6cc1560e84f8 \
--role-definition-id be79875a-2cc4-40d5-8958-566017875b39 \
--scope "/dbs/mydb/colls/mycontainer" \
--principal-id 6328f5f7-dbf7-4244-bba8-fbb9d8066506
必要參數
Cosmosdb 帳戶名稱。
要授與此角色指派之主體的 AAD 物件標識碼。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
要授與此角色指派的數據平面資源路徑。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
選擇性的 [建立]。 角色指派的唯一標識符。 如果未提供,則會使用新的 GUID。
此角色指派所參考之角色定義的唯一標識符。
此角色指派所參考之角色定義的唯一名稱。 Eg. 'Contoso 讀者角色'。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql role assignment delete
刪除 Azure Cosmos DB 帳戶下的 SQL 角色指派。
az cosmosdb sql role assignment delete --account-name
--resource-group
--role-assignment-id
[--no-wait]
[--yes]
範例
刪除 Azure Cosmos DB 帳戶下的 SQL 角色指派。
az cosmosdb sql role assignment delete --account-name MyAccount --resource-group MyResourceGroup --role-assignment-id cb8ed2d7-2371-4e3c-bd31-6cc1560e84f8
必要參數
Cosmosdb 帳戶名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性的 [建立]。 角色指派的唯一標識符。 如果未提供,則會使用新的 GUID。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
請勿提示確認。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql role assignment exists
檢查 Azure Cosmos DB 角色指派是否存在。
az cosmosdb sql role assignment exists --account-name
--resource-group
--role-assignment-id
範例
檢查 Azure Cosmos DB 角色指派是否存在。
az cosmosdb sql role assignment exists --account-name MyAccount --resource-group MyResourceGroup --role-assignment-id cb8ed2d7-2371-4e3c-bd31-6cc1560e84f8
必要參數
Cosmosdb 帳戶名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性的 [建立]。 角色指派的唯一標識符。 如果未提供,則會使用新的 GUID。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql role assignment list
列出 Azure Cosmos DB 帳戶下的所有 SQL 角色指派。
az cosmosdb sql role assignment list --account-name
--resource-group
範例
列出 Azure Cosmos DB 帳戶下的所有 SQL 角色指派。
az cosmosdb sql role assignment list --account-name MyAccount --resource-group MyResourceGroup
必要參數
Cosmosdb 帳戶名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql role assignment show
顯示 Azure Cosmos DB 帳戶下 SQL 角色指派的屬性。
az cosmosdb sql role assignment show --account-name
--resource-group
--role-assignment-id
範例
顯示 Azure Cosmos DB 帳戶下 SQL 角色指派的屬性。
az cosmosdb sql role assignment show --account-name MyAccount --resource-group MyResourceGroup --role-assignment-id cb8ed2d7-2371-4e3c-bd31-6cc1560e84f8
必要參數
Cosmosdb 帳戶名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性的 [建立]。 角色指派的唯一標識符。 如果未提供,則會使用新的 GUID。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql role assignment update
更新 Azure Cosmos DB 帳戶下的 SQL 角色指派。
az cosmosdb sql role assignment update --account-name
--resource-group
--role-assignment-id
[--no-wait]
[--principal-id]
[--role-definition-id]
[--role-definition-name]
[--scope]
範例
更新 Azure Cosmos DB 帳戶下的 SQL 角色指派。
az cosmosdb sql role assignment update --account-name MyAccount --resource-group MyResourceGroup \
--role-assignment-id cb8ed2d7-2371-4e3c-bd31-6cc1560e84f8 \
--role-definition-id updated-role-definition-id
必要參數
Cosmosdb 帳戶名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性的 [建立]。 角色指派的唯一標識符。 如果未提供,則會使用新的 GUID。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
要授與此角色指派之主體的 AAD 物件標識碼。
此角色指派所參考之角色定義的唯一標識符。
此角色指派所參考之角色定義的唯一名稱。 Eg. 'Contoso 讀者角色'。
要授與此角色指派的數據平面資源路徑。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az cosmosdb sql role assignment wait
輪詢 SQL 角色指派,直到符合特定條件為止。
az cosmosdb sql role assignment wait --account-name
--resource-group
--role-assignment-id
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--timeout]
[--updated]
範例
輪詢 SQL 角色指派,直到刪除為止。
az cosmosdb sql role assignment wait --account-name MyAccount --resource-group MyResourceGroup --role-assignment-id cb8ed2d7-2371-4e3c-bd31-6cc1560e84f8 --deleted
必要參數
Cosmosdb 帳戶名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性的 [建立]。 角色指派的唯一標識符。 如果未提供,則會使用新的 GUID。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
請等候在 'Succeeded' 使用 'provisioningState' 建立。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
等到刪除為止。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
等候資源存在。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
輪詢間隔以秒為單位。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | 30 |
以秒為單位的等候上限。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | 3600 |
等到 provisioningState 更新為 'Succeeded'。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |