你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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。 在这种情况下,获取密钥将失败。

适用于