1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 |
|
3 3 | /// <p>Describes the default server-side encryption to apply to new objects in the bucket. If a PUT Object request doesn't specify any server-side encryption, this default encryption will be applied. If you don't specify a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key in your Amazon Web Services account the first time that you add an object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key for SSE-KMS. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html">PUT Bucket encryption</a> in the <i>Amazon S3 API Reference</i>.</p>
|
4 4 | #[non_exhaustive]
|
5 5 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
|
6 6 | pub struct ServerSideEncryptionByDefault {
|
7 7 | /// <p>Server-side encryption algorithm to use for the default encryption.</p>
|
8 8 | pub sse_algorithm: crate::types::ServerSideEncryption,
|
9 - | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code> or <code>aws:kms:dsse</code>.</p>
|
9 + | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code>.</p>
|
10 10 | /// <p>You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS key.</p>
|
11 11 | /// <ul>
|
12 12 | /// <li>
|
13 13 | /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
14 14 | /// <li>
|
15 15 | /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
16 16 | /// <li>
|
17 17 | /// <p>Key Alias: <code>alias/alias-name</code></p></li>
|
18 18 | /// </ul>
|
19 19 | /// <p>If you use a key ID, you can run into a LogDestination undeliverable error when creating a VPC flow log.</p>
|
20 20 | /// <p>If you are using encryption with cross-account or Amazon Web Services service operations you must use a fully qualified KMS key ARN. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy">Using encryption for cross-account operations</a>.</p><important>
|
21 21 | /// <p>Amazon S3 only supports symmetric encryption KMS keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric keys in Amazon Web Services KMS</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
|
22 22 | /// </important>
|
23 23 | pub kms_master_key_id: ::std::option::Option<::std::string::String>,
|
24 24 | }
|
25 25 | impl ServerSideEncryptionByDefault {
|
26 26 | /// <p>Server-side encryption algorithm to use for the default encryption.</p>
|
27 27 | pub fn sse_algorithm(&self) -> &crate::types::ServerSideEncryption {
|
28 28 | &self.sse_algorithm
|
29 29 | }
|
30 - | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code> or <code>aws:kms:dsse</code>.</p>
|
30 + | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code>.</p>
|
31 31 | /// <p>You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS key.</p>
|
32 32 | /// <ul>
|
33 33 | /// <li>
|
34 34 | /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
35 35 | /// <li>
|
36 36 | /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
37 37 | /// <li>
|
38 38 | /// <p>Key Alias: <code>alias/alias-name</code></p></li>
|
39 39 | /// </ul>
|
40 40 | /// <p>If you use a key ID, you can run into a LogDestination undeliverable error when creating a VPC flow log.</p>
|
41 41 | /// <p>If you are using encryption with cross-account or Amazon Web Services service operations you must use a fully qualified KMS key ARN. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy">Using encryption for cross-account operations</a>.</p><important>
|
42 42 | /// <p>Amazon S3 only supports symmetric encryption KMS keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric keys in Amazon Web Services KMS</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
|
43 43 | /// </important>
|
44 44 | pub fn kms_master_key_id(&self) -> ::std::option::Option<&str> {
|
45 45 | self.kms_master_key_id.as_deref()
|
46 46 | }
|
47 47 | }
|
48 48 | impl ::std::fmt::Debug for ServerSideEncryptionByDefault {
|
49 49 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
50 50 | let mut formatter = f.debug_struct("ServerSideEncryptionByDefault");
|
51 51 | formatter.field("sse_algorithm", &self.sse_algorithm);
|
52 52 | formatter.field("kms_master_key_id", &"*** Sensitive Data Redacted ***");
|
53 53 | formatter.finish()
|
54 54 | }
|
55 55 | }
|
56 56 | impl ServerSideEncryptionByDefault {
|
57 57 | /// Creates a new builder-style object to manufacture [`ServerSideEncryptionByDefault`](crate::types::ServerSideEncryptionByDefault).
|
58 58 | pub fn builder() -> crate::types::builders::ServerSideEncryptionByDefaultBuilder {
|
59 59 | crate::types::builders::ServerSideEncryptionByDefaultBuilder::default()
|
60 60 | }
|
61 61 | }
|
62 62 |
|
63 63 | /// A builder for [`ServerSideEncryptionByDefault`](crate::types::ServerSideEncryptionByDefault).
|
64 64 | #[non_exhaustive]
|
65 65 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
66 66 | pub struct ServerSideEncryptionByDefaultBuilder {
|
67 67 | pub(crate) sse_algorithm: ::std::option::Option<crate::types::ServerSideEncryption>,
|
68 68 | pub(crate) kms_master_key_id: ::std::option::Option<::std::string::String>,
|
69 69 | }
|
70 70 | impl ServerSideEncryptionByDefaultBuilder {
|
71 71 | /// <p>Server-side encryption algorithm to use for the default encryption.</p>
|
72 72 | /// This field is required.
|
73 73 | pub fn sse_algorithm(mut self, input: crate::types::ServerSideEncryption) -> Self {
|
74 74 | self.sse_algorithm = ::std::option::Option::Some(input);
|
75 75 | self
|
76 76 | }
|
77 77 | /// <p>Server-side encryption algorithm to use for the default encryption.</p>
|
78 78 | pub fn set_sse_algorithm(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
|
79 79 | self.sse_algorithm = input;
|
80 80 | self
|
81 81 | }
|
82 82 | /// <p>Server-side encryption algorithm to use for the default encryption.</p>
|
83 83 | pub fn get_sse_algorithm(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
|
84 84 | &self.sse_algorithm
|
85 85 | }
|
86 - | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code> or <code>aws:kms:dsse</code>.</p>
|
86 + | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code>.</p>
|
87 87 | /// <p>You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS key.</p>
|
88 88 | /// <ul>
|
89 89 | /// <li>
|
90 90 | /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
91 91 | /// <li>
|
92 92 | /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
93 93 | /// <li>
|
94 94 | /// <p>Key Alias: <code>alias/alias-name</code></p></li>
|
95 95 | /// </ul>
|
96 96 | /// <p>If you use a key ID, you can run into a LogDestination undeliverable error when creating a VPC flow log.</p>
|
97 97 | /// <p>If you are using encryption with cross-account or Amazon Web Services service operations you must use a fully qualified KMS key ARN. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy">Using encryption for cross-account operations</a>.</p><important>
|
98 98 | /// <p>Amazon S3 only supports symmetric encryption KMS keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric keys in Amazon Web Services KMS</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
|
99 99 | /// </important>
|
100 100 | pub fn kms_master_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
101 101 | self.kms_master_key_id = ::std::option::Option::Some(input.into());
|
102 102 | self
|
103 103 | }
|
104 - | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code> or <code>aws:kms:dsse</code>.</p>
|
104 + | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code>.</p>
|
105 105 | /// <p>You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS key.</p>
|
106 106 | /// <ul>
|
107 107 | /// <li>
|
108 108 | /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
109 109 | /// <li>
|
110 110 | /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
111 111 | /// <li>
|
112 112 | /// <p>Key Alias: <code>alias/alias-name</code></p></li>
|
113 113 | /// </ul>
|
114 114 | /// <p>If you use a key ID, you can run into a LogDestination undeliverable error when creating a VPC flow log.</p>
|
115 115 | /// <p>If you are using encryption with cross-account or Amazon Web Services service operations you must use a fully qualified KMS key ARN. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy">Using encryption for cross-account operations</a>.</p><important>
|
116 116 | /// <p>Amazon S3 only supports symmetric encryption KMS keys. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Asymmetric keys in Amazon Web Services KMS</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
|
117 117 | /// </important>
|
118 118 | pub fn set_kms_master_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
119 119 | self.kms_master_key_id = input;
|
120 120 | self
|
121 121 | }
|
122 - | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code> or <code>aws:kms:dsse</code>.</p>
|
122 + | /// <p>Amazon Web Services Key Management Service (KMS) customer Amazon Web Services KMS key ID to use for the default encryption. This parameter is allowed if and only if <code>SSEAlgorithm</code> is set to <code>aws:kms</code>.</p>
|
123 123 | /// <p>You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS key.</p>
|
124 124 | /// <ul>
|
125 125 | /// <li>
|
126 126 | /// <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
127 127 | /// <li>
|
128 128 | /// <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code></p></li>
|
129 129 | /// <li>
|
130 130 | /// <p>Key Alias: <code>alias/alias-name</code></p></li>
|
131 131 | /// </ul>
|
132 132 | /// <p>If you use a key ID, you can run into a LogDestination undeliverable error when creating a VPC flow log.</p>
|