Compartilhar via


BatchAccountOperationsExtensions.RegenerateKeyAsync Método

Definição

Regenera a chave de conta especificada para a conta do Lote.

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

Parâmetros

operations
IBatchAccountOperations

O grupo de operações para esse método de extensão.

resourceGroupName
String

O nome do grupo de recursos que contém a conta do Lote.

accountName
String

O nome da conta do Lote.

keyName
AccountKeyType

O tipo de chave de conta a ser regenerada. Os valores possíveis incluem: 'Primary', 'Secondary'

cancellationToken
CancellationToken

O token de cancelamento.

Retornos

Comentários

Essa operação se aplica somente a contas do Lote com allowedAuthenticationModes contendo 'SharedKey'. Se a conta do Lote não contiver 'SharedKey' em seu allowedAuthenticationMode, os clientes não poderão usar chaves compartilhadas para autenticar e devem usar outro allowedAuthenticationModes. Nesse caso, a regeneração das chaves falhará.

Aplica-se a