Share via


KeyVaultClientExtensions.UpdateKeyAsync Method

Definition

Overloads

UpdateKeyAsync(IKeyVaultClient, String, String[], KeyAttributes, Dictionary<String,String>, CancellationToken)

Updates the Key Attributes associated with the specified key

UpdateKeyAsync(IKeyVaultClient, String, String, String[], KeyAttributes, Dictionary<String,String>, CancellationToken)

Updates the Key Attributes associated with the specified key

UpdateKeyAsync(IKeyVaultClient, String, String, String, IList<String>, KeyAttributes, IDictionary<String,String>, CancellationToken)

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.

UpdateKeyAsync(IKeyVaultClient, String, String[], KeyAttributes, Dictionary<String,String>, CancellationToken)

Source:
KeyVaultClientExtensions.cs

Updates the Key Attributes associated with the specified key

public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle> UpdateKeyAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string keyIdentifier, string[] keyOps = default, Microsoft.Azure.KeyVault.Models.KeyAttributes attributes = default, System.Collections.Generic.Dictionary<string,string> tags = default, System.Threading.CancellationToken cancellationToken = default);
static member UpdateKeyAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string[] * Microsoft.Azure.KeyVault.Models.KeyAttributes * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle>
<Extension()>
Public Function UpdateKeyAsync (operations As IKeyVaultClient, keyIdentifier As String, Optional keyOps As String() = Nothing, Optional attributes As KeyAttributes = Nothing, Optional tags As Dictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KeyBundle)

Parameters

operations
IKeyVaultClient
keyIdentifier
String

The key identifier

keyOps
String[]

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

attributes
KeyAttributes

The new attributes for the key. For more information on key attributes, see KeyAttributes.

tags
Dictionary<String,String>

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

cancellationToken
CancellationToken

Optional cancellation token

Returns

The updated key

Applies to

UpdateKeyAsync(IKeyVaultClient, String, String, String[], KeyAttributes, Dictionary<String,String>, CancellationToken)

Source:
KeyVaultClientExtensions.cs

Updates the Key Attributes associated with the specified key

public static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle> UpdateKeyAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, string vaultBaseUrl, string keyName, string[] keyOps = default, Microsoft.Azure.KeyVault.Models.KeyAttributes attributes = default, System.Collections.Generic.Dictionary<string,string> tags = default, System.Threading.CancellationToken cancellationToken = default);
static member UpdateKeyAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * string[] * Microsoft.Azure.KeyVault.Models.KeyAttributes * System.Collections.Generic.Dictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle>
<Extension()>
Public Function UpdateKeyAsync (operations As IKeyVaultClient, vaultBaseUrl As String, keyName As String, Optional keyOps As String() = Nothing, Optional attributes As KeyAttributes = Nothing, Optional tags As Dictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KeyBundle)

Parameters

operations
IKeyVaultClient
vaultBaseUrl
String

The vault name, e.g. https://myvault.vault.azure.net

keyName
String

The key name

keyOps
String[]

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

attributes
KeyAttributes

The new attributes for the key. For more information on key attributes, see KeyAttributes.

tags
Dictionary<String,String>

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

cancellationToken
CancellationToken

Returns

The updated key

Applies to

UpdateKeyAsync(IKeyVaultClient, String, String, String, IList<String>, KeyAttributes, IDictionary<String,String>, CancellationToken)

Source:
KeyVaultClientExtensions.cs

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 static System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle> UpdateKeyAsync (this Microsoft.Azure.KeyVault.IKeyVaultClient operations, 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.Threading.CancellationToken cancellationToken = default);
static member UpdateKeyAsync : Microsoft.Azure.KeyVault.IKeyVaultClient * string * string * string * System.Collections.Generic.IList<string> * Microsoft.Azure.KeyVault.Models.KeyAttributes * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.KeyVault.Models.KeyBundle>
<Extension()>
Public Function UpdateKeyAsync (operations As IKeyVaultClient, 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 cancellationToken As CancellationToken = Nothing) As Task(Of KeyBundle)

Parameters

operations
IKeyVaultClient

The operations group for this extension method.

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.

cancellationToken
CancellationToken

The cancellation token.

Returns

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