Condividi tramite


ICertificateOperations.DeleteWithHttpMessagesAsync Method

Definition

Caution

This operation is deprecated. Please do not use it any longer.

Deletes a Certificate from the specified Account.

[System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.CertificateDeleteHeaders>> DeleteWithHttpMessagesAsync (string thumbprintAlgorithm, string thumbprint, Microsoft.Azure.Batch.Protocol.Models.CertificateDeleteOptions certificateDeleteOptions = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("This operation is deprecated. Please do not use it any longer.")>]
abstract member DeleteWithHttpMessagesAsync : string * string * Microsoft.Azure.Batch.Protocol.Models.CertificateDeleteOptions * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationHeaderResponse<Microsoft.Azure.Batch.Protocol.Models.CertificateDeleteHeaders>>
Public Function DeleteWithHttpMessagesAsync (thumbprintAlgorithm As String, thumbprint As String, Optional certificateDeleteOptions As CertificateDeleteOptions = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationHeaderResponse(Of CertificateDeleteHeaders))

Parameters

thumbprintAlgorithm
String

The algorithm used to derive the thumbprint parameter. This must be sha1.

thumbprint
String

The thumbprint of the Certificate to be deleted.

certificateDeleteOptions
CertificateDeleteOptions

Additional parameters for the operation

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Attributes

Exceptions

Thrown when the operation returned an invalid status code

Thrown when a required parameter is null

Remarks

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 existing Pools, the Certificate is not installed on any Nodes (even if you remove a Certificate from a Pool, it is not removed from existing Compute Nodes in that Pool until they restart), and no running Tasks depend on the Certificate. If you try to delete a Certificate that is in use, the deletion fails. The Certificate status changes to deleteFailed. You can use Cancel Delete Certificate to set the status back to active if you decide that you want to continue using the Certificate.

Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.

Applies to