Sdílet prostřednictvím


Certificate.Delete(IEnumerable<BatchClientBehavior>) Method

Definition

Deletes the certificate from the Batch account.

public void Delete (System.Collections.Generic.IEnumerable<Microsoft.Azure.Batch.BatchClientBehavior> additionalBehaviors = default);
member this.Delete : seq<Microsoft.Azure.Batch.BatchClientBehavior> -> unit
Public Sub Delete (Optional additionalBehaviors As IEnumerable(Of BatchClientBehavior) = Nothing)

Parameters

additionalBehaviors
IEnumerable<BatchClientBehavior>

A collection of BatchClientBehavior instances that are applied to the Batch service request after the CustomBehaviors.

Remarks

The delete operation requests that the certificate be deleted. The request puts the certificate in the Deleting state. The Batch service will perform the actual certificate deletion without any further client action.

You cannot delete a certificate if a resource (pool or compute node) is using it. Before you can delete a certificate, you must therefore make sure that:

  • The certificate is not associated with any pools.
  • The certificate is not installed on any compute nodes. (Even if you remove a certificate from a pool, it is not removed from existing compute nodes in that pool until they restart.)

If you try to delete a certificate that is in use, the deletion fails. The certificate state changes to DeleteFailed. You can use CancelDeleteAsync(IEnumerable<BatchClientBehavior>, CancellationToken) to set the status back to Active if you decide that you want to continue using the certificate.

This is a blocking operation. For a non-blocking equivalent, see DeleteAsync(IEnumerable<BatchClientBehavior>, CancellationToken).

Applies to