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_output::CreateFunctionOutputBuilder;
3
4pub use crate::operation::create_function::_create_function_input::CreateFunctionInputBuilder;
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>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>
282    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
283        self.inner = self.inner.vpc_config(input);
284        self
285    }
286    /// <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>
287    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
288        self.inner = self.inner.set_vpc_config(input);
289        self
290    }
291    /// <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>
292    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
293        self.inner.get_vpc_config()
294    }
295    /// <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>
296    pub fn package_type(mut self, input: crate::types::PackageType) -> Self {
297        self.inner = self.inner.package_type(input);
298        self
299    }
300    /// <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>
301    pub fn set_package_type(mut self, input: ::std::option::Option<crate::types::PackageType>) -> Self {
302        self.inner = self.inner.set_package_type(input);
303        self
304    }
305    /// <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>
306    pub fn get_package_type(&self) -> &::std::option::Option<crate::types::PackageType> {
307        self.inner.get_package_type()
308    }
309    /// <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>
310    pub fn dead_letter_config(mut self, input: crate::types::DeadLetterConfig) -> Self {
311        self.inner = self.inner.dead_letter_config(input);
312        self
313    }
314    /// <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>
315    pub fn set_dead_letter_config(mut self, input: ::std::option::Option<crate::types::DeadLetterConfig>) -> Self {
316        self.inner = self.inner.set_dead_letter_config(input);
317        self
318    }
319    /// <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>
320    pub fn get_dead_letter_config(&self) -> &::std::option::Option<crate::types::DeadLetterConfig> {
321        self.inner.get_dead_letter_config()
322    }
323    /// <p>Environment variables that are accessible from function code during execution.</p>
324    pub fn environment(mut self, input: crate::types::Environment) -> Self {
325        self.inner = self.inner.environment(input);
326        self
327    }
328    /// <p>Environment variables that are accessible from function code during execution.</p>
329    pub fn set_environment(mut self, input: ::std::option::Option<crate::types::Environment>) -> Self {
330        self.inner = self.inner.set_environment(input);
331        self
332    }
333    /// <p>Environment variables that are accessible from function code during execution.</p>
334    pub fn get_environment(&self) -> &::std::option::Option<crate::types::Environment> {
335        self.inner.get_environment()
336    }
337    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
338    /// <ul>
339    /// <li>
340    /// <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>
341    /// <li>
342    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
343    /// <li>
344    /// <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>
345    /// <li>
346    /// <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>
347    /// </ul>
348    /// <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>
349    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
350        self.inner = self.inner.kms_key_arn(input.into());
351        self
352    }
353    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
354    /// <ul>
355    /// <li>
356    /// <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>
357    /// <li>
358    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
359    /// <li>
360    /// <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>
361    /// <li>
362    /// <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>
363    /// </ul>
364    /// <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>
365    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
366        self.inner = self.inner.set_kms_key_arn(input);
367        self
368    }
369    /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
370    /// <ul>
371    /// <li>
372    /// <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>
373    /// <li>
374    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
375    /// <li>
376    /// <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>
377    /// <li>
378    /// <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>
379    /// </ul>
380    /// <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>
381    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
382        self.inner.get_kms_key_arn()
383    }
384    /// <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>
385    pub fn tracing_config(mut self, input: crate::types::TracingConfig) -> Self {
386        self.inner = self.inner.tracing_config(input);
387        self
388    }
389    /// <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>
390    pub fn set_tracing_config(mut self, input: ::std::option::Option<crate::types::TracingConfig>) -> Self {
391        self.inner = self.inner.set_tracing_config(input);
392        self
393    }
394    /// <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>
395    pub fn get_tracing_config(&self) -> &::std::option::Option<crate::types::TracingConfig> {
396        self.inner.get_tracing_config()
397    }
398    ///
399    /// Adds a key-value pair to `Tags`.
400    ///
401    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
402    ///
403    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
404    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
405        self.inner = self.inner.tags(k.into(), v.into());
406        self
407    }
408    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
409    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
410        self.inner = self.inner.set_tags(input);
411        self
412    }
413    /// <p>A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function.</p>
414    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
415        self.inner.get_tags()
416    }
417    ///
418    /// Appends an item to `Layers`.
419    ///
420    /// To override the contents of this collection use [`set_layers`](Self::set_layers).
421    ///
422    /// <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>
423    pub fn layers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
424        self.inner = self.inner.layers(input.into());
425        self
426    }
427    /// <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>
428    pub fn set_layers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
429        self.inner = self.inner.set_layers(input);
430        self
431    }
432    /// <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>
433    pub fn get_layers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
434        self.inner.get_layers()
435    }
436    ///
437    /// Appends an item to `FileSystemConfigs`.
438    ///
439    /// To override the contents of this collection use [`set_file_system_configs`](Self::set_file_system_configs).
440    ///
441    /// <p>Connection settings for an Amazon EFS file system.</p>
442    pub fn file_system_configs(mut self, input: crate::types::FileSystemConfig) -> Self {
443        self.inner = self.inner.file_system_configs(input);
444        self
445    }
446    /// <p>Connection settings for an Amazon EFS file system.</p>
447    pub fn set_file_system_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>) -> Self {
448        self.inner = self.inner.set_file_system_configs(input);
449        self
450    }
451    /// <p>Connection settings for an Amazon EFS file system.</p>
452    pub fn get_file_system_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>> {
453        self.inner.get_file_system_configs()
454    }
455    /// <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>
456    pub fn image_config(mut self, input: crate::types::ImageConfig) -> Self {
457        self.inner = self.inner.image_config(input);
458        self
459    }
460    /// <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>
461    pub fn set_image_config(mut self, input: ::std::option::Option<crate::types::ImageConfig>) -> Self {
462        self.inner = self.inner.set_image_config(input);
463        self
464    }
465    /// <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>
466    pub fn get_image_config(&self) -> &::std::option::Option<crate::types::ImageConfig> {
467        self.inner.get_image_config()
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    ///
484    /// Appends an item to `Architectures`.
485    ///
486    /// To override the contents of this collection use [`set_architectures`](Self::set_architectures).
487    ///
488    /// <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>
489    pub fn architectures(mut self, input: crate::types::Architecture) -> Self {
490        self.inner = self.inner.architectures(input);
491        self
492    }
493    /// <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>
494    pub fn set_architectures(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>) -> Self {
495        self.inner = self.inner.set_architectures(input);
496        self
497    }
498    /// <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>
499    pub fn get_architectures(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Architecture>> {
500        self.inner.get_architectures()
501    }
502    /// <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>
503    pub fn ephemeral_storage(mut self, input: crate::types::EphemeralStorage) -> Self {
504        self.inner = self.inner.ephemeral_storage(input);
505        self
506    }
507    /// <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>
508    pub fn set_ephemeral_storage(mut self, input: ::std::option::Option<crate::types::EphemeralStorage>) -> Self {
509        self.inner = self.inner.set_ephemeral_storage(input);
510        self
511    }
512    /// <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>
513    pub fn get_ephemeral_storage(&self) -> &::std::option::Option<crate::types::EphemeralStorage> {
514        self.inner.get_ephemeral_storage()
515    }
516    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
517    pub fn snap_start(mut self, input: crate::types::SnapStart) -> Self {
518        self.inner = self.inner.snap_start(input);
519        self
520    }
521    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
522    pub fn set_snap_start(mut self, input: ::std::option::Option<crate::types::SnapStart>) -> Self {
523        self.inner = self.inner.set_snap_start(input);
524        self
525    }
526    /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">SnapStart</a> setting.</p>
527    pub fn get_snap_start(&self) -> &::std::option::Option<crate::types::SnapStart> {
528        self.inner.get_snap_start()
529    }
530    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
531    pub fn logging_config(mut self, input: crate::types::LoggingConfig) -> Self {
532        self.inner = self.inner.logging_config(input);
533        self
534    }
535    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
536    pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::LoggingConfig>) -> Self {
537        self.inner = self.inner.set_logging_config(input);
538        self
539    }
540    /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
541    pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::LoggingConfig> {
542        self.inner.get_logging_config()
543    }
544}