Skip to main content

aws_sdk_lambda/operation/create_function/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_function::_create_function_input::CreateFunctionInputBuilder;
3
4pub use crate::operation::create_function::_create_function_output::CreateFunctionOutputBuilder;
5
6impl crate::operation::create_function::builders::CreateFunctionInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_function::CreateFunctionOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_function::CreateFunctionError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_function();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateFunction`.
24///
25/// <p>Creates a Lambda function. To create a function, you need a <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html">deployment package</a> and an <a href="https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role">execution role</a>. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use Amazon Web Services services, such as Amazon CloudWatch Logs for log streaming and X-Ray for request tracing.</p>
26/// <p>If the deployment package is a <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html">container image</a>, then you set the package type to <code>Image</code>. For a container image, the code property must include the URI of a container image in the Amazon ECR registry. You do not need to specify the handler and runtime properties.</p>
27/// <p>If the deployment package is a <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip">.zip file archive</a>, then you set the package type to <code>Zip</code>. For a .zip file archive, the code property specifies the location of the .zip file. You must also specify the handler and runtime properties. The code in the deployment package must be compatible with the target instruction set architecture of the function (<code>x86-64</code> or <code>arm64</code>). If you do not specify the architecture, then the default value is <code>x86-64</code>.</p>
28/// <p>When you create a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify the function. The <code>State</code>, <code>StateReason</code>, and <code>StateReasonCode</code> fields in the response from <code>GetFunctionConfiguration</code> indicate when the function is ready to invoke. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">Lambda function states</a>.</p>
29/// <p>A function has an unpublished version, and can have published versions and aliases. The unpublished version changes when you update your function's code and configuration. A published version is a snapshot of your function code and configuration that can't be changed. An alias is a named resource that maps to a version, and can be changed to map to a different version. Use the <code>Publish</code> parameter to create version <code>1</code> of your function from its initial configuration.</p>
30/// <p>The other parameters let you configure version-specific and function-level settings. You can modify version-specific settings later with <code>UpdateFunctionConfiguration</code>. Function-level settings apply to both the unpublished and published versions of the function, and include tags (<code>TagResource</code>) and per-function concurrency limits (<code>PutFunctionConcurrency</code>).</p>
31/// <p>You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with <code>UpdateFunctionCode</code>, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes set of signing profiles, which define the trusted publishers for this function.</p>
32/// <p>If another Amazon Web Services account or an Amazon Web Services service invokes your function, use <code>AddPermission</code> to grant permission by creating a resource-based Identity and Access Management (IAM) policy. You can grant permissions at the function level, on a version, or on an alias.</p>
33/// <p>To invoke your function directly, use <code>Invoke</code>. To invoke your function in response to events in other Amazon Web Services services, create an event source mapping (<code>CreateEventSourceMapping</code>), or configure a function trigger in the other service. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html">Invoking Lambda functions</a>.</p>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct CreateFunctionFluentBuilder {
36    handle: ::std::sync::Arc<crate::client::Handle>,
37    inner: crate::operation::create_function::builders::CreateFunctionInputBuilder,
38    config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41    crate::client::customize::internal::CustomizableSend<
42        crate::operation::create_function::CreateFunctionOutput,
43        crate::operation::create_function::CreateFunctionError,
44    > for CreateFunctionFluentBuilder
45{
46    fn send(
47        self,
48        config_override: crate::config::Builder,
49    ) -> crate::client::customize::internal::BoxFuture<
50        crate::client::customize::internal::SendResult<
51            crate::operation::create_function::CreateFunctionOutput,
52            crate::operation::create_function::CreateFunctionError,
53        >,
54    > {
55        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56    }
57}
58impl CreateFunctionFluentBuilder {
59    /// Creates a new `CreateFunctionFluentBuilder`.
60    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61        Self {
62            handle,
63            inner: ::std::default::Default::default(),
64            config_override: ::std::option::Option::None,
65        }
66    }
67    /// Access the CreateFunction as a reference.
68    pub fn as_input(&self) -> &crate::operation::create_function::builders::CreateFunctionInputBuilder {
69        &self.inner
70    }
71    /// Sends the request and returns the response.
72    ///
73    /// If an error occurs, an `SdkError` will be returned with additional details that
74    /// can be matched against.
75    ///
76    /// By default, any retryable failures will be retried twice. Retry behavior
77    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
78    /// set when configuring the client.
79    pub async fn send(
80        self,
81    ) -> ::std::result::Result<
82        crate::operation::create_function::CreateFunctionOutput,
83        ::aws_smithy_runtime_api::client::result::SdkError<
84            crate::operation::create_function::CreateFunctionError,
85            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86        >,
87    > {
88        let input = self
89            .inner
90            .build()
91            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92        let runtime_plugins = crate::operation::create_function::CreateFunction::operation_runtime_plugins(
93            self.handle.runtime_plugins.clone(),
94            &self.handle.conf,
95            self.config_override,
96        );
97        crate::operation::create_function::CreateFunction::orchestrate(&runtime_plugins, input).await
98    }
99
100    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
101    pub fn customize(
102        self,
103    ) -> crate::client::customize::CustomizableOperation<
104        crate::operation::create_function::CreateFunctionOutput,
105        crate::operation::create_function::CreateFunctionError,
106        Self,
107    > {
108        crate::client::customize::CustomizableOperation::new(self)
109    }
110    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111        self.set_config_override(::std::option::Option::Some(config_override.into()));
112        self
113    }
114
115    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116        self.config_override = config_override;
117        self
118    }
119    /// <p>The name or ARN of the Lambda function.</p>
120    /// <p class="title"><b>Name formats</b></p>
121    /// <ul>
122    /// <li>
123    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
124    /// <li>
125    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
126    /// <li>
127    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
128    /// </ul>
129    /// <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>
130    pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.inner = self.inner.function_name(input.into());
132        self
133    }
134    /// <p>The name or ARN of the Lambda function.</p>
135    /// <p class="title"><b>Name formats</b></p>
136    /// <ul>
137    /// <li>
138    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
139    /// <li>
140    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
141    /// <li>
142    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
143    /// </ul>
144    /// <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>
145    pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_function_name(input);
147        self
148    }
149    /// <p>The name or ARN of the Lambda function.</p>
150    /// <p class="title"><b>Name formats</b></p>
151    /// <ul>
152    /// <li>
153    /// <p><b>Function name</b> – <code>my-function</code>.</p></li>
154    /// <li>
155    /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>
156    /// <li>
157    /// <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li>
158    /// </ul>
159    /// <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>
160    pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
161        self.inner.get_function_name()
162    }
163    /// <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>
164    /// <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>
165    /// <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>
166    pub fn runtime(mut self, input: crate::types::Runtime) -> Self {
167        self.inner = self.inner.runtime(input);
168        self
169    }
170    /// <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>
171    /// <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>
172    /// <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>
173    pub fn set_runtime(mut self, input: ::std::option::Option<crate::types::Runtime>) -> Self {
174        self.inner = self.inner.set_runtime(input);
175        self
176    }
177    /// <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>
178    /// <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>
179    /// <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>
180    pub fn get_runtime(&self) -> &::std::option::Option<crate::types::Runtime> {
181        self.inner.get_runtime()
182    }
183    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
184    pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.inner = self.inner.role(input.into());
186        self
187    }
188    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
189    pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.inner = self.inner.set_role(input);
191        self
192    }
193    /// <p>The Amazon Resource Name (ARN) of the function's execution role.</p>
194    pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
195        self.inner.get_role()
196    }
197    /// <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>
198    pub fn handler(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199        self.inner = self.inner.handler(input.into());
200        self
201    }
202    /// <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>
203    pub fn set_handler(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.inner = self.inner.set_handler(input);
205        self
206    }
207    /// <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>
208    pub fn get_handler(&self) -> &::std::option::Option<::std::string::String> {
209        self.inner.get_handler()
210    }
211    /// <p>The code for the function.</p>
212    pub fn code(mut self, input: crate::types::FunctionCode) -> Self {
213        self.inner = self.inner.code(input);
214        self
215    }
216    /// <p>The code for the function.</p>
217    pub fn set_code(mut self, input: ::std::option::Option<crate::types::FunctionCode>) -> Self {
218        self.inner = self.inner.set_code(input);
219        self
220    }
221    /// <p>The code for the function.</p>
222    pub fn get_code(&self) -> &::std::option::Option<crate::types::FunctionCode> {
223        self.inner.get_code()
224    }
225    /// <p>A description of the function.</p>
226    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227        self.inner = self.inner.description(input.into());
228        self
229    }
230    /// <p>A description of the function.</p>
231    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232        self.inner = self.inner.set_description(input);
233        self
234    }
235    /// <p>A description of the function.</p>
236    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
237        self.inner.get_description()
238    }
239    /// <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>
240    pub fn timeout(mut self, input: i32) -> Self {
241        self.inner = self.inner.timeout(input);
242        self
243    }
244    /// <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>
245    pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
246        self.inner = self.inner.set_timeout(input);
247        self
248    }
249    /// <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>
250    pub fn get_timeout(&self) -> &::std::option::Option<i32> {
251        self.inner.get_timeout()
252    }
253    /// <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>
254    pub fn memory_size(mut self, input: i32) -> Self {
255        self.inner = self.inner.memory_size(input);
256        self
257    }
258    /// <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>
259    pub fn set_memory_size(mut self, input: ::std::option::Option<i32>) -> Self {
260        self.inner = self.inner.set_memory_size(input);
261        self
262    }
263    /// <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>
264    pub fn get_memory_size(&self) -> &::std::option::Option<i32> {
265        self.inner.get_memory_size()
266    }
267    /// <p>Set to true to publish the first version of the function during creation.</p>
268    pub fn publish(mut self, input: bool) -> Self {
269        self.inner = self.inner.publish(input);
270        self
271    }
272    /// <p>Set to true to publish the first version of the function during creation.</p>
273    pub fn set_publish(mut self, input: ::std::option::Option<bool>) -> Self {
274        self.inner = self.inner.set_publish(input);
275        self
276    }
277    /// <p>Set to true to publish the first version of the function during creation.</p>
278    pub fn get_publish(&self) -> &::std::option::Option<bool> {
279        self.inner.get_publish()
280    }
281    /// <p>Specifies where to publish the function version or configuration.</p>
282    pub fn publish_to(mut self, input: crate::types::FunctionVersionLatestPublished) -> Self {
283        self.inner = self.inner.publish_to(input);
284        self
285    }
286    /// <p>Specifies where to publish the function version or configuration.</p>
287    pub fn set_publish_to(mut self, input: ::std::option::Option<crate::types::FunctionVersionLatestPublished>) -> Self {
288        self.inner = self.inner.set_publish_to(input);
289        self
290    }
291    /// <p>Specifies where to publish the function version or configuration.</p>
292    pub fn get_publish_to(&self) -> &::std::option::Option<crate::types::FunctionVersionLatestPublished> {
293        self.inner.get_publish_to()
294    }
295    /// <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>
296    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
297        self.inner = self.inner.vpc_config(input);
298        self
299    }
300    /// <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>
301    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
302        self.inner = self.inner.set_vpc_config(input);
303        self
304    }
305    /// <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>
306    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
307        self.inner.get_vpc_config()
308    }
309    /// <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>
310    pub fn package_type(mut self, input: crate::types::PackageType) -> Self {
311        self.inner = self.inner.package_type(input);
312        self
313    }
314    /// <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>
315    pub fn set_package_type(mut self, input: ::std::option::Option<crate::types::PackageType>) -> Self {
316        self.inner = self.inner.set_package_type(input);
317        self
318    }
319    /// <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>
320    pub fn get_package_type(&self) -> &::std::option::Option<crate::types::PackageType> {
321        self.inner.get_package_type()
322    }
323    /// <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>
324    pub fn dead_letter_config(mut self, input: crate::types::DeadLetterConfig) -> Self {
325        self.inner = self.inner.dead_letter_config(input);
326        self
327    }
328    /// <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>
329    pub fn set_dead_letter_config(mut self, input: ::std::option::Option<crate::types::DeadLetterConfig>) -> Self {
330        self.inner = self.inner.set_dead_letter_config(input);
331        self
332    }
333    /// <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>
334    pub fn get_dead_letter_config(&self) -> &::std::option::Option<crate::types::DeadLetterConfig> {
335        self.inner.get_dead_letter_config()
336    }
337    /// <p>Environment variables that are accessible from function code during execution.</p>
338    pub fn environment(mut self, input: crate::types::Environment) -> Self {
339        self.inner = self.inner.environment(input);
340        self
341    }
342    /// <p>Environment variables that are accessible from function code during execution.</p>
343    pub fn set_environment(mut self, input: ::std::option::Option<crate::types::Environment>) -> Self {
344        self.inner = self.inner.set_environment(input);
345        self
346    }
347    /// <p>Environment variables that are accessible from function code during execution.</p>
348    pub fn get_environment(&self) -> &::std::option::Option<crate::types::Environment> {
349        self.inner.get_environment()
350    }
351    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
352    /// <ul>
353    /// <li>
354    /// <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>
355    /// <li>
356    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
357    /// <li>
358    /// <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>
359    /// <li>
360    /// <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>
361    /// </ul>
362    /// <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>
363    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
364        self.inner = self.inner.kms_key_arn(input.into());
365        self
366    }
367    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
368    /// <ul>
369    /// <li>
370    /// <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>
371    /// <li>
372    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
373    /// <li>
374    /// <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>
375    /// <li>
376    /// <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>
377    /// </ul>
378    /// <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>
379    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
380        self.inner = self.inner.set_kms_key_arn(input);
381        self
382    }
383    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
384    /// <ul>
385    /// <li>
386    /// <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>
387    /// <li>
388    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
389    /// <li>
390    /// <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>
391    /// <li>
392    /// <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>
393    /// </ul>
394    /// <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>
395    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
396        self.inner.get_kms_key_arn()
397    }
398    /// <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>
399    pub fn tracing_config(mut self, input: crate::types::TracingConfig) -> Self {
400        self.inner = self.inner.tracing_config(input);
401        self
402    }
403    /// <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>
404    pub fn set_tracing_config(mut self, input: ::std::option::Option<crate::types::TracingConfig>) -> Self {
405        self.inner = self.inner.set_tracing_config(input);
406        self
407    }
408    /// <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>
409    pub fn get_tracing_config(&self) -> &::std::option::Option<crate::types::TracingConfig> {
410        self.inner.get_tracing_config()
411    }
412    ///
413    /// Adds a key-value pair to `Tags`.
414    ///
415    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
416    ///
417    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
418    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
419        self.inner = self.inner.tags(k.into(), v.into());
420        self
421    }
422    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
423    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
424        self.inner = self.inner.set_tags(input);
425        self
426    }
427    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
428    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
429        self.inner.get_tags()
430    }
431    ///
432    /// Appends an item to `Layers`.
433    ///
434    /// To override the contents of this collection use [`set_layers`](Self::set_layers).
435    ///
436    /// <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>
437    pub fn layers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
438        self.inner = self.inner.layers(input.into());
439        self
440    }
441    /// <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>
442    pub fn set_layers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
443        self.inner = self.inner.set_layers(input);
444        self
445    }
446    /// <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>
447    pub fn get_layers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
448        self.inner.get_layers()
449    }
450    ///
451    /// Appends an item to `FileSystemConfigs`.
452    ///
453    /// To override the contents of this collection use [`set_file_system_configs`](Self::set_file_system_configs).
454    ///
455    /// <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
456    pub fn file_system_configs(mut self, input: crate::types::FileSystemConfig) -> Self {
457        self.inner = self.inner.file_system_configs(input);
458        self
459    }
460    /// <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
461    pub fn set_file_system_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>) -> Self {
462        self.inner = self.inner.set_file_system_configs(input);
463        self
464    }
465    /// <p>Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.</p>
466    pub fn get_file_system_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>> {
467        self.inner.get_file_system_configs()
468    }
469    /// <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>
470    pub fn code_signing_config_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
471        self.inner = self.inner.code_signing_config_arn(input.into());
472        self
473    }
474    /// <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>
475    pub fn set_code_signing_config_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
476        self.inner = self.inner.set_code_signing_config_arn(input);
477        self
478    }
479    /// <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>
480    pub fn get_code_signing_config_arn(&self) -> &::std::option::Option<::std::string::String> {
481        self.inner.get_code_signing_config_arn()
482    }
483    /// <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>
484    pub fn image_config(mut self, input: crate::types::ImageConfig) -> Self {
485        self.inner = self.inner.image_config(input);
486        self
487    }
488    /// <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>
489    pub fn set_image_config(mut self, input: ::std::option::Option<crate::types::ImageConfig>) -> Self {
490        self.inner = self.inner.set_image_config(input);
491        self
492    }
493    /// <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>
494    pub fn get_image_config(&self) -> &::std::option::Option<crate::types::ImageConfig> {
495        self.inner.get_image_config()
496    }
497    ///
498    /// Appends an item to `Architectures`.
499    ///
500    /// To override the contents of this collection use [`set_architectures`](Self::set_architectures).
501    ///
502    /// <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>
503    pub fn architectures(mut self, input: crate::types::Architecture) -> Self {
504        self.inner = self.inner.architectures(input);
505        self
506    }
507    /// <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>
508    pub fn set_architectures(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>) -> Self {
509        self.inner = self.inner.set_architectures(input);
510        self
511    }
512    /// <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>
513    pub fn get_architectures(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Architecture>> {
514        self.inner.get_architectures()
515    }
516    /// <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>
517    pub fn ephemeral_storage(mut self, input: crate::types::EphemeralStorage) -> Self {
518        self.inner = self.inner.ephemeral_storage(input);
519        self
520    }
521    /// <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>
522    pub fn set_ephemeral_storage(mut self, input: ::std::option::Option<crate::types::EphemeralStorage>) -> Self {
523        self.inner = self.inner.set_ephemeral_storage(input);
524        self
525    }
526    /// <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>
527    pub fn get_ephemeral_storage(&self) -> &::std::option::Option<crate::types::EphemeralStorage> {
528        self.inner.get_ephemeral_storage()
529    }
530    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
531    pub fn snap_start(mut self, input: crate::types::SnapStart) -> Self {
532        self.inner = self.inner.snap_start(input);
533        self
534    }
535    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
536    pub fn set_snap_start(mut self, input: ::std::option::Option<crate::types::SnapStart>) -> Self {
537        self.inner = self.inner.set_snap_start(input);
538        self
539    }
540    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
541    pub fn get_snap_start(&self) -> &::std::option::Option<crate::types::SnapStart> {
542        self.inner.get_snap_start()
543    }
544    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
545    pub fn logging_config(mut self, input: crate::types::LoggingConfig) -> Self {
546        self.inner = self.inner.logging_config(input);
547        self
548    }
549    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
550    pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::LoggingConfig>) -> Self {
551        self.inner = self.inner.set_logging_config(input);
552        self
553    }
554    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
555    pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::LoggingConfig> {
556        self.inner.get_logging_config()
557    }
558    /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
559    pub fn tenancy_config(mut self, input: crate::types::TenancyConfig) -> Self {
560        self.inner = self.inner.tenancy_config(input);
561        self
562    }
563    /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
564    pub fn set_tenancy_config(mut self, input: ::std::option::Option<crate::types::TenancyConfig>) -> Self {
565        self.inner = self.inner.set_tenancy_config(input);
566        self
567    }
568    /// <p>Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.</p>
569    pub fn get_tenancy_config(&self) -> &::std::option::Option<crate::types::TenancyConfig> {
570        self.inner.get_tenancy_config()
571    }
572    /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
573    pub fn capacity_provider_config(mut self, input: crate::types::CapacityProviderConfig) -> Self {
574        self.inner = self.inner.capacity_provider_config(input);
575        self
576    }
577    /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
578    pub fn set_capacity_provider_config(mut self, input: ::std::option::Option<crate::types::CapacityProviderConfig>) -> Self {
579        self.inner = self.inner.set_capacity_provider_config(input);
580        self
581    }
582    /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
583    pub fn get_capacity_provider_config(&self) -> &::std::option::Option<crate::types::CapacityProviderConfig> {
584        self.inner.get_capacity_provider_config()
585    }
586    /// <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
587    pub fn durable_config(mut self, input: crate::types::DurableConfig) -> Self {
588        self.inner = self.inner.durable_config(input);
589        self
590    }
591    /// <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
592    pub fn set_durable_config(mut self, input: ::std::option::Option<crate::types::DurableConfig>) -> Self {
593        self.inner = self.inner.set_durable_config(input);
594        self
595    }
596    /// <p>Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.</p>
597    pub fn get_durable_config(&self) -> &::std::option::Option<crate::types::DurableConfig> {
598        self.inner.get_durable_config()
599    }
600}