aws_sdk_lambda/operation/create_function/_create_function_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Details about a function's configuration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateFunctionOutput {
7 /// <p>The name of the function.</p>
8 pub function_name: ::std::option::Option<::std::string::String>,
9 /// <p>The function's Amazon Resource Name (ARN).</p>
10 pub function_arn: ::std::option::Option<::std::string::String>,
11 /// <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>
12 /// <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>
13 /// <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>
14 pub runtime: ::std::option::Option<crate::types::Runtime>,
15 /// <p>The function's execution role.</p>
16 pub role: ::std::option::Option<::std::string::String>,
17 /// <p>The function that Lambda calls to begin running your function.</p>
18 pub handler: ::std::option::Option<::std::string::String>,
19 /// <p>The size of the function's deployment package, in bytes.</p>
20 pub code_size: i64,
21 /// <p>The function's description.</p>
22 pub description: ::std::option::Option<::std::string::String>,
23 /// <p>The amount of time in seconds that Lambda allows a function to run before stopping it.</p>
24 pub timeout: ::std::option::Option<i32>,
25 /// <p>The amount of memory available to the function at runtime.</p>
26 pub memory_size: ::std::option::Option<i32>,
27 /// <p>The date and time that the function was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
28 pub last_modified: ::std::option::Option<::std::string::String>,
29 /// <p>The SHA256 hash of the function's deployment package.</p>
30 pub code_sha256: ::std::option::Option<::std::string::String>,
31 /// <p>The version of the Lambda function.</p>
32 pub version: ::std::option::Option<::std::string::String>,
33 /// <p>The function's networking configuration.</p>
34 pub vpc_config: ::std::option::Option<crate::types::VpcConfigResponse>,
35 /// <p>The function's dead letter queue.</p>
36 pub dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
37 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html">environment variables</a>. Omitted from CloudTrail logs.</p>
38 pub environment: ::std::option::Option<crate::types::EnvironmentResponse>,
39 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
40 /// <ul>
41 /// <li>
42 /// <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>
43 /// <li>
44 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
45 /// <li>
46 /// <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>
47 /// <li>
48 /// <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>
49 /// </ul>
50 /// <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>
51 pub kms_key_arn: ::std::option::Option<::std::string::String>,
52 /// <p>The function's X-Ray tracing configuration.</p>
53 pub tracing_config: ::std::option::Option<crate::types::TracingConfigResponse>,
54 /// <p>For Lambda@Edge functions, the ARN of the main function.</p>
55 pub master_arn: ::std::option::Option<::std::string::String>,
56 /// <p>The latest updated revision of the function or alias.</p>
57 pub revision_id: ::std::option::Option<::std::string::String>,
58 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">layers</a>.</p>
59 pub layers: ::std::option::Option<::std::vec::Vec<crate::types::Layer>>,
60 /// <p>The current state of the function. When the state is <code>Inactive</code>, you can reactivate the function by invoking it.</p>
61 pub state: ::std::option::Option<crate::types::State>,
62 /// <p>The reason for the function's current state.</p>
63 pub state_reason: ::std::option::Option<::std::string::String>,
64 /// <p>The reason code for the function's current state. When the code is <code>Creating</code>, you can't invoke or modify the function.</p>
65 pub state_reason_code: ::std::option::Option<crate::types::StateReasonCode>,
66 /// <p>The status of the last update that was performed on the function. This is first set to <code>Successful</code> after function creation completes.</p>
67 pub last_update_status: ::std::option::Option<crate::types::LastUpdateStatus>,
68 /// <p>The reason for the last update that was performed on the function.</p>
69 pub last_update_status_reason: ::std::option::Option<::std::string::String>,
70 /// <p>The reason code for the last update that was performed on the function.</p>
71 pub last_update_status_reason_code: ::std::option::Option<crate::types::LastUpdateStatusReasonCode>,
72 /// <p>Connection settings for an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
73 pub file_system_configs: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>,
74 /// <p>The type of deployment package. Set to <code>Image</code> for container image and set <code>Zip</code> for .zip file archive.</p>
75 pub package_type: ::std::option::Option<crate::types::PackageType>,
76 /// <p>The function's image configuration values.</p>
77 pub image_config_response: ::std::option::Option<crate::types::ImageConfigResponse>,
78 /// <p>The ARN of the signing profile version.</p>
79 pub signing_profile_version_arn: ::std::option::Option<::std::string::String>,
80 /// <p>The ARN of the signing job.</p>
81 pub signing_job_arn: ::std::option::Option<::std::string::String>,
82 /// <p>The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is <code>x86_64</code>.</p>
83 pub architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
84 /// <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>
85 pub ephemeral_storage: ::std::option::Option<crate::types::EphemeralStorage>,
86 /// <p>Set <code>ApplyOn</code> to <code>PublishedVersions</code> to create a snapshot of the initialized execution environment when you publish a function version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Improving startup performance with Lambda SnapStart</a>.</p>
87 pub snap_start: ::std::option::Option<crate::types::SnapStartResponse>,
88 /// <p>The ARN of the runtime and any errors that occured.</p>
89 pub runtime_version_config: ::std::option::Option<crate::types::RuntimeVersionConfig>,
90 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
91 pub logging_config: ::std::option::Option<crate::types::LoggingConfig>,
92 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
93 pub capacity_provider_config: ::std::option::Option<crate::types::CapacityProviderConfig>,
94 /// <p>The SHA256 hash of the function configuration.</p>
95 pub config_sha256: ::std::option::Option<::std::string::String>,
96 /// <p>The function's durable execution configuration settings, if the function is configured for durability.</p>
97 pub durable_config: ::std::option::Option<crate::types::DurableConfig>,
98 /// <p>The function's tenant isolation configuration settings. Determines whether the Lambda function runs on a shared or dedicated infrastructure per unique tenant.</p>
99 pub tenancy_config: ::std::option::Option<crate::types::TenancyConfig>,
100 _request_id: Option<String>,
101}
102impl CreateFunctionOutput {
103 /// <p>The name of the function.</p>
104 pub fn function_name(&self) -> ::std::option::Option<&str> {
105 self.function_name.as_deref()
106 }
107 /// <p>The function's Amazon Resource Name (ARN).</p>
108 pub fn function_arn(&self) -> ::std::option::Option<&str> {
109 self.function_arn.as_deref()
110 }
111 /// <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>
112 /// <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>
113 /// <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>
114 pub fn runtime(&self) -> ::std::option::Option<&crate::types::Runtime> {
115 self.runtime.as_ref()
116 }
117 /// <p>The function's execution role.</p>
118 pub fn role(&self) -> ::std::option::Option<&str> {
119 self.role.as_deref()
120 }
121 /// <p>The function that Lambda calls to begin running your function.</p>
122 pub fn handler(&self) -> ::std::option::Option<&str> {
123 self.handler.as_deref()
124 }
125 /// <p>The size of the function's deployment package, in bytes.</p>
126 pub fn code_size(&self) -> i64 {
127 self.code_size
128 }
129 /// <p>The function's description.</p>
130 pub fn description(&self) -> ::std::option::Option<&str> {
131 self.description.as_deref()
132 }
133 /// <p>The amount of time in seconds that Lambda allows a function to run before stopping it.</p>
134 pub fn timeout(&self) -> ::std::option::Option<i32> {
135 self.timeout
136 }
137 /// <p>The amount of memory available to the function at runtime.</p>
138 pub fn memory_size(&self) -> ::std::option::Option<i32> {
139 self.memory_size
140 }
141 /// <p>The date and time that the function was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
142 pub fn last_modified(&self) -> ::std::option::Option<&str> {
143 self.last_modified.as_deref()
144 }
145 /// <p>The SHA256 hash of the function's deployment package.</p>
146 pub fn code_sha256(&self) -> ::std::option::Option<&str> {
147 self.code_sha256.as_deref()
148 }
149 /// <p>The version of the Lambda function.</p>
150 pub fn version(&self) -> ::std::option::Option<&str> {
151 self.version.as_deref()
152 }
153 /// <p>The function's networking configuration.</p>
154 pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfigResponse> {
155 self.vpc_config.as_ref()
156 }
157 /// <p>The function's dead letter queue.</p>
158 pub fn dead_letter_config(&self) -> ::std::option::Option<&crate::types::DeadLetterConfig> {
159 self.dead_letter_config.as_ref()
160 }
161 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html">environment variables</a>. Omitted from CloudTrail logs.</p>
162 pub fn environment(&self) -> ::std::option::Option<&crate::types::EnvironmentResponse> {
163 self.environment.as_ref()
164 }
165 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
166 /// <ul>
167 /// <li>
168 /// <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>
169 /// <li>
170 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
171 /// <li>
172 /// <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>
173 /// <li>
174 /// <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>
175 /// </ul>
176 /// <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>
177 pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
178 self.kms_key_arn.as_deref()
179 }
180 /// <p>The function's X-Ray tracing configuration.</p>
181 pub fn tracing_config(&self) -> ::std::option::Option<&crate::types::TracingConfigResponse> {
182 self.tracing_config.as_ref()
183 }
184 /// <p>For Lambda@Edge functions, the ARN of the main function.</p>
185 pub fn master_arn(&self) -> ::std::option::Option<&str> {
186 self.master_arn.as_deref()
187 }
188 /// <p>The latest updated revision of the function or alias.</p>
189 pub fn revision_id(&self) -> ::std::option::Option<&str> {
190 self.revision_id.as_deref()
191 }
192 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">layers</a>.</p>
193 ///
194 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.layers.is_none()`.
195 pub fn layers(&self) -> &[crate::types::Layer] {
196 self.layers.as_deref().unwrap_or_default()
197 }
198 /// <p>The current state of the function. When the state is <code>Inactive</code>, you can reactivate the function by invoking it.</p>
199 pub fn state(&self) -> ::std::option::Option<&crate::types::State> {
200 self.state.as_ref()
201 }
202 /// <p>The reason for the function's current state.</p>
203 pub fn state_reason(&self) -> ::std::option::Option<&str> {
204 self.state_reason.as_deref()
205 }
206 /// <p>The reason code for the function's current state. When the code is <code>Creating</code>, you can't invoke or modify the function.</p>
207 pub fn state_reason_code(&self) -> ::std::option::Option<&crate::types::StateReasonCode> {
208 self.state_reason_code.as_ref()
209 }
210 /// <p>The status of the last update that was performed on the function. This is first set to <code>Successful</code> after function creation completes.</p>
211 pub fn last_update_status(&self) -> ::std::option::Option<&crate::types::LastUpdateStatus> {
212 self.last_update_status.as_ref()
213 }
214 /// <p>The reason for the last update that was performed on the function.</p>
215 pub fn last_update_status_reason(&self) -> ::std::option::Option<&str> {
216 self.last_update_status_reason.as_deref()
217 }
218 /// <p>The reason code for the last update that was performed on the function.</p>
219 pub fn last_update_status_reason_code(&self) -> ::std::option::Option<&crate::types::LastUpdateStatusReasonCode> {
220 self.last_update_status_reason_code.as_ref()
221 }
222 /// <p>Connection settings for an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
223 ///
224 /// 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()`.
225 pub fn file_system_configs(&self) -> &[crate::types::FileSystemConfig] {
226 self.file_system_configs.as_deref().unwrap_or_default()
227 }
228 /// <p>The type of deployment package. Set to <code>Image</code> for container image and set <code>Zip</code> for .zip file archive.</p>
229 pub fn package_type(&self) -> ::std::option::Option<&crate::types::PackageType> {
230 self.package_type.as_ref()
231 }
232 /// <p>The function's image configuration values.</p>
233 pub fn image_config_response(&self) -> ::std::option::Option<&crate::types::ImageConfigResponse> {
234 self.image_config_response.as_ref()
235 }
236 /// <p>The ARN of the signing profile version.</p>
237 pub fn signing_profile_version_arn(&self) -> ::std::option::Option<&str> {
238 self.signing_profile_version_arn.as_deref()
239 }
240 /// <p>The ARN of the signing job.</p>
241 pub fn signing_job_arn(&self) -> ::std::option::Option<&str> {
242 self.signing_job_arn.as_deref()
243 }
244 /// <p>The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is <code>x86_64</code>.</p>
245 ///
246 /// 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()`.
247 pub fn architectures(&self) -> &[crate::types::Architecture] {
248 self.architectures.as_deref().unwrap_or_default()
249 }
250 /// <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>
251 pub fn ephemeral_storage(&self) -> ::std::option::Option<&crate::types::EphemeralStorage> {
252 self.ephemeral_storage.as_ref()
253 }
254 /// <p>Set <code>ApplyOn</code> to <code>PublishedVersions</code> to create a snapshot of the initialized execution environment when you publish a function version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Improving startup performance with Lambda SnapStart</a>.</p>
255 pub fn snap_start(&self) -> ::std::option::Option<&crate::types::SnapStartResponse> {
256 self.snap_start.as_ref()
257 }
258 /// <p>The ARN of the runtime and any errors that occured.</p>
259 pub fn runtime_version_config(&self) -> ::std::option::Option<&crate::types::RuntimeVersionConfig> {
260 self.runtime_version_config.as_ref()
261 }
262 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
263 pub fn logging_config(&self) -> ::std::option::Option<&crate::types::LoggingConfig> {
264 self.logging_config.as_ref()
265 }
266 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
267 pub fn capacity_provider_config(&self) -> ::std::option::Option<&crate::types::CapacityProviderConfig> {
268 self.capacity_provider_config.as_ref()
269 }
270 /// <p>The SHA256 hash of the function configuration.</p>
271 pub fn config_sha256(&self) -> ::std::option::Option<&str> {
272 self.config_sha256.as_deref()
273 }
274 /// <p>The function's durable execution configuration settings, if the function is configured for durability.</p>
275 pub fn durable_config(&self) -> ::std::option::Option<&crate::types::DurableConfig> {
276 self.durable_config.as_ref()
277 }
278 /// <p>The function's tenant isolation configuration settings. Determines whether the Lambda function runs on a shared or dedicated infrastructure per unique tenant.</p>
279 pub fn tenancy_config(&self) -> ::std::option::Option<&crate::types::TenancyConfig> {
280 self.tenancy_config.as_ref()
281 }
282}
283impl ::aws_types::request_id::RequestId for CreateFunctionOutput {
284 fn request_id(&self) -> Option<&str> {
285 self._request_id.as_deref()
286 }
287}
288impl CreateFunctionOutput {
289 /// Creates a new builder-style object to manufacture [`CreateFunctionOutput`](crate::operation::create_function::CreateFunctionOutput).
290 pub fn builder() -> crate::operation::create_function::builders::CreateFunctionOutputBuilder {
291 crate::operation::create_function::builders::CreateFunctionOutputBuilder::default()
292 }
293}
294
295/// A builder for [`CreateFunctionOutput`](crate::operation::create_function::CreateFunctionOutput).
296#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
297#[non_exhaustive]
298pub struct CreateFunctionOutputBuilder {
299 pub(crate) function_name: ::std::option::Option<::std::string::String>,
300 pub(crate) function_arn: ::std::option::Option<::std::string::String>,
301 pub(crate) runtime: ::std::option::Option<crate::types::Runtime>,
302 pub(crate) role: ::std::option::Option<::std::string::String>,
303 pub(crate) handler: ::std::option::Option<::std::string::String>,
304 pub(crate) code_size: ::std::option::Option<i64>,
305 pub(crate) description: ::std::option::Option<::std::string::String>,
306 pub(crate) timeout: ::std::option::Option<i32>,
307 pub(crate) memory_size: ::std::option::Option<i32>,
308 pub(crate) last_modified: ::std::option::Option<::std::string::String>,
309 pub(crate) code_sha256: ::std::option::Option<::std::string::String>,
310 pub(crate) version: ::std::option::Option<::std::string::String>,
311 pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfigResponse>,
312 pub(crate) dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
313 pub(crate) environment: ::std::option::Option<crate::types::EnvironmentResponse>,
314 pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
315 pub(crate) tracing_config: ::std::option::Option<crate::types::TracingConfigResponse>,
316 pub(crate) master_arn: ::std::option::Option<::std::string::String>,
317 pub(crate) revision_id: ::std::option::Option<::std::string::String>,
318 pub(crate) layers: ::std::option::Option<::std::vec::Vec<crate::types::Layer>>,
319 pub(crate) state: ::std::option::Option<crate::types::State>,
320 pub(crate) state_reason: ::std::option::Option<::std::string::String>,
321 pub(crate) state_reason_code: ::std::option::Option<crate::types::StateReasonCode>,
322 pub(crate) last_update_status: ::std::option::Option<crate::types::LastUpdateStatus>,
323 pub(crate) last_update_status_reason: ::std::option::Option<::std::string::String>,
324 pub(crate) last_update_status_reason_code: ::std::option::Option<crate::types::LastUpdateStatusReasonCode>,
325 pub(crate) file_system_configs: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>,
326 pub(crate) package_type: ::std::option::Option<crate::types::PackageType>,
327 pub(crate) image_config_response: ::std::option::Option<crate::types::ImageConfigResponse>,
328 pub(crate) signing_profile_version_arn: ::std::option::Option<::std::string::String>,
329 pub(crate) signing_job_arn: ::std::option::Option<::std::string::String>,
330 pub(crate) architectures: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>,
331 pub(crate) ephemeral_storage: ::std::option::Option<crate::types::EphemeralStorage>,
332 pub(crate) snap_start: ::std::option::Option<crate::types::SnapStartResponse>,
333 pub(crate) runtime_version_config: ::std::option::Option<crate::types::RuntimeVersionConfig>,
334 pub(crate) logging_config: ::std::option::Option<crate::types::LoggingConfig>,
335 pub(crate) capacity_provider_config: ::std::option::Option<crate::types::CapacityProviderConfig>,
336 pub(crate) config_sha256: ::std::option::Option<::std::string::String>,
337 pub(crate) durable_config: ::std::option::Option<crate::types::DurableConfig>,
338 pub(crate) tenancy_config: ::std::option::Option<crate::types::TenancyConfig>,
339 _request_id: Option<String>,
340}
341impl CreateFunctionOutputBuilder {
342 /// <p>The name of the function.</p>
343 pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
344 self.function_name = ::std::option::Option::Some(input.into());
345 self
346 }
347 /// <p>The name of the function.</p>
348 pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
349 self.function_name = input;
350 self
351 }
352 /// <p>The name of the function.</p>
353 pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
354 &self.function_name
355 }
356 /// <p>The function's Amazon Resource Name (ARN).</p>
357 pub fn function_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
358 self.function_arn = ::std::option::Option::Some(input.into());
359 self
360 }
361 /// <p>The function's Amazon Resource Name (ARN).</p>
362 pub fn set_function_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
363 self.function_arn = input;
364 self
365 }
366 /// <p>The function's Amazon Resource Name (ARN).</p>
367 pub fn get_function_arn(&self) -> &::std::option::Option<::std::string::String> {
368 &self.function_arn
369 }
370 /// <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>
371 /// <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>
372 /// <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>
373 pub fn runtime(mut self, input: crate::types::Runtime) -> Self {
374 self.runtime = ::std::option::Option::Some(input);
375 self
376 }
377 /// <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>
378 /// <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>
379 /// <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>
380 pub fn set_runtime(mut self, input: ::std::option::Option<crate::types::Runtime>) -> Self {
381 self.runtime = input;
382 self
383 }
384 /// <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>
385 /// <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>
386 /// <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>
387 pub fn get_runtime(&self) -> &::std::option::Option<crate::types::Runtime> {
388 &self.runtime
389 }
390 /// <p>The function's execution role.</p>
391 pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
392 self.role = ::std::option::Option::Some(input.into());
393 self
394 }
395 /// <p>The function's execution role.</p>
396 pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
397 self.role = input;
398 self
399 }
400 /// <p>The function's execution role.</p>
401 pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
402 &self.role
403 }
404 /// <p>The function that Lambda calls to begin running your function.</p>
405 pub fn handler(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
406 self.handler = ::std::option::Option::Some(input.into());
407 self
408 }
409 /// <p>The function that Lambda calls to begin running your function.</p>
410 pub fn set_handler(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
411 self.handler = input;
412 self
413 }
414 /// <p>The function that Lambda calls to begin running your function.</p>
415 pub fn get_handler(&self) -> &::std::option::Option<::std::string::String> {
416 &self.handler
417 }
418 /// <p>The size of the function's deployment package, in bytes.</p>
419 pub fn code_size(mut self, input: i64) -> Self {
420 self.code_size = ::std::option::Option::Some(input);
421 self
422 }
423 /// <p>The size of the function's deployment package, in bytes.</p>
424 pub fn set_code_size(mut self, input: ::std::option::Option<i64>) -> Self {
425 self.code_size = input;
426 self
427 }
428 /// <p>The size of the function's deployment package, in bytes.</p>
429 pub fn get_code_size(&self) -> &::std::option::Option<i64> {
430 &self.code_size
431 }
432 /// <p>The function's description.</p>
433 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
434 self.description = ::std::option::Option::Some(input.into());
435 self
436 }
437 /// <p>The function's description.</p>
438 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
439 self.description = input;
440 self
441 }
442 /// <p>The function's description.</p>
443 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
444 &self.description
445 }
446 /// <p>The amount of time in seconds that Lambda allows a function to run before stopping it.</p>
447 pub fn timeout(mut self, input: i32) -> Self {
448 self.timeout = ::std::option::Option::Some(input);
449 self
450 }
451 /// <p>The amount of time in seconds that Lambda allows a function to run before stopping it.</p>
452 pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
453 self.timeout = input;
454 self
455 }
456 /// <p>The amount of time in seconds that Lambda allows a function to run before stopping it.</p>
457 pub fn get_timeout(&self) -> &::std::option::Option<i32> {
458 &self.timeout
459 }
460 /// <p>The amount of memory available to the function at runtime.</p>
461 pub fn memory_size(mut self, input: i32) -> Self {
462 self.memory_size = ::std::option::Option::Some(input);
463 self
464 }
465 /// <p>The amount of memory available to the function at runtime.</p>
466 pub fn set_memory_size(mut self, input: ::std::option::Option<i32>) -> Self {
467 self.memory_size = input;
468 self
469 }
470 /// <p>The amount of memory available to the function at runtime.</p>
471 pub fn get_memory_size(&self) -> &::std::option::Option<i32> {
472 &self.memory_size
473 }
474 /// <p>The date and time that the function was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
475 pub fn last_modified(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
476 self.last_modified = ::std::option::Option::Some(input.into());
477 self
478 }
479 /// <p>The date and time that the function was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
480 pub fn set_last_modified(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
481 self.last_modified = input;
482 self
483 }
484 /// <p>The date and time that the function was last updated, in <a href="https://www.w3.org/TR/NOTE-datetime">ISO-8601 format</a> (YYYY-MM-DDThh:mm:ss.sTZD).</p>
485 pub fn get_last_modified(&self) -> &::std::option::Option<::std::string::String> {
486 &self.last_modified
487 }
488 /// <p>The SHA256 hash of the function's deployment package.</p>
489 pub fn code_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
490 self.code_sha256 = ::std::option::Option::Some(input.into());
491 self
492 }
493 /// <p>The SHA256 hash of the function's deployment package.</p>
494 pub fn set_code_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
495 self.code_sha256 = input;
496 self
497 }
498 /// <p>The SHA256 hash of the function's deployment package.</p>
499 pub fn get_code_sha256(&self) -> &::std::option::Option<::std::string::String> {
500 &self.code_sha256
501 }
502 /// <p>The version of the Lambda function.</p>
503 pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
504 self.version = ::std::option::Option::Some(input.into());
505 self
506 }
507 /// <p>The version of the Lambda function.</p>
508 pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
509 self.version = input;
510 self
511 }
512 /// <p>The version of the Lambda function.</p>
513 pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
514 &self.version
515 }
516 /// <p>The function's networking configuration.</p>
517 pub fn vpc_config(mut self, input: crate::types::VpcConfigResponse) -> Self {
518 self.vpc_config = ::std::option::Option::Some(input);
519 self
520 }
521 /// <p>The function's networking configuration.</p>
522 pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfigResponse>) -> Self {
523 self.vpc_config = input;
524 self
525 }
526 /// <p>The function's networking configuration.</p>
527 pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfigResponse> {
528 &self.vpc_config
529 }
530 /// <p>The function's dead letter queue.</p>
531 pub fn dead_letter_config(mut self, input: crate::types::DeadLetterConfig) -> Self {
532 self.dead_letter_config = ::std::option::Option::Some(input);
533 self
534 }
535 /// <p>The function's dead letter queue.</p>
536 pub fn set_dead_letter_config(mut self, input: ::std::option::Option<crate::types::DeadLetterConfig>) -> Self {
537 self.dead_letter_config = input;
538 self
539 }
540 /// <p>The function's dead letter queue.</p>
541 pub fn get_dead_letter_config(&self) -> &::std::option::Option<crate::types::DeadLetterConfig> {
542 &self.dead_letter_config
543 }
544 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html">environment variables</a>. Omitted from CloudTrail logs.</p>
545 pub fn environment(mut self, input: crate::types::EnvironmentResponse) -> Self {
546 self.environment = ::std::option::Option::Some(input);
547 self
548 }
549 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html">environment variables</a>. Omitted from CloudTrail logs.</p>
550 pub fn set_environment(mut self, input: ::std::option::Option<crate::types::EnvironmentResponse>) -> Self {
551 self.environment = input;
552 self
553 }
554 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html">environment variables</a>. Omitted from CloudTrail logs.</p>
555 pub fn get_environment(&self) -> &::std::option::Option<crate::types::EnvironmentResponse> {
556 &self.environment
557 }
558 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
559 /// <ul>
560 /// <li>
561 /// <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>
562 /// <li>
563 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
564 /// <li>
565 /// <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>
566 /// <li>
567 /// <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>
568 /// </ul>
569 /// <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>
570 pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
571 self.kms_key_arn = ::std::option::Option::Some(input.into());
572 self
573 }
574 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
575 /// <ul>
576 /// <li>
577 /// <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>
578 /// <li>
579 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
580 /// <li>
581 /// <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>
582 /// <li>
583 /// <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>
584 /// </ul>
585 /// <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>
586 pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
587 self.kms_key_arn = input;
588 self
589 }
590 /// <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p>
591 /// <ul>
592 /// <li>
593 /// <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>
594 /// <li>
595 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>
596 /// <li>
597 /// <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>
598 /// <li>
599 /// <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>
600 /// </ul>
601 /// <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>
602 pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
603 &self.kms_key_arn
604 }
605 /// <p>The function's X-Ray tracing configuration.</p>
606 pub fn tracing_config(mut self, input: crate::types::TracingConfigResponse) -> Self {
607 self.tracing_config = ::std::option::Option::Some(input);
608 self
609 }
610 /// <p>The function's X-Ray tracing configuration.</p>
611 pub fn set_tracing_config(mut self, input: ::std::option::Option<crate::types::TracingConfigResponse>) -> Self {
612 self.tracing_config = input;
613 self
614 }
615 /// <p>The function's X-Ray tracing configuration.</p>
616 pub fn get_tracing_config(&self) -> &::std::option::Option<crate::types::TracingConfigResponse> {
617 &self.tracing_config
618 }
619 /// <p>For Lambda@Edge functions, the ARN of the main function.</p>
620 pub fn master_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
621 self.master_arn = ::std::option::Option::Some(input.into());
622 self
623 }
624 /// <p>For Lambda@Edge functions, the ARN of the main function.</p>
625 pub fn set_master_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
626 self.master_arn = input;
627 self
628 }
629 /// <p>For Lambda@Edge functions, the ARN of the main function.</p>
630 pub fn get_master_arn(&self) -> &::std::option::Option<::std::string::String> {
631 &self.master_arn
632 }
633 /// <p>The latest updated revision of the function or alias.</p>
634 pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
635 self.revision_id = ::std::option::Option::Some(input.into());
636 self
637 }
638 /// <p>The latest updated revision of the function or alias.</p>
639 pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
640 self.revision_id = input;
641 self
642 }
643 /// <p>The latest updated revision of the function or alias.</p>
644 pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
645 &self.revision_id
646 }
647 /// Appends an item to `layers`.
648 ///
649 /// To override the contents of this collection use [`set_layers`](Self::set_layers).
650 ///
651 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">layers</a>.</p>
652 pub fn layers(mut self, input: crate::types::Layer) -> Self {
653 let mut v = self.layers.unwrap_or_default();
654 v.push(input);
655 self.layers = ::std::option::Option::Some(v);
656 self
657 }
658 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">layers</a>.</p>
659 pub fn set_layers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Layer>>) -> Self {
660 self.layers = input;
661 self
662 }
663 /// <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">layers</a>.</p>
664 pub fn get_layers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Layer>> {
665 &self.layers
666 }
667 /// <p>The current state of the function. When the state is <code>Inactive</code>, you can reactivate the function by invoking it.</p>
668 pub fn state(mut self, input: crate::types::State) -> Self {
669 self.state = ::std::option::Option::Some(input);
670 self
671 }
672 /// <p>The current state of the function. When the state is <code>Inactive</code>, you can reactivate the function by invoking it.</p>
673 pub fn set_state(mut self, input: ::std::option::Option<crate::types::State>) -> Self {
674 self.state = input;
675 self
676 }
677 /// <p>The current state of the function. When the state is <code>Inactive</code>, you can reactivate the function by invoking it.</p>
678 pub fn get_state(&self) -> &::std::option::Option<crate::types::State> {
679 &self.state
680 }
681 /// <p>The reason for the function's current state.</p>
682 pub fn state_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
683 self.state_reason = ::std::option::Option::Some(input.into());
684 self
685 }
686 /// <p>The reason for the function's current state.</p>
687 pub fn set_state_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
688 self.state_reason = input;
689 self
690 }
691 /// <p>The reason for the function's current state.</p>
692 pub fn get_state_reason(&self) -> &::std::option::Option<::std::string::String> {
693 &self.state_reason
694 }
695 /// <p>The reason code for the function's current state. When the code is <code>Creating</code>, you can't invoke or modify the function.</p>
696 pub fn state_reason_code(mut self, input: crate::types::StateReasonCode) -> Self {
697 self.state_reason_code = ::std::option::Option::Some(input);
698 self
699 }
700 /// <p>The reason code for the function's current state. When the code is <code>Creating</code>, you can't invoke or modify the function.</p>
701 pub fn set_state_reason_code(mut self, input: ::std::option::Option<crate::types::StateReasonCode>) -> Self {
702 self.state_reason_code = input;
703 self
704 }
705 /// <p>The reason code for the function's current state. When the code is <code>Creating</code>, you can't invoke or modify the function.</p>
706 pub fn get_state_reason_code(&self) -> &::std::option::Option<crate::types::StateReasonCode> {
707 &self.state_reason_code
708 }
709 /// <p>The status of the last update that was performed on the function. This is first set to <code>Successful</code> after function creation completes.</p>
710 pub fn last_update_status(mut self, input: crate::types::LastUpdateStatus) -> Self {
711 self.last_update_status = ::std::option::Option::Some(input);
712 self
713 }
714 /// <p>The status of the last update that was performed on the function. This is first set to <code>Successful</code> after function creation completes.</p>
715 pub fn set_last_update_status(mut self, input: ::std::option::Option<crate::types::LastUpdateStatus>) -> Self {
716 self.last_update_status = input;
717 self
718 }
719 /// <p>The status of the last update that was performed on the function. This is first set to <code>Successful</code> after function creation completes.</p>
720 pub fn get_last_update_status(&self) -> &::std::option::Option<crate::types::LastUpdateStatus> {
721 &self.last_update_status
722 }
723 /// <p>The reason for the last update that was performed on the function.</p>
724 pub fn last_update_status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
725 self.last_update_status_reason = ::std::option::Option::Some(input.into());
726 self
727 }
728 /// <p>The reason for the last update that was performed on the function.</p>
729 pub fn set_last_update_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
730 self.last_update_status_reason = input;
731 self
732 }
733 /// <p>The reason for the last update that was performed on the function.</p>
734 pub fn get_last_update_status_reason(&self) -> &::std::option::Option<::std::string::String> {
735 &self.last_update_status_reason
736 }
737 /// <p>The reason code for the last update that was performed on the function.</p>
738 pub fn last_update_status_reason_code(mut self, input: crate::types::LastUpdateStatusReasonCode) -> Self {
739 self.last_update_status_reason_code = ::std::option::Option::Some(input);
740 self
741 }
742 /// <p>The reason code for the last update that was performed on the function.</p>
743 pub fn set_last_update_status_reason_code(mut self, input: ::std::option::Option<crate::types::LastUpdateStatusReasonCode>) -> Self {
744 self.last_update_status_reason_code = input;
745 self
746 }
747 /// <p>The reason code for the last update that was performed on the function.</p>
748 pub fn get_last_update_status_reason_code(&self) -> &::std::option::Option<crate::types::LastUpdateStatusReasonCode> {
749 &self.last_update_status_reason_code
750 }
751 /// Appends an item to `file_system_configs`.
752 ///
753 /// To override the contents of this collection use [`set_file_system_configs`](Self::set_file_system_configs).
754 ///
755 /// <p>Connection settings for an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
756 pub fn file_system_configs(mut self, input: crate::types::FileSystemConfig) -> Self {
757 let mut v = self.file_system_configs.unwrap_or_default();
758 v.push(input);
759 self.file_system_configs = ::std::option::Option::Some(v);
760 self
761 }
762 /// <p>Connection settings for an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
763 pub fn set_file_system_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>>) -> Self {
764 self.file_system_configs = input;
765 self
766 }
767 /// <p>Connection settings for an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
768 pub fn get_file_system_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FileSystemConfig>> {
769 &self.file_system_configs
770 }
771 /// <p>The type of deployment package. Set to <code>Image</code> for container image and set <code>Zip</code> for .zip file archive.</p>
772 pub fn package_type(mut self, input: crate::types::PackageType) -> Self {
773 self.package_type = ::std::option::Option::Some(input);
774 self
775 }
776 /// <p>The type of deployment package. Set to <code>Image</code> for container image and set <code>Zip</code> for .zip file archive.</p>
777 pub fn set_package_type(mut self, input: ::std::option::Option<crate::types::PackageType>) -> Self {
778 self.package_type = input;
779 self
780 }
781 /// <p>The type of deployment package. Set to <code>Image</code> for container image and set <code>Zip</code> for .zip file archive.</p>
782 pub fn get_package_type(&self) -> &::std::option::Option<crate::types::PackageType> {
783 &self.package_type
784 }
785 /// <p>The function's image configuration values.</p>
786 pub fn image_config_response(mut self, input: crate::types::ImageConfigResponse) -> Self {
787 self.image_config_response = ::std::option::Option::Some(input);
788 self
789 }
790 /// <p>The function's image configuration values.</p>
791 pub fn set_image_config_response(mut self, input: ::std::option::Option<crate::types::ImageConfigResponse>) -> Self {
792 self.image_config_response = input;
793 self
794 }
795 /// <p>The function's image configuration values.</p>
796 pub fn get_image_config_response(&self) -> &::std::option::Option<crate::types::ImageConfigResponse> {
797 &self.image_config_response
798 }
799 /// <p>The ARN of the signing profile version.</p>
800 pub fn signing_profile_version_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
801 self.signing_profile_version_arn = ::std::option::Option::Some(input.into());
802 self
803 }
804 /// <p>The ARN of the signing profile version.</p>
805 pub fn set_signing_profile_version_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
806 self.signing_profile_version_arn = input;
807 self
808 }
809 /// <p>The ARN of the signing profile version.</p>
810 pub fn get_signing_profile_version_arn(&self) -> &::std::option::Option<::std::string::String> {
811 &self.signing_profile_version_arn
812 }
813 /// <p>The ARN of the signing job.</p>
814 pub fn signing_job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
815 self.signing_job_arn = ::std::option::Option::Some(input.into());
816 self
817 }
818 /// <p>The ARN of the signing job.</p>
819 pub fn set_signing_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
820 self.signing_job_arn = input;
821 self
822 }
823 /// <p>The ARN of the signing job.</p>
824 pub fn get_signing_job_arn(&self) -> &::std::option::Option<::std::string::String> {
825 &self.signing_job_arn
826 }
827 /// Appends an item to `architectures`.
828 ///
829 /// To override the contents of this collection use [`set_architectures`](Self::set_architectures).
830 ///
831 /// <p>The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is <code>x86_64</code>.</p>
832 pub fn architectures(mut self, input: crate::types::Architecture) -> Self {
833 let mut v = self.architectures.unwrap_or_default();
834 v.push(input);
835 self.architectures = ::std::option::Option::Some(v);
836 self
837 }
838 /// <p>The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is <code>x86_64</code>.</p>
839 pub fn set_architectures(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Architecture>>) -> Self {
840 self.architectures = input;
841 self
842 }
843 /// <p>The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is <code>x86_64</code>.</p>
844 pub fn get_architectures(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Architecture>> {
845 &self.architectures
846 }
847 /// <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>
848 pub fn ephemeral_storage(mut self, input: crate::types::EphemeralStorage) -> Self {
849 self.ephemeral_storage = ::std::option::Option::Some(input);
850 self
851 }
852 /// <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>
853 pub fn set_ephemeral_storage(mut self, input: ::std::option::Option<crate::types::EphemeralStorage>) -> Self {
854 self.ephemeral_storage = input;
855 self
856 }
857 /// <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>
858 pub fn get_ephemeral_storage(&self) -> &::std::option::Option<crate::types::EphemeralStorage> {
859 &self.ephemeral_storage
860 }
861 /// <p>Set <code>ApplyOn</code> to <code>PublishedVersions</code> to create a snapshot of the initialized execution environment when you publish a function version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Improving startup performance with Lambda SnapStart</a>.</p>
862 pub fn snap_start(mut self, input: crate::types::SnapStartResponse) -> Self {
863 self.snap_start = ::std::option::Option::Some(input);
864 self
865 }
866 /// <p>Set <code>ApplyOn</code> to <code>PublishedVersions</code> to create a snapshot of the initialized execution environment when you publish a function version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Improving startup performance with Lambda SnapStart</a>.</p>
867 pub fn set_snap_start(mut self, input: ::std::option::Option<crate::types::SnapStartResponse>) -> Self {
868 self.snap_start = input;
869 self
870 }
871 /// <p>Set <code>ApplyOn</code> to <code>PublishedVersions</code> to create a snapshot of the initialized execution environment when you publish a function version. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Improving startup performance with Lambda SnapStart</a>.</p>
872 pub fn get_snap_start(&self) -> &::std::option::Option<crate::types::SnapStartResponse> {
873 &self.snap_start
874 }
875 /// <p>The ARN of the runtime and any errors that occured.</p>
876 pub fn runtime_version_config(mut self, input: crate::types::RuntimeVersionConfig) -> Self {
877 self.runtime_version_config = ::std::option::Option::Some(input);
878 self
879 }
880 /// <p>The ARN of the runtime and any errors that occured.</p>
881 pub fn set_runtime_version_config(mut self, input: ::std::option::Option<crate::types::RuntimeVersionConfig>) -> Self {
882 self.runtime_version_config = input;
883 self
884 }
885 /// <p>The ARN of the runtime and any errors that occured.</p>
886 pub fn get_runtime_version_config(&self) -> &::std::option::Option<crate::types::RuntimeVersionConfig> {
887 &self.runtime_version_config
888 }
889 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
890 pub fn logging_config(mut self, input: crate::types::LoggingConfig) -> Self {
891 self.logging_config = ::std::option::Option::Some(input);
892 self
893 }
894 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
895 pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::LoggingConfig>) -> Self {
896 self.logging_config = input;
897 self
898 }
899 /// <p>The function's Amazon CloudWatch Logs configuration settings.</p>
900 pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::LoggingConfig> {
901 &self.logging_config
902 }
903 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
904 pub fn capacity_provider_config(mut self, input: crate::types::CapacityProviderConfig) -> Self {
905 self.capacity_provider_config = ::std::option::Option::Some(input);
906 self
907 }
908 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
909 pub fn set_capacity_provider_config(mut self, input: ::std::option::Option<crate::types::CapacityProviderConfig>) -> Self {
910 self.capacity_provider_config = input;
911 self
912 }
913 /// <p>Configuration for the capacity provider that manages compute resources for Lambda functions.</p>
914 pub fn get_capacity_provider_config(&self) -> &::std::option::Option<crate::types::CapacityProviderConfig> {
915 &self.capacity_provider_config
916 }
917 /// <p>The SHA256 hash of the function configuration.</p>
918 pub fn config_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
919 self.config_sha256 = ::std::option::Option::Some(input.into());
920 self
921 }
922 /// <p>The SHA256 hash of the function configuration.</p>
923 pub fn set_config_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
924 self.config_sha256 = input;
925 self
926 }
927 /// <p>The SHA256 hash of the function configuration.</p>
928 pub fn get_config_sha256(&self) -> &::std::option::Option<::std::string::String> {
929 &self.config_sha256
930 }
931 /// <p>The function's durable execution configuration settings, if the function is configured for durability.</p>
932 pub fn durable_config(mut self, input: crate::types::DurableConfig) -> Self {
933 self.durable_config = ::std::option::Option::Some(input);
934 self
935 }
936 /// <p>The function's durable execution configuration settings, if the function is configured for durability.</p>
937 pub fn set_durable_config(mut self, input: ::std::option::Option<crate::types::DurableConfig>) -> Self {
938 self.durable_config = input;
939 self
940 }
941 /// <p>The function's durable execution configuration settings, if the function is configured for durability.</p>
942 pub fn get_durable_config(&self) -> &::std::option::Option<crate::types::DurableConfig> {
943 &self.durable_config
944 }
945 /// <p>The function's tenant isolation configuration settings. Determines whether the Lambda function runs on a shared or dedicated infrastructure per unique tenant.</p>
946 pub fn tenancy_config(mut self, input: crate::types::TenancyConfig) -> Self {
947 self.tenancy_config = ::std::option::Option::Some(input);
948 self
949 }
950 /// <p>The function's tenant isolation configuration settings. Determines whether the Lambda function runs on a shared or dedicated infrastructure per unique tenant.</p>
951 pub fn set_tenancy_config(mut self, input: ::std::option::Option<crate::types::TenancyConfig>) -> Self {
952 self.tenancy_config = input;
953 self
954 }
955 /// <p>The function's tenant isolation configuration settings. Determines whether the Lambda function runs on a shared or dedicated infrastructure per unique tenant.</p>
956 pub fn get_tenancy_config(&self) -> &::std::option::Option<crate::types::TenancyConfig> {
957 &self.tenancy_config
958 }
959 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
960 self._request_id = Some(request_id.into());
961 self
962 }
963
964 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
965 self._request_id = request_id;
966 self
967 }
968 /// Consumes the builder and constructs a [`CreateFunctionOutput`](crate::operation::create_function::CreateFunctionOutput).
969 pub fn build(self) -> crate::operation::create_function::CreateFunctionOutput {
970 crate::operation::create_function::CreateFunctionOutput {
971 function_name: self.function_name,
972 function_arn: self.function_arn,
973 runtime: self.runtime,
974 role: self.role,
975 handler: self.handler,
976 code_size: self.code_size.unwrap_or_default(),
977 description: self.description,
978 timeout: self.timeout,
979 memory_size: self.memory_size,
980 last_modified: self.last_modified,
981 code_sha256: self.code_sha256,
982 version: self.version,
983 vpc_config: self.vpc_config,
984 dead_letter_config: self.dead_letter_config,
985 environment: self.environment,
986 kms_key_arn: self.kms_key_arn,
987 tracing_config: self.tracing_config,
988 master_arn: self.master_arn,
989 revision_id: self.revision_id,
990 layers: self.layers,
991 state: self.state,
992 state_reason: self.state_reason,
993 state_reason_code: self.state_reason_code,
994 last_update_status: self.last_update_status,
995 last_update_status_reason: self.last_update_status_reason,
996 last_update_status_reason_code: self.last_update_status_reason_code,
997 file_system_configs: self.file_system_configs,
998 package_type: self.package_type,
999 image_config_response: self.image_config_response,
1000 signing_profile_version_arn: self.signing_profile_version_arn,
1001 signing_job_arn: self.signing_job_arn,
1002 architectures: self.architectures,
1003 ephemeral_storage: self.ephemeral_storage,
1004 snap_start: self.snap_start,
1005 runtime_version_config: self.runtime_version_config,
1006 logging_config: self.logging_config,
1007 capacity_provider_config: self.capacity_provider_config,
1008 config_sha256: self.config_sha256,
1009 durable_config: self.durable_config,
1010 tenancy_config: self.tenancy_config,
1011 _request_id: self._request_id,
1012 }
1013 }
1014}