// Deletes the specified certificate. A certificate cannot be deleted if it has a
// policy or IoT thing attached to it or if its status is set to ACTIVE. To delete
// a certificate, first use the DetachPrincipalPolicy API to detach all policies.
// Next, use the UpdateCertificate API to set the certificate to the INACTIVE
// status.
Deletes the specified certificate. A certificate cannot be deleted if it has a
policy or IoT thing attached to it or if its status is set to ACTIVE. To delete
a certificate, first use the DetachPrincipalPolicy API to detach all policies.
Next, use the UpdateCertificate API to set the certificate to the INACTIVE
status.
// Deletes the specified certificate . A certificate cannot be deleted if it has a // policy or IoT thing attached to it or if its status is set to ACTIVE . To delete // a certificate first use the DetachPrincipalPolicy API to detach all policies . // Next use the UpdateCertificate API to set the certificate to the INACTIVE // status .
func (c *Client) DeleteCertificate(ctx context.Context, params *DeleteCertificateInput, optFns ...func(*Options)) (*DeleteCertificateOutput, error) {
	if params == nil {
		params = &DeleteCertificateInput{}
	}
	result, metadata, err := c.invokeOperation(ctx, "DeleteCertificate", params, optFns, addOperationDeleteCertificateMiddlewares)
	if err != nil {
		return nil, err
	}
	out := result.(*DeleteCertificateOutput)
	out.ResultMetadata = metadata
	return out, nil
}
func ( c * Client ) DeleteCertificate ( ctx context . Context , params * DeleteCertificateInput , optFns ... func ( * Options ) ) ( * DeleteCertificateOutput , error ) { if params == nil { params = & DeleteCertificateInput { } } result , metadata , err := c . invokeOperation ( ctx , " " , params , optFns , addOperationDeleteCertificateMiddlewares ) if err != nil { return nil , err } out := result . ( * DeleteCertificateOutput ) out . ResultMetadata = metadata return out , nil }
Deletes the specified certificate.
Deletes the specified certificate .