Share via


az security atp cosmosdb

檢視和管理 Cosmos DB 帳戶的進階威脅防護設定。

命令

名稱 Description 類型 狀態
az security atp cosmosdb show

顯示 Azure Cosmos DB 帳戶的進階威脅防護設定。

核心 GA
az security atp cosmosdb update

切換 Azure Cosmos DB 帳戶的進階威脅防護狀態。

核心 GA

az security atp cosmosdb show

顯示 Azure Cosmos DB 帳戶的進階威脅防護設定。

az security atp cosmosdb show --cosmosdb-account
                              --resource-group

範例

擷取訂用帳戶範圍上 Azure Cosmos DB 帳戶的進階威脅防護設定。

az security atp cosmosdb show --resource-group MyResourceGroup --cosmosdb-account MyCosmosDbAccount

必要參數

--cosmosdb-account

現有 Cosmos DB 帳戶的名稱。

--resource-group -g

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

全域參數
--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 security atp cosmosdb update

切換 Azure Cosmos DB 帳戶的進階威脅防護狀態。

az security atp cosmosdb update --cosmosdb-account
                                --is-enabled {false, true}
                                --resource-group

範例

針對訂用帳戶範圍上的 Azure Cosmos DB 帳戶啟用進階威脅防護。

az security atp cosmosdb update --resource-group MyResourceGroup --cosmosdb-account MyCosmosDbAccount --is-enabled true

針對訂用帳戶範圍上的 Azure Cosmos DB 帳戶停用進階威脅防護。

az security atp cosmosdb update --resource-group MyResourceGroup --cosmosdb-account MyCosmosDbAccount --is-enabled false

必要參數

--cosmosdb-account

現有 Cosmos DB 帳戶的名稱。

--is-enabled

啟用或停用已接收儲存體或 Cosmos DB 帳戶的進階威脅防護。

接受的值: false, true
--resource-group -g

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

全域參數
--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 來取得完整偵錯記錄。