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