aws_sdk_lambda/operation/create_function/
_create_function_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 CreateFunctionInput {
6    /// <p>The name or ARN of the Lambda function.</p>
7    /// <p class="title"><b>Name formats</b></p>
8    /// <ul>
9    /// <li>
10    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
11    /// <li>
12    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
13    /// <li>
14    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
15    /// </ul>
16    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
17    pub function_name: ::std::option::Option<::std::string::String>,
18    /// <p>The identifier of the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html"> runtime</a>. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.</p>
19    /// <p>The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
20    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
21    pub runtime: ::std::option::Option<crate::types::Runtime>,
22    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
23    pub role: ::std::option::Option<::std::string::String>,
24    /// <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html">Lambda programming model</a>.</p>
25    pub handler: ::std::option::Option<::std::string::String>,
26    /// <p>The code for the function.</p>
27    pub code: ::std::option::Option<crate::types::FunctionCode>,
28    /// <p>A description of the function.</p>
29    pub description: ::std::option::Option<::std::string::String>,
30    /// <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html">Lambda execution environment</a>.</p>
31    pub timeout: ::std::option::Option<i32>,
32    /// <p>The amount of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
33    pub memory_size: ::std::option::Option<i32>,
34    /// <p>Set to true to publish the first version of the function during creation.</p>
35    pub publish: ::std::option::Option<bool>,
36    /// <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">Configuring a Lambda function to access resources in a VPC</a>.</p>
37    pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
38    /// <p>The type of deployment package. Set to <code>Image</code> for container image and set to <code>Zip</code> for .zip file archive.</p>
39    pub package_type: ::std::option::Option<crate::types::PackageType>,
40    /// <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq">Dead-letter queues</a>.</p>
41    pub dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
42    /// <p>Environment variables that are accessible from function code during execution.</p>
43    pub environment: ::std::option::Option<crate::types::Environment>,
44    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
45    /// <ul>
46    /// <li>
47    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption">environment variables</a>.</p></li>
48    /// <li>
49    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
50    /// <li>
51    /// <p>When used with <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption"> Specifying a customer managed key for Lambda</a>.</p></li>
52    /// <li>
53    /// <p>The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle">Function lifecycle</a>.</p></li>
54    /// </ul>
55    /// <p>If you don't provide a customer managed key, Lambda uses an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned key</a> or an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>.</p>
56    pub kms_key_arn: ::std::option::Option<::std::string::String>,
57    /// <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href="https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html">X-Ray</a>.</p>
58    pub tracing_config: ::std::option::Option<crate::types::TracingConfig>,
59    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
60    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
61    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
62    pub layers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
63    /// <p>Connection settings for an Amazon EFS file system.</p>
64    pub file_system_configs: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>,
65    /// <p>Container image <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms">configuration values</a> that override the values in the container image Dockerfile.</p>
66    pub image_config: ::std::option::Option<crate::types::ImageConfig>,
67    /// <p>To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.</p>
68    pub code_signing_config_arn: ::std::option::Option<::std::string::String>,
69    /// <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
70    pub architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
71    /// <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage">Configuring ephemeral storage (console)</a>.</p>
72    pub ephemeral_storage: ::std::option::Option<crate::types::EphemeralStorage>,
73    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
74    pub snap_start: ::std::option::Option<crate::types::SnapStart>,
75    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
76    pub logging_config: ::std::option::Option<crate::types::LoggingConfig>,
77}
78impl CreateFunctionInput {
79    /// <p>The name or ARN of the Lambda function.</p>
80    /// <p class="title"><b>Name formats</b></p>
81    /// <ul>
82    /// <li>
83    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
84    /// <li>
85    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
86    /// <li>
87    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
88    /// </ul>
89    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
90    pub fn function_name(&self) -> ::std::option::Option<&str> {
91        self.function_name.as_deref()
92    }
93    /// <p>The identifier of the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html"> runtime</a>. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.</p>
94    /// <p>The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
95    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
96    pub fn runtime(&self) -> ::std::option::Option<&crate::types::Runtime> {
97        self.runtime.as_ref()
98    }
99    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
100    pub fn role(&self) -> ::std::option::Option<&str> {
101        self.role.as_deref()
102    }
103    /// <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html">Lambda programming model</a>.</p>
104    pub fn handler(&self) -> ::std::option::Option<&str> {
105        self.handler.as_deref()
106    }
107    /// <p>The code for the function.</p>
108    pub fn code(&self) -> ::std::option::Option<&crate::types::FunctionCode> {
109        self.code.as_ref()
110    }
111    /// <p>A description of the function.</p>
112    pub fn description(&self) -> ::std::option::Option<&str> {
113        self.description.as_deref()
114    }
115    /// <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html">Lambda execution environment</a>.</p>
116    pub fn timeout(&self) -> ::std::option::Option<i32> {
117        self.timeout
118    }
119    /// <p>The amount of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
120    pub fn memory_size(&self) -> ::std::option::Option<i32> {
121        self.memory_size
122    }
123    /// <p>Set to true to publish the first version of the function during creation.</p>
124    pub fn publish(&self) -> ::std::option::Option<bool> {
125        self.publish
126    }
127    /// <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">Configuring a Lambda function to access resources in a VPC</a>.</p>
128    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
129        self.vpc_config.as_ref()
130    }
131    /// <p>The type of deployment package. Set to <code>Image</code> for container image and set to <code>Zip</code> for .zip file archive.</p>
132    pub fn package_type(&self) -> ::std::option::Option<&crate::types::PackageType> {
133        self.package_type.as_ref()
134    }
135    /// <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq">Dead-letter queues</a>.</p>
136    pub fn dead_letter_config(&self) -> ::std::option::Option<&crate::types::DeadLetterConfig> {
137        self.dead_letter_config.as_ref()
138    }
139    /// <p>Environment variables that are accessible from function code during execution.</p>
140    pub fn environment(&self) -> ::std::option::Option<&crate::types::Environment> {
141        self.environment.as_ref()
142    }
143    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
144    /// <ul>
145    /// <li>
146    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption">environment variables</a>.</p></li>
147    /// <li>
148    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
149    /// <li>
150    /// <p>When used with <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption"> Specifying a customer managed key for Lambda</a>.</p></li>
151    /// <li>
152    /// <p>The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle">Function lifecycle</a>.</p></li>
153    /// </ul>
154    /// <p>If you don't provide a customer managed key, Lambda uses an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned key</a> or an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>.</p>
155    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
156        self.kms_key_arn.as_deref()
157    }
158    /// <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href="https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html">X-Ray</a>.</p>
159    pub fn tracing_config(&self) -> ::std::option::Option<&crate::types::TracingConfig> {
160        self.tracing_config.as_ref()
161    }
162    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
163    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
164        self.tags.as_ref()
165    }
166    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
167    ///
168    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.layers.is_none()`.
169    pub fn layers(&self) -> &[::std::string::String] {
170        self.layers.as_deref().unwrap_or_default()
171    }
172    /// <p>Connection settings for an Amazon EFS file system.</p>
173    ///
174    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.file_system_configs.is_none()`.
175    pub fn file_system_configs(&self) -> &[crate::types::FileSystemConfig] {
176        self.file_system_configs.as_deref().unwrap_or_default()
177    }
178    /// <p>Container image <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms">configuration values</a> that override the values in the container image Dockerfile.</p>
179    pub fn image_config(&self) -> ::std::option::Option<&crate::types::ImageConfig> {
180        self.image_config.as_ref()
181    }
182    /// <p>To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.</p>
183    pub fn code_signing_config_arn(&self) -> ::std::option::Option<&str> {
184        self.code_signing_config_arn.as_deref()
185    }
186    /// <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
187    ///
188    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.architectures.is_none()`.
189    pub fn architectures(&self) -> &[crate::types::Architecture] {
190        self.architectures.as_deref().unwrap_or_default()
191    }
192    /// <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage">Configuring ephemeral storage (console)</a>.</p>
193    pub fn ephemeral_storage(&self) -> ::std::option::Option<&crate::types::EphemeralStorage> {
194        self.ephemeral_storage.as_ref()
195    }
196    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
197    pub fn snap_start(&self) -> ::std::option::Option<&crate::types::SnapStart> {
198        self.snap_start.as_ref()
199    }
200    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
201    pub fn logging_config(&self) -> ::std::option::Option<&crate::types::LoggingConfig> {
202        self.logging_config.as_ref()
203    }
204}
205impl CreateFunctionInput {
206    /// Creates a new builder-style object to manufacture [`CreateFunctionInput`](crate::operation::create_function::CreateFunctionInput).
207    pub fn builder() -> crate::operation::create_function::builders::CreateFunctionInputBuilder {
208        crate::operation::create_function::builders::CreateFunctionInputBuilder::default()
209    }
210}
211
212/// A builder for [`CreateFunctionInput`](crate::operation::create_function::CreateFunctionInput).
213#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
214#[non_exhaustive]
215pub struct CreateFunctionInputBuilder {
216    pub(crate) function_name: ::std::option::Option<::std::string::String>,
217    pub(crate) runtime: ::std::option::Option<crate::types::Runtime>,
218    pub(crate) role: ::std::option::Option<::std::string::String>,
219    pub(crate) handler: ::std::option::Option<::std::string::String>,
220    pub(crate) code: ::std::option::Option<crate::types::FunctionCode>,
221    pub(crate) description: ::std::option::Option<::std::string::String>,
222    pub(crate) timeout: ::std::option::Option<i32>,
223    pub(crate) memory_size: ::std::option::Option<i32>,
224    pub(crate) publish: ::std::option::Option<bool>,
225    pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
226    pub(crate) package_type: ::std::option::Option<crate::types::PackageType>,
227    pub(crate) dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
228    pub(crate) environment: ::std::option::Option<crate::types::Environment>,
229    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
230    pub(crate) tracing_config: ::std::option::Option<crate::types::TracingConfig>,
231    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
232    pub(crate) layers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
233    pub(crate) file_system_configs: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>,
234    pub(crate) image_config: ::std::option::Option<crate::types::ImageConfig>,
235    pub(crate) code_signing_config_arn: ::std::option::Option<::std::string::String>,
236    pub(crate) architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
237    pub(crate) ephemeral_storage: ::std::option::Option<crate::types::EphemeralStorage>,
238    pub(crate) snap_start: ::std::option::Option<crate::types::SnapStart>,
239    pub(crate) logging_config: ::std::option::Option<crate::types::LoggingConfig>,
240}
241impl CreateFunctionInputBuilder {
242    /// <p>The name or ARN of the Lambda function.</p>
243    /// <p class="title"><b>Name formats</b></p>
244    /// <ul>
245    /// <li>
246    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
247    /// <li>
248    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
249    /// <li>
250    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
251    /// </ul>
252    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
253    /// This field is required.
254    pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255        self.function_name = ::std::option::Option::Some(input.into());
256        self
257    }
258    /// <p>The name or ARN of the Lambda function.</p>
259    /// <p class="title"><b>Name formats</b></p>
260    /// <ul>
261    /// <li>
262    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
263    /// <li>
264    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
265    /// <li>
266    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
267    /// </ul>
268    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
269    pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
270        self.function_name = input;
271        self
272    }
273    /// <p>The name or ARN of the Lambda function.</p>
274    /// <p class="title"><b>Name formats</b></p>
275    /// <ul>
276    /// <li>
277    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
278    /// <li>
279    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
280    /// <li>
281    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
282    /// </ul>
283    /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>
284    pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
285        &self.function_name
286    }
287    /// <p>The identifier of the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html"> runtime</a>. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.</p>
288    /// <p>The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
289    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
290    pub fn runtime(mut self, input: crate::types::Runtime) -> Self {
291        self.runtime = ::std::option::Option::Some(input);
292        self
293    }
294    /// <p>The identifier of the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html"> runtime</a>. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.</p>
295    /// <p>The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
296    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
297    pub fn set_runtime(mut self, input: ::std::option::Option<crate::types::Runtime>) -> Self {
298        self.runtime = input;
299        self
300    }
301    /// <p>The identifier of the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html"> runtime</a>. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.</p>
302    /// <p>The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels">Runtime use after deprecation</a>.</p>
303    /// <p>For a list of all currently supported runtimes, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported">Supported runtimes</a>.</p>
304    pub fn get_runtime(&self) -> &::std::option::Option<crate::types::Runtime> {
305        &self.runtime
306    }
307    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
308    /// This field is required.
309    pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
310        self.role = ::std::option::Option::Some(input.into());
311        self
312    }
313    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
314    pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
315        self.role = input;
316        self
317    }
318    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
319    pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
320        &self.role
321    }
322    /// <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html">Lambda programming model</a>.</p>
323    pub fn handler(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
324        self.handler = ::std::option::Option::Some(input.into());
325        self
326    }
327    /// <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html">Lambda programming model</a>.</p>
328    pub fn set_handler(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
329        self.handler = input;
330        self
331    }
332    /// <p>The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html">Lambda programming model</a>.</p>
333    pub fn get_handler(&self) -> &::std::option::Option<::std::string::String> {
334        &self.handler
335    }
336    /// <p>The code for the function.</p>
337    /// This field is required.
338    pub fn code(mut self, input: crate::types::FunctionCode) -> Self {
339        self.code = ::std::option::Option::Some(input);
340        self
341    }
342    /// <p>The code for the function.</p>
343    pub fn set_code(mut self, input: ::std::option::Option<crate::types::FunctionCode>) -> Self {
344        self.code = input;
345        self
346    }
347    /// <p>The code for the function.</p>
348    pub fn get_code(&self) -> &::std::option::Option<crate::types::FunctionCode> {
349        &self.code
350    }
351    /// <p>A description of the function.</p>
352    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
353        self.description = ::std::option::Option::Some(input.into());
354        self
355    }
356    /// <p>A description of the function.</p>
357    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
358        self.description = input;
359        self
360    }
361    /// <p>A description of the function.</p>
362    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
363        &self.description
364    }
365    /// <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html">Lambda execution environment</a>.</p>
366    pub fn timeout(mut self, input: i32) -> Self {
367        self.timeout = ::std::option::Option::Some(input);
368        self
369    }
370    /// <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html">Lambda execution environment</a>.</p>
371    pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
372        self.timeout = input;
373        self
374    }
375    /// <p>The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html">Lambda execution environment</a>.</p>
376    pub fn get_timeout(&self) -> &::std::option::Option<i32> {
377        &self.timeout
378    }
379    /// <p>The amount of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
380    pub fn memory_size(mut self, input: i32) -> Self {
381        self.memory_size = ::std::option::Option::Some(input);
382        self
383    }
384    /// <p>The amount of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
385    pub fn set_memory_size(mut self, input: ::std::option::Option<i32>) -> Self {
386        self.memory_size = input;
387        self
388    }
389    /// <p>The amount of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console">memory available to the function</a> at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.</p>
390    pub fn get_memory_size(&self) -> &::std::option::Option<i32> {
391        &self.memory_size
392    }
393    /// <p>Set to true to publish the first version of the function during creation.</p>
394    pub fn publish(mut self, input: bool) -> Self {
395        self.publish = ::std::option::Option::Some(input);
396        self
397    }
398    /// <p>Set to true to publish the first version of the function during creation.</p>
399    pub fn set_publish(mut self, input: ::std::option::Option<bool>) -> Self {
400        self.publish = input;
401        self
402    }
403    /// <p>Set to true to publish the first version of the function during creation.</p>
404    pub fn get_publish(&self) -> &::std::option::Option<bool> {
405        &self.publish
406    }
407    /// <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">Configuring a Lambda function to access resources in a VPC</a>.</p>
408    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
409        self.vpc_config = ::std::option::Option::Some(input);
410        self
411    }
412    /// <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">Configuring a Lambda function to access resources in a VPC</a>.</p>
413    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
414        self.vpc_config = input;
415        self
416    }
417    /// <p>For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">Configuring a Lambda function to access resources in a VPC</a>.</p>
418    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
419        &self.vpc_config
420    }
421    /// <p>The type of deployment package. Set to <code>Image</code> for container image and set to <code>Zip</code> for .zip file archive.</p>
422    pub fn package_type(mut self, input: crate::types::PackageType) -> Self {
423        self.package_type = ::std::option::Option::Some(input);
424        self
425    }
426    /// <p>The type of deployment package. Set to <code>Image</code> for container image and set to <code>Zip</code> for .zip file archive.</p>
427    pub fn set_package_type(mut self, input: ::std::option::Option<crate::types::PackageType>) -> Self {
428        self.package_type = input;
429        self
430    }
431    /// <p>The type of deployment package. Set to <code>Image</code> for container image and set to <code>Zip</code> for .zip file archive.</p>
432    pub fn get_package_type(&self) -> &::std::option::Option<crate::types::PackageType> {
433        &self.package_type
434    }
435    /// <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq">Dead-letter queues</a>.</p>
436    pub fn dead_letter_config(mut self, input: crate::types::DeadLetterConfig) -> Self {
437        self.dead_letter_config = ::std::option::Option::Some(input);
438        self
439    }
440    /// <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq">Dead-letter queues</a>.</p>
441    pub fn set_dead_letter_config(mut self, input: ::std::option::Option<crate::types::DeadLetterConfig>) -> Self {
442        self.dead_letter_config = input;
443        self
444    }
445    /// <p>A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq">Dead-letter queues</a>.</p>
446    pub fn get_dead_letter_config(&self) -> &::std::option::Option<crate::types::DeadLetterConfig> {
447        &self.dead_letter_config
448    }
449    /// <p>Environment variables that are accessible from function code during execution.</p>
450    pub fn environment(mut self, input: crate::types::Environment) -> Self {
451        self.environment = ::std::option::Option::Some(input);
452        self
453    }
454    /// <p>Environment variables that are accessible from function code during execution.</p>
455    pub fn set_environment(mut self, input: ::std::option::Option<crate::types::Environment>) -> Self {
456        self.environment = input;
457        self
458    }
459    /// <p>Environment variables that are accessible from function code during execution.</p>
460    pub fn get_environment(&self) -> &::std::option::Option<crate::types::Environment> {
461        &self.environment
462    }
463    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
464    /// <ul>
465    /// <li>
466    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption">environment variables</a>.</p></li>
467    /// <li>
468    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
469    /// <li>
470    /// <p>When used with <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption"> Specifying a customer managed key for Lambda</a>.</p></li>
471    /// <li>
472    /// <p>The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle">Function lifecycle</a>.</p></li>
473    /// </ul>
474    /// <p>If you don't provide a customer managed key, Lambda uses an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned key</a> or an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>.</p>
475    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
476        self.kms_key_arn = ::std::option::Option::Some(input.into());
477        self
478    }
479    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
480    /// <ul>
481    /// <li>
482    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption">environment variables</a>.</p></li>
483    /// <li>
484    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
485    /// <li>
486    /// <p>When used with <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption"> Specifying a customer managed key for Lambda</a>.</p></li>
487    /// <li>
488    /// <p>The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle">Function lifecycle</a>.</p></li>
489    /// </ul>
490    /// <p>If you don't provide a customer managed key, Lambda uses an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned key</a> or an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>.</p>
491    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
492        self.kms_key_arn = input;
493        self
494    }
495    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
496    /// <ul>
497    /// <li>
498    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption">environment variables</a>.</p></li>
499    /// <li>
500    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
501    /// <li>
502    /// <p>When used with <code>SourceKMSKeyArn</code>, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption"> Specifying a customer managed key for Lambda</a>.</p></li>
503    /// <li>
504    /// <p>The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle">Function lifecycle</a>.</p></li>
505    /// </ul>
506    /// <p>If you don't provide a customer managed key, Lambda uses an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned key</a> or an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>.</p>
507    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
508        &self.kms_key_arn
509    }
510    /// <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href="https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html">X-Ray</a>.</p>
511    pub fn tracing_config(mut self, input: crate::types::TracingConfig) -> Self {
512        self.tracing_config = ::std::option::Option::Some(input);
513        self
514    }
515    /// <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href="https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html">X-Ray</a>.</p>
516    pub fn set_tracing_config(mut self, input: ::std::option::Option<crate::types::TracingConfig>) -> Self {
517        self.tracing_config = input;
518        self
519    }
520    /// <p>Set <code>Mode</code> to <code>Active</code> to sample and trace a subset of incoming requests with <a href="https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html">X-Ray</a>.</p>
521    pub fn get_tracing_config(&self) -> &::std::option::Option<crate::types::TracingConfig> {
522        &self.tracing_config
523    }
524    /// Adds a key-value pair to `tags`.
525    ///
526    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
527    ///
528    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
529    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
530        let mut hash_map = self.tags.unwrap_or_default();
531        hash_map.insert(k.into(), v.into());
532        self.tags = ::std::option::Option::Some(hash_map);
533        self
534    }
535    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
536    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
537        self.tags = input;
538        self
539    }
540    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
541    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
542        &self.tags
543    }
544    /// Appends an item to `layers`.
545    ///
546    /// To override the contents of this collection use [`set_layers`](Self::set_layers).
547    ///
548    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
549    pub fn layers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
550        let mut v = self.layers.unwrap_or_default();
551        v.push(input.into());
552        self.layers = ::std::option::Option::Some(v);
553        self
554    }
555    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
556    pub fn set_layers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
557        self.layers = input;
558        self
559    }
560    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the version.</p>
561    pub fn get_layers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
562        &self.layers
563    }
564    /// Appends an item to `file_system_configs`.
565    ///
566    /// To override the contents of this collection use [`set_file_system_configs`](Self::set_file_system_configs).
567    ///
568    /// <p>Connection settings for an Amazon EFS file system.</p>
569    pub fn file_system_configs(mut self, input: crate::types::FileSystemConfig) -> Self {
570        let mut v = self.file_system_configs.unwrap_or_default();
571        v.push(input);
572        self.file_system_configs = ::std::option::Option::Some(v);
573        self
574    }
575    /// <p>Connection settings for an Amazon EFS file system.</p>
576    pub fn set_file_system_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>) -> Self {
577        self.file_system_configs = input;
578        self
579    }
580    /// <p>Connection settings for an Amazon EFS file system.</p>
581    pub fn get_file_system_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>> {
582        &self.file_system_configs
583    }
584    /// <p>Container image <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms">configuration values</a> that override the values in the container image Dockerfile.</p>
585    pub fn image_config(mut self, input: crate::types::ImageConfig) -> Self {
586        self.image_config = ::std::option::Option::Some(input);
587        self
588    }
589    /// <p>Container image <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms">configuration values</a> that override the values in the container image Dockerfile.</p>
590    pub fn set_image_config(mut self, input: ::std::option::Option<crate::types::ImageConfig>) -> Self {
591        self.image_config = input;
592        self
593    }
594    /// <p>Container image <a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms">configuration values</a> that override the values in the container image Dockerfile.</p>
595    pub fn get_image_config(&self) -> &::std::option::Option<crate::types::ImageConfig> {
596        &self.image_config
597    }
598    /// <p>To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.</p>
599    pub fn code_signing_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
600        self.code_signing_config_arn = ::std::option::Option::Some(input.into());
601        self
602    }
603    /// <p>To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.</p>
604    pub fn set_code_signing_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
605        self.code_signing_config_arn = input;
606        self
607    }
608    /// <p>To enable code signing for this function, specify the ARN of a code-signing configuration. A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.</p>
609    pub fn get_code_signing_config_arn(&self) -> &::std::option::Option<::std::string::String> {
610        &self.code_signing_config_arn
611    }
612    /// Appends an item to `architectures`.
613    ///
614    /// To override the contents of this collection use [`set_architectures`](Self::set_architectures).
615    ///
616    /// <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
617    pub fn architectures(mut self, input: crate::types::Architecture) -> Self {
618        let mut v = self.architectures.unwrap_or_default();
619        v.push(input);
620        self.architectures = ::std::option::Option::Some(v);
621        self
622    }
623    /// <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
624    pub fn set_architectures(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>) -> Self {
625        self.architectures = input;
626        self
627    }
628    /// <p>The instruction set architecture that the function supports. Enter a string array with one of the valid values (arm64 or x86_64). The default value is <code>x86_64</code>.</p>
629    pub fn get_architectures(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Architecture>> {
630        &self.architectures
631    }
632    /// <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage">Configuring ephemeral storage (console)</a>.</p>
633    pub fn ephemeral_storage(mut self, input: crate::types::EphemeralStorage) -> Self {
634        self.ephemeral_storage = ::std::option::Option::Some(input);
635        self
636    }
637    /// <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage">Configuring ephemeral storage (console)</a>.</p>
638    pub fn set_ephemeral_storage(mut self, input: ::std::option::Option<crate::types::EphemeralStorage>) -> Self {
639        self.ephemeral_storage = input;
640        self
641    }
642    /// <p>The size of the function's <code>/tmp</code> directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage">Configuring ephemeral storage (console)</a>.</p>
643    pub fn get_ephemeral_storage(&self) -> &::std::option::Option<crate::types::EphemeralStorage> {
644        &self.ephemeral_storage
645    }
646    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
647    pub fn snap_start(mut self, input: crate::types::SnapStart) -> Self {
648        self.snap_start = ::std::option::Option::Some(input);
649        self
650    }
651    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
652    pub fn set_snap_start(mut self, input: ::std::option::Option<crate::types::SnapStart>) -> Self {
653        self.snap_start = input;
654        self
655    }
656    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
657    pub fn get_snap_start(&self) -> &::std::option::Option<crate::types::SnapStart> {
658        &self.snap_start
659    }
660    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
661    pub fn logging_config(mut self, input: crate::types::LoggingConfig) -> Self {
662        self.logging_config = ::std::option::Option::Some(input);
663        self
664    }
665    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
666    pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::LoggingConfig>) -> Self {
667        self.logging_config = input;
668        self
669    }
670    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
671    pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::LoggingConfig> {
672        &self.logging_config
673    }
674    /// Consumes the builder and constructs a [`CreateFunctionInput`](crate::operation::create_function::CreateFunctionInput).
675    pub fn build(
676        self,
677    ) -> ::std::result::Result<crate::operation::create_function::CreateFunctionInput, ::aws_smithy_types::error::operation::BuildError> {
678        ::std::result::Result::Ok(crate::operation::create_function::CreateFunctionInput {
679            function_name: self.function_name,
680            runtime: self.runtime,
681            role: self.role,
682            handler: self.handler,
683            code: self.code,
684            description: self.description,
685            timeout: self.timeout,
686            memory_size: self.memory_size,
687            publish: self.publish,
688            vpc_config: self.vpc_config,
689            package_type: self.package_type,
690            dead_letter_config: self.dead_letter_config,
691            environment: self.environment,
692            kms_key_arn: self.kms_key_arn,
693            tracing_config: self.tracing_config,
694            tags: self.tags,
695            layers: self.layers,
696            file_system_configs: self.file_system_configs,
697            image_config: self.image_config,
698            code_signing_config_arn: self.code_signing_config_arn,
699            architectures: self.architectures,
700            ephemeral_storage: self.ephemeral_storage,
701            snap_start: self.snap_start,
702            logging_config: self.logging_config,
703        })
704    }
705}