Udostępnij za pośrednictwem


KeyVaultClient.UpdateKeyWithHttpMessagesAsync Method

Definition

The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyBundle>> UpdateKeyWithHttpMessagesAsync (string vaultBaseUrl, string keyName, string keyVersion, System.Collections.Generic.IList<string> keyOps = default, Microsoft.Azure.KeyVault.Models.KeyAttributes keyAttributes = default, System.Collections.Generic.IDictionary<string,string> tags = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateKeyWithHttpMessagesAsync : string * string * string * System.Collections.Generic.IList<string> * Microsoft.Azure.KeyVault.Models.KeyAttributes * System.Collections.Generic.IDictionary<string, string> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyBundle>>
override this.UpdateKeyWithHttpMessagesAsync : string * string * string * System.Collections.Generic.IList<string> * Microsoft.Azure.KeyVault.Models.KeyAttributes * System.Collections.Generic.IDictionary<string, string> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyBundle>>
Public Function UpdateKeyWithHttpMessagesAsync (vaultBaseUrl As String, keyName As String, keyVersion As String, Optional keyOps As IList(Of String) = Nothing, Optional keyAttributes As KeyAttributes = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of KeyBundle))

Parameters

vaultBaseUrl
String

The vault name, for example https://myvault.vault.azure.net.

keyName
String

The name of key to update.

keyVersion
String

The version of the key to update.

keyOps
IList<String>

Json web key operations. For more information on possible key operations, see JsonWebKeyOperation.

keyAttributes
KeyAttributes
tags
IDictionary<String,String>

Application specific metadata in the form of key-value pairs.

customHeaders
Dictionary<String,List<String>>

Headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Implements

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

Thrown when a required parameter is null

Remarks

In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed. This operation requires the keys/update permission.

Applies to