1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// 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()
}
}