aws-sdk-lambda 1.121.0

AWS SDK for AWS Lambda
Documentation
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// When writing a match expression against `Runtime`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let runtime = unimplemented!();
/// match runtime {
///     Runtime::Dotnet10 => { /* ... */ },
///     Runtime::Dotnet6 => { /* ... */ },
///     Runtime::Dotnet8 => { /* ... */ },
///     Runtime::Dotnetcore10 => { /* ... */ },
///     Runtime::Dotnetcore20 => { /* ... */ },
///     Runtime::Dotnetcore21 => { /* ... */ },
///     Runtime::Dotnetcore31 => { /* ... */ },
///     Runtime::Go1x => { /* ... */ },
///     Runtime::Java11 => { /* ... */ },
///     Runtime::Java17 => { /* ... */ },
///     Runtime::Java21 => { /* ... */ },
///     Runtime::Java25 => { /* ... */ },
///     Runtime::Java8 => { /* ... */ },
///     Runtime::Java8al2 => { /* ... */ },
///     Runtime::Nodejs => { /* ... */ },
///     Runtime::Nodejs10x => { /* ... */ },
///     Runtime::Nodejs12x => { /* ... */ },
///     Runtime::Nodejs14x => { /* ... */ },
///     Runtime::Nodejs16x => { /* ... */ },
///     Runtime::Nodejs18x => { /* ... */ },
///     Runtime::Nodejs20x => { /* ... */ },
///     Runtime::Nodejs22x => { /* ... */ },
///     Runtime::Nodejs24x => { /* ... */ },
///     Runtime::Nodejs43 => { /* ... */ },
///     Runtime::Nodejs43edge => { /* ... */ },
///     Runtime::Nodejs610 => { /* ... */ },
///     Runtime::Nodejs810 => { /* ... */ },
///     Runtime::Provided => { /* ... */ },
///     Runtime::Providedal2 => { /* ... */ },
///     Runtime::Providedal2023 => { /* ... */ },
///     Runtime::Python27 => { /* ... */ },
///     Runtime::Python310 => { /* ... */ },
///     Runtime::Python311 => { /* ... */ },
///     Runtime::Python312 => { /* ... */ },
///     Runtime::Python313 => { /* ... */ },
///     Runtime::Python314 => { /* ... */ },
///     Runtime::Python36 => { /* ... */ },
///     Runtime::Python37 => { /* ... */ },
///     Runtime::Python38 => { /* ... */ },
///     Runtime::Python39 => { /* ... */ },
///     Runtime::Ruby25 => { /* ... */ },
///     Runtime::Ruby27 => { /* ... */ },
///     Runtime::Ruby32 => { /* ... */ },
///     Runtime::Ruby33 => { /* ... */ },
///     Runtime::Ruby34 => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `runtime` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `Runtime::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `Runtime::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `Runtime::NewFeature` is defined.
/// Specifically, when `runtime` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `Runtime::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
///
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
)]
pub enum Runtime {
    #[allow(missing_docs)] // documentation missing in model
    Dotnet10,
    #[allow(missing_docs)] // documentation missing in model
    Dotnet6,
    #[allow(missing_docs)] // documentation missing in model
    Dotnet8,
    #[allow(missing_docs)] // documentation missing in model
    Dotnetcore10,
    #[allow(missing_docs)] // documentation missing in model
    Dotnetcore20,
    #[allow(missing_docs)] // documentation missing in model
    Dotnetcore21,
    #[allow(missing_docs)] // documentation missing in model
    Dotnetcore31,
    #[allow(missing_docs)] // documentation missing in model
    Go1x,
    #[allow(missing_docs)] // documentation missing in model
    Java11,
    #[allow(missing_docs)] // documentation missing in model
    Java17,
    #[allow(missing_docs)] // documentation missing in model
    Java21,
    #[allow(missing_docs)] // documentation missing in model
    Java25,
    #[allow(missing_docs)] // documentation missing in model
    Java8,
    #[allow(missing_docs)] // documentation missing in model
    Java8al2,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs10x,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs12x,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs14x,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs16x,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs18x,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs20x,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs22x,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs24x,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs43,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs43edge,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs610,
    #[allow(missing_docs)] // documentation missing in model
    Nodejs810,
    #[allow(missing_docs)] // documentation missing in model
    Provided,
    #[allow(missing_docs)] // documentation missing in model
    Providedal2,
    #[allow(missing_docs)] // documentation missing in model
    Providedal2023,
    #[allow(missing_docs)] // documentation missing in model
    Python27,
    #[allow(missing_docs)] // documentation missing in model
    Python310,
    #[allow(missing_docs)] // documentation missing in model
    Python311,
    #[allow(missing_docs)] // documentation missing in model
    Python312,
    #[allow(missing_docs)] // documentation missing in model
    Python313,
    #[allow(missing_docs)] // documentation missing in model
    Python314,
    #[allow(missing_docs)] // documentation missing in model
    Python36,
    #[allow(missing_docs)] // documentation missing in model
    Python37,
    #[allow(missing_docs)] // documentation missing in model
    Python38,
    #[allow(missing_docs)] // documentation missing in model
    Python39,
    #[allow(missing_docs)] // documentation missing in model
    Ruby25,
    #[allow(missing_docs)] // documentation missing in model
    Ruby27,
    #[allow(missing_docs)] // documentation missing in model
    Ruby32,
    #[allow(missing_docs)] // documentation missing in model
    Ruby33,
    #[allow(missing_docs)] // documentation missing in model
    Ruby34,
    /// `Unknown` contains new variants that have been added since this code was generated.
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
}
impl ::std::convert::From<&str> for Runtime {
    fn from(s: &str) -> Self {
        match s {
            "dotnet10" => Runtime::Dotnet10,
            "dotnet6" => Runtime::Dotnet6,
            "dotnet8" => Runtime::Dotnet8,
            "dotnetcore1.0" => Runtime::Dotnetcore10,
            "dotnetcore2.0" => Runtime::Dotnetcore20,
            "dotnetcore2.1" => Runtime::Dotnetcore21,
            "dotnetcore3.1" => Runtime::Dotnetcore31,
            "go1.x" => Runtime::Go1x,
            "java11" => Runtime::Java11,
            "java17" => Runtime::Java17,
            "java21" => Runtime::Java21,
            "java25" => Runtime::Java25,
            "java8" => Runtime::Java8,
            "java8.al2" => Runtime::Java8al2,
            "nodejs" => Runtime::Nodejs,
            "nodejs10.x" => Runtime::Nodejs10x,
            "nodejs12.x" => Runtime::Nodejs12x,
            "nodejs14.x" => Runtime::Nodejs14x,
            "nodejs16.x" => Runtime::Nodejs16x,
            "nodejs18.x" => Runtime::Nodejs18x,
            "nodejs20.x" => Runtime::Nodejs20x,
            "nodejs22.x" => Runtime::Nodejs22x,
            "nodejs24.x" => Runtime::Nodejs24x,
            "nodejs4.3" => Runtime::Nodejs43,
            "nodejs4.3-edge" => Runtime::Nodejs43edge,
            "nodejs6.10" => Runtime::Nodejs610,
            "nodejs8.10" => Runtime::Nodejs810,
            "provided" => Runtime::Provided,
            "provided.al2" => Runtime::Providedal2,
            "provided.al2023" => Runtime::Providedal2023,
            "python2.7" => Runtime::Python27,
            "python3.10" => Runtime::Python310,
            "python3.11" => Runtime::Python311,
            "python3.12" => Runtime::Python312,
            "python3.13" => Runtime::Python313,
            "python3.14" => Runtime::Python314,
            "python3.6" => Runtime::Python36,
            "python3.7" => Runtime::Python37,
            "python3.8" => Runtime::Python38,
            "python3.9" => Runtime::Python39,
            "ruby2.5" => Runtime::Ruby25,
            "ruby2.7" => Runtime::Ruby27,
            "ruby3.2" => Runtime::Ruby32,
            "ruby3.3" => Runtime::Ruby33,
            "ruby3.4" => Runtime::Ruby34,
            other => Runtime::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl ::std::str::FromStr for Runtime {
    type Err = ::std::convert::Infallible;

    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
        ::std::result::Result::Ok(Runtime::from(s))
    }
}
impl Runtime {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Runtime::Dotnet10 => "dotnet10",
            Runtime::Dotnet6 => "dotnet6",
            Runtime::Dotnet8 => "dotnet8",
            Runtime::Dotnetcore10 => "dotnetcore1.0",
            Runtime::Dotnetcore20 => "dotnetcore2.0",
            Runtime::Dotnetcore21 => "dotnetcore2.1",
            Runtime::Dotnetcore31 => "dotnetcore3.1",
            Runtime::Go1x => "go1.x",
            Runtime::Java11 => "java11",
            Runtime::Java17 => "java17",
            Runtime::Java21 => "java21",
            Runtime::Java25 => "java25",
            Runtime::Java8 => "java8",
            Runtime::Java8al2 => "java8.al2",
            Runtime::Nodejs => "nodejs",
            Runtime::Nodejs10x => "nodejs10.x",
            Runtime::Nodejs12x => "nodejs12.x",
            Runtime::Nodejs14x => "nodejs14.x",
            Runtime::Nodejs16x => "nodejs16.x",
            Runtime::Nodejs18x => "nodejs18.x",
            Runtime::Nodejs20x => "nodejs20.x",
            Runtime::Nodejs22x => "nodejs22.x",
            Runtime::Nodejs24x => "nodejs24.x",
            Runtime::Nodejs43 => "nodejs4.3",
            Runtime::Nodejs43edge => "nodejs4.3-edge",
            Runtime::Nodejs610 => "nodejs6.10",
            Runtime::Nodejs810 => "nodejs8.10",
            Runtime::Provided => "provided",
            Runtime::Providedal2 => "provided.al2",
            Runtime::Providedal2023 => "provided.al2023",
            Runtime::Python27 => "python2.7",
            Runtime::Python310 => "python3.10",
            Runtime::Python311 => "python3.11",
            Runtime::Python312 => "python3.12",
            Runtime::Python313 => "python3.13",
            Runtime::Python314 => "python3.14",
            Runtime::Python36 => "python3.6",
            Runtime::Python37 => "python3.7",
            Runtime::Python38 => "python3.8",
            Runtime::Python39 => "python3.9",
            Runtime::Ruby25 => "ruby2.5",
            Runtime::Ruby27 => "ruby2.7",
            Runtime::Ruby32 => "ruby3.2",
            Runtime::Ruby33 => "ruby3.3",
            Runtime::Ruby34 => "ruby3.4",
            Runtime::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` representations of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "dotnet10",
            "dotnet6",
            "dotnet8",
            "dotnetcore1.0",
            "dotnetcore2.0",
            "dotnetcore2.1",
            "dotnetcore3.1",
            "go1.x",
            "java11",
            "java17",
            "java21",
            "java25",
            "java8",
            "java8.al2",
            "nodejs",
            "nodejs10.x",
            "nodejs12.x",
            "nodejs14.x",
            "nodejs16.x",
            "nodejs18.x",
            "nodejs20.x",
            "nodejs22.x",
            "nodejs24.x",
            "nodejs4.3",
            "nodejs4.3-edge",
            "nodejs6.10",
            "nodejs8.10",
            "provided",
            "provided.al2",
            "provided.al2023",
            "python2.7",
            "python3.10",
            "python3.11",
            "python3.12",
            "python3.13",
            "python3.14",
            "python3.6",
            "python3.7",
            "python3.8",
            "python3.9",
            "ruby2.5",
            "ruby2.7",
            "ruby3.2",
            "ruby3.3",
            "ruby3.4",
        ]
    }
}
impl ::std::convert::AsRef<str> for Runtime {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}
impl Runtime {
    /// Parses the enum value while disallowing unknown variants.
    ///
    /// Unknown variants will result in an error.
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
        match Self::from(value) {
            #[allow(deprecated)]
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
            known => Ok(known),
        }
    }
}
impl ::std::fmt::Display for Runtime {
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
        match self {
            Runtime::Dotnet10 => write!(f, "dotnet10"),
            Runtime::Dotnet6 => write!(f, "dotnet6"),
            Runtime::Dotnet8 => write!(f, "dotnet8"),
            Runtime::Dotnetcore10 => write!(f, "dotnetcore1.0"),
            Runtime::Dotnetcore20 => write!(f, "dotnetcore2.0"),
            Runtime::Dotnetcore21 => write!(f, "dotnetcore2.1"),
            Runtime::Dotnetcore31 => write!(f, "dotnetcore3.1"),
            Runtime::Go1x => write!(f, "go1.x"),
            Runtime::Java11 => write!(f, "java11"),
            Runtime::Java17 => write!(f, "java17"),
            Runtime::Java21 => write!(f, "java21"),
            Runtime::Java25 => write!(f, "java25"),
            Runtime::Java8 => write!(f, "java8"),
            Runtime::Java8al2 => write!(f, "java8.al2"),
            Runtime::Nodejs => write!(f, "nodejs"),
            Runtime::Nodejs10x => write!(f, "nodejs10.x"),
            Runtime::Nodejs12x => write!(f, "nodejs12.x"),
            Runtime::Nodejs14x => write!(f, "nodejs14.x"),
            Runtime::Nodejs16x => write!(f, "nodejs16.x"),
            Runtime::Nodejs18x => write!(f, "nodejs18.x"),
            Runtime::Nodejs20x => write!(f, "nodejs20.x"),
            Runtime::Nodejs22x => write!(f, "nodejs22.x"),
            Runtime::Nodejs24x => write!(f, "nodejs24.x"),
            Runtime::Nodejs43 => write!(f, "nodejs4.3"),
            Runtime::Nodejs43edge => write!(f, "nodejs4.3-edge"),
            Runtime::Nodejs610 => write!(f, "nodejs6.10"),
            Runtime::Nodejs810 => write!(f, "nodejs8.10"),
            Runtime::Provided => write!(f, "provided"),
            Runtime::Providedal2 => write!(f, "provided.al2"),
            Runtime::Providedal2023 => write!(f, "provided.al2023"),
            Runtime::Python27 => write!(f, "python2.7"),
            Runtime::Python310 => write!(f, "python3.10"),
            Runtime::Python311 => write!(f, "python3.11"),
            Runtime::Python312 => write!(f, "python3.12"),
            Runtime::Python313 => write!(f, "python3.13"),
            Runtime::Python314 => write!(f, "python3.14"),
            Runtime::Python36 => write!(f, "python3.6"),
            Runtime::Python37 => write!(f, "python3.7"),
            Runtime::Python38 => write!(f, "python3.8"),
            Runtime::Python39 => write!(f, "python3.9"),
            Runtime::Ruby25 => write!(f, "ruby2.5"),
            Runtime::Ruby27 => write!(f, "ruby2.7"),
            Runtime::Ruby32 => write!(f, "ruby3.2"),
            Runtime::Ruby33 => write!(f, "ruby3.3"),
            Runtime::Ruby34 => write!(f, "ruby3.4"),
            Runtime::Unknown(value) => write!(f, "{value}"),
        }
    }
}