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>Specifies where to publish the function version or configuration.</p>
37 pub publish_to: ::std::option::Option<crate::types::FunctionVersionLatestPublished>,
38 /// <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>
39 pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
40 /// <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>
41 pub package_type: ::std::option::Option<crate::types::PackageType>,
42 /// <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>
43 pub dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
44 /// <p>Environment variables that are accessible from function code during execution.</p>
45 pub environment: ::std::option::Option<crate::types::Environment>,
46 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
47 /// <ul>
48 /// <li>
49 /// <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>
50 /// <li>
51 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
52 /// <li>
53 /// <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>
54 /// <li>
55 /// <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>
56 /// </ul>
57 /// <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>
58 pub kms_key_arn: ::std::option::Option<::std::string::String>,
59 /// <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>
60 pub tracing_config: ::std::option::Option<crate::types::TracingConfig>,
61 /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
62 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
63 /// <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>
64 pub layers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
65 /// <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
66 pub file_system_configs: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>,
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>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>
70 pub image_config: ::std::option::Option<crate::types::ImageConfig>,
71 /// <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>
72 pub architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
73 /// <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>
74 pub ephemeral_storage: ::std::option::Option<crate::types::EphemeralStorage>,
75 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
76 pub snap_start: ::std::option::Option<crate::types::SnapStart>,
77 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
78 pub logging_config: ::std::option::Option<crate::types::LoggingConfig>,
79 /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
80 pub tenancy_config: ::std::option::Option<crate::types::TenancyConfig>,
81 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
82 pub capacity_provider_config: ::std::option::Option<crate::types::CapacityProviderConfig>,
83 /// <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
84 pub durable_config: ::std::option::Option<crate::types::DurableConfig>,
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>Specifies where to publish the function version or configuration.</p>
136 pub fn publish_to(&self) -> ::std::option::Option<&crate::types::FunctionVersionLatestPublished> {
137 self.publish_to.as_ref()
138 }
139 /// <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>
140 pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
141 self.vpc_config.as_ref()
142 }
143 /// <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>
144 pub fn package_type(&self) -> ::std::option::Option<&crate::types::PackageType> {
145 self.package_type.as_ref()
146 }
147 /// <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>
148 pub fn dead_letter_config(&self) -> ::std::option::Option<&crate::types::DeadLetterConfig> {
149 self.dead_letter_config.as_ref()
150 }
151 /// <p>Environment variables that are accessible from function code during execution.</p>
152 pub fn environment(&self) -> ::std::option::Option<&crate::types::Environment> {
153 self.environment.as_ref()
154 }
155 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
156 /// <ul>
157 /// <li>
158 /// <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>
159 /// <li>
160 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
161 /// <li>
162 /// <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>
163 /// <li>
164 /// <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>
165 /// </ul>
166 /// <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>
167 pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
168 self.kms_key_arn.as_deref()
169 }
170 /// <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>
171 pub fn tracing_config(&self) -> ::std::option::Option<&crate::types::TracingConfig> {
172 self.tracing_config.as_ref()
173 }
174 /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
175 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
176 self.tags.as_ref()
177 }
178 /// <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>
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 `.layers.is_none()`.
181 pub fn layers(&self) -> &[::std::string::String] {
182 self.layers.as_deref().unwrap_or_default()
183 }
184 /// <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
185 ///
186 /// 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()`.
187 pub fn file_system_configs(&self) -> &[crate::types::FileSystemConfig] {
188 self.file_system_configs.as_deref().unwrap_or_default()
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>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>
195 pub fn image_config(&self) -> ::std::option::Option<&crate::types::ImageConfig> {
196 self.image_config.as_ref()
197 }
198 /// <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>
199 ///
200 /// 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()`.
201 pub fn architectures(&self) -> &[crate::types::Architecture] {
202 self.architectures.as_deref().unwrap_or_default()
203 }
204 /// <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>
205 pub fn ephemeral_storage(&self) -> ::std::option::Option<&crate::types::EphemeralStorage> {
206 self.ephemeral_storage.as_ref()
207 }
208 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
209 pub fn snap_start(&self) -> ::std::option::Option<&crate::types::SnapStart> {
210 self.snap_start.as_ref()
211 }
212 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
213 pub fn logging_config(&self) -> ::std::option::Option<&crate::types::LoggingConfig> {
214 self.logging_config.as_ref()
215 }
216 /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
217 pub fn tenancy_config(&self) -> ::std::option::Option<&crate::types::TenancyConfig> {
218 self.tenancy_config.as_ref()
219 }
220 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
221 pub fn capacity_provider_config(&self) -> ::std::option::Option<&crate::types::CapacityProviderConfig> {
222 self.capacity_provider_config.as_ref()
223 }
224 /// <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
225 pub fn durable_config(&self) -> ::std::option::Option<&crate::types::DurableConfig> {
226 self.durable_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) publish_to: ::std::option::Option<crate::types::FunctionVersionLatestPublished>,
250 pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
251 pub(crate) package_type: ::std::option::Option<crate::types::PackageType>,
252 pub(crate) dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
253 pub(crate) environment: ::std::option::Option<crate::types::Environment>,
254 pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
255 pub(crate) tracing_config: ::std::option::Option<crate::types::TracingConfig>,
256 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
257 pub(crate) layers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
258 pub(crate) file_system_configs: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>,
259 pub(crate) code_signing_config_arn: ::std::option::Option<::std::string::String>,
260 pub(crate) image_config: ::std::option::Option<crate::types::ImageConfig>,
261 pub(crate) architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
262 pub(crate) ephemeral_storage: ::std::option::Option<crate::types::EphemeralStorage>,
263 pub(crate) snap_start: ::std::option::Option<crate::types::SnapStart>,
264 pub(crate) logging_config: ::std::option::Option<crate::types::LoggingConfig>,
265 pub(crate) tenancy_config: ::std::option::Option<crate::types::TenancyConfig>,
266 pub(crate) capacity_provider_config: ::std::option::Option<crate::types::CapacityProviderConfig>,
267 pub(crate) durable_config: ::std::option::Option<crate::types::DurableConfig>,
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>Specifies where to publish the function version or configuration.</p>
436 pub fn publish_to(mut self, input: crate::types::FunctionVersionLatestPublished) -> Self {
437 self.publish_to = ::std::option::Option::Some(input);
438 self
439 }
440 /// <p>Specifies where to publish the function version or configuration.</p>
441 pub fn set_publish_to(mut self, input: ::std::option::Option<crate::types::FunctionVersionLatestPublished>) -> Self {
442 self.publish_to = input;
443 self
444 }
445 /// <p>Specifies where to publish the function version or configuration.</p>
446 pub fn get_publish_to(&self) -> &::std::option::Option<crate::types::FunctionVersionLatestPublished> {
447 &self.publish_to
448 }
449 /// <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>
450 pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
451 self.vpc_config = ::std::option::Option::Some(input);
452 self
453 }
454 /// <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>
455 pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
456 self.vpc_config = input;
457 self
458 }
459 /// <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>
460 pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
461 &self.vpc_config
462 }
463 /// <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>
464 pub fn package_type(mut self, input: crate::types::PackageType) -> Self {
465 self.package_type = ::std::option::Option::Some(input);
466 self
467 }
468 /// <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>
469 pub fn set_package_type(mut self, input: ::std::option::Option<crate::types::PackageType>) -> Self {
470 self.package_type = input;
471 self
472 }
473 /// <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>
474 pub fn get_package_type(&self) -> &::std::option::Option<crate::types::PackageType> {
475 &self.package_type
476 }
477 /// <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>
478 pub fn dead_letter_config(mut self, input: crate::types::DeadLetterConfig) -> Self {
479 self.dead_letter_config = ::std::option::Option::Some(input);
480 self
481 }
482 /// <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>
483 pub fn set_dead_letter_config(mut self, input: ::std::option::Option<crate::types::DeadLetterConfig>) -> Self {
484 self.dead_letter_config = input;
485 self
486 }
487 /// <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>
488 pub fn get_dead_letter_config(&self) -> &::std::option::Option<crate::types::DeadLetterConfig> {
489 &self.dead_letter_config
490 }
491 /// <p>Environment variables that are accessible from function code during execution.</p>
492 pub fn environment(mut self, input: crate::types::Environment) -> Self {
493 self.environment = ::std::option::Option::Some(input);
494 self
495 }
496 /// <p>Environment variables that are accessible from function code during execution.</p>
497 pub fn set_environment(mut self, input: ::std::option::Option<crate::types::Environment>) -> Self {
498 self.environment = input;
499 self
500 }
501 /// <p>Environment variables that are accessible from function code during execution.</p>
502 pub fn get_environment(&self) -> &::std::option::Option<crate::types::Environment> {
503 &self.environment
504 }
505 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
506 /// <ul>
507 /// <li>
508 /// <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>
509 /// <li>
510 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
511 /// <li>
512 /// <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>
513 /// <li>
514 /// <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>
515 /// </ul>
516 /// <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>
517 pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
518 self.kms_key_arn = ::std::option::Option::Some(input.into());
519 self
520 }
521 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
522 /// <ul>
523 /// <li>
524 /// <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>
525 /// <li>
526 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
527 /// <li>
528 /// <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>
529 /// <li>
530 /// <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>
531 /// </ul>
532 /// <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>
533 pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
534 self.kms_key_arn = input;
535 self
536 }
537 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
538 /// <ul>
539 /// <li>
540 /// <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>
541 /// <li>
542 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
543 /// <li>
544 /// <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>
545 /// <li>
546 /// <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>
547 /// </ul>
548 /// <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>
549 pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
550 &self.kms_key_arn
551 }
552 /// <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>
553 pub fn tracing_config(mut self, input: crate::types::TracingConfig) -> Self {
554 self.tracing_config = ::std::option::Option::Some(input);
555 self
556 }
557 /// <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>
558 pub fn set_tracing_config(mut self, input: ::std::option::Option<crate::types::TracingConfig>) -> Self {
559 self.tracing_config = input;
560 self
561 }
562 /// <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>
563 pub fn get_tracing_config(&self) -> &::std::option::Option<crate::types::TracingConfig> {
564 &self.tracing_config
565 }
566 /// Adds a key-value pair to `tags`.
567 ///
568 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
569 ///
570 /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
571 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
572 let mut hash_map = self.tags.unwrap_or_default();
573 hash_map.insert(k.into(), v.into());
574 self.tags = ::std::option::Option::Some(hash_map);
575 self
576 }
577 /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
578 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
579 self.tags = input;
580 self
581 }
582 /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
583 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
584 &self.tags
585 }
586 /// Appends an item to `layers`.
587 ///
588 /// To override the contents of this collection use [`set_layers`](Self::set_layers).
589 ///
590 /// <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>
591 pub fn layers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
592 let mut v = self.layers.unwrap_or_default();
593 v.push(input.into());
594 self.layers = ::std::option::Option::Some(v);
595 self
596 }
597 /// <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>
598 pub fn set_layers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
599 self.layers = input;
600 self
601 }
602 /// <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>
603 pub fn get_layers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
604 &self.layers
605 }
606 /// Appends an item to `file_system_configs`.
607 ///
608 /// To override the contents of this collection use [`set_file_system_configs`](Self::set_file_system_configs).
609 ///
610 /// <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
611 pub fn file_system_configs(mut self, input: crate::types::FileSystemConfig) -> Self {
612 let mut v = self.file_system_configs.unwrap_or_default();
613 v.push(input);
614 self.file_system_configs = ::std::option::Option::Some(v);
615 self
616 }
617 /// <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
618 pub fn set_file_system_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>) -> Self {
619 self.file_system_configs = input;
620 self
621 }
622 /// <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
623 pub fn get_file_system_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>> {
624 &self.file_system_configs
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 /// <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>
641 pub fn image_config(mut self, input: crate::types::ImageConfig) -> Self {
642 self.image_config = ::std::option::Option::Some(input);
643 self
644 }
645 /// <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>
646 pub fn set_image_config(mut self, input: ::std::option::Option<crate::types::ImageConfig>) -> Self {
647 self.image_config = input;
648 self
649 }
650 /// <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>
651 pub fn get_image_config(&self) -> &::std::option::Option<crate::types::ImageConfig> {
652 &self.image_config
653 }
654 /// Appends an item to `architectures`.
655 ///
656 /// To override the contents of this collection use [`set_architectures`](Self::set_architectures).
657 ///
658 /// <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>
659 pub fn architectures(mut self, input: crate::types::Architecture) -> Self {
660 let mut v = self.architectures.unwrap_or_default();
661 v.push(input);
662 self.architectures = ::std::option::Option::Some(v);
663 self
664 }
665 /// <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>
666 pub fn set_architectures(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>) -> Self {
667 self.architectures = input;
668 self
669 }
670 /// <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>
671 pub fn get_architectures(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Architecture>> {
672 &self.architectures
673 }
674 /// <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>
675 pub fn ephemeral_storage(mut self, input: crate::types::EphemeralStorage) -> Self {
676 self.ephemeral_storage = ::std::option::Option::Some(input);
677 self
678 }
679 /// <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>
680 pub fn set_ephemeral_storage(mut self, input: ::std::option::Option<crate::types::EphemeralStorage>) -> Self {
681 self.ephemeral_storage = input;
682 self
683 }
684 /// <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>
685 pub fn get_ephemeral_storage(&self) -> &::std::option::Option<crate::types::EphemeralStorage> {
686 &self.ephemeral_storage
687 }
688 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
689 pub fn snap_start(mut self, input: crate::types::SnapStart) -> Self {
690 self.snap_start = ::std::option::Option::Some(input);
691 self
692 }
693 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
694 pub fn set_snap_start(mut self, input: ::std::option::Option<crate::types::SnapStart>) -> Self {
695 self.snap_start = input;
696 self
697 }
698 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
699 pub fn get_snap_start(&self) -> &::std::option::Option<crate::types::SnapStart> {
700 &self.snap_start
701 }
702 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
703 pub fn logging_config(mut self, input: crate::types::LoggingConfig) -> Self {
704 self.logging_config = ::std::option::Option::Some(input);
705 self
706 }
707 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
708 pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::LoggingConfig>) -> Self {
709 self.logging_config = input;
710 self
711 }
712 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
713 pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::LoggingConfig> {
714 &self.logging_config
715 }
716 /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
717 pub fn tenancy_config(mut self, input: crate::types::TenancyConfig) -> Self {
718 self.tenancy_config = ::std::option::Option::Some(input);
719 self
720 }
721 /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
722 pub fn set_tenancy_config(mut self, input: ::std::option::Option<crate::types::TenancyConfig>) -> Self {
723 self.tenancy_config = input;
724 self
725 }
726 /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
727 pub fn get_tenancy_config(&self) -> &::std::option::Option<crate::types::TenancyConfig> {
728 &self.tenancy_config
729 }
730 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
731 pub fn capacity_provider_config(mut self, input: crate::types::CapacityProviderConfig) -> Self {
732 self.capacity_provider_config = ::std::option::Option::Some(input);
733 self
734 }
735 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
736 pub fn set_capacity_provider_config(mut self, input: ::std::option::Option<crate::types::CapacityProviderConfig>) -> Self {
737 self.capacity_provider_config = input;
738 self
739 }
740 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
741 pub fn get_capacity_provider_config(&self) -> &::std::option::Option<crate::types::CapacityProviderConfig> {
742 &self.capacity_provider_config
743 }
744 /// <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
745 pub fn durable_config(mut self, input: crate::types::DurableConfig) -> Self {
746 self.durable_config = ::std::option::Option::Some(input);
747 self
748 }
749 /// <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
750 pub fn set_durable_config(mut self, input: ::std::option::Option<crate::types::DurableConfig>) -> Self {
751 self.durable_config = input;
752 self
753 }
754 /// <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
755 pub fn get_durable_config(&self) -> &::std::option::Option<crate::types::DurableConfig> {
756 &self.durable_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 publish_to: self.publish_to,
773 vpc_config: self.vpc_config,
774 package_type: self.package_type,
775 dead_letter_config: self.dead_letter_config,
776 environment: self.environment,
777 kms_key_arn: self.kms_key_arn,
778 tracing_config: self.tracing_config,
779 tags: self.tags,
780 layers: self.layers,
781 file_system_configs: self.file_system_configs,
782 code_signing_config_arn: self.code_signing_config_arn,
783 image_config: self.image_config,
784 architectures: self.architectures,
785 ephemeral_storage: self.ephemeral_storage,
786 snap_start: self.snap_start,
787 logging_config: self.logging_config,
788 tenancy_config: self.tenancy_config,
789 capacity_provider_config: self.capacity_provider_config,
790 durable_config: self.durable_config,
791 })
792 }
793}