Aracılığıyla paylaş


KeyClient.UpdateKeyRotationPolicy 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 Azure.Response<Azure.Security.KeyVault.Keys.KeyRotationPolicy> UpdateKeyRotationPolicy (string keyName, Azure.Security.KeyVault.Keys.KeyRotationPolicy policy, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateKeyRotationPolicy : string * Azure.Security.KeyVault.Keys.KeyRotationPolicy * System.Threading.CancellationToken -> Azure.Response<Azure.Security.KeyVault.Keys.KeyRotationPolicy>
override this.UpdateKeyRotationPolicy : string * Azure.Security.KeyVault.Keys.KeyRotationPolicy * System.Threading.CancellationToken -> Azure.Response<Azure.Security.KeyVault.Keys.KeyRotationPolicy>
Public Overridable Function UpdateKeyRotationPolicy (keyName As String, policy As KeyRotationPolicy, Optional cancellationToken As CancellationToken = Nothing) As 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