共用方式為


KeyClient.UpdateKeyRotationPolicyAsync Method

Definition

Updates the KeyRotationPolicy for the specified key in Key Vault. The new policy will be used for the next version of the key when rotated.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Keys.KeyRotationPolicy>> UpdateKeyRotationPolicyAsync (string keyName, Azure.Security.KeyVault.Keys.KeyRotationPolicy policy, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateKeyRotationPolicyAsync : string * Azure.Security.KeyVault.Keys.KeyRotationPolicy * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Keys.KeyRotationPolicy>>
override this.UpdateKeyRotationPolicyAsync : string * Azure.Security.KeyVault.Keys.KeyRotationPolicy * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Keys.KeyRotationPolicy>>
Public Overridable Function UpdateKeyRotationPolicyAsync (keyName As String, policy As KeyRotationPolicy, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of KeyRotationPolicy))

Parameters

keyName
String

The name of the key.

policy
KeyRotationPolicy

The KeyRotationPolicy to update.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A KeyRotationPolicy for the specified key.

Exceptions

keyName contains an empty string.

keyName or policy is null.

The server returned an error. See Message for details returned from the server.

Remarks

This operation requires the keys/update permission.

Applies to