KeyVaultClient.ImportKeyAsync Method (String, String, KeyBundle, Nullable<Boolean>, CancellationToken)
Asynchronously imports a key into the specified vault.
Namespace: Microsoft.Azure.KeyVault
Assembly: Microsoft.Azure.KeyVault (in Microsoft.Azure.KeyVault.dll)
Syntax
public Task<KeyBundle> ImportKeyAsync(
string vault,
string keyName,
KeyBundle keyBundle,
Nullable<bool> importToHardware = null,
CancellationToken cancellationToken = null
)
public:
Task<KeyBundle^>^ ImportKeyAsync(
String^ vault,
String^ keyName,
KeyBundle^ keyBundle,
Nullable<bool> importToHardware = null,
CancellationToken cancellationToken = null
)
member ImportKeyAsync :
vault:string *
keyName:string *
keyBundle:KeyBundle *
importToHardware:Nullable<bool> = null *
cancellationToken:CancellationToken = null -> Task<KeyBundle>
Public Function ImportKeyAsync (
vault As String,
keyName As String,
keyBundle As KeyBundle,
importToHardware As Nullable(Of Boolean),
cancellationToken As CancellationToken
) As Task(Of KeyBundle)
Parameters
vault
Type: System.StringThe vault name, e.g. https://myvault.vault.azure.net.
keyName
Type: System.StringThe key name.
keyBundle
Type: Microsoft.Azure.KeyVault.KeyBundleThe key bundle.
importToHardware
Type: System.Nullable<Boolean>Whether to import as a hardware key (HSM) or software key.
cancellationToken
Type: System.Threading.CancellationTokenOptional cancellation token.
Return Value
Type: System.Threading.Tasks.Task<KeyBundle>
The imported key bundle to the vault.
See Also
KeyVaultClient Class
Microsoft.Azure.KeyVault Namespace
Return to top