IKeyVaultClient.ImportKeyWithHttpMessagesAsync(String, String, JsonWebKey, Nullable<Boolean>, KeyAttributes, IDictionary<String,String>, Dictionary<String,List<String>>, CancellationToken) Method

Definition

Imports an externally created key, stores it, and returns key parameters and attributes to the client.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.KeyVault.Models.KeyBundle>> ImportKeyWithHttpMessagesAsync (string vaultBaseUrl, string keyName, Microsoft.Azure.KeyVault.WebKey.JsonWebKey key, Nullable<bool> hsm = null, Microsoft.Azure.KeyVault.Models.KeyAttributes keyAttributes = null, System.Collections.Generic.IDictionary<string,string> tags = null, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = null);
abstract member ImportKeyWithHttpMessagesAsync : string * string * Microsoft.Azure.KeyVault.WebKey.JsonWebKey * Nullable<bool> * 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>>

Parameters

vaultBaseUrl
String

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

keyName
String

Name for the imported key.

key
JsonWebKey

The Json web key

hsm
Nullable<Boolean>

Whether to import as a hardware key (HSM) or software key.

keyAttributes
KeyAttributes

The key management attributes.

tags
IDictionary<String,String>

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

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Task<Microsoft.Rest.Azure.AzureOperationResponse<KeyBundle>>

Remarks

The import key operation may be used to import any key type into an

Azure Key Vault. If the named key already exists, Azure Key Vault

creates a new version of the key.

Applies to