共用方式為


az cosmosdb cassandra role definition

Note

This reference is part of the cosmosdb-preview extension for the Azure CLI (version 2.17.1 or higher). 擴充功能會在您第一次執行 az cosmosdb cassandra 角色定義 命令時自動安裝。 Learn more about extensions.

管理 Azure Cosmos DB Cassandra 角色定義。

命令

名稱 Description 類型 狀態
az cosmosdb cassandra role definition create

在 Azure Cosmos DB 帳戶下建立 Cassandra 角色定義。

Extension GA
az cosmosdb cassandra role definition delete

刪除 Azure Cosmos DB 帳戶底下的 Cassandra 角色定義。

Extension GA
az cosmosdb cassandra role definition exists

檢查 Azure Cosmos DB 角色定義是否存在。

Extension GA
az cosmosdb cassandra role definition list

列出 Azure Cosmos DB 帳戶下的所有 Cassandra 角色定義。

Extension GA
az cosmosdb cassandra role definition show

顯示 Azure Cosmos DB 帳戶下 Cassandra 角色定義的屬性。

Extension GA
az cosmosdb cassandra role definition update

更新 Azure Cosmos DB 帳戶底下的 Cassandra 角色定義。

Extension GA

az cosmosdb cassandra role definition create

在 Azure Cosmos DB 帳戶下建立 Cassandra 角色定義。

az cosmosdb cassandra role definition create --account-name
                                             --body
                                             --resource-group

範例

使用 JSON 字串,在 Azure Cosmos DB 帳戶下建立 Cassandra 角色定義。

az cosmosdb cassandra role definition create --account-name MyAccount --resource-group MyResourceGroup --body '{
  "Id": "be79875a-2cc4-40d5-8958-566017875b39",
  "RoleName": "My Read Only Role",
  "Type": "CustomRole",
  "AssignableScopes": ["/dbs/mydb/colls/mycontainer"],
  "Permissions": [{
    "DataActions": [
      "Microsoft.DocumentDB/databaseAccounts/readMetadata",
      "Microsoft.DocumentDB/databaseAccounts/cassandra/containers/entities/read",
      "Microsoft.DocumentDB/databaseAccounts/cassandra/containers/executeQuery",
      "Microsoft.DocumentDB/databaseAccounts/cassandra/containers/readChangeFeed"
    ]
  }]
}'

使用 JSON 檔案,在 Azure Cosmos DB 帳戶下建立 Cassandra 角色定義。

az cosmosdb cassandra role definition create --account-name MyAccount --resource-group MyResourceGroup --body @role-definition.json

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--body -b

具有標識符的角色定義主體(選擇性用於建立)、類型(預設值為 CustomRole)、RoleName、Description、AssignableScopes、Permissions。 您可以將它輸入為字串或檔案,例如 --body @cassandra-role_definition-body-file.json 或 --body “{ ”Id“: ”be79875a-2cc4-40d5-8958-8958-566017875b39“, ”RoleName“: ”MyTestRole“, ”type“: ”CustomRole“, ”description“: ”Custom role to read Cosmos DB metadata“, ”AssignableScopes“:[”/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.DocumentDB/databaseAccounts/MyDBAccountName“], ”Permissions“: [{”dataActions“: [”Microsoft.DocumentDB/databaseAccounts/readMetadata“]}] }”。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

Output format.

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az cosmosdb cassandra role definition delete

刪除 Azure Cosmos DB 帳戶底下的 Cassandra 角色定義。

az cosmosdb cassandra role definition delete --account-name
                                             --resource-group
                                             --role-definition-id
                                             [--yes]

範例

刪除 Azure Cosmos DB 帳戶底下的 Cassandra 角色定義。

az cosmosdb cassandra role definition delete --account-name MyAccount --resource-group MyResourceGroup --role-definition-id be79875a-2cc4-40d5-8958-566017875b39

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--resource-group -g

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

--role-definition-id -i

Cassandra 角色定義的唯一標識符。

選擇性參數

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

--yes -y

請勿提示確認。

屬性
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

Output format.

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az cosmosdb cassandra role definition exists

檢查 Azure Cosmos DB 角色定義是否存在。

az cosmosdb cassandra role definition exists --account-name
                                             --resource-group
                                             --role-definition-id

範例

檢查 Azure Cosmos DB 角色定義是否存在。

az cosmosdb cassandra role definition exists --account-name MyAccount --resource-group MyResourceGroup --role-definition-id be79875a-2cc4-40d5-8958-566017875b39

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--resource-group -g

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

--role-definition-id -i

Cassandra 角色定義的唯一標識符。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

Output format.

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az cosmosdb cassandra role definition list

列出 Azure Cosmos DB 帳戶下的所有 Cassandra 角色定義。

az cosmosdb cassandra role definition list --account-name
                                           --resource-group

範例

列出 Azure Cosmos DB 帳戶下的所有 Cassandra 角色定義。

az cosmosdb cassandra role definition list --account-name MyAccount --resource-group MyResourceGroup

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

Output format.

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az cosmosdb cassandra role definition show

顯示 Azure Cosmos DB 帳戶下 Cassandra 角色定義的屬性。

az cosmosdb cassandra role definition show --account-name
                                           --resource-group
                                           --role-definition-id

範例

顯示 Azure Cosmos DB 帳戶下 Cassandra 角色定義的屬性。

az cosmosdb cassandra role definition show --account-name MyAccount --resource-group MyResourceGroup --role-definition-id be79875a-2cc4-40d5-8958-566017875b39

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--resource-group -g

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

--role-definition-id -i

Cassandra 角色定義的唯一標識符。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

Output format.

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az cosmosdb cassandra role definition update

更新 Azure Cosmos DB 帳戶底下的 Cassandra 角色定義。

az cosmosdb cassandra role definition update --account-name
                                             --body
                                             --resource-group

範例

更新 Azure Cosmos DB 帳戶底下的 Cassandra 角色定義。

az cosmosdb cassandra role definition update --account-name MyAccount --resource-group MyResourceGroup --body @role-definition.json

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--body -b

具有標識符的角色定義主體(選擇性用於建立)、類型(預設值為 CustomRole)、RoleName、Description、AssignableScopes、Permissions。 您可以將它輸入為字串或檔案,例如 --body @cassandra-role_definition-body-file.json 或 --body “{ ”Id“: ”be79875a-2cc4-40d5-8958-8958-566017875b39“, ”RoleName“: ”MyTestRole“, ”type“: ”CustomRole“, ”description“: ”Custom role to read Cosmos DB metadata“, ”AssignableScopes“:[”/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.DocumentDB/databaseAccounts/MyDBAccountName“], ”Permissions“: [{”dataActions“: [”Microsoft.DocumentDB/databaseAccounts/readMetadata“]}] }”。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

Output format.

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False