Struct aws_sdk_lambda::client::fluent_builders::PublishVersion
source · pub struct PublishVersion { /* private fields */ }
Expand description
Fluent builder constructing a request to PublishVersion
.
Creates a version from the current code and configuration of a function. Use versions to create a snapshot of your function code and configuration that doesn't change.
Lambda doesn't publish a version if the function's configuration and code haven't changed since the last version. Use UpdateFunctionCode
or UpdateFunctionConfiguration
to update the function before publishing a version.
Clients can invoke versions directly or with an alias. To create an alias, use CreateAlias
.
Implementations§
source§impl PublishVersion
impl PublishVersion
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<PublishVersion, AwsResponseRetryClassifier>, SdkError<PublishVersionError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<PublishVersion, AwsResponseRetryClassifier>, SdkError<PublishVersionError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<PublishVersionOutput, SdkError<PublishVersionError>>
pub async fn send(
self
) -> Result<PublishVersionOutput, SdkError<PublishVersionError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn function_name(self, input: impl Into<String>) -> Self
pub fn function_name(self, input: impl Into<String>) -> Self
The name of the Lambda function.
Name formats
-
Function name -
MyFunction
. -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:MyFunction
. -
Partial ARN -
123456789012:function:MyFunction
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
sourcepub fn set_function_name(self, input: Option<String>) -> Self
pub fn set_function_name(self, input: Option<String>) -> Self
The name of the Lambda function.
Name formats
-
Function name -
MyFunction
. -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:MyFunction
. -
Partial ARN -
123456789012:function:MyFunction
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
sourcepub fn code_sha256(self, input: impl Into<String>) -> Self
pub fn code_sha256(self, input: impl Into<String>) -> Self
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 UpdateFunctionCode
.
sourcepub fn set_code_sha256(self, input: Option<String>) -> Self
pub fn set_code_sha256(self, input: Option<String>) -> Self
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 UpdateFunctionCode
.
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description for the version to override the description in the function configuration.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description for the version to override the description in the function configuration.
sourcepub fn revision_id(self, input: impl Into<String>) -> Self
pub fn revision_id(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_revision_id(self, input: Option<String>) -> Self
pub fn set_revision_id(self, input: Option<String>) -> Self
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.
Trait Implementations§
source§impl Clone for PublishVersion
impl Clone for PublishVersion
source§fn clone(&self) -> PublishVersion
fn clone(&self) -> PublishVersion
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more