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

BatchAccountOperationsExtensions.RegenerateKey 方法

定义

重新生成 Batch 帐户的指定帐户密钥。

public static Microsoft.Azure.Management.Batch.Models.BatchAccountKeys RegenerateKey (this Microsoft.Azure.Management.Batch.IBatchAccountOperations operations, string resourceGroupName, string accountName, Microsoft.Azure.Management.Batch.Models.AccountKeyType keyName);
static member RegenerateKey : Microsoft.Azure.Management.Batch.IBatchAccountOperations * string * string * Microsoft.Azure.Management.Batch.Models.AccountKeyType -> Microsoft.Azure.Management.Batch.Models.BatchAccountKeys
<Extension()>
Public Function RegenerateKey (operations As IBatchAccountOperations, resourceGroupName As String, accountName As String, keyName As AccountKeyType) As BatchAccountKeys

参数

operations
IBatchAccountOperations

此扩展方法的操作组。

resourceGroupName
String

包含 Batch 帐户的资源组的名称。

accountName
String

Batch 帐户的名称。

keyName
AccountKeyType

要重新生成的帐户密钥的类型。 可能的值包括:“Primary”、“Secondary”

返回

注解

此操作仅适用于包含“SharedKey”的 allowedAuthenticationModes 的 Batch 帐户。 如果 Batch 帐户在其 allowedAuthenticationMode 中不包含“SharedKey”,则客户端无法使用共享密钥进行身份验证,并且必须改用另一个 allowedAuthenticationModes。 在这种情况下,重新生成密钥将失败。

适用于