aws_sdk_qldb/operation/create_ledger/_create_ledger_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateLedgerInput {
6 /// <p>The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon Web Services account in the current Region.</p>
7 /// <p>Naming constraints for ledger names are defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
8 pub name: ::std::option::Option<::std::string::String>,
9 /// <p>The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
10 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
11 /// <p>The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:</p>
12 /// <ul>
13 /// <li>
14 /// <p><code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p>
15 /// <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p></li>
16 /// <li>
17 /// <p><code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p>
18 /// <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p></li>
19 /// </ul><note>
20 /// <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p>
21 /// </note>
22 pub permissions_mode: ::std::option::Option<crate::types::PermissionsMode>,
23 /// <p>Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled (<code>true</code>) by default.</p>
24 /// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set this parameter to <code>false</code>.</p>
25 pub deletion_protection: ::std::option::Option<bool>,
26 /// <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
27 /// <p>Use one of the following options to specify this parameter:</p>
28 /// <ul>
29 /// <li>
30 /// <p><code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p></li>
31 /// <li>
32 /// <p><b>Undefined</b>: By default, use an Amazon Web Services owned KMS key.</p></li>
33 /// <li>
34 /// <p><b>A valid symmetric customer managed KMS key</b>: Use the specified symmetric encryption KMS key in your account that you create, own, and manage.</p>
35 /// <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p></li>
36 /// </ul>
37 /// <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
38 /// <p>For example:</p>
39 /// <ul>
40 /// <li>
41 /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
42 /// <li>
43 /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
44 /// <li>
45 /// <p>Alias name: <code>alias/ExampleAlias</code></p></li>
46 /// <li>
47 /// <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code></p></li>
48 /// </ul>
49 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
50 pub kms_key: ::std::option::Option<::std::string::String>,
51}
52impl CreateLedgerInput {
53 /// <p>The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon Web Services account in the current Region.</p>
54 /// <p>Naming constraints for ledger names are defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
55 pub fn name(&self) -> ::std::option::Option<&str> {
56 self.name.as_deref()
57 }
58 /// <p>The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
59 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>> {
60 self.tags.as_ref()
61 }
62 /// <p>The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:</p>
63 /// <ul>
64 /// <li>
65 /// <p><code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p>
66 /// <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p></li>
67 /// <li>
68 /// <p><code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p>
69 /// <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p></li>
70 /// </ul><note>
71 /// <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p>
72 /// </note>
73 pub fn permissions_mode(&self) -> ::std::option::Option<&crate::types::PermissionsMode> {
74 self.permissions_mode.as_ref()
75 }
76 /// <p>Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled (<code>true</code>) by default.</p>
77 /// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set this parameter to <code>false</code>.</p>
78 pub fn deletion_protection(&self) -> ::std::option::Option<bool> {
79 self.deletion_protection
80 }
81 /// <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
82 /// <p>Use one of the following options to specify this parameter:</p>
83 /// <ul>
84 /// <li>
85 /// <p><code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p></li>
86 /// <li>
87 /// <p><b>Undefined</b>: By default, use an Amazon Web Services owned KMS key.</p></li>
88 /// <li>
89 /// <p><b>A valid symmetric customer managed KMS key</b>: Use the specified symmetric encryption KMS key in your account that you create, own, and manage.</p>
90 /// <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p></li>
91 /// </ul>
92 /// <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
93 /// <p>For example:</p>
94 /// <ul>
95 /// <li>
96 /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
97 /// <li>
98 /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
99 /// <li>
100 /// <p>Alias name: <code>alias/ExampleAlias</code></p></li>
101 /// <li>
102 /// <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code></p></li>
103 /// </ul>
104 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
105 pub fn kms_key(&self) -> ::std::option::Option<&str> {
106 self.kms_key.as_deref()
107 }
108}
109impl CreateLedgerInput {
110 /// Creates a new builder-style object to manufacture [`CreateLedgerInput`](crate::operation::create_ledger::CreateLedgerInput).
111 pub fn builder() -> crate::operation::create_ledger::builders::CreateLedgerInputBuilder {
112 crate::operation::create_ledger::builders::CreateLedgerInputBuilder::default()
113 }
114}
115
116/// A builder for [`CreateLedgerInput`](crate::operation::create_ledger::CreateLedgerInput).
117#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
118#[non_exhaustive]
119pub struct CreateLedgerInputBuilder {
120 pub(crate) name: ::std::option::Option<::std::string::String>,
121 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
122 pub(crate) permissions_mode: ::std::option::Option<crate::types::PermissionsMode>,
123 pub(crate) deletion_protection: ::std::option::Option<bool>,
124 pub(crate) kms_key: ::std::option::Option<::std::string::String>,
125}
126impl CreateLedgerInputBuilder {
127 /// <p>The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon Web Services account in the current Region.</p>
128 /// <p>Naming constraints for ledger names are defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
129 /// This field is required.
130 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.name = ::std::option::Option::Some(input.into());
132 self
133 }
134 /// <p>The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon Web Services account in the current Region.</p>
135 /// <p>Naming constraints for ledger names are defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
136 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.name = input;
138 self
139 }
140 /// <p>The name of the ledger that you want to create. The name must be unique among all of the ledgers in your Amazon Web Services account in the current Region.</p>
141 /// <p>Naming constraints for ledger names are defined in <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming">Quotas in Amazon QLDB</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
142 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
143 &self.name
144 }
145 /// Adds a key-value pair to `tags`.
146 ///
147 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
148 ///
149 /// <p>The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
150 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::option::Option<::std::string::String>) -> Self {
151 let mut hash_map = self.tags.unwrap_or_default();
152 hash_map.insert(k.into(), v);
153 self.tags = ::std::option::Option::Some(hash_map);
154 self
155 }
156 /// <p>The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
157 pub fn set_tags(
158 mut self,
159 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>>,
160 ) -> Self {
161 self.tags = input;
162 self
163 }
164 /// <p>The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.</p>
165 pub fn get_tags(
166 &self,
167 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::option::Option<::std::string::String>>> {
168 &self.tags
169 }
170 /// <p>The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:</p>
171 /// <ul>
172 /// <li>
173 /// <p><code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p>
174 /// <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p></li>
175 /// <li>
176 /// <p><code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p>
177 /// <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p></li>
178 /// </ul><note>
179 /// <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p>
180 /// </note>
181 /// This field is required.
182 pub fn permissions_mode(mut self, input: crate::types::PermissionsMode) -> Self {
183 self.permissions_mode = ::std::option::Option::Some(input);
184 self
185 }
186 /// <p>The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:</p>
187 /// <ul>
188 /// <li>
189 /// <p><code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p>
190 /// <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p></li>
191 /// <li>
192 /// <p><code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p>
193 /// <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p></li>
194 /// </ul><note>
195 /// <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p>
196 /// </note>
197 pub fn set_permissions_mode(mut self, input: ::std::option::Option<crate::types::PermissionsMode>) -> Self {
198 self.permissions_mode = input;
199 self
200 }
201 /// <p>The permissions mode to assign to the ledger that you want to create. This parameter can have one of the following values:</p>
202 /// <ul>
203 /// <li>
204 /// <p><code>ALLOW_ALL</code>: A legacy permissions mode that enables access control with API-level granularity for ledgers.</p>
205 /// <p>This mode allows users who have the <code>SendCommand</code> API permission for this ledger to run all PartiQL commands (hence, <code>ALLOW_ALL</code>) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.</p></li>
206 /// <li>
207 /// <p><code>STANDARD</code>: (<i>Recommended</i>) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.</p>
208 /// <p>By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the <code>SendCommand</code> API permission for the ledger. For information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-standard-mode.html">Getting started with the standard permissions mode</a> in the <i>Amazon QLDB Developer Guide</i>.</p></li>
209 /// </ul><note>
210 /// <p>We strongly recommend using the <code>STANDARD</code> permissions mode to maximize the security of your ledger data.</p>
211 /// </note>
212 pub fn get_permissions_mode(&self) -> &::std::option::Option<crate::types::PermissionsMode> {
213 &self.permissions_mode
214 }
215 /// <p>Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled (<code>true</code>) by default.</p>
216 /// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set this parameter to <code>false</code>.</p>
217 pub fn deletion_protection(mut self, input: bool) -> Self {
218 self.deletion_protection = ::std::option::Option::Some(input);
219 self
220 }
221 /// <p>Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled (<code>true</code>) by default.</p>
222 /// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set this parameter to <code>false</code>.</p>
223 pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
224 self.deletion_protection = input;
225 self
226 }
227 /// <p>Specifies whether the ledger is protected from being deleted by any user. If not defined during ledger creation, this feature is enabled (<code>true</code>) by default.</p>
228 /// <p>If deletion protection is enabled, you must first disable it before you can delete the ledger. You can disable it by calling the <code>UpdateLedger</code> operation to set this parameter to <code>false</code>.</p>
229 pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
230 &self.deletion_protection
231 }
232 /// <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
233 /// <p>Use one of the following options to specify this parameter:</p>
234 /// <ul>
235 /// <li>
236 /// <p><code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p></li>
237 /// <li>
238 /// <p><b>Undefined</b>: By default, use an Amazon Web Services owned KMS key.</p></li>
239 /// <li>
240 /// <p><b>A valid symmetric customer managed KMS key</b>: Use the specified symmetric encryption KMS key in your account that you create, own, and manage.</p>
241 /// <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p></li>
242 /// </ul>
243 /// <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
244 /// <p>For example:</p>
245 /// <ul>
246 /// <li>
247 /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
248 /// <li>
249 /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
250 /// <li>
251 /// <p>Alias name: <code>alias/ExampleAlias</code></p></li>
252 /// <li>
253 /// <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code></p></li>
254 /// </ul>
255 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
256 pub fn kms_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
257 self.kms_key = ::std::option::Option::Some(input.into());
258 self
259 }
260 /// <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
261 /// <p>Use one of the following options to specify this parameter:</p>
262 /// <ul>
263 /// <li>
264 /// <p><code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p></li>
265 /// <li>
266 /// <p><b>Undefined</b>: By default, use an Amazon Web Services owned KMS key.</p></li>
267 /// <li>
268 /// <p><b>A valid symmetric customer managed KMS key</b>: Use the specified symmetric encryption KMS key in your account that you create, own, and manage.</p>
269 /// <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p></li>
270 /// </ul>
271 /// <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
272 /// <p>For example:</p>
273 /// <ul>
274 /// <li>
275 /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
276 /// <li>
277 /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
278 /// <li>
279 /// <p>Alias name: <code>alias/ExampleAlias</code></p></li>
280 /// <li>
281 /// <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code></p></li>
282 /// </ul>
283 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
284 pub fn set_kms_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
285 self.kms_key = input;
286 self
287 }
288 /// <p>The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
289 /// <p>Use one of the following options to specify this parameter:</p>
290 /// <ul>
291 /// <li>
292 /// <p><code>AWS_OWNED_KMS_KEY</code>: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.</p></li>
293 /// <li>
294 /// <p><b>Undefined</b>: By default, use an Amazon Web Services owned KMS key.</p></li>
295 /// <li>
296 /// <p><b>A valid symmetric customer managed KMS key</b>: Use the specified symmetric encryption KMS key in your account that you create, own, and manage.</p>
297 /// <p>Amazon QLDB does not support asymmetric keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using symmetric and asymmetric keys</a> in the <i>Key Management Service Developer Guide</i>.</p></li>
298 /// </ul>
299 /// <p>To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
300 /// <p>For example:</p>
301 /// <ul>
302 /// <li>
303 /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
304 /// <li>
305 /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
306 /// <li>
307 /// <p>Alias name: <code>alias/ExampleAlias</code></p></li>
308 /// <li>
309 /// <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code></p></li>
310 /// </ul>
311 /// <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
312 pub fn get_kms_key(&self) -> &::std::option::Option<::std::string::String> {
313 &self.kms_key
314 }
315 /// Consumes the builder and constructs a [`CreateLedgerInput`](crate::operation::create_ledger::CreateLedgerInput).
316 pub fn build(
317 self,
318 ) -> ::std::result::Result<crate::operation::create_ledger::CreateLedgerInput, ::aws_smithy_types::error::operation::BuildError> {
319 ::std::result::Result::Ok(crate::operation::create_ledger::CreateLedgerInput {
320 name: self.name,
321 tags: self.tags,
322 permissions_mode: self.permissions_mode,
323 deletion_protection: self.deletion_protection,
324 kms_key: self.kms_key,
325 })
326 }
327}