Share via


CertificateClient.StartCreateCertificateAsync Method

Definition

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

public virtual System.Threading.Tasks.Task<Azure.Security.KeyVault.Certificates.CertificateOperation> StartCreateCertificateAsync (string certificateName, Azure.Security.KeyVault.Certificates.CertificatePolicy policy, bool? enabled = default, System.Collections.Generic.IDictionary<string,string> tags = default, System.Threading.CancellationToken cancellationToken = default);
abstract member StartCreateCertificateAsync : string * Azure.Security.KeyVault.Certificates.CertificatePolicy * Nullable<bool> * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Certificates.CertificateOperation>
override this.StartCreateCertificateAsync : string * Azure.Security.KeyVault.Certificates.CertificatePolicy * Nullable<bool> * System.Collections.Generic.IDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Security.KeyVault.Certificates.CertificateOperation>
Public Overridable Function StartCreateCertificateAsync (certificateName As String, policy As CertificatePolicy, Optional enabled As Nullable(Of Boolean) = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of CertificateOperation)

Parameters

certificateName
String

The name of the certificate to create.

policy
CertificatePolicy

The CertificatePolicy which governs the properties and lifecycle of the created certificate.

enabled
Nullable<Boolean>

Specifies whether the certificate should be created in an enabled state. If null, the server default will be used.

tags
IDictionary<String,String>

Tags to be applied to the created certificate.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A CertificateOperation which contains details on the create operation, and can be used to retrieve updated status.

Exceptions

certificateName is empty.

certificateName or policy is null.

Remarks

If no certificate with the specified name exists it will be created; otherwise, a new version of the existing certificate will be created. This operation requires the certificates/create permission.

Applies to