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    /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
78    pub tenancy_config: ::std::option::Option<crate::types::TenancyConfig>,
79}
80impl CreateFunctionInput {
81    /// <p>The name or ARN of the Lambda function.</p>
82    /// <p class="title"><b>Name formats</b></p>
83    /// <ul>
84    /// <li>
85    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
86    /// <li>
87    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
88    /// <li>
89    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
90    /// </ul>
91    /// <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>
92    pub fn function_name(&self) -> ::std::option::Option<&str> {
93        self.function_name.as_deref()
94    }
95    /// <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>
96    /// <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>
97    /// <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>
98    pub fn runtime(&self) -> ::std::option::Option<&crate::types::Runtime> {
99        self.runtime.as_ref()
100    }
101    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
102    pub fn role(&self) -> ::std::option::Option<&str> {
103        self.role.as_deref()
104    }
105    /// <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>
106    pub fn handler(&self) -> ::std::option::Option<&str> {
107        self.handler.as_deref()
108    }
109    /// <p>The code for the function.</p>
110    pub fn code(&self) -> ::std::option::Option<&crate::types::FunctionCode> {
111        self.code.as_ref()
112    }
113    /// <p>A description of the function.</p>
114    pub fn description(&self) -> ::std::option::Option<&str> {
115        self.description.as_deref()
116    }
117    /// <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>
118    pub fn timeout(&self) -> ::std::option::Option<i32> {
119        self.timeout
120    }
121    /// <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>
122    pub fn memory_size(&self) -> ::std::option::Option<i32> {
123        self.memory_size
124    }
125    /// <p>Set to true to publish the first version of the function during creation.</p>
126    pub fn publish(&self) -> ::std::option::Option<bool> {
127        self.publish
128    }
129    /// <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>
130    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
131        self.vpc_config.as_ref()
132    }
133    /// <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>
134    pub fn package_type(&self) -> ::std::option::Option<&crate::types::PackageType> {
135        self.package_type.as_ref()
136    }
137    /// <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>
138    pub fn dead_letter_config(&self) -> ::std::option::Option<&crate::types::DeadLetterConfig> {
139        self.dead_letter_config.as_ref()
140    }
141    /// <p>Environment variables that are accessible from function code during execution.</p>
142    pub fn environment(&self) -> ::std::option::Option<&crate::types::Environment> {
143        self.environment.as_ref()
144    }
145    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
146    /// <ul>
147    /// <li>
148    /// <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>
149    /// <li>
150    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
151    /// <li>
152    /// <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>
153    /// <li>
154    /// <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>
155    /// </ul>
156    /// <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>
157    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
158        self.kms_key_arn.as_deref()
159    }
160    /// <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>
161    pub fn tracing_config(&self) -> ::std::option::Option<&crate::types::TracingConfig> {
162        self.tracing_config.as_ref()
163    }
164    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
165    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
166        self.tags.as_ref()
167    }
168    /// <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>
169    ///
170    /// 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()`.
171    pub fn layers(&self) -> &[::std::string::String] {
172        self.layers.as_deref().unwrap_or_default()
173    }
174    /// <p>Connection settings for an Amazon EFS file system.</p>
175    ///
176    /// 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()`.
177    pub fn file_system_configs(&self) -> &[crate::types::FileSystemConfig] {
178        self.file_system_configs.as_deref().unwrap_or_default()
179    }
180    /// <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>
181    pub fn image_config(&self) -> ::std::option::Option<&crate::types::ImageConfig> {
182        self.image_config.as_ref()
183    }
184    /// <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>
185    pub fn code_signing_config_arn(&self) -> ::std::option::Option<&str> {
186        self.code_signing_config_arn.as_deref()
187    }
188    /// <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>
189    ///
190    /// 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()`.
191    pub fn architectures(&self) -> &[crate::types::Architecture] {
192        self.architectures.as_deref().unwrap_or_default()
193    }
194    /// <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>
195    pub fn ephemeral_storage(&self) -> ::std::option::Option<&crate::types::EphemeralStorage> {
196        self.ephemeral_storage.as_ref()
197    }
198    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
199    pub fn snap_start(&self) -> ::std::option::Option<&crate::types::SnapStart> {
200        self.snap_start.as_ref()
201    }
202    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
203    pub fn logging_config(&self) -> ::std::option::Option<&crate::types::LoggingConfig> {
204        self.logging_config.as_ref()
205    }
206    /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
207    pub fn tenancy_config(&self) -> ::std::option::Option<&crate::types::TenancyConfig> {
208        self.tenancy_config.as_ref()
209    }
210}
211impl CreateFunctionInput {
212    /// Creates a new builder-style object to manufacture [`CreateFunctionInput`](crate::operation::create_function::CreateFunctionInput).
213    pub fn builder() -> crate::operation::create_function::builders::CreateFunctionInputBuilder {
214        crate::operation::create_function::builders::CreateFunctionInputBuilder::default()
215    }
216}
217
218/// A builder for [`CreateFunctionInput`](crate::operation::create_function::CreateFunctionInput).
219#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
220#[non_exhaustive]
221pub struct CreateFunctionInputBuilder {
222    pub(crate) function_name: ::std::option::Option<::std::string::String>,
223    pub(crate) runtime: ::std::option::Option<crate::types::Runtime>,
224    pub(crate) role: ::std::option::Option<::std::string::String>,
225    pub(crate) handler: ::std::option::Option<::std::string::String>,
226    pub(crate) code: ::std::option::Option<crate::types::FunctionCode>,
227    pub(crate) description: ::std::option::Option<::std::string::String>,
228    pub(crate) timeout: ::std::option::Option<i32>,
229    pub(crate) memory_size: ::std::option::Option<i32>,
230    pub(crate) publish: ::std::option::Option<bool>,
231    pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
232    pub(crate) package_type: ::std::option::Option<crate::types::PackageType>,
233    pub(crate) dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
234    pub(crate) environment: ::std::option::Option<crate::types::Environment>,
235    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
236    pub(crate) tracing_config: ::std::option::Option<crate::types::TracingConfig>,
237    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
238    pub(crate) layers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
239    pub(crate) file_system_configs: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>,
240    pub(crate) image_config: ::std::option::Option<crate::types::ImageConfig>,
241    pub(crate) code_signing_config_arn: ::std::option::Option<::std::string::String>,
242    pub(crate) architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
243    pub(crate) ephemeral_storage: ::std::option::Option<crate::types::EphemeralStorage>,
244    pub(crate) snap_start: ::std::option::Option<crate::types::SnapStart>,
245    pub(crate) logging_config: ::std::option::Option<crate::types::LoggingConfig>,
246    pub(crate) tenancy_config: ::std::option::Option<crate::types::TenancyConfig>,
247}
248impl CreateFunctionInputBuilder {
249    /// <p>The name or ARN of the Lambda function.</p>
250    /// <p class="title"><b>Name formats</b></p>
251    /// <ul>
252    /// <li>
253    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
254    /// <li>
255    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
256    /// <li>
257    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
258    /// </ul>
259    /// <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>
260    /// This field is required.
261    pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
262        self.function_name = ::std::option::Option::Some(input.into());
263        self
264    }
265    /// <p>The name or ARN of the Lambda function.</p>
266    /// <p class="title"><b>Name formats</b></p>
267    /// <ul>
268    /// <li>
269    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
270    /// <li>
271    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
272    /// <li>
273    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
274    /// </ul>
275    /// <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>
276    pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
277        self.function_name = input;
278        self
279    }
280    /// <p>The name or ARN of the Lambda function.</p>
281    /// <p class="title"><b>Name formats</b></p>
282    /// <ul>
283    /// <li>
284    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
285    /// <li>
286    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
287    /// <li>
288    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
289    /// </ul>
290    /// <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>
291    pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
292        &self.function_name
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 runtime(mut self, input: crate::types::Runtime) -> Self {
298        self.runtime = ::std::option::Option::Some(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 set_runtime(mut self, input: ::std::option::Option<crate::types::Runtime>) -> Self {
305        self.runtime = input;
306        self
307    }
308    /// <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>
309    /// <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>
310    /// <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>
311    pub fn get_runtime(&self) -> &::std::option::Option<crate::types::Runtime> {
312        &self.runtime
313    }
314    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
315    /// This field is required.
316    pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
317        self.role = ::std::option::Option::Some(input.into());
318        self
319    }
320    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
321    pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
322        self.role = input;
323        self
324    }
325    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
326    pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
327        &self.role
328    }
329    /// <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>
330    pub fn handler(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
331        self.handler = ::std::option::Option::Some(input.into());
332        self
333    }
334    /// <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>
335    pub fn set_handler(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
336        self.handler = input;
337        self
338    }
339    /// <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>
340    pub fn get_handler(&self) -> &::std::option::Option<::std::string::String> {
341        &self.handler
342    }
343    /// <p>The code for the function.</p>
344    /// This field is required.
345    pub fn code(mut self, input: crate::types::FunctionCode) -> Self {
346        self.code = ::std::option::Option::Some(input);
347        self
348    }
349    /// <p>The code for the function.</p>
350    pub fn set_code(mut self, input: ::std::option::Option<crate::types::FunctionCode>) -> Self {
351        self.code = input;
352        self
353    }
354    /// <p>The code for the function.</p>
355    pub fn get_code(&self) -> &::std::option::Option<crate::types::FunctionCode> {
356        &self.code
357    }
358    /// <p>A description of the function.</p>
359    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
360        self.description = ::std::option::Option::Some(input.into());
361        self
362    }
363    /// <p>A description of the function.</p>
364    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
365        self.description = input;
366        self
367    }
368    /// <p>A description of the function.</p>
369    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
370        &self.description
371    }
372    /// <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>
373    pub fn timeout(mut self, input: i32) -> Self {
374        self.timeout = ::std::option::Option::Some(input);
375        self
376    }
377    /// <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>
378    pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
379        self.timeout = input;
380        self
381    }
382    /// <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>
383    pub fn get_timeout(&self) -> &::std::option::Option<i32> {
384        &self.timeout
385    }
386    /// <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>
387    pub fn memory_size(mut self, input: i32) -> Self {
388        self.memory_size = ::std::option::Option::Some(input);
389        self
390    }
391    /// <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>
392    pub fn set_memory_size(mut self, input: ::std::option::Option<i32>) -> Self {
393        self.memory_size = input;
394        self
395    }
396    /// <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>
397    pub fn get_memory_size(&self) -> &::std::option::Option<i32> {
398        &self.memory_size
399    }
400    /// <p>Set to true to publish the first version of the function during creation.</p>
401    pub fn publish(mut self, input: bool) -> Self {
402        self.publish = ::std::option::Option::Some(input);
403        self
404    }
405    /// <p>Set to true to publish the first version of the function during creation.</p>
406    pub fn set_publish(mut self, input: ::std::option::Option<bool>) -> Self {
407        self.publish = input;
408        self
409    }
410    /// <p>Set to true to publish the first version of the function during creation.</p>
411    pub fn get_publish(&self) -> &::std::option::Option<bool> {
412        &self.publish
413    }
414    /// <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>
415    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
416        self.vpc_config = ::std::option::Option::Some(input);
417        self
418    }
419    /// <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>
420    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
421        self.vpc_config = input;
422        self
423    }
424    /// <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>
425    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
426        &self.vpc_config
427    }
428    /// <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>
429    pub fn package_type(mut self, input: crate::types::PackageType) -> Self {
430        self.package_type = ::std::option::Option::Some(input);
431        self
432    }
433    /// <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>
434    pub fn set_package_type(mut self, input: ::std::option::Option<crate::types::PackageType>) -> Self {
435        self.package_type = input;
436        self
437    }
438    /// <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>
439    pub fn get_package_type(&self) -> &::std::option::Option<crate::types::PackageType> {
440        &self.package_type
441    }
442    /// <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>
443    pub fn dead_letter_config(mut self, input: crate::types::DeadLetterConfig) -> Self {
444        self.dead_letter_config = ::std::option::Option::Some(input);
445        self
446    }
447    /// <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>
448    pub fn set_dead_letter_config(mut self, input: ::std::option::Option<crate::types::DeadLetterConfig>) -> Self {
449        self.dead_letter_config = input;
450        self
451    }
452    /// <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>
453    pub fn get_dead_letter_config(&self) -> &::std::option::Option<crate::types::DeadLetterConfig> {
454        &self.dead_letter_config
455    }
456    /// <p>Environment variables that are accessible from function code during execution.</p>
457    pub fn environment(mut self, input: crate::types::Environment) -> Self {
458        self.environment = ::std::option::Option::Some(input);
459        self
460    }
461    /// <p>Environment variables that are accessible from function code during execution.</p>
462    pub fn set_environment(mut self, input: ::std::option::Option<crate::types::Environment>) -> Self {
463        self.environment = input;
464        self
465    }
466    /// <p>Environment variables that are accessible from function code during execution.</p>
467    pub fn get_environment(&self) -> &::std::option::Option<crate::types::Environment> {
468        &self.environment
469    }
470    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
471    /// <ul>
472    /// <li>
473    /// <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>
474    /// <li>
475    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
476    /// <li>
477    /// <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>
478    /// <li>
479    /// <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>
480    /// </ul>
481    /// <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>
482    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
483        self.kms_key_arn = ::std::option::Option::Some(input.into());
484        self
485    }
486    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
487    /// <ul>
488    /// <li>
489    /// <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>
490    /// <li>
491    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
492    /// <li>
493    /// <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>
494    /// <li>
495    /// <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>
496    /// </ul>
497    /// <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>
498    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
499        self.kms_key_arn = input;
500        self
501    }
502    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
503    /// <ul>
504    /// <li>
505    /// <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>
506    /// <li>
507    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
508    /// <li>
509    /// <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>
510    /// <li>
511    /// <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>
512    /// </ul>
513    /// <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>
514    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
515        &self.kms_key_arn
516    }
517    /// <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>
518    pub fn tracing_config(mut self, input: crate::types::TracingConfig) -> Self {
519        self.tracing_config = ::std::option::Option::Some(input);
520        self
521    }
522    /// <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>
523    pub fn set_tracing_config(mut self, input: ::std::option::Option<crate::types::TracingConfig>) -> Self {
524        self.tracing_config = input;
525        self
526    }
527    /// <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>
528    pub fn get_tracing_config(&self) -> &::std::option::Option<crate::types::TracingConfig> {
529        &self.tracing_config
530    }
531    /// Adds a key-value pair to `tags`.
532    ///
533    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
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 tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
537        let mut hash_map = self.tags.unwrap_or_default();
538        hash_map.insert(k.into(), v.into());
539        self.tags = ::std::option::Option::Some(hash_map);
540        self
541    }
542    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
543    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
544        self.tags = input;
545        self
546    }
547    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
548    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
549        &self.tags
550    }
551    /// Appends an item to `layers`.
552    ///
553    /// To override the contents of this collection use [`set_layers`](Self::set_layers).
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 layers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
557        let mut v = self.layers.unwrap_or_default();
558        v.push(input.into());
559        self.layers = ::std::option::Option::Some(v);
560        self
561    }
562    /// <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>
563    pub fn set_layers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
564        self.layers = input;
565        self
566    }
567    /// <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>
568    pub fn get_layers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
569        &self.layers
570    }
571    /// Appends an item to `file_system_configs`.
572    ///
573    /// To override the contents of this collection use [`set_file_system_configs`](Self::set_file_system_configs).
574    ///
575    /// <p>Connection settings for an Amazon EFS file system.</p>
576    pub fn file_system_configs(mut self, input: crate::types::FileSystemConfig) -> Self {
577        let mut v = self.file_system_configs.unwrap_or_default();
578        v.push(input);
579        self.file_system_configs = ::std::option::Option::Some(v);
580        self
581    }
582    /// <p>Connection settings for an Amazon EFS file system.</p>
583    pub fn set_file_system_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>) -> Self {
584        self.file_system_configs = input;
585        self
586    }
587    /// <p>Connection settings for an Amazon EFS file system.</p>
588    pub fn get_file_system_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>> {
589        &self.file_system_configs
590    }
591    /// <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>
592    pub fn image_config(mut self, input: crate::types::ImageConfig) -> Self {
593        self.image_config = ::std::option::Option::Some(input);
594        self
595    }
596    /// <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>
597    pub fn set_image_config(mut self, input: ::std::option::Option<crate::types::ImageConfig>) -> Self {
598        self.image_config = input;
599        self
600    }
601    /// <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>
602    pub fn get_image_config(&self) -> &::std::option::Option<crate::types::ImageConfig> {
603        &self.image_config
604    }
605    /// <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>
606    pub fn code_signing_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
607        self.code_signing_config_arn = ::std::option::Option::Some(input.into());
608        self
609    }
610    /// <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>
611    pub fn set_code_signing_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
612        self.code_signing_config_arn = input;
613        self
614    }
615    /// <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>
616    pub fn get_code_signing_config_arn(&self) -> &::std::option::Option<::std::string::String> {
617        &self.code_signing_config_arn
618    }
619    /// Appends an item to `architectures`.
620    ///
621    /// To override the contents of this collection use [`set_architectures`](Self::set_architectures).
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 architectures(mut self, input: crate::types::Architecture) -> Self {
625        let mut v = self.architectures.unwrap_or_default();
626        v.push(input);
627        self.architectures = ::std::option::Option::Some(v);
628        self
629    }
630    /// <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>
631    pub fn set_architectures(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>) -> Self {
632        self.architectures = input;
633        self
634    }
635    /// <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>
636    pub fn get_architectures(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Architecture>> {
637        &self.architectures
638    }
639    /// <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>
640    pub fn ephemeral_storage(mut self, input: crate::types::EphemeralStorage) -> Self {
641        self.ephemeral_storage = ::std::option::Option::Some(input);
642        self
643    }
644    /// <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>
645    pub fn set_ephemeral_storage(mut self, input: ::std::option::Option<crate::types::EphemeralStorage>) -> Self {
646        self.ephemeral_storage = input;
647        self
648    }
649    /// <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>
650    pub fn get_ephemeral_storage(&self) -> &::std::option::Option<crate::types::EphemeralStorage> {
651        &self.ephemeral_storage
652    }
653    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
654    pub fn snap_start(mut self, input: crate::types::SnapStart) -> Self {
655        self.snap_start = ::std::option::Option::Some(input);
656        self
657    }
658    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
659    pub fn set_snap_start(mut self, input: ::std::option::Option<crate::types::SnapStart>) -> Self {
660        self.snap_start = input;
661        self
662    }
663    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
664    pub fn get_snap_start(&self) -> &::std::option::Option<crate::types::SnapStart> {
665        &self.snap_start
666    }
667    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
668    pub fn logging_config(mut self, input: crate::types::LoggingConfig) -> Self {
669        self.logging_config = ::std::option::Option::Some(input);
670        self
671    }
672    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
673    pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::LoggingConfig>) -> Self {
674        self.logging_config = input;
675        self
676    }
677    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
678    pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::LoggingConfig> {
679        &self.logging_config
680    }
681    /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
682    pub fn tenancy_config(mut self, input: crate::types::TenancyConfig) -> Self {
683        self.tenancy_config = ::std::option::Option::Some(input);
684        self
685    }
686    /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
687    pub fn set_tenancy_config(mut self, input: ::std::option::Option<crate::types::TenancyConfig>) -> Self {
688        self.tenancy_config = input;
689        self
690    }
691    /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
692    pub fn get_tenancy_config(&self) -> &::std::option::Option<crate::types::TenancyConfig> {
693        &self.tenancy_config
694    }
695    /// Consumes the builder and constructs a [`CreateFunctionInput`](crate::operation::create_function::CreateFunctionInput).
696    pub fn build(
697        self,
698    ) -> ::std::result::Result<crate::operation::create_function::CreateFunctionInput, ::aws_smithy_types::error::operation::BuildError> {
699        ::std::result::Result::Ok(crate::operation::create_function::CreateFunctionInput {
700            function_name: self.function_name,
701            runtime: self.runtime,
702            role: self.role,
703            handler: self.handler,
704            code: self.code,
705            description: self.description,
706            timeout: self.timeout,
707            memory_size: self.memory_size,
708            publish: self.publish,
709            vpc_config: self.vpc_config,
710            package_type: self.package_type,
711            dead_letter_config: self.dead_letter_config,
712            environment: self.environment,
713            kms_key_arn: self.kms_key_arn,
714            tracing_config: self.tracing_config,
715            tags: self.tags,
716            layers: self.layers,
717            file_system_configs: self.file_system_configs,
718            image_config: self.image_config,
719            code_signing_config_arn: self.code_signing_config_arn,
720            architectures: self.architectures,
721            ephemeral_storage: self.ephemeral_storage,
722            snap_start: self.snap_start,
723            logging_config: self.logging_config,
724            tenancy_config: self.tenancy_config,
725        })
726    }
727}