aws-sdk-acm 1.105.0

AWS SDK for AWS Certificate Manager
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct ExportCertificateInput {
    /// <p>An Amazon Resource Name (ARN) of the issued certificate. This must be of the form:</p>
    /// <p><code>arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012</code></p>
    pub certificate_arn: ::std::option::Option<::std::string::String>,
    /// <p>Passphrase to associate with the encrypted exported private key.</p><note>
    /// <p>When creating your passphrase, you can use any ASCII character except #, $, or %.</p>
    /// </note>
    /// <p>If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key. After entering the command, you are prompted for the passphrase.</p>
    /// <p><code>openssl rsa -in encrypted_key.pem -out decrypted_key.pem</code></p>
    pub passphrase: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl ExportCertificateInput {
    /// <p>An Amazon Resource Name (ARN) of the issued certificate. This must be of the form:</p>
    /// <p><code>arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012</code></p>
    pub fn certificate_arn(&self) -> ::std::option::Option<&str> {
        self.certificate_arn.as_deref()
    }
    /// <p>Passphrase to associate with the encrypted exported private key.</p><note>
    /// <p>When creating your passphrase, you can use any ASCII character except #, $, or %.</p>
    /// </note>
    /// <p>If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key. After entering the command, you are prompted for the passphrase.</p>
    /// <p><code>openssl rsa -in encrypted_key.pem -out decrypted_key.pem</code></p>
    pub fn passphrase(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.passphrase.as_ref()
    }
}
impl ::std::fmt::Debug for ExportCertificateInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ExportCertificateInput");
        formatter.field("certificate_arn", &self.certificate_arn);
        formatter.field("passphrase", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl ExportCertificateInput {
    /// Creates a new builder-style object to manufacture [`ExportCertificateInput`](crate::operation::export_certificate::ExportCertificateInput).
    pub fn builder() -> crate::operation::export_certificate::builders::ExportCertificateInputBuilder {
        crate::operation::export_certificate::builders::ExportCertificateInputBuilder::default()
    }
}

/// A builder for [`ExportCertificateInput`](crate::operation::export_certificate::ExportCertificateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ExportCertificateInputBuilder {
    pub(crate) certificate_arn: ::std::option::Option<::std::string::String>,
    pub(crate) passphrase: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl ExportCertificateInputBuilder {
    /// <p>An Amazon Resource Name (ARN) of the issued certificate. This must be of the form:</p>
    /// <p><code>arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012</code></p>
    /// This field is required.
    pub fn certificate_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.certificate_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An Amazon Resource Name (ARN) of the issued certificate. This must be of the form:</p>
    /// <p><code>arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012</code></p>
    pub fn set_certificate_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.certificate_arn = input;
        self
    }
    /// <p>An Amazon Resource Name (ARN) of the issued certificate. This must be of the form:</p>
    /// <p><code>arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012</code></p>
    pub fn get_certificate_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate_arn
    }
    /// <p>Passphrase to associate with the encrypted exported private key.</p><note>
    /// <p>When creating your passphrase, you can use any ASCII character except #, $, or %.</p>
    /// </note>
    /// <p>If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key. After entering the command, you are prompted for the passphrase.</p>
    /// <p><code>openssl rsa -in encrypted_key.pem -out decrypted_key.pem</code></p>
    /// This field is required.
    pub fn passphrase(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.passphrase = ::std::option::Option::Some(input);
        self
    }
    /// <p>Passphrase to associate with the encrypted exported private key.</p><note>
    /// <p>When creating your passphrase, you can use any ASCII character except #, $, or %.</p>
    /// </note>
    /// <p>If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key. After entering the command, you are prompted for the passphrase.</p>
    /// <p><code>openssl rsa -in encrypted_key.pem -out decrypted_key.pem</code></p>
    pub fn set_passphrase(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.passphrase = input;
        self
    }
    /// <p>Passphrase to associate with the encrypted exported private key.</p><note>
    /// <p>When creating your passphrase, you can use any ASCII character except #, $, or %.</p>
    /// </note>
    /// <p>If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key. After entering the command, you are prompted for the passphrase.</p>
    /// <p><code>openssl rsa -in encrypted_key.pem -out decrypted_key.pem</code></p>
    pub fn get_passphrase(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.passphrase
    }
    /// Consumes the builder and constructs a [`ExportCertificateInput`](crate::operation::export_certificate::ExportCertificateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::export_certificate::ExportCertificateInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::export_certificate::ExportCertificateInput {
            certificate_arn: self.certificate_arn,
            passphrase: self.passphrase,
        })
    }
}
impl ::std::fmt::Debug for ExportCertificateInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ExportCertificateInputBuilder");
        formatter.field("certificate_arn", &self.certificate_arn);
        formatter.field("passphrase", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}