共用方式為


az batch account keys

管理 Batch 帳戶金鑰。

命令

名稱 Description 類型 狀態
az batch account keys list

取得指定 Batch 帳戶的帳戶金鑰。 此作業僅適用於包含 『SharedKey』 的 allowedAuthenticationModes 的 Batch 帳戶。 如果 Batch 帳戶在其 allowedAuthenticationMode 中未包含 'SharedKey',則客戶端無法使用共用密鑰進行驗證,而且必須改用另一個 allowedAuthenticationModes。 在此情況下,取得金鑰將會失敗。

Core GA
az batch account keys renew

更新 Batch 帳戶的金鑰。

Core GA

az batch account keys list

取得指定 Batch 帳戶的帳戶金鑰。 此作業僅適用於包含 『SharedKey』 的 allowedAuthenticationModes 的 Batch 帳戶。 如果 Batch 帳戶在其 allowedAuthenticationMode 中未包含 'SharedKey',則客戶端無法使用共用密鑰進行驗證,而且必須改用另一個 allowedAuthenticationModes。 在此情況下,取得金鑰將會失敗。

[WARNING]輸出包含您必須保護的秘密。 請確定您未在原始檔控制中包含這些秘密。 也請確認命令或文稿的記錄中沒有秘密。 如需詳細資訊,請參閱 http://aka.ms/clisecrets

az batch account keys list --name
                           --resource-group

必要參數

--name -n

Batch 帳戶的名稱。

--resource-group -g

資源群組的名稱。

全域參數
--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 batch account keys renew

更新 Batch 帳戶的金鑰。

[WARNING]輸出包含您必須保護的秘密。 請確定您未在原始檔控制中包含這些秘密。 也請確認命令或文稿的記錄中沒有秘密。 如需詳細資訊,請參閱 http://aka.ms/clisecrets

az batch account keys renew [--key-name {Primary, Secondary}]
                            [--name]
                            [--resource-group]

範例

更新 Batch 帳戶的金鑰。

az batch account keys renew --name MyBatchAccount --resource-group MyResourceGroup --key-name primary

選擇性參數

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

--key-name

批次帳戶金鑰的名稱。

屬性
接受的值: Primary, Secondary
--name -n

要顯示的批次帳戶名稱。 如果未指定,則會顯示目前設定的帳戶。

--resource-group -g

資源群組的名稱。 如果未指定,則會顯示目前設定的帳戶。

全域參數
--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