BatchAccountOperationsExtensions.RegenerateKeyAsync Methode

Definition

Generiert den angegebenen Kontoschlüssel für das Batch-Konto.

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)

Parameter

operations
IBatchAccountOperations

Die Vorgangsgruppe für diese Erweiterungsmethode.

resourceGroupName
String

Der Name der Ressourcengruppe, die das Batch-Konto enthält.

accountName
String

Der Name des Batch-Kontos.

keyName
AccountKeyType

Der Typ des neu zu generierenden Kontoschlüssels. Mögliche Werte: "Primär", "Sekundär"

cancellationToken
CancellationToken

Das Abbruchtoken.

Gibt zurück

Hinweise

Dieser Vorgang gilt nur für Batch-Konten mit allowedAuthenticationModes, die "SharedKey" enthalten. Wenn das Batch-Konto "SharedKey" in seiner allowedAuthenticationMode nicht enthält, können Clients keine freigegebenen Schlüssel zum Authentifizieren verwenden und müssen stattdessen einen anderen allowedAuthenticationModes verwenden. In diesem Fall schlägt die Neugenerierung der Schlüssel fehl.

Gilt für: