Dela via


BatchAccountOperationsExtensions.RegenerateKeyAsync Metod

Definition

Återskapar den angivna kontonyckeln för Batch-kontot.

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)

Parametrar

operations
IBatchAccountOperations

Åtgärdsgruppen för den här tilläggsmetoden.

resourceGroupName
String

Namnet på resursgruppen som innehåller Batch-kontot.

accountName
String

Namnet på Batch-kontot.

keyName
AccountKeyType

Typ av kontonyckel som ska återskapas. Möjliga värden är: "Primär", "Sekundär"

cancellationToken
CancellationToken

Annulleringstoken.

Returer

Kommentarer

Den här åtgärden gäller endast för Batch-konton med allowedAuthenticationModes som innehåller "SharedKey". Om Batch-kontot inte innehåller "SharedKey" i dess allowedAuthenticationMode kan klienter inte använda delade nycklar för att autentisera och måste använda en annan allowedAuthenticationModes i stället. I det här fallet misslyckas återställningen av nycklarna.

Gäller för