aws_sdk_lambda/client/
publish_version.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`PublishVersion`](crate::operation::publish_version::builders::PublishVersionFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`function_name(impl Into<String>)`](crate::operation::publish_version::builders::PublishVersionFluentBuilder::function_name) / [`set_function_name(Option<String>)`](crate::operation::publish_version::builders::PublishVersionFluentBuilder::set_function_name):<br>required: **true**<br><p>The name or ARN of the Lambda function.</p> <p class="title"><b>Name formats</b></p> <ul>  <li>   <p><b>Function name</b> - <code>MyFunction</code>.</p></li>  <li>   <p><b>Function ARN</b> - <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p></li>  <li>   <p><b>Partial ARN</b> - <code>123456789012:function:MyFunction</code>.</p></li> </ul> <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><br>
7    ///   - [`code_sha256(impl Into<String>)`](crate::operation::publish_version::builders::PublishVersionFluentBuilder::code_sha256) / [`set_code_sha256(Option<String>)`](crate::operation::publish_version::builders::PublishVersionFluentBuilder::set_code_sha256):<br>required: **false**<br><p>Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing a version if the function code has changed since you last updated it. You can get the hash for the version that you uploaded from the output of <code>UpdateFunctionCode</code>.</p><br>
8    ///   - [`description(impl Into<String>)`](crate::operation::publish_version::builders::PublishVersionFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::publish_version::builders::PublishVersionFluentBuilder::set_description):<br>required: **false**<br><p>A description for the version to override the description in the function configuration.</p><br>
9    ///   - [`revision_id(impl Into<String>)`](crate::operation::publish_version::builders::PublishVersionFluentBuilder::revision_id) / [`set_revision_id(Option<String>)`](crate::operation::publish_version::builders::PublishVersionFluentBuilder::set_revision_id):<br>required: **false**<br><p>Only update the function if the revision ID matches the ID that's specified. Use this option to avoid publishing a version if the function configuration has changed since you last updated it.</p><br>
10    /// - On success, responds with [`PublishVersionOutput`](crate::operation::publish_version::PublishVersionOutput) with field(s):
11    ///   - [`function_name(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::function_name): <p>The name of the function.</p>
12    ///   - [`function_arn(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::function_arn): <p>The function's Amazon Resource Name (ARN).</p>
13    ///   - [`runtime(Option<Runtime>)`](crate::operation::publish_version::PublishVersionOutput::runtime): <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> <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> <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    ///   - [`role(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::role): <p>The function's execution role.</p>
15    ///   - [`handler(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::handler): <p>The function that Lambda calls to begin running your function.</p>
16    ///   - [`code_size(i64)`](crate::operation::publish_version::PublishVersionOutput::code_size): <p>The size of the function's deployment package, in bytes.</p>
17    ///   - [`description(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::description): <p>The function's description.</p>
18    ///   - [`timeout(Option<i32>)`](crate::operation::publish_version::PublishVersionOutput::timeout): <p>The amount of time in seconds that Lambda allows a function to run before stopping it.</p>
19    ///   - [`memory_size(Option<i32>)`](crate::operation::publish_version::PublishVersionOutput::memory_size): <p>The amount of memory available to the function at runtime.</p>
20    ///   - [`last_modified(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::last_modified): <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>
21    ///   - [`code_sha256(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::code_sha256): <p>The SHA256 hash of the function's deployment package.</p>
22    ///   - [`version(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::version): <p>The version of the Lambda function.</p>
23    ///   - [`vpc_config(Option<VpcConfigResponse>)`](crate::operation::publish_version::PublishVersionOutput::vpc_config): <p>The function's networking configuration.</p>
24    ///   - [`dead_letter_config(Option<DeadLetterConfig>)`](crate::operation::publish_version::PublishVersionOutput::dead_letter_config): <p>The function's dead letter queue.</p>
25    ///   - [`environment(Option<EnvironmentResponse>)`](crate::operation::publish_version::PublishVersionOutput::environment): <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>
26    ///   - [`kms_key_arn(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::kms_key_arn): <p>The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:</p> <ul>  <li>   <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>  <li>   <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html">Lambda SnapStart</a> snapshots.</p></li>  <li>   <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>  <li>   <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> </ul> <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>
27    ///   - [`tracing_config(Option<TracingConfigResponse>)`](crate::operation::publish_version::PublishVersionOutput::tracing_config): <p>The function's X-Ray tracing configuration.</p>
28    ///   - [`master_arn(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::master_arn): <p>For Lambda@Edge functions, the ARN of the main function.</p>
29    ///   - [`revision_id(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::revision_id): <p>The latest updated revision of the function or alias.</p>
30    ///   - [`layers(Option<Vec::<Layer>>)`](crate::operation::publish_version::PublishVersionOutput::layers): <p>The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">layers</a>.</p>
31    ///   - [`state(Option<State>)`](crate::operation::publish_version::PublishVersionOutput::state): <p>The current state of the function. When the state is <code>Inactive</code>, you can reactivate the function by invoking it.</p>
32    ///   - [`state_reason(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::state_reason): <p>The reason for the function's current state.</p>
33    ///   - [`state_reason_code(Option<StateReasonCode>)`](crate::operation::publish_version::PublishVersionOutput::state_reason_code): <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>
34    ///   - [`last_update_status(Option<LastUpdateStatus>)`](crate::operation::publish_version::PublishVersionOutput::last_update_status): <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>
35    ///   - [`last_update_status_reason(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::last_update_status_reason): <p>The reason for the last update that was performed on the function.</p>
36    ///   - [`last_update_status_reason_code(Option<LastUpdateStatusReasonCode>)`](crate::operation::publish_version::PublishVersionOutput::last_update_status_reason_code): <p>The reason code for the last update that was performed on the function.</p>
37    ///   - [`file_system_configs(Option<Vec::<FileSystemConfig>>)`](crate::operation::publish_version::PublishVersionOutput::file_system_configs): <p>Connection settings for an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html">Amazon EFS file system</a>.</p>
38    ///   - [`package_type(Option<PackageType>)`](crate::operation::publish_version::PublishVersionOutput::package_type): <p>The type of deployment package. Set to <code>Image</code> for container image and set <code>Zip</code> for .zip file archive.</p>
39    ///   - [`image_config_response(Option<ImageConfigResponse>)`](crate::operation::publish_version::PublishVersionOutput::image_config_response): <p>The function's image configuration values.</p>
40    ///   - [`signing_profile_version_arn(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::signing_profile_version_arn): <p>The ARN of the signing profile version.</p>
41    ///   - [`signing_job_arn(Option<String>)`](crate::operation::publish_version::PublishVersionOutput::signing_job_arn): <p>The ARN of the signing job.</p>
42    ///   - [`architectures(Option<Vec::<Architecture>>)`](crate::operation::publish_version::PublishVersionOutput::architectures): <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>
43    ///   - [`ephemeral_storage(Option<EphemeralStorage>)`](crate::operation::publish_version::PublishVersionOutput::ephemeral_storage): <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>
44    ///   - [`snap_start(Option<SnapStartResponse>)`](crate::operation::publish_version::PublishVersionOutput::snap_start): <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>
45    ///   - [`runtime_version_config(Option<RuntimeVersionConfig>)`](crate::operation::publish_version::PublishVersionOutput::runtime_version_config): <p>The ARN of the runtime and any errors that occured.</p>
46    ///   - [`logging_config(Option<LoggingConfig>)`](crate::operation::publish_version::PublishVersionOutput::logging_config): <p>The function's Amazon CloudWatch Logs configuration settings.</p>
47    /// - On failure, responds with [`SdkError<PublishVersionError>`](crate::operation::publish_version::PublishVersionError)
48    pub fn publish_version(&self) -> crate::operation::publish_version::builders::PublishVersionFluentBuilder {
49        crate::operation::publish_version::builders::PublishVersionFluentBuilder::new(self.handle.clone())
50    }
51}