CertificateClient.ImportCertificate Method

Definition

Imports a pre-existing certificate to the key vault. The specified certificate must be in PFX or ASCII PEM-format, and must contain the private key as well as the X.509 certificates. This operation requires the certificates/import permission.

public virtual Azure.Response<Azure.Security.KeyVault.Certificates.KeyVaultCertificateWithPolicy> ImportCertificate (Azure.Security.KeyVault.Certificates.ImportCertificateOptions importCertificateOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member ImportCertificate : Azure.Security.KeyVault.Certificates.ImportCertificateOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Security.KeyVault.Certificates.KeyVaultCertificateWithPolicy>
override this.ImportCertificate : Azure.Security.KeyVault.Certificates.ImportCertificateOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Security.KeyVault.Certificates.KeyVaultCertificateWithPolicy>
Public Overridable Function ImportCertificate (importCertificateOptions As ImportCertificateOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of KeyVaultCertificateWithPolicy)

Parameters

importCertificateOptions
ImportCertificateOptions

The details of the certificate to import to the key vault.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

The imported certificate and policy.

Exceptions

Name of importCertificateOptions is empty.

importCertificateOptions or Name of importCertificateOptions is null.

Applies to