KeyClient.CreateExternalKey Method

Definition

Registers a Managed HSM key that points at material managed by an external HSM. This operation requires the keys/create permission. Only available with service version V2026_01_01_Preview and newer, and only supported on Managed HSM.

public virtual Azure.Response<Azure.Security.KeyVault.Keys.KeyVaultKey> CreateExternalKey(Azure.Security.KeyVault.Keys.CreateExternalKeyOptions externalKeyOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateExternalKey : Azure.Security.KeyVault.Keys.CreateExternalKeyOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Security.KeyVault.Keys.KeyVaultKey>
override this.CreateExternalKey : Azure.Security.KeyVault.Keys.CreateExternalKeyOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Security.KeyVault.Keys.KeyVaultKey>
Public Overridable Function CreateExternalKey (externalKeyOptions As CreateExternalKeyOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of KeyVaultKey)

Parameters

externalKeyOptions
CreateExternalKeyOptions

The key options object containing the name and external key reference for the key being registered.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Exceptions

externalKeyOptions is null.

The server returned an error. See Message for details returned from the server.

Applies to