/// <summary> /// Deletes a Certificate from the specified Account. /// </summary> /// <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. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='thumbprintAlgorithm'> /// The algorithm used to derive the thumbprint parameter. This must be sha1. /// </param> /// <param name='thumbprint'> /// The thumbprint of the Certificate to be deleted. /// </param> /// <param name='certificateDeleteOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CertificateDeleteHeaders> DeleteAsync(this ICertificateOperations operations, string thumbprintAlgorithm, string thumbprint, CertificateDeleteOptions certificateDeleteOptions = default(CertificateDeleteOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(thumbprintAlgorithm, thumbprint, certificateDeleteOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }
/// <summary> /// Deletes the specified certificate. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the Batch account. /// </param> /// <param name='accountName'> /// The name of the Batch account. /// </param> /// <param name='certificateName'> /// The identifier for the certificate. This must be made up of algorithm and /// thumbprint separated by a dash, and must match the certificate data in the /// request. For example SHA1-a3d1c5. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CertificateDeleteHeaders> DeleteAsync(this ICertificateOperations operations, string resourceGroupName, string accountName, string certificateName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, certificateName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }
/// <summary> /// Deletes specific certificate. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='serviceName'> /// The name of the API Management service. /// </param> /// <param name='certificateId'> /// Identifier of the certificate entity. Must be unique in the current API /// Management service instance. /// </param> /// <param name='ifMatch'> /// ETag of the Entity. ETag should match the current entity state from the /// header response of the GET request or it should be * for unconditional /// update. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, string ifMatch, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serviceName, certificateId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose(); }