aws_sdk_acmpca/client/
revoke_certificate.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`RevokeCertificate`](crate::operation::revoke_certificate::builders::RevokeCertificateFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`certificate_authority_arn(impl Into<String>)`](crate::operation::revoke_certificate::builders::RevokeCertificateFluentBuilder::certificate_authority_arn) / [`set_certificate_authority_arn(Option<String>)`](crate::operation::revoke_certificate::builders::RevokeCertificateFluentBuilder::set_certificate_authority_arn):<br>required: **true**<br><p>Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of the form:</p> <p><code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>12345678-1234-1234-1234-123456789012</i> </code></p><br>
7    ///   - [`certificate_serial(impl Into<String>)`](crate::operation::revoke_certificate::builders::RevokeCertificateFluentBuilder::certificate_serial) / [`set_certificate_serial(Option<String>)`](crate::operation::revoke_certificate::builders::RevokeCertificateFluentBuilder::set_certificate_serial):<br>required: **true**<br><p>Serial number of the certificate to be revoked. This must be in hexadecimal format. You can retrieve the serial number by calling <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificate.html">GetCertificate</a> with the Amazon Resource Name (ARN) of the certificate you want and the ARN of your private CA. The <b>GetCertificate</b> action retrieves the certificate in the PEM format. You can use the following OpenSSL command to list the certificate in text format and copy the hexadecimal serial number.</p> <p><code>openssl x509 -in <i>file_path</i> -text -noout</code></p> <p>You can also copy the serial number from the console or use the <a href="https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html">DescribeCertificate</a> action in the <i>Certificate Manager API Reference</i>.</p><br>
8    ///   - [`revocation_reason(RevocationReason)`](crate::operation::revoke_certificate::builders::RevokeCertificateFluentBuilder::revocation_reason) / [`set_revocation_reason(Option<RevocationReason>)`](crate::operation::revoke_certificate::builders::RevokeCertificateFluentBuilder::set_revocation_reason):<br>required: **true**<br><p>Specifies why you revoked the certificate.</p><br>
9    /// - On success, responds with [`RevokeCertificateOutput`](crate::operation::revoke_certificate::RevokeCertificateOutput)
10    /// - On failure, responds with [`SdkError<RevokeCertificateError>`](crate::operation::revoke_certificate::RevokeCertificateError)
11    pub fn revoke_certificate(&self) -> crate::operation::revoke_certificate::builders::RevokeCertificateFluentBuilder {
12        crate::operation::revoke_certificate::builders::RevokeCertificateFluentBuilder::new(self.handle.clone())
13    }
14}