Condividi tramite


IBatchAccountOperations.RegenerateKeyWithHttpMessagesAsync Metodo

Definizione

Rigenera la chiave dell'account specificata per l'account Batch.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Batch.Models.BatchAccountKeys>> RegenerateKeyWithHttpMessagesAsync (string resourceGroupName, string accountName, Microsoft.Azure.Management.Batch.Models.AccountKeyType keyName, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RegenerateKeyWithHttpMessagesAsync : string * string * Microsoft.Azure.Management.Batch.Models.AccountKeyType * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Batch.Models.BatchAccountKeys>>
Public Function RegenerateKeyWithHttpMessagesAsync (resourceGroupName As String, accountName As String, keyName As AccountKeyType, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of BatchAccountKeys))

Parametri

resourceGroupName
String

Nome del gruppo di risorse che contiene l'account Batch.

accountName
String

Nome dell'account Batch.

keyName
AccountKeyType

Tipo di chiave dell'account da rigenerare. I valori possibili includono: 'Primary', 'Secondary'

customHeaders
Dictionary<String,List<String>>

Intestazioni che verranno aggiunte alla richiesta.

cancellationToken
CancellationToken

Token di annullamento.

Restituisce

Eccezioni

Generata quando l'operazione ha restituito un codice di stato non valido

Generata quando non è possibile deserializzare la risposta

Generata quando un parametro obbligatorio è Null

Commenti

Questa operazione si applica solo agli account Batch con allowedAuthenticationModes contenente 'SharedKey'. Se l'account Batch non contiene "SharedKey" nel valore consentitoAuthenticationMode, i client non possono usare chiavi condivise per l'autenticazione e devono usare un altro oggetto allowedAuthenticationModes. In questo caso, la rigenerazione delle chiavi avrà esito negativo.

Si applica a