BatchAccountOperationsExtensions.GetKeysAsync 方法

定義

取得指定 Batch 帳戶的帳戶金鑰。

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.Batch.Models.BatchAccountKeys> GetKeysAsync (this Microsoft.Azure.Management.Batch.IBatchAccountOperations operations, string resourceGroupName, string accountName, System.Threading.CancellationToken cancellationToken = default);
static member GetKeysAsync : Microsoft.Azure.Management.Batch.IBatchAccountOperations * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.Batch.Models.BatchAccountKeys>
<Extension()>
Public Function GetKeysAsync (operations As IBatchAccountOperations, resourceGroupName As String, accountName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of BatchAccountKeys)

參數

operations
IBatchAccountOperations

這個擴充方法的作業群組。

resourceGroupName
String

包含 Batch 帳戶的資源群組名稱。

accountName
String

Batch 帳戶的名稱。

cancellationToken
CancellationToken

取消語彙基元。

傳回

備註

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

適用於