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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The encryption settings, if any, that are used for decrypting your input files or encrypting your output files. If your input file is encrypted, you must specify the mode that Elastic Transcoder uses to decrypt your file, otherwise you must specify the mode you want Elastic Transcoder to use to encrypt your output files.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Encryption {
/// <p>The specific server-side encryption mode that you want Elastic Transcoder to use when decrypting your input files or encrypting your output files. Elastic Transcoder supports the following options:</p>
/// <ul>
/// <li>
/// <p><b>s3:</b> Amazon S3 creates and manages the keys used for encrypting your files.</p></li>
/// <li>
/// <p><b>s3-aws-kms:</b> Amazon S3 calls the Amazon Key Management Service, which creates and manages the keys that are used for encrypting your files. If you specify <code>s3-aws-kms</code> and you don't want to use the default key, you must add the AWS-KMS key that you want to use to your pipeline.</p></li>
/// <li>
/// <p><b>aes-cbc-pkcs7:</b> A padded cipher-block mode of operation originally used for HLS files.</p></li>
/// <li>
/// <p><b>aes-ctr:</b> AES Counter Mode.</p></li>
/// <li>
/// <p><b>aes-gcm:</b> AES Galois Counter Mode, a mode of operation that is an authenticated encryption format, meaning that a file, key, or initialization vector that has been tampered with fails the decryption process.</p></li>
/// </ul>
/// <p>For all three AES options, you must provide the following settings, which must be base64-encoded:</p>
/// <ul>
/// <li>
/// <p><b>Key</b></p></li>
/// <li>
/// <p><b>Key MD5</b></p></li>
/// <li>
/// <p><b>Initialization Vector</b></p></li>
/// </ul><important>
/// <p>For the AES modes, your private encryption keys and your unencrypted data are never stored by AWS; therefore, it is important that you safely manage your encryption keys. If you lose them, you won't be able to unencrypt your data.</p>
/// </important>
pub mode: ::std::option::Option<::std::string::String>,
/// <p>The data encryption key that you want Elastic Transcoder to use to encrypt your output file, or that was used to encrypt your input file. The key must be base64-encoded and it must be one of the following bit lengths before being base64-encoded:</p>
/// <p><code>128</code>, <code>192</code>, or <code>256</code>.</p>
/// <p>The key must also be encrypted by using the Amazon Key Management Service.</p>
pub key: ::std::option::Option<::std::string::String>,
/// <p>The MD5 digest of the key that you used to encrypt your input file, or that you want Elastic Transcoder to use to encrypt your output file. Elastic Transcoder uses the key digest as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub key_md5: ::std::option::Option<::std::string::String>,
/// <p>The series of random bits created by a random bit generator, unique for every encryption operation, that you used to encrypt your input files or that you want Elastic Transcoder to use to encrypt your output files. The initialization vector must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub initialization_vector: ::std::option::Option<::std::string::String>,
}
impl Encryption {
/// <p>The specific server-side encryption mode that you want Elastic Transcoder to use when decrypting your input files or encrypting your output files. Elastic Transcoder supports the following options:</p>
/// <ul>
/// <li>
/// <p><b>s3:</b> Amazon S3 creates and manages the keys used for encrypting your files.</p></li>
/// <li>
/// <p><b>s3-aws-kms:</b> Amazon S3 calls the Amazon Key Management Service, which creates and manages the keys that are used for encrypting your files. If you specify <code>s3-aws-kms</code> and you don't want to use the default key, you must add the AWS-KMS key that you want to use to your pipeline.</p></li>
/// <li>
/// <p><b>aes-cbc-pkcs7:</b> A padded cipher-block mode of operation originally used for HLS files.</p></li>
/// <li>
/// <p><b>aes-ctr:</b> AES Counter Mode.</p></li>
/// <li>
/// <p><b>aes-gcm:</b> AES Galois Counter Mode, a mode of operation that is an authenticated encryption format, meaning that a file, key, or initialization vector that has been tampered with fails the decryption process.</p></li>
/// </ul>
/// <p>For all three AES options, you must provide the following settings, which must be base64-encoded:</p>
/// <ul>
/// <li>
/// <p><b>Key</b></p></li>
/// <li>
/// <p><b>Key MD5</b></p></li>
/// <li>
/// <p><b>Initialization Vector</b></p></li>
/// </ul><important>
/// <p>For the AES modes, your private encryption keys and your unencrypted data are never stored by AWS; therefore, it is important that you safely manage your encryption keys. If you lose them, you won't be able to unencrypt your data.</p>
/// </important>
pub fn mode(&self) -> ::std::option::Option<&str> {
self.mode.as_deref()
}
/// <p>The data encryption key that you want Elastic Transcoder to use to encrypt your output file, or that was used to encrypt your input file. The key must be base64-encoded and it must be one of the following bit lengths before being base64-encoded:</p>
/// <p><code>128</code>, <code>192</code>, or <code>256</code>.</p>
/// <p>The key must also be encrypted by using the Amazon Key Management Service.</p>
pub fn key(&self) -> ::std::option::Option<&str> {
self.key.as_deref()
}
/// <p>The MD5 digest of the key that you used to encrypt your input file, or that you want Elastic Transcoder to use to encrypt your output file. Elastic Transcoder uses the key digest as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub fn key_md5(&self) -> ::std::option::Option<&str> {
self.key_md5.as_deref()
}
/// <p>The series of random bits created by a random bit generator, unique for every encryption operation, that you used to encrypt your input files or that you want Elastic Transcoder to use to encrypt your output files. The initialization vector must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub fn initialization_vector(&self) -> ::std::option::Option<&str> {
self.initialization_vector.as_deref()
}
}
impl Encryption {
/// Creates a new builder-style object to manufacture [`Encryption`](crate::types::Encryption).
pub fn builder() -> crate::types::builders::EncryptionBuilder {
crate::types::builders::EncryptionBuilder::default()
}
}
/// A builder for [`Encryption`](crate::types::Encryption).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EncryptionBuilder {
pub(crate) mode: ::std::option::Option<::std::string::String>,
pub(crate) key: ::std::option::Option<::std::string::String>,
pub(crate) key_md5: ::std::option::Option<::std::string::String>,
pub(crate) initialization_vector: ::std::option::Option<::std::string::String>,
}
impl EncryptionBuilder {
/// <p>The specific server-side encryption mode that you want Elastic Transcoder to use when decrypting your input files or encrypting your output files. Elastic Transcoder supports the following options:</p>
/// <ul>
/// <li>
/// <p><b>s3:</b> Amazon S3 creates and manages the keys used for encrypting your files.</p></li>
/// <li>
/// <p><b>s3-aws-kms:</b> Amazon S3 calls the Amazon Key Management Service, which creates and manages the keys that are used for encrypting your files. If you specify <code>s3-aws-kms</code> and you don't want to use the default key, you must add the AWS-KMS key that you want to use to your pipeline.</p></li>
/// <li>
/// <p><b>aes-cbc-pkcs7:</b> A padded cipher-block mode of operation originally used for HLS files.</p></li>
/// <li>
/// <p><b>aes-ctr:</b> AES Counter Mode.</p></li>
/// <li>
/// <p><b>aes-gcm:</b> AES Galois Counter Mode, a mode of operation that is an authenticated encryption format, meaning that a file, key, or initialization vector that has been tampered with fails the decryption process.</p></li>
/// </ul>
/// <p>For all three AES options, you must provide the following settings, which must be base64-encoded:</p>
/// <ul>
/// <li>
/// <p><b>Key</b></p></li>
/// <li>
/// <p><b>Key MD5</b></p></li>
/// <li>
/// <p><b>Initialization Vector</b></p></li>
/// </ul><important>
/// <p>For the AES modes, your private encryption keys and your unencrypted data are never stored by AWS; therefore, it is important that you safely manage your encryption keys. If you lose them, you won't be able to unencrypt your data.</p>
/// </important>
pub fn mode(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.mode = ::std::option::Option::Some(input.into());
self
}
/// <p>The specific server-side encryption mode that you want Elastic Transcoder to use when decrypting your input files or encrypting your output files. Elastic Transcoder supports the following options:</p>
/// <ul>
/// <li>
/// <p><b>s3:</b> Amazon S3 creates and manages the keys used for encrypting your files.</p></li>
/// <li>
/// <p><b>s3-aws-kms:</b> Amazon S3 calls the Amazon Key Management Service, which creates and manages the keys that are used for encrypting your files. If you specify <code>s3-aws-kms</code> and you don't want to use the default key, you must add the AWS-KMS key that you want to use to your pipeline.</p></li>
/// <li>
/// <p><b>aes-cbc-pkcs7:</b> A padded cipher-block mode of operation originally used for HLS files.</p></li>
/// <li>
/// <p><b>aes-ctr:</b> AES Counter Mode.</p></li>
/// <li>
/// <p><b>aes-gcm:</b> AES Galois Counter Mode, a mode of operation that is an authenticated encryption format, meaning that a file, key, or initialization vector that has been tampered with fails the decryption process.</p></li>
/// </ul>
/// <p>For all three AES options, you must provide the following settings, which must be base64-encoded:</p>
/// <ul>
/// <li>
/// <p><b>Key</b></p></li>
/// <li>
/// <p><b>Key MD5</b></p></li>
/// <li>
/// <p><b>Initialization Vector</b></p></li>
/// </ul><important>
/// <p>For the AES modes, your private encryption keys and your unencrypted data are never stored by AWS; therefore, it is important that you safely manage your encryption keys. If you lose them, you won't be able to unencrypt your data.</p>
/// </important>
pub fn set_mode(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.mode = input;
self
}
/// <p>The specific server-side encryption mode that you want Elastic Transcoder to use when decrypting your input files or encrypting your output files. Elastic Transcoder supports the following options:</p>
/// <ul>
/// <li>
/// <p><b>s3:</b> Amazon S3 creates and manages the keys used for encrypting your files.</p></li>
/// <li>
/// <p><b>s3-aws-kms:</b> Amazon S3 calls the Amazon Key Management Service, which creates and manages the keys that are used for encrypting your files. If you specify <code>s3-aws-kms</code> and you don't want to use the default key, you must add the AWS-KMS key that you want to use to your pipeline.</p></li>
/// <li>
/// <p><b>aes-cbc-pkcs7:</b> A padded cipher-block mode of operation originally used for HLS files.</p></li>
/// <li>
/// <p><b>aes-ctr:</b> AES Counter Mode.</p></li>
/// <li>
/// <p><b>aes-gcm:</b> AES Galois Counter Mode, a mode of operation that is an authenticated encryption format, meaning that a file, key, or initialization vector that has been tampered with fails the decryption process.</p></li>
/// </ul>
/// <p>For all three AES options, you must provide the following settings, which must be base64-encoded:</p>
/// <ul>
/// <li>
/// <p><b>Key</b></p></li>
/// <li>
/// <p><b>Key MD5</b></p></li>
/// <li>
/// <p><b>Initialization Vector</b></p></li>
/// </ul><important>
/// <p>For the AES modes, your private encryption keys and your unencrypted data are never stored by AWS; therefore, it is important that you safely manage your encryption keys. If you lose them, you won't be able to unencrypt your data.</p>
/// </important>
pub fn get_mode(&self) -> &::std::option::Option<::std::string::String> {
&self.mode
}
/// <p>The data encryption key that you want Elastic Transcoder to use to encrypt your output file, or that was used to encrypt your input file. The key must be base64-encoded and it must be one of the following bit lengths before being base64-encoded:</p>
/// <p><code>128</code>, <code>192</code>, or <code>256</code>.</p>
/// <p>The key must also be encrypted by using the Amazon Key Management Service.</p>
pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key = ::std::option::Option::Some(input.into());
self
}
/// <p>The data encryption key that you want Elastic Transcoder to use to encrypt your output file, or that was used to encrypt your input file. The key must be base64-encoded and it must be one of the following bit lengths before being base64-encoded:</p>
/// <p><code>128</code>, <code>192</code>, or <code>256</code>.</p>
/// <p>The key must also be encrypted by using the Amazon Key Management Service.</p>
pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key = input;
self
}
/// <p>The data encryption key that you want Elastic Transcoder to use to encrypt your output file, or that was used to encrypt your input file. The key must be base64-encoded and it must be one of the following bit lengths before being base64-encoded:</p>
/// <p><code>128</code>, <code>192</code>, or <code>256</code>.</p>
/// <p>The key must also be encrypted by using the Amazon Key Management Service.</p>
pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
&self.key
}
/// <p>The MD5 digest of the key that you used to encrypt your input file, or that you want Elastic Transcoder to use to encrypt your output file. Elastic Transcoder uses the key digest as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub fn key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key_md5 = ::std::option::Option::Some(input.into());
self
}
/// <p>The MD5 digest of the key that you used to encrypt your input file, or that you want Elastic Transcoder to use to encrypt your output file. Elastic Transcoder uses the key digest as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub fn set_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key_md5 = input;
self
}
/// <p>The MD5 digest of the key that you used to encrypt your input file, or that you want Elastic Transcoder to use to encrypt your output file. Elastic Transcoder uses the key digest as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub fn get_key_md5(&self) -> &::std::option::Option<::std::string::String> {
&self.key_md5
}
/// <p>The series of random bits created by a random bit generator, unique for every encryption operation, that you used to encrypt your input files or that you want Elastic Transcoder to use to encrypt your output files. The initialization vector must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub fn initialization_vector(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.initialization_vector = ::std::option::Option::Some(input.into());
self
}
/// <p>The series of random bits created by a random bit generator, unique for every encryption operation, that you used to encrypt your input files or that you want Elastic Transcoder to use to encrypt your output files. The initialization vector must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub fn set_initialization_vector(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.initialization_vector = input;
self
}
/// <p>The series of random bits created by a random bit generator, unique for every encryption operation, that you used to encrypt your input files or that you want Elastic Transcoder to use to encrypt your output files. The initialization vector must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
pub fn get_initialization_vector(&self) -> &::std::option::Option<::std::string::String> {
&self.initialization_vector
}
/// Consumes the builder and constructs a [`Encryption`](crate::types::Encryption).
pub fn build(self) -> crate::types::Encryption {
crate::types::Encryption {
mode: self.mode,
key: self.key,
key_md5: self.key_md5,
initialization_vector: self.initialization_vector,
}
}
}