Delen via


CertificateClient Class

Definition

The CertificateClient provides synchronous and asynchronous methods to manage KeyVaultCertificates in Azure Key Vault. The client supports creating, retrieving, updating, deleting, purging, backing up, restoring, and listing the KeyVaultCertificate, along with managing certificate CertificateIssuers and CertificateContacts. The client also supports listing DeletedCertificate for a soft delete enabled key vault.

public class CertificateClient
type CertificateClient = class
Public Class CertificateClient
Inheritance
CertificateClient

Constructors

CertificateClient()

Initializes a new instance of the CertificateClient class for mocking.

CertificateClient(Uri, TokenCredential)

Initializes a new instance of the CertificateClient class for the specified vault.

CertificateClient(Uri, TokenCredential, CertificateClientOptions)

Initializes a new instance of the CertificateClient class for the specified vault.

Properties

VaultUri

Gets the Uri of the vault used to create this instance of the CertificateClient.

Methods

BackupCertificate(String, CancellationToken)

Creates a backup of the certificate, including all versions, which can be used to restore the certificate to the state at the time of the backup in the case the certificate is deleted, or to restore the certificate to a different vault in the same region as the original value. This operation requires the certificate/backup permission.

BackupCertificateAsync(String, CancellationToken)

Creates a backup of the certificate, including all versions, which can be used to restore the certificate to the state at the time of the backup in the case the certificate is deleted, or to restore the certificate to a different vault in the same region as the original value. This operation requires the certificate/backup permission.

CreateIssuer(CertificateIssuer, CancellationToken)

Creates or replaces a certificate CertificateIssuer in the key vault. This operation requires the certificates/setissuers permission.

CreateIssuerAsync(CertificateIssuer, CancellationToken)

Creates or replaces a certificate CertificateIssuer in the key vault. This operation requires the certificates/setissuers permission.

DeleteContacts(CancellationToken)

Deletes all certificate CertificateContacts from the key vault, replacing any existing contacts. This operation requires the certificates/managecontacts permission.

DeleteContactsAsync(CancellationToken)

Deletes all certificate CertificateContacts from the key vault, replacing any existing contacts. This operation requires the certificates/managecontacts permission.

DeleteIssuer(String, CancellationToken)

Deletes the specified certificate CertificateIssuer from the vault. This operation requires the certificates/deleteissuers permission.

DeleteIssuerAsync(String, CancellationToken)

Deletes the specified certificate CertificateIssuer from the vault. This operation requires the certificates/deleteissuers permission.

DownloadCertificate(DownloadCertificateOptions, CancellationToken)

Creates an X509Certificate2 from the specified certificate.

DownloadCertificate(String, String, CancellationToken)

Creates an X509Certificate2 from the specified certificate.

DownloadCertificateAsync(DownloadCertificateOptions, CancellationToken)

Creates an X509Certificate2 from the specified certificate.

DownloadCertificateAsync(String, String, CancellationToken)

Creates an X509Certificate2 from the specified certificate.

GetCertificate(String, CancellationToken)

Returns the latest version of the KeyVaultCertificate along with its CertificatePolicy. This operation requires the certificates/get permission.

GetCertificateAsync(String, CancellationToken)

Returns the latest version of the KeyVaultCertificate along with its CertificatePolicy. This operation requires the certificates/get permission.

GetCertificateOperation(String, CancellationToken)

Gets a pending CertificateOperation from the key vault. This operation requires the certificates/get permission.

GetCertificateOperationAsync(String, CancellationToken)

Gets a pending CertificateOperation from the key vault. This operation requires the certificates/get permission.

GetCertificatePolicy(String, CancellationToken)

Retrieves the CertificatePolicy of the specified certificate. This operation requires the certificate/get permission.

GetCertificatePolicyAsync(String, CancellationToken)

Retrieves the CertificatePolicy of the specified certificate. This operation requires the certificate/get permission.

GetCertificateVersion(String, String, CancellationToken)

Gets a specific version of the KeyVaultCertificate. This operation requires the certificates/get permission.

GetCertificateVersionAsync(String, String, CancellationToken)

Gets a specific version of the KeyVaultCertificate. This operation requires the certificates/get permission.

GetContacts(CancellationToken)

Gets the certificate CertificateContacts for the key vaults. This operation requires the certificates/managecontacts permission.

GetContactsAsync(CancellationToken)

Gets the certificate CertificateContacts for the key vaults. This operation requires the certificates/managecontacts permission.

GetDeletedCertificate(String, CancellationToken)

Retrieves information about the specified deleted KeyVaultCertificate. This operation is only applicable in vaults enabled for soft delete, and requires the certificates/get permission.

GetDeletedCertificateAsync(String, CancellationToken)

Retrieves information about the specified deleted KeyVaultCertificate. This operation is only applicable in vaults enabled for soft delete, and requires the certificates/get permission.

GetDeletedCertificates(Boolean, CancellationToken)

Enumerates the deleted certificates in the vault. This operation is only available on soft delete-enabled vaults, and requires the certificates/list/get permissions.

GetDeletedCertificatesAsync(Boolean, CancellationToken)

Enumerates the deleted certificates in the vault. This operation is only available on soft delete-enabled vaults, and requires the certificates/list/get permissions.

GetIssuer(String, CancellationToken)

Retrieves the specified certificate CertificateIssuer from the vault. This operation requires the certificates/getissuers permission.

GetIssuerAsync(String, CancellationToken)

Retrieves the specified certificate CertificateIssuer from the vault. This operation requires the certificates/getissuers permission.

GetPropertiesOfCertificates(Boolean, CancellationToken)

Lists the properties of all enabled and disabled certificates in the specified vault. You can use the returned Name in subsequent calls to GetCertificate(String, CancellationToken). This operation requires the certificates/list permission.

GetPropertiesOfCertificatesAsync(Boolean, CancellationToken)

Lists the properties of all enabled and disabled certificates in the specified vault. You can use the returned Name in subsequent calls to GetCertificate(String, CancellationToken). This operation requires the certificates/list permission.

GetPropertiesOfCertificateVersions(String, CancellationToken)

Lists the properties of all enabled and disabled versions of the specified certificate in the specified vault. You can use the returned Name in subsequent calls to GetCertificateVersion(String, String, CancellationToken). This operation requires the certificates/list permission.

GetPropertiesOfCertificateVersionsAsync(String, CancellationToken)

Lists the properties of all enabled and disabled versions of the specified certificate in the specified vault. You can use the returned Name in subsequent calls to GetCertificateVersion(String, String, CancellationToken). This operation requires the certificates/list permission.

GetPropertiesOfIssuers(CancellationToken)

Lists the properties of all issuers in the specified vault. You can use the returned Name in subsequent calls to GetIssuer(String, CancellationToken). This operation requires the certificates/getissuers permission.

GetPropertiesOfIssuersAsync(CancellationToken)

Lists the properties of all issuers in the specified vault. You can use the returned Name in subsequent calls to GetIssuer(String, CancellationToken). This operation requires the certificates/getissuers permission.

ImportCertificate(ImportCertificateOptions, CancellationToken)

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.

ImportCertificateAsync(ImportCertificateOptions, CancellationToken)

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.

MergeCertificate(MergeCertificateOptions, CancellationToken)

Merges a certificate or a certificate chain with a key pair currently available in the service. This operation requires the certificate/create permission.

MergeCertificateAsync(MergeCertificateOptions, CancellationToken)

Merges a certificate or a certificate chain with a key pair currently available in the service. This operation requires the certificate/create permission.

PurgeDeletedCertificate(String, CancellationToken)

Permanently and irreversibly deletes the specified deleted certificate, without the possibility of recovery. This operation is only applicable in vaults enabled for soft delete, and requires the certificates/purge permission. The operation is not available if the DeletedCertificate.RecoveryLevel of the DeletedCertificate does not specify 'Purgeable'.

PurgeDeletedCertificateAsync(String, CancellationToken)

Permanently and irreversibly deletes the specified deleted certificate, without the possibility of recovery. This operation is only applicable in vaults enabled for soft delete, and requires the certificates/purge permission. The operation is not available if the DeletedCertificate.RecoveryLevel of the DeletedCertificate does not specify 'Purgeable'.

RestoreCertificateBackup(Byte[], CancellationToken)

Restores a KeyVaultCertificate, including all versions, from a backup created from the BackupCertificate(String, CancellationToken) or BackupCertificateAsync(String, CancellationToken). The backup must be restored to a vault in the same region as its original vault. This operation requires the certificate/restore permission.

RestoreCertificateBackupAsync(Byte[], CancellationToken)

Restores a KeyVaultCertificate, including all versions, from a backup created from the BackupCertificate(String, CancellationToken) or BackupCertificateAsync(String, CancellationToken). The backup must be restored to a vault in the same region as its original vault. This operation requires the certificate/restore permission.

SetContacts(IEnumerable<CertificateContact>, CancellationToken)

Sets the certificate CertificateContacts for the key vault, replacing any existing contacts. This operation requires the certificates/managecontacts permission.

SetContactsAsync(IEnumerable<CertificateContact>, CancellationToken)

Sets the certificate CertificateContacts for the key vault, replacing any existing contacts. This operation requires the certificates/managecontacts permission.

StartCreateCertificate(String, CertificatePolicy, Nullable<Boolean>, IDictionary<String,String>, CancellationToken)

Starts a long running operation to create a KeyVaultCertificate in the vault with the specified certificate policy.

StartCreateCertificateAsync(String, CertificatePolicy, Nullable<Boolean>, IDictionary<String,String>, CancellationToken)

Starts a long running operation to create a KeyVaultCertificate in the vault with the specified certificate policy.

StartDeleteCertificate(String, CancellationToken)

Deletes all versions of the specified KeyVaultCertificate. If the vault is soft delete-enabled, the KeyVaultCertificate will be marked for permanent deletion and can be recovered with StartRecoverDeletedCertificate(String, CancellationToken), or purged with PurgeDeletedCertificate(String, CancellationToken). This operation requires the certificates/delete permission.

StartDeleteCertificateAsync(String, CancellationToken)

Deletes all versions of the specified KeyVaultCertificate. If the vault is soft delete-enabled, the KeyVaultCertificate will be marked for permanent deletion and can be recovered with StartRecoverDeletedCertificate(String, CancellationToken), or purged with PurgeDeletedCertificate(String, CancellationToken). This operation requires the certificates/delete permission.

StartRecoverDeletedCertificate(String, CancellationToken)

Recovers the DeletedCertificate to its pre-deleted state. This operation is only applicable in vaults enabled for soft delete, and requires the certificates/recover permission.

StartRecoverDeletedCertificateAsync(String, CancellationToken)

Recovers the DeletedCertificate to its pre-deleted state. This operation is only applicable in vaults enabled for soft delete, and requires the certificates/recover permission.

UpdateCertificatePolicy(String, CertificatePolicy, CancellationToken)

Updates the CertificatePolicy of the specified certificate. This operation requires the certificate/update permission.

UpdateCertificatePolicyAsync(String, CertificatePolicy, CancellationToken)

Updates the CertificatePolicy of the specified certificate. This operation requires the certificate/update permission.

UpdateCertificateProperties(CertificateProperties, CancellationToken)

Updates the specified KeyVaultCertificate with the specified values for its mutable properties. This operation requires the certificates/update permission.

UpdateCertificatePropertiesAsync(CertificateProperties, CancellationToken)

Updates the specified KeyVaultCertificate with the specified values for its mutable properties. This operation requires the certificates/update permission.

UpdateIssuer(CertificateIssuer, CancellationToken)

Updates the specified certificate CertificateIssuer in the vault, only updating the specified fields, others will remain unchanged. This operation requires the certificates/setissuers permission.

UpdateIssuerAsync(CertificateIssuer, CancellationToken)

Updates the specified certificate CertificateIssuer in the vault, only updating the specified fields, others will remain unchanged. This operation requires the certificates/setissuers permission.

Applies to