다음을 통해 공유


CertificateClient.ImportCertificateAsync 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 System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Certificates.KeyVaultCertificateWithPolicy>> ImportCertificateAsync (Azure.Security.KeyVault.Certificates.ImportCertificateOptions importCertificateOptions, System.Threading.CancellationToken cancellationToken = default);
abstract member ImportCertificateAsync : Azure.Security.KeyVault.Certificates.ImportCertificateOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Certificates.KeyVaultCertificateWithPolicy>>
override this.ImportCertificateAsync : Azure.Security.KeyVault.Certificates.ImportCertificateOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Security.KeyVault.Certificates.KeyVaultCertificateWithPolicy>>
Public Overridable Function ImportCertificateAsync (importCertificateOptions As ImportCertificateOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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