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