pub struct Client { /* private fields */ }Expand description
Client for AWS Lambda
Client for invoking operations on AWS Lambda. Each operation on AWS Lambda is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_lambda::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Builder struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_lambda::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the AddLayerVersionPermission operation has
a Client::add_layer_version_permission, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.add_layer_version_permission()
.layer_name("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
§Waiters
This client provides wait_until methods behind the Waiters trait.
To use them, simply import the trait, and then call one of the wait_until methods. This will
return a waiter fluent builder that takes various parameters, which are documented on the builder
type. Once parameters have been provided, the wait method can be called to initiate waiting.
For example, if there was a wait_until_thing method, it could look like:
let result = client.wait_until_thing()
.thing_id("someId")
.wait(Duration::from_secs(120))
.await;Implementations§
Source§impl Client
impl Client
Sourcepub fn add_layer_version_permission(
&self,
) -> AddLayerVersionPermissionFluentBuilder
pub fn add_layer_version_permission( &self, ) -> AddLayerVersionPermissionFluentBuilder
Constructs a fluent builder for the AddLayerVersionPermission operation.
- The fluent builder is configurable:
layer_name(impl Into<String>)/set_layer_name(Option<String>):
required: trueThe name or Amazon Resource Name (ARN) of the layer.
version_number(i64)/set_version_number(Option<i64>):
required: trueThe version number.
statement_id(impl Into<String>)/set_statement_id(Option<String>):
required: trueAn identifier that distinguishes the policy from others on the same layer version.
action(impl Into<String>)/set_action(Option<String>):
required: trueThe API action that grants access to the layer. For example,
lambda:GetLayerVersion.principal(impl Into<String>)/set_principal(Option<String>):
required: trueAn account ID, or
*to grant layer usage permission to all accounts in an organization, or all Amazon Web Services accounts (iforganizationIdis not specified). For the last case, make sure that you really do want all Amazon Web Services accounts to have usage permission to this layer.organization_id(impl Into<String>)/set_organization_id(Option<String>):
required: falseWith the principal set to
*, grant permission to all accounts in the specified organization.revision_id(impl Into<String>)/set_revision_id(Option<String>):
required: falseOnly update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.
- On success, responds with
AddLayerVersionPermissionOutputwith field(s):statement(Option<String>):The permission statement.
revision_id(Option<String>):A unique identifier for the current revision of the policy.
- On failure, responds with
SdkError<AddLayerVersionPermissionError>
Source§impl Client
impl Client
Sourcepub fn add_permission(&self) -> AddPermissionFluentBuilder
pub fn add_permission(&self) -> AddPermissionFluentBuilder
Constructs a fluent builder for the AddPermission operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name –
my-function(name-only),my-function:v1(with alias). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
statement_id(impl Into<String>)/set_statement_id(Option<String>):
required: trueA statement identifier that differentiates the statement from others in the same policy.
action(impl Into<String>)/set_action(Option<String>):
required: trueThe action that the principal can use on the function. For example,
lambda:InvokeFunctionorlambda:GetFunction.principal(impl Into<String>)/set_principal(Option<String>):
required: trueThe Amazon Web Services service, Amazon Web Services account, IAM user, or IAM role that invokes the function. If you specify a service, use
SourceArnorSourceAccountto limit who can invoke the function through that service.source_arn(impl Into<String>)/set_source_arn(Option<String>):
required: falseFor Amazon Web Services services, the ARN of the Amazon Web Services resource that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic.
Note that Lambda configures the comparison using the
StringLikeoperator.source_account(impl Into<String>)/set_source_account(Option<String>):
required: falseFor Amazon Web Services service, the ID of the Amazon Web Services account that owns the resource. Use this together with
SourceArnto ensure that the specified account owns the resource. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.event_source_token(impl Into<String>)/set_event_source_token(Option<String>):
required: falseFor Alexa Smart Home functions, a token that the invoker must supply.
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseSpecify a version or alias to add permissions to a published version of the function.
revision_id(impl Into<String>)/set_revision_id(Option<String>):
required: falseUpdate the policy only if the revision ID matches the ID that’s specified. Use this option to avoid modifying a policy that has changed since you last read it.
principal_org_id(impl Into<String>)/set_principal_org_id(Option<String>):
required: falseThe identifier for your organization in Organizations. Use this to grant permissions to all the Amazon Web Services accounts under this organization.
function_url_auth_type(FunctionUrlAuthType)/set_function_url_auth_type(Option<FunctionUrlAuthType>):
required: falseThe type of authentication that your function URL uses. Set to
AWS_IAMif you want to restrict access to authenticated users only. Set toNONEif you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs.
- On success, responds with
AddPermissionOutputwith field(s):statement(Option<String>):The permission statement that’s added to the function policy.
- On failure, responds with
SdkError<AddPermissionError>
Source§impl Client
impl Client
Sourcepub fn create_alias(&self) -> CreateAliasFluentBuilder
pub fn create_alias(&self) -> CreateAliasFluentBuilder
Constructs a fluent builder for the CreateAlias operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the alias.
function_version(impl Into<String>)/set_function_version(Option<String>):
required: trueThe function version that the alias invokes.
description(impl Into<String>)/set_description(Option<String>):
required: falseA description of the alias.
routing_config(AliasRoutingConfiguration)/set_routing_config(Option<AliasRoutingConfiguration>):
required: falseThe routing configuration of the alias.
- On success, responds with
CreateAliasOutputwith field(s):alias_arn(Option<String>):The Amazon Resource Name (ARN) of the alias.
name(Option<String>):The name of the alias.
function_version(Option<String>):The function version that the alias invokes.
description(Option<String>):A description of the alias.
routing_config(Option<AliasRoutingConfiguration>):The routing configuration of the alias.
revision_id(Option<String>):A unique identifier that changes when you update the alias.
- On failure, responds with
SdkError<CreateAliasError>
Source§impl Client
impl Client
Sourcepub fn create_code_signing_config(&self) -> CreateCodeSigningConfigFluentBuilder
pub fn create_code_signing_config(&self) -> CreateCodeSigningConfigFluentBuilder
Constructs a fluent builder for the CreateCodeSigningConfig operation.
- The fluent builder is configurable:
description(impl Into<String>)/set_description(Option<String>):
required: falseDescriptive name for this code signing configuration.
allowed_publishers(AllowedPublishers)/set_allowed_publishers(Option<AllowedPublishers>):
required: trueSigning profiles for this code signing configuration.
code_signing_policies(CodeSigningPolicies)/set_code_signing_policies(Option<CodeSigningPolicies>):
required: falseThe code signing policies define the actions to take if the validation checks fail.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA list of tags to add to the code signing configuration.
- On success, responds with
CreateCodeSigningConfigOutputwith field(s):code_signing_config(Option<CodeSigningConfig>):The code signing configuration.
- On failure, responds with
SdkError<CreateCodeSigningConfigError>
Source§impl Client
impl Client
Sourcepub fn create_event_source_mapping(
&self,
) -> CreateEventSourceMappingFluentBuilder
pub fn create_event_source_mapping( &self, ) -> CreateEventSourceMappingFluentBuilder
Constructs a fluent builder for the CreateEventSourceMapping operation.
- The fluent builder is configurable:
event_source_arn(impl Into<String>)/set_event_source_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of the event source.
-
Amazon Kinesis – The ARN of the data stream or a stream consumer.
-
Amazon DynamoDB Streams – The ARN of the stream.
-
Amazon Simple Queue Service – The ARN of the queue.
-
Amazon Managed Streaming for Apache Kafka – The ARN of the cluster or the ARN of the VPC connection (for cross-account event source mappings).
-
Amazon MQ – The ARN of the broker.
-
Amazon DocumentDB – The ARN of the DocumentDB change stream.
-
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
MyFunction. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:MyFunction. -
Version or Alias ARN –
arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. -
Partial ARN –
123456789012:function:MyFunction.
The length constraint applies only to the full ARN. If you specify only the function name, it’s limited to 64 characters in length.
-
enabled(bool)/set_enabled(Option<bool>):
required: falseWhen true, the event source mapping is active. When false, Lambda pauses polling and invocation.
Default: True
batch_size(i32)/set_batch_size(Option<i32>):
required: falseThe maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
-
Amazon Kinesis – Default 100. Max 10,000.
-
Amazon DynamoDB Streams – Default 100. Max 10,000.
-
Amazon Simple Queue Service – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
-
Amazon Managed Streaming for Apache Kafka – Default 100. Max 10,000.
-
Self-managed Apache Kafka – Default 100. Max 10,000.
-
Amazon MQ (ActiveMQ and RabbitMQ) – Default 100. Max 10,000.
-
DocumentDB – Default 100. Max 10,000.
-
filter_criteria(FilterCriteria)/set_filter_criteria(Option<FilterCriteria>):
required: falseAn object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.
maximum_batching_window_in_seconds(i32)/set_maximum_batching_window_in_seconds(Option<i32>):
required: falseThe maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure
MaximumBatchingWindowInSecondsto any value from 0 seconds to 300 seconds in increments of seconds.For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change
MaximumBatchingWindowInSecondsin increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.parallelization_factor(i32)/set_parallelization_factor(Option<i32>):
required: false(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.
starting_position(EventSourcePosition)/set_starting_position(Option<EventSourcePosition>):
required: falseThe position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources.
AT_TIMESTAMPis supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.starting_position_timestamp(DateTime)/set_starting_position_timestamp(Option<DateTime>):
required: falseWith
StartingPositionset toAT_TIMESTAMP, the time from which to start reading.StartingPositionTimestampcannot be in the future.destination_config(DestinationConfig)/set_destination_config(Option<DestinationConfig>):
required: false(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A configuration object that specifies the destination of an event after Lambda processes it.
maximum_record_age_in_seconds(i32)/set_maximum_record_age_in_seconds(Option<i32>):
required: false(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is infinite (-1).
bisect_batch_on_function_error(bool)/set_bisect_batch_on_function_error(Option<bool>):
required: false(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
maximum_retry_attempts(i32)/set_maximum_retry_attempts(Option<i32>):
required: false(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA list of tags to apply to the event source mapping.
tumbling_window_in_seconds(i32)/set_tumbling_window_in_seconds(Option<i32>):
required: false(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
topics(impl Into<String>)/set_topics(Option<Vec::<String>>):
required: falseThe name of the Kafka topic.
queues(impl Into<String>)/set_queues(Option<Vec::<String>>):
required: false(MQ) The name of the Amazon MQ broker destination queue to consume.
source_access_configurations(SourceAccessConfiguration)/set_source_access_configurations(Option<Vec::<SourceAccessConfiguration>>):
required: falseAn array of authentication protocols or VPC components required to secure your event source.
self_managed_event_source(SelfManagedEventSource)/set_self_managed_event_source(Option<SelfManagedEventSource>):
required: falseThe self-managed Apache Kafka cluster to receive records from.
function_response_types(FunctionResponseType)/set_function_response_types(Option<Vec::<FunctionResponseType>>):
required: false(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event source mapping.
amazon_managed_kafka_event_source_config(AmazonManagedKafkaEventSourceConfig)/set_amazon_managed_kafka_event_source_config(Option<AmazonManagedKafkaEventSourceConfig>):
required: falseSpecific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
self_managed_kafka_event_source_config(SelfManagedKafkaEventSourceConfig)/set_self_managed_kafka_event_source_config(Option<SelfManagedKafkaEventSourceConfig>):
required: falseSpecific configuration settings for a self-managed Apache Kafka event source.
scaling_config(ScalingConfig)/set_scaling_config(Option<ScalingConfig>):
required: false(Amazon SQS only) The scaling configuration for the event source. For more information, see Configuring maximum concurrency for Amazon SQS event sources.
document_db_event_source_config(DocumentDbEventSourceConfig)/set_document_db_event_source_config(Option<DocumentDbEventSourceConfig>):
required: falseSpecific configuration settings for a DocumentDB event source.
kms_key_arn(impl Into<String>)/set_kms_key_arn(Option<String>):
required: falseThe ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function’s filter criteria. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key.
metrics_config(EventSourceMappingMetricsConfig)/set_metrics_config(Option<EventSourceMappingMetricsConfig>):
required: falseThe metrics configuration for your event source. For more information, see Event source mapping metrics.
provisioned_poller_config(ProvisionedPollerConfig)/set_provisioned_poller_config(Option<ProvisionedPollerConfig>):
required: false(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source. For more information, see Provisioned Mode.
- On success, responds with
CreateEventSourceMappingOutputwith field(s):uuid(Option<String>):The identifier of the event source mapping.
starting_position(Option<EventSourcePosition>):The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources.
AT_TIMESTAMPis supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.starting_position_timestamp(Option<DateTime>):With
StartingPositionset toAT_TIMESTAMP, the time from which to start reading.StartingPositionTimestampcannot be in the future.batch_size(Option<i32>):The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.
Related setting: When you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.maximum_batching_window_in_seconds(Option<i32>):The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure
MaximumBatchingWindowInSecondsto any value from 0 seconds to 300 seconds in increments of seconds.For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change
MaximumBatchingWindowInSecondsin increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.Related setting: For streams and Amazon SQS event sources, when you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.parallelization_factor(Option<i32>):(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
event_source_arn(Option<String>):The Amazon Resource Name (ARN) of the event source.
filter_criteria(Option<FilterCriteria>):An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.
If filter criteria is encrypted, this field shows up as
nullin the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you havekms:Decryptpermissions for the correct KMS key.function_arn(Option<String>):The ARN of the Lambda function.
last_modified(Option<DateTime>):The date that the event source mapping was last updated or that its state changed.
last_processing_result(Option<String>):The result of the last Lambda invocation of your function.
state(Option<String>):The state of the event source mapping. It can be one of the following:
Creating,Enabling,Enabled,Disabling,Disabled,Updating, orDeleting.state_transition_reason(Option<String>):Indicates whether a user or Lambda made the last change to the event source mapping.
destination_config(Option<DestinationConfig>):(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
topics(Option<Vec::<String>>):The name of the Kafka topic.
queues(Option<Vec::<String>>):(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
source_access_configurations(Option<Vec::<SourceAccessConfiguration>>):An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
self_managed_event_source(Option<SelfManagedEventSource>):The self-managed Apache Kafka cluster for your event source.
maximum_record_age_in_seconds(Option<i32>):(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.
The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter’s absolute range, they are not allowed
bisect_batch_on_function_error(Option<bool>):(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
maximum_retry_attempts(Option<i32>):(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
tumbling_window_in_seconds(Option<i32>):(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
function_response_types(Option<Vec::<FunctionResponseType>>):(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event source mapping.
amazon_managed_kafka_event_source_config(Option<AmazonManagedKafkaEventSourceConfig>):Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
self_managed_kafka_event_source_config(Option<SelfManagedKafkaEventSourceConfig>):Specific configuration settings for a self-managed Apache Kafka event source.
scaling_config(Option<ScalingConfig>):(Amazon SQS only) The scaling configuration for the event source. For more information, see Configuring maximum concurrency for Amazon SQS event sources.
document_db_event_source_config(Option<DocumentDbEventSourceConfig>):Specific configuration settings for a DocumentDB event source.
kms_key_arn(Option<String>):The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function’s filter criteria.
filter_criteria_error(Option<FilterCriteriaError>):An object that contains details about an error related to filter criteria encryption.
event_source_mapping_arn(Option<String>):The Amazon Resource Name (ARN) of the event source mapping.
metrics_config(Option<EventSourceMappingMetricsConfig>):The metrics configuration for your event source. For more information, see Event source mapping metrics.
provisioned_poller_config(Option<ProvisionedPollerConfig>):(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source. For more information, see Provisioned Mode.
- On failure, responds with
SdkError<CreateEventSourceMappingError>
Source§impl Client
impl Client
Sourcepub fn create_function(&self) -> CreateFunctionFluentBuilder
pub fn create_function(&self) -> CreateFunctionFluentBuilder
Constructs a fluent builder for the CreateFunction operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
runtime(Runtime)/set_runtime(Option<Runtime>):
required: falseThe identifier of the function’s runtime. 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.
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 Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
role(impl Into<String>)/set_role(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the function’s execution role.
handler(impl Into<String>)/set_handler(Option<String>):
required: falseThe 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 Lambda programming model.
code(FunctionCode)/set_code(Option<FunctionCode>):
required: trueThe code for the function.
description(impl Into<String>)/set_description(Option<String>):
required: falseA description of the function.
timeout(i32)/set_timeout(Option<i32>):
required: falseThe 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 Lambda execution environment.
memory_size(i32)/set_memory_size(Option<i32>):
required: falseThe amount of memory available to the function 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.
publish(bool)/set_publish(Option<bool>):
required: falseSet to true to publish the first version of the function during creation.
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseFor 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 Configuring a Lambda function to access resources in a VPC.
package_type(PackageType)/set_package_type(Option<PackageType>):
required: falseThe type of deployment package. Set to
Imagefor container image and set toZipfor .zip file archive.dead_letter_config(DeadLetterConfig)/set_dead_letter_config(Option<DeadLetterConfig>):
required: falseA dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
environment(Environment)/set_environment(Option<Environment>):
required: falseEnvironment variables that are accessible from function code during execution.
kms_key_arn(impl Into<String>)/set_kms_key_arn(Option<String>):
required: falseThe ARN of the Key Management Service (KMS) customer managed key that’s used to encrypt the following resources:
-
The function’s environment variables.
-
The function’s Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn, the unzipped version of the .zip deployment package that’s used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
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 Function lifecycle.
If you don’t provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
-
tracing_config(TracingConfig)/set_tracing_config(Option<TracingConfig>):
required: falseSet
ModetoActiveto sample and trace a subset of incoming requests with X-Ray.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseA list of tags to apply to the function.
layers(impl Into<String>)/set_layers(Option<Vec::<String>>):
required: falseA list of function layers to add to the function’s execution environment. Specify each layer by its ARN, including the version.
file_system_configs(FileSystemConfig)/set_file_system_configs(Option<Vec::<FileSystemConfig>>):
required: falseConnection settings for an Amazon EFS file system.
image_config(ImageConfig)/set_image_config(Option<ImageConfig>):
required: falseContainer image configuration values that override the values in the container image Dockerfile.
code_signing_config_arn(impl Into<String>)/set_code_signing_config_arn(Option<String>):
required: falseTo 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.
architectures(Architecture)/set_architectures(Option<Vec::<Architecture>>):
required: falseThe 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
x86_64.ephemeral_storage(EphemeralStorage)/set_ephemeral_storage(Option<EphemeralStorage>):
required: falseThe size of the function’s
/tmpdirectory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).snap_start(SnapStart)/set_snap_start(Option<SnapStart>):
required: falseThe function’s SnapStart setting.
logging_config(LoggingConfig)/set_logging_config(Option<LoggingConfig>):
required: falseThe function’s Amazon CloudWatch Logs configuration settings.
- On success, responds with
CreateFunctionOutputwith field(s):function_name(Option<String>):The name of the function.
function_arn(Option<String>):The function’s Amazon Resource Name (ARN).
runtime(Option<Runtime>):The identifier of the function’s runtime. 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.
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 Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
role(Option<String>):The function’s execution role.
handler(Option<String>):The function that Lambda calls to begin running your function.
code_size(i64):The size of the function’s deployment package, in bytes.
description(Option<String>):The function’s description.
timeout(Option<i32>):The amount of time in seconds that Lambda allows a function to run before stopping it.
memory_size(Option<i32>):The amount of memory available to the function at runtime.
last_modified(Option<String>):The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
code_sha256(Option<String>):The SHA256 hash of the function’s deployment package.
version(Option<String>):The version of the Lambda function.
vpc_config(Option<VpcConfigResponse>):The function’s networking configuration.
dead_letter_config(Option<DeadLetterConfig>):The function’s dead letter queue.
environment(Option<EnvironmentResponse>):The function’s environment variables. Omitted from CloudTrail logs.
kms_key_arn(Option<String>):The ARN of the Key Management Service (KMS) customer managed key that’s used to encrypt the following resources:
-
The function’s environment variables.
-
The function’s Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn, the unzipped version of the .zip deployment package that’s used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
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 Function lifecycle.
If you don’t provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
-
tracing_config(Option<TracingConfigResponse>):The function’s X-Ray tracing configuration.
master_arn(Option<String>):For Lambda@Edge functions, the ARN of the main function.
revision_id(Option<String>):The latest updated revision of the function or alias.
layers(Option<Vec::<Layer>>):The function’s layers.
state(Option<State>):The current state of the function. When the state is
Inactive, you can reactivate the function by invoking it.state_reason(Option<String>):The reason for the function’s current state.
state_reason_code(Option<StateReasonCode>):The reason code for the function’s current state. When the code is
Creating, you can’t invoke or modify the function.last_update_status(Option<LastUpdateStatus>):The status of the last update that was performed on the function. This is first set to
Successfulafter function creation completes.last_update_status_reason(Option<String>):The reason for the last update that was performed on the function.
last_update_status_reason_code(Option<LastUpdateStatusReasonCode>):The reason code for the last update that was performed on the function.
file_system_configs(Option<Vec::<FileSystemConfig>>):Connection settings for an Amazon EFS file system.
package_type(Option<PackageType>):The type of deployment package. Set to
Imagefor container image and setZipfor .zip file archive.image_config_response(Option<ImageConfigResponse>):The function’s image configuration values.
signing_profile_version_arn(Option<String>):The ARN of the signing profile version.
signing_job_arn(Option<String>):The ARN of the signing job.
architectures(Option<Vec::<Architecture>>):The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is
x86_64.ephemeral_storage(Option<EphemeralStorage>):The size of the function’s
/tmpdirectory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).snap_start(Option<SnapStartResponse>):Set
ApplyOntoPublishedVersionsto create a snapshot of the initialized execution environment when you publish a function version. For more information, see Improving startup performance with Lambda SnapStart.runtime_version_config(Option<RuntimeVersionConfig>):The ARN of the runtime and any errors that occured.
logging_config(Option<LoggingConfig>):The function’s Amazon CloudWatch Logs configuration settings.
- On failure, responds with
SdkError<CreateFunctionError>
Source§impl Client
impl Client
Sourcepub fn create_function_url_config(&self) -> CreateFunctionUrlConfigFluentBuilder
pub fn create_function_url_config(&self) -> CreateFunctionUrlConfigFluentBuilder
Constructs a fluent builder for the CreateFunctionUrlConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseThe alias name.
auth_type(FunctionUrlAuthType)/set_auth_type(Option<FunctionUrlAuthType>):
required: trueThe type of authentication that your function URL uses. Set to
AWS_IAMif you want to restrict access to authenticated users only. Set toNONEif you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs.cors(Cors)/set_cors(Option<Cors>):
required: falseThe cross-origin resource sharing (CORS) settings for your function URL.
invoke_mode(InvokeMode)/set_invoke_mode(Option<InvokeMode>):
required: falseUse one of the following options:
-
BUFFERED– This is the default option. Lambda invokes your function using theInvokeAPI operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB. -
RESPONSE_STREAM– Your function streams payload results as they become available. Lambda invokes your function using theInvokeWithResponseStreamAPI operation. The maximum response payload size is 20 MB, however, you can request a quota increase.
-
- On success, responds with
CreateFunctionUrlConfigOutputwith field(s):function_url(String):The HTTP URL endpoint for your function.
function_arn(String):The Amazon Resource Name (ARN) of your function.
auth_type(FunctionUrlAuthType):The type of authentication that your function URL uses. Set to
AWS_IAMif you want to restrict access to authenticated users only. Set toNONEif you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs.cors(Option<Cors>):The cross-origin resource sharing (CORS) settings for your function URL.
creation_time(String):When the function URL was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
invoke_mode(Option<InvokeMode>):Use one of the following options:
-
BUFFERED– This is the default option. Lambda invokes your function using theInvokeAPI operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB. -
RESPONSE_STREAM– Your function streams payload results as they become available. Lambda invokes your function using theInvokeWithResponseStreamAPI operation. The maximum response payload size is 20 MB, however, you can request a quota increase.
-
- On failure, responds with
SdkError<CreateFunctionUrlConfigError>
Source§impl Client
impl Client
Sourcepub fn delete_alias(&self) -> DeleteAliasFluentBuilder
pub fn delete_alias(&self) -> DeleteAliasFluentBuilder
Constructs a fluent builder for the DeleteAlias operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the alias.
- On success, responds with
DeleteAliasOutput - On failure, responds with
SdkError<DeleteAliasError>
Source§impl Client
impl Client
Sourcepub fn delete_code_signing_config(&self) -> DeleteCodeSigningConfigFluentBuilder
pub fn delete_code_signing_config(&self) -> DeleteCodeSigningConfigFluentBuilder
Constructs a fluent builder for the DeleteCodeSigningConfig operation.
- The fluent builder is configurable:
code_signing_config_arn(impl Into<String>)/set_code_signing_config_arn(Option<String>):
required: trueThe The Amazon Resource Name (ARN) of the code signing configuration.
- On success, responds with
DeleteCodeSigningConfigOutput - On failure, responds with
SdkError<DeleteCodeSigningConfigError>
Source§impl Client
impl Client
Sourcepub fn delete_event_source_mapping(
&self,
) -> DeleteEventSourceMappingFluentBuilder
pub fn delete_event_source_mapping( &self, ) -> DeleteEventSourceMappingFluentBuilder
Constructs a fluent builder for the DeleteEventSourceMapping operation.
- The fluent builder is configurable:
uuid(impl Into<String>)/set_uuid(Option<String>):
required: trueThe identifier of the event source mapping.
- On success, responds with
DeleteEventSourceMappingOutputwith field(s):uuid(Option<String>):The identifier of the event source mapping.
starting_position(Option<EventSourcePosition>):The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources.
AT_TIMESTAMPis supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.starting_position_timestamp(Option<DateTime>):With
StartingPositionset toAT_TIMESTAMP, the time from which to start reading.StartingPositionTimestampcannot be in the future.batch_size(Option<i32>):The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.
Related setting: When you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.maximum_batching_window_in_seconds(Option<i32>):The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure
MaximumBatchingWindowInSecondsto any value from 0 seconds to 300 seconds in increments of seconds.For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change
MaximumBatchingWindowInSecondsin increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.Related setting: For streams and Amazon SQS event sources, when you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.parallelization_factor(Option<i32>):(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
event_source_arn(Option<String>):The Amazon Resource Name (ARN) of the event source.
filter_criteria(Option<FilterCriteria>):An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.
If filter criteria is encrypted, this field shows up as
nullin the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you havekms:Decryptpermissions for the correct KMS key.function_arn(Option<String>):The ARN of the Lambda function.
last_modified(Option<DateTime>):The date that the event source mapping was last updated or that its state changed.
last_processing_result(Option<String>):The result of the last Lambda invocation of your function.
state(Option<String>):The state of the event source mapping. It can be one of the following:
Creating,Enabling,Enabled,Disabling,Disabled,Updating, orDeleting.state_transition_reason(Option<String>):Indicates whether a user or Lambda made the last change to the event source mapping.
destination_config(Option<DestinationConfig>):(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
topics(Option<Vec::<String>>):The name of the Kafka topic.
queues(Option<Vec::<String>>):(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
source_access_configurations(Option<Vec::<SourceAccessConfiguration>>):An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
self_managed_event_source(Option<SelfManagedEventSource>):The self-managed Apache Kafka cluster for your event source.
maximum_record_age_in_seconds(Option<i32>):(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.
The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter’s absolute range, they are not allowed
bisect_batch_on_function_error(Option<bool>):(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
maximum_retry_attempts(Option<i32>):(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
tumbling_window_in_seconds(Option<i32>):(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
function_response_types(Option<Vec::<FunctionResponseType>>):(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event source mapping.
amazon_managed_kafka_event_source_config(Option<AmazonManagedKafkaEventSourceConfig>):Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
self_managed_kafka_event_source_config(Option<SelfManagedKafkaEventSourceConfig>):Specific configuration settings for a self-managed Apache Kafka event source.
scaling_config(Option<ScalingConfig>):(Amazon SQS only) The scaling configuration for the event source. For more information, see Configuring maximum concurrency for Amazon SQS event sources.
document_db_event_source_config(Option<DocumentDbEventSourceConfig>):Specific configuration settings for a DocumentDB event source.
kms_key_arn(Option<String>):The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function’s filter criteria.
filter_criteria_error(Option<FilterCriteriaError>):An object that contains details about an error related to filter criteria encryption.
event_source_mapping_arn(Option<String>):The Amazon Resource Name (ARN) of the event source mapping.
metrics_config(Option<EventSourceMappingMetricsConfig>):The metrics configuration for your event source. For more information, see Event source mapping metrics.
provisioned_poller_config(Option<ProvisionedPollerConfig>):(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source. For more information, see Provisioned Mode.
- On failure, responds with
SdkError<DeleteEventSourceMappingError>
Source§impl Client
impl Client
Sourcepub fn delete_function(&self) -> DeleteFunctionFluentBuilder
pub fn delete_function(&self) -> DeleteFunctionFluentBuilder
Constructs a fluent builder for the DeleteFunction operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function or version.
Name formats
-
Function name –
my-function(name-only),my-function:1(with version). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseSpecify a version to delete. You can’t delete a version that an alias references.
- On success, responds with
DeleteFunctionOutput - On failure, responds with
SdkError<DeleteFunctionError>
Source§impl Client
impl Client
Sourcepub fn delete_function_code_signing_config(
&self,
) -> DeleteFunctionCodeSigningConfigFluentBuilder
pub fn delete_function_code_signing_config( &self, ) -> DeleteFunctionCodeSigningConfigFluentBuilder
Constructs a fluent builder for the DeleteFunctionCodeSigningConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
- On success, responds with
DeleteFunctionCodeSigningConfigOutput - On failure, responds with
SdkError<DeleteFunctionCodeSigningConfigError>
Source§impl Client
impl Client
Sourcepub fn delete_function_concurrency(
&self,
) -> DeleteFunctionConcurrencyFluentBuilder
pub fn delete_function_concurrency( &self, ) -> DeleteFunctionConcurrencyFluentBuilder
Constructs a fluent builder for the DeleteFunctionConcurrency operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
- On success, responds with
DeleteFunctionConcurrencyOutput - On failure, responds with
SdkError<DeleteFunctionConcurrencyError>
Source§impl Client
impl Client
Sourcepub fn delete_function_event_invoke_config(
&self,
) -> DeleteFunctionEventInvokeConfigFluentBuilder
pub fn delete_function_event_invoke_config( &self, ) -> DeleteFunctionEventInvokeConfigFluentBuilder
Constructs a fluent builder for the DeleteFunctionEventInvokeConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name -
my-function(name-only),my-function:v1(with alias). -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN -
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseA version number or alias name.
- On success, responds with
DeleteFunctionEventInvokeConfigOutput - On failure, responds with
SdkError<DeleteFunctionEventInvokeConfigError>
Source§impl Client
impl Client
Sourcepub fn delete_function_url_config(&self) -> DeleteFunctionUrlConfigFluentBuilder
pub fn delete_function_url_config(&self) -> DeleteFunctionUrlConfigFluentBuilder
Constructs a fluent builder for the DeleteFunctionUrlConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseThe alias name.
- On success, responds with
DeleteFunctionUrlConfigOutput - On failure, responds with
SdkError<DeleteFunctionUrlConfigError>
Source§impl Client
impl Client
Sourcepub fn delete_layer_version(&self) -> DeleteLayerVersionFluentBuilder
pub fn delete_layer_version(&self) -> DeleteLayerVersionFluentBuilder
Constructs a fluent builder for the DeleteLayerVersion operation.
- The fluent builder is configurable:
layer_name(impl Into<String>)/set_layer_name(Option<String>):
required: trueThe name or Amazon Resource Name (ARN) of the layer.
version_number(i64)/set_version_number(Option<i64>):
required: trueThe version number.
- On success, responds with
DeleteLayerVersionOutput - On failure, responds with
SdkError<DeleteLayerVersionError>
Source§impl Client
impl Client
Sourcepub fn delete_provisioned_concurrency_config(
&self,
) -> DeleteProvisionedConcurrencyConfigFluentBuilder
pub fn delete_provisioned_concurrency_config( &self, ) -> DeleteProvisionedConcurrencyConfigFluentBuilder
Constructs a fluent builder for the DeleteProvisionedConcurrencyConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: trueThe version number or alias name.
- On success, responds with
DeleteProvisionedConcurrencyConfigOutput - On failure, responds with
SdkError<DeleteProvisionedConcurrencyConfigError>
Source§impl Client
impl Client
Sourcepub fn get_account_settings(&self) -> GetAccountSettingsFluentBuilder
pub fn get_account_settings(&self) -> GetAccountSettingsFluentBuilder
Constructs a fluent builder for the GetAccountSettings operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetAccountSettingsOutputwith field(s):account_limit(Option<AccountLimit>):Limits that are related to concurrency and code storage.
account_usage(Option<AccountUsage>):The number of functions and amount of storage in use.
- On failure, responds with
SdkError<GetAccountSettingsError>
Source§impl Client
impl Client
Sourcepub fn get_alias(&self) -> GetAliasFluentBuilder
pub fn get_alias(&self) -> GetAliasFluentBuilder
Constructs a fluent builder for the GetAlias operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the alias.
- On success, responds with
GetAliasOutputwith field(s):alias_arn(Option<String>):The Amazon Resource Name (ARN) of the alias.
name(Option<String>):The name of the alias.
function_version(Option<String>):The function version that the alias invokes.
description(Option<String>):A description of the alias.
routing_config(Option<AliasRoutingConfiguration>):The routing configuration of the alias.
revision_id(Option<String>):A unique identifier that changes when you update the alias.
- On failure, responds with
SdkError<GetAliasError>
Source§impl Client
impl Client
Sourcepub fn get_code_signing_config(&self) -> GetCodeSigningConfigFluentBuilder
pub fn get_code_signing_config(&self) -> GetCodeSigningConfigFluentBuilder
Constructs a fluent builder for the GetCodeSigningConfig operation.
- The fluent builder is configurable:
code_signing_config_arn(impl Into<String>)/set_code_signing_config_arn(Option<String>):
required: trueThe The Amazon Resource Name (ARN) of the code signing configuration.
- On success, responds with
GetCodeSigningConfigOutputwith field(s):code_signing_config(Option<CodeSigningConfig>):The code signing configuration
- On failure, responds with
SdkError<GetCodeSigningConfigError>
Source§impl Client
impl Client
Sourcepub fn get_event_source_mapping(&self) -> GetEventSourceMappingFluentBuilder
pub fn get_event_source_mapping(&self) -> GetEventSourceMappingFluentBuilder
Constructs a fluent builder for the GetEventSourceMapping operation.
- The fluent builder is configurable:
uuid(impl Into<String>)/set_uuid(Option<String>):
required: trueThe identifier of the event source mapping.
- On success, responds with
GetEventSourceMappingOutputwith field(s):uuid(Option<String>):The identifier of the event source mapping.
starting_position(Option<EventSourcePosition>):The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources.
AT_TIMESTAMPis supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.starting_position_timestamp(Option<DateTime>):With
StartingPositionset toAT_TIMESTAMP, the time from which to start reading.StartingPositionTimestampcannot be in the future.batch_size(Option<i32>):The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.
Related setting: When you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.maximum_batching_window_in_seconds(Option<i32>):The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure
MaximumBatchingWindowInSecondsto any value from 0 seconds to 300 seconds in increments of seconds.For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change
MaximumBatchingWindowInSecondsin increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.Related setting: For streams and Amazon SQS event sources, when you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.parallelization_factor(Option<i32>):(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
event_source_arn(Option<String>):The Amazon Resource Name (ARN) of the event source.
filter_criteria(Option<FilterCriteria>):An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.
If filter criteria is encrypted, this field shows up as
nullin the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you havekms:Decryptpermissions for the correct KMS key.function_arn(Option<String>):The ARN of the Lambda function.
last_modified(Option<DateTime>):The date that the event source mapping was last updated or that its state changed.
last_processing_result(Option<String>):The result of the last Lambda invocation of your function.
state(Option<String>):The state of the event source mapping. It can be one of the following:
Creating,Enabling,Enabled,Disabling,Disabled,Updating, orDeleting.state_transition_reason(Option<String>):Indicates whether a user or Lambda made the last change to the event source mapping.
destination_config(Option<DestinationConfig>):(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
topics(Option<Vec::<String>>):The name of the Kafka topic.
queues(Option<Vec::<String>>):(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
source_access_configurations(Option<Vec::<SourceAccessConfiguration>>):An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
self_managed_event_source(Option<SelfManagedEventSource>):The self-managed Apache Kafka cluster for your event source.
maximum_record_age_in_seconds(Option<i32>):(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.
The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter’s absolute range, they are not allowed
bisect_batch_on_function_error(Option<bool>):(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
maximum_retry_attempts(Option<i32>):(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
tumbling_window_in_seconds(Option<i32>):(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
function_response_types(Option<Vec::<FunctionResponseType>>):(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event source mapping.
amazon_managed_kafka_event_source_config(Option<AmazonManagedKafkaEventSourceConfig>):Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
self_managed_kafka_event_source_config(Option<SelfManagedKafkaEventSourceConfig>):Specific configuration settings for a self-managed Apache Kafka event source.
scaling_config(Option<ScalingConfig>):(Amazon SQS only) The scaling configuration for the event source. For more information, see Configuring maximum concurrency for Amazon SQS event sources.
document_db_event_source_config(Option<DocumentDbEventSourceConfig>):Specific configuration settings for a DocumentDB event source.
kms_key_arn(Option<String>):The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function’s filter criteria.
filter_criteria_error(Option<FilterCriteriaError>):An object that contains details about an error related to filter criteria encryption.
event_source_mapping_arn(Option<String>):The Amazon Resource Name (ARN) of the event source mapping.
metrics_config(Option<EventSourceMappingMetricsConfig>):The metrics configuration for your event source. For more information, see Event source mapping metrics.
provisioned_poller_config(Option<ProvisionedPollerConfig>):(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source. For more information, see Provisioned Mode.
- On failure, responds with
SdkError<GetEventSourceMappingError>
Source§impl Client
impl Client
Sourcepub fn get_function(&self) -> GetFunctionFluentBuilder
pub fn get_function(&self) -> GetFunctionFluentBuilder
Constructs a fluent builder for the GetFunction operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name –
my-function(name-only),my-function:v1(with alias). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseSpecify a version or alias to get details about a published version of the function.
- On success, responds with
GetFunctionOutputwith field(s):configuration(Option<FunctionConfiguration>):The configuration of the function or version.
code(Option<FunctionCodeLocation>):The deployment package of the function or version.
tags(Option<HashMap::<String, String>>):The function’s tags. Lambda returns tag data only if you have explicit allow permissions for lambda:ListTags.
tags_error(Option<TagsError>):An object that contains details about an error related to retrieving tags.
concurrency(Option<Concurrency>):The function’s reserved concurrency.
- On failure, responds with
SdkError<GetFunctionError>
Source§impl Client
impl Client
Sourcepub fn get_function_code_signing_config(
&self,
) -> GetFunctionCodeSigningConfigFluentBuilder
pub fn get_function_code_signing_config( &self, ) -> GetFunctionCodeSigningConfigFluentBuilder
Constructs a fluent builder for the GetFunctionCodeSigningConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
- On success, responds with
GetFunctionCodeSigningConfigOutputwith field(s):code_signing_config_arn(String):The The Amazon Resource Name (ARN) of the code signing configuration.
function_name(String):The name or ARN 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.
-
- On failure, responds with
SdkError<GetFunctionCodeSigningConfigError>
Source§impl Client
impl Client
Sourcepub fn get_function_concurrency(&self) -> GetFunctionConcurrencyFluentBuilder
pub fn get_function_concurrency(&self) -> GetFunctionConcurrencyFluentBuilder
Constructs a fluent builder for the GetFunctionConcurrency operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
- On success, responds with
GetFunctionConcurrencyOutputwith field(s):reserved_concurrent_executions(Option<i32>):The number of simultaneous executions that are reserved for the function.
- On failure, responds with
SdkError<GetFunctionConcurrencyError>
Source§impl Client
impl Client
Sourcepub fn get_function_configuration(
&self,
) -> GetFunctionConfigurationFluentBuilder
pub fn get_function_configuration( &self, ) -> GetFunctionConfigurationFluentBuilder
Constructs a fluent builder for the GetFunctionConfiguration operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name –
my-function(name-only),my-function:v1(with alias). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseSpecify a version or alias to get details about a published version of the function.
- On success, responds with
GetFunctionConfigurationOutputwith field(s):function_name(Option<String>):The name of the function.
function_arn(Option<String>):The function’s Amazon Resource Name (ARN).
runtime(Option<Runtime>):The identifier of the function’s runtime. 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.
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 Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
role(Option<String>):The function’s execution role.
handler(Option<String>):The function that Lambda calls to begin running your function.
code_size(i64):The size of the function’s deployment package, in bytes.
description(Option<String>):The function’s description.
timeout(Option<i32>):The amount of time in seconds that Lambda allows a function to run before stopping it.
memory_size(Option<i32>):The amount of memory available to the function at runtime.
last_modified(Option<String>):The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
code_sha256(Option<String>):The SHA256 hash of the function’s deployment package.
version(Option<String>):The version of the Lambda function.
vpc_config(Option<VpcConfigResponse>):The function’s networking configuration.
dead_letter_config(Option<DeadLetterConfig>):The function’s dead letter queue.
environment(Option<EnvironmentResponse>):The function’s environment variables. Omitted from CloudTrail logs.
kms_key_arn(Option<String>):The ARN of the Key Management Service (KMS) customer managed key that’s used to encrypt the following resources:
-
The function’s environment variables.
-
The function’s Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn, the unzipped version of the .zip deployment package that’s used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
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 Function lifecycle.
If you don’t provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
-
tracing_config(Option<TracingConfigResponse>):The function’s X-Ray tracing configuration.
master_arn(Option<String>):For Lambda@Edge functions, the ARN of the main function.
revision_id(Option<String>):The latest updated revision of the function or alias.
layers(Option<Vec::<Layer>>):The function’s layers.
state(Option<State>):The current state of the function. When the state is
Inactive, you can reactivate the function by invoking it.state_reason(Option<String>):The reason for the function’s current state.
state_reason_code(Option<StateReasonCode>):The reason code for the function’s current state. When the code is
Creating, you can’t invoke or modify the function.last_update_status(Option<LastUpdateStatus>):The status of the last update that was performed on the function. This is first set to
Successfulafter function creation completes.last_update_status_reason(Option<String>):The reason for the last update that was performed on the function.
last_update_status_reason_code(Option<LastUpdateStatusReasonCode>):The reason code for the last update that was performed on the function.
file_system_configs(Option<Vec::<FileSystemConfig>>):Connection settings for an Amazon EFS file system.
package_type(Option<PackageType>):The type of deployment package. Set to
Imagefor container image and setZipfor .zip file archive.image_config_response(Option<ImageConfigResponse>):The function’s image configuration values.
signing_profile_version_arn(Option<String>):The ARN of the signing profile version.
signing_job_arn(Option<String>):The ARN of the signing job.
architectures(Option<Vec::<Architecture>>):The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is
x86_64.ephemeral_storage(Option<EphemeralStorage>):The size of the function’s
/tmpdirectory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).snap_start(Option<SnapStartResponse>):Set
ApplyOntoPublishedVersionsto create a snapshot of the initialized execution environment when you publish a function version. For more information, see Improving startup performance with Lambda SnapStart.runtime_version_config(Option<RuntimeVersionConfig>):The ARN of the runtime and any errors that occured.
logging_config(Option<LoggingConfig>):The function’s Amazon CloudWatch Logs configuration settings.
- On failure, responds with
SdkError<GetFunctionConfigurationError>
Source§impl Client
impl Client
Sourcepub fn get_function_event_invoke_config(
&self,
) -> GetFunctionEventInvokeConfigFluentBuilder
pub fn get_function_event_invoke_config( &self, ) -> GetFunctionEventInvokeConfigFluentBuilder
Constructs a fluent builder for the GetFunctionEventInvokeConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name -
my-function(name-only),my-function:v1(with alias). -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN -
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseA version number or alias name.
- On success, responds with
GetFunctionEventInvokeConfigOutputwith field(s):last_modified(Option<DateTime>):The date and time that the configuration was last updated.
function_arn(Option<String>):The Amazon Resource Name (ARN) of the function.
maximum_retry_attempts(Option<i32>):The maximum number of times to retry when the function returns an error.
maximum_event_age_in_seconds(Option<i32>):The maximum age of a request that Lambda sends to a function for processing.
destination_config(Option<DestinationConfig>):A destination for events after they have been sent to a function for processing.
Destinations
-
Function - The Amazon Resource Name (ARN) of a Lambda function.
-
Queue - The ARN of a standard SQS queue.
-
Bucket - The ARN of an Amazon S3 bucket.
-
Topic - The ARN of a standard SNS topic.
-
Event Bus - The ARN of an Amazon EventBridge event bus.
S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type.
-
- On failure, responds with
SdkError<GetFunctionEventInvokeConfigError>
Source§impl Client
impl Client
Sourcepub fn get_function_recursion_config(
&self,
) -> GetFunctionRecursionConfigFluentBuilder
pub fn get_function_recursion_config( &self, ) -> GetFunctionRecursionConfigFluentBuilder
Constructs a fluent builder for the GetFunctionRecursionConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: true
- On success, responds with
GetFunctionRecursionConfigOutputwith field(s):recursive_loop(Option<RecursiveLoop>):If your function’s recursive loop detection configuration is
Allow, Lambda doesn’t take any action when it detects your function being invoked as part of a recursive loop.If your function’s recursive loop detection configuration is
Terminate, Lambda stops your function being invoked and notifies you when it detects your function being invoked as part of a recursive loop.By default, Lambda sets your function’s configuration to
Terminate. You can update this configuration using thePutFunctionRecursionConfigaction.
- On failure, responds with
SdkError<GetFunctionRecursionConfigError>
Source§impl Client
impl Client
Sourcepub fn get_function_url_config(&self) -> GetFunctionUrlConfigFluentBuilder
pub fn get_function_url_config(&self) -> GetFunctionUrlConfigFluentBuilder
Constructs a fluent builder for the GetFunctionUrlConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseThe alias name.
- On success, responds with
GetFunctionUrlConfigOutputwith field(s):function_url(String):The HTTP URL endpoint for your function.
function_arn(String):The Amazon Resource Name (ARN) of your function.
auth_type(FunctionUrlAuthType):The type of authentication that your function URL uses. Set to
AWS_IAMif you want to restrict access to authenticated users only. Set toNONEif you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs.cors(Option<Cors>):The cross-origin resource sharing (CORS) settings for your function URL.
creation_time(String):When the function URL was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
last_modified_time(String):When the function URL configuration was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
invoke_mode(Option<InvokeMode>):Use one of the following options:
-
BUFFERED– This is the default option. Lambda invokes your function using theInvokeAPI operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB. -
RESPONSE_STREAM– Your function streams payload results as they become available. Lambda invokes your function using theInvokeWithResponseStreamAPI operation. The maximum response payload size is 20 MB, however, you can request a quota increase.
-
- On failure, responds with
SdkError<GetFunctionUrlConfigError>
Source§impl Client
impl Client
Sourcepub fn get_layer_version(&self) -> GetLayerVersionFluentBuilder
pub fn get_layer_version(&self) -> GetLayerVersionFluentBuilder
Constructs a fluent builder for the GetLayerVersion operation.
- The fluent builder is configurable:
layer_name(impl Into<String>)/set_layer_name(Option<String>):
required: trueThe name or Amazon Resource Name (ARN) of the layer.
version_number(i64)/set_version_number(Option<i64>):
required: trueThe version number.
- On success, responds with
GetLayerVersionOutputwith field(s):content(Option<LayerVersionContentOutput>):Details about the layer version.
layer_arn(Option<String>):The ARN of the layer.
layer_version_arn(Option<String>):The ARN of the layer version.
description(Option<String>):The description of the version.
created_date(Option<String>):The date that the layer version was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
version(i64):The version number.
compatible_runtimes(Option<Vec::<Runtime>>):The layer’s compatible runtimes.
The following list includes deprecated runtimes. For more information, see Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
license_info(Option<String>):The layer’s software license.
compatible_architectures(Option<Vec::<Architecture>>):A list of compatible instruction set architectures.
- On failure, responds with
SdkError<GetLayerVersionError>
Source§impl Client
impl Client
Sourcepub fn get_layer_version_by_arn(&self) -> GetLayerVersionByArnFluentBuilder
pub fn get_layer_version_by_arn(&self) -> GetLayerVersionByArnFluentBuilder
Constructs a fluent builder for the GetLayerVersionByArn operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: trueThe ARN of the layer version.
- On success, responds with
GetLayerVersionByArnOutputwith field(s):content(Option<LayerVersionContentOutput>):Details about the layer version.
layer_arn(Option<String>):The ARN of the layer.
layer_version_arn(Option<String>):The ARN of the layer version.
description(Option<String>):The description of the version.
created_date(Option<String>):The date that the layer version was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
version(i64):The version number.
compatible_runtimes(Option<Vec::<Runtime>>):The layer’s compatible runtimes.
The following list includes deprecated runtimes. For more information, see Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
license_info(Option<String>):The layer’s software license.
compatible_architectures(Option<Vec::<Architecture>>):A list of compatible instruction set architectures.
- On failure, responds with
SdkError<GetLayerVersionByArnError>
Source§impl Client
impl Client
Sourcepub fn get_layer_version_policy(&self) -> GetLayerVersionPolicyFluentBuilder
pub fn get_layer_version_policy(&self) -> GetLayerVersionPolicyFluentBuilder
Constructs a fluent builder for the GetLayerVersionPolicy operation.
- The fluent builder is configurable:
layer_name(impl Into<String>)/set_layer_name(Option<String>):
required: trueThe name or Amazon Resource Name (ARN) of the layer.
version_number(i64)/set_version_number(Option<i64>):
required: trueThe version number.
- On success, responds with
GetLayerVersionPolicyOutputwith field(s):policy(Option<String>):The policy document.
revision_id(Option<String>):A unique identifier for the current revision of the policy.
- On failure, responds with
SdkError<GetLayerVersionPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_policy(&self) -> GetPolicyFluentBuilder
pub fn get_policy(&self) -> GetPolicyFluentBuilder
Constructs a fluent builder for the GetPolicy operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name –
my-function(name-only),my-function:v1(with alias). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseSpecify a version or alias to get the policy for that resource.
- On success, responds with
GetPolicyOutputwith field(s):policy(Option<String>):The resource-based policy.
revision_id(Option<String>):A unique identifier for the current revision of the policy.
- On failure, responds with
SdkError<GetPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_provisioned_concurrency_config(
&self,
) -> GetProvisionedConcurrencyConfigFluentBuilder
pub fn get_provisioned_concurrency_config( &self, ) -> GetProvisionedConcurrencyConfigFluentBuilder
Constructs a fluent builder for the GetProvisionedConcurrencyConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: trueThe version number or alias name.
- On success, responds with
GetProvisionedConcurrencyConfigOutputwith field(s):requested_provisioned_concurrent_executions(Option<i32>):The amount of provisioned concurrency requested.
available_provisioned_concurrent_executions(Option<i32>):The amount of provisioned concurrency available.
allocated_provisioned_concurrent_executions(Option<i32>):The amount of provisioned concurrency allocated. When a weighted alias is used during linear and canary deployments, this value fluctuates depending on the amount of concurrency that is provisioned for the function versions.
status(Option<ProvisionedConcurrencyStatusEnum>):The status of the allocation process.
status_reason(Option<String>):For failed allocations, the reason that provisioned concurrency could not be allocated.
last_modified(Option<String>):The date and time that a user last updated the configuration, in ISO 8601 format.
- On failure, responds with
SdkError<GetProvisionedConcurrencyConfigError>
Source§impl Client
impl Client
Sourcepub fn get_runtime_management_config(
&self,
) -> GetRuntimeManagementConfigFluentBuilder
pub fn get_runtime_management_config( &self, ) -> GetRuntimeManagementConfigFluentBuilder
Constructs a fluent builder for the GetRuntimeManagementConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseSpecify a version of the function. This can be
$LATESTor a published version number. If no value is specified, the configuration for the$LATESTversion is returned.
- On success, responds with
GetRuntimeManagementConfigOutputwith field(s):update_runtime_on(Option<UpdateRuntimeOn>):The current runtime update mode of the function.
runtime_version_arn(Option<String>):The ARN of the runtime the function is configured to use. If the runtime update mode is Manual, the ARN is returned, otherwise
nullis returned.function_arn(Option<String>):The Amazon Resource Name (ARN) of your function.
- On failure, responds with
SdkError<GetRuntimeManagementConfigError>
Source§impl Client
impl Client
Sourcepub fn invoke(&self) -> InvokeFluentBuilder
pub fn invoke(&self) -> InvokeFluentBuilder
Constructs a fluent builder for the Invoke operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name –
my-function(name-only),my-function:v1(with alias). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
invocation_type(InvocationType)/set_invocation_type(Option<InvocationType>):
required: falseChoose from the following options.
-
RequestResponse(default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data. -
Event– Invoke the function asynchronously. Send events that fail multiple times to the function’s dead-letter queue (if one is configured). The API response only includes a status code. -
DryRun– Validate parameter values and verify that the user or role has permission to invoke the function.
-
log_type(LogType)/set_log_type(Option<LogType>):
required: falseSet to
Tailto include the execution log in the response. Applies to synchronously invoked functions only.client_context(impl Into<String>)/set_client_context(Option<String>):
required: falseUp to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object. Lambda passes the
ClientContextobject to your function for synchronous invocations only.payload(Blob)/set_payload(Option<Blob>):
required: falseThe JSON that you want to provide to your Lambda function as input.
You can enter the JSON directly. For example,
–payload ‘{ “key”: “value” }’. You can also specify a file path. For example,–payload file://payload.json.qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseSpecify a version or alias to invoke a published version of the function.
- On success, responds with
InvokeOutputwith field(s):status_code(i32):The HTTP status code is in the 200 range for a successful request. For the
RequestResponseinvocation type, this status code is 200. For theEventinvocation type, this status code is 202. For theDryRuninvocation type, the status code is 204.function_error(Option<String>):If present, indicates that an error occurred during function execution. Details about the error are included in the response payload.
log_result(Option<String>):The last 4 KB of the execution log, which is base64-encoded.
payload(Option<Blob>):The response from the function, or an error object.
executed_version(Option<String>):The version of the function that executed. When you invoke a function with an alias, this indicates which version the alias resolved to.
- On failure, responds with
SdkError<InvokeError>
Source§impl Client
impl Client
Sourcepub fn invoke_async(&self) -> InvokeAsyncFluentBuilder
👎Deprecated
pub fn invoke_async(&self) -> InvokeAsyncFluentBuilder
Constructs a fluent builder for the InvokeAsync operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
invoke_args(ByteStream)/set_invoke_args(ByteStream):
required: trueThe JSON that you want to provide to your Lambda function as input.
- On success, responds with
InvokeAsyncOutputwith field(s):status(i32):The status code.
- On failure, responds with
SdkError<InvokeAsyncError>
Source§impl Client
impl Client
Sourcepub fn invoke_with_response_stream(
&self,
) -> InvokeWithResponseStreamFluentBuilder
pub fn invoke_with_response_stream( &self, ) -> InvokeWithResponseStreamFluentBuilder
Constructs a fluent builder for the InvokeWithResponseStream operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
invocation_type(ResponseStreamingInvocationType)/set_invocation_type(Option<ResponseStreamingInvocationType>):
required: falseUse one of the following options:
-
RequestResponse(default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API operation response includes the function response and additional data. -
DryRun– Validate parameter values and verify that the IAM user or role has permission to invoke the function.
-
log_type(LogType)/set_log_type(Option<LogType>):
required: falseSet to
Tailto include the execution log in the response. Applies to synchronously invoked functions only.client_context(impl Into<String>)/set_client_context(Option<String>):
required: falseUp to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseThe alias name.
payload(Blob)/set_payload(Option<Blob>):
required: falseThe JSON that you want to provide to your Lambda function as input.
You can enter the JSON directly. For example,
–payload ‘{ “key”: “value” }’. You can also specify a file path. For example,–payload file://payload.json.
- On success, responds with
InvokeWithResponseStreamOutputwith field(s):status_code(i32):For a successful request, the HTTP status code is in the 200 range. For the
RequestResponseinvocation type, this status code is 200. For theDryRuninvocation type, this status code is 204.executed_version(Option<String>):The version of the function that executed. When you invoke a function with an alias, this indicates which version the alias resolved to.
event_stream(EventReceiver<InvokeWithResponseStreamResponseEvent, InvokeWithResponseStreamResponseEventError>):The stream of response payloads.
response_stream_content_type(Option<String>):The type of data the stream is returning.
- On failure, responds with
SdkError<InvokeWithResponseStreamError>
Source§impl Client
impl Client
Sourcepub fn list_aliases(&self) -> ListAliasesFluentBuilder
pub fn list_aliases(&self) -> ListAliasesFluentBuilder
Constructs a fluent builder for the ListAliases operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
function_version(impl Into<String>)/set_function_version(Option<String>):
required: falseSpecify a function version to only list aliases that invoke that version.
marker(impl Into<String>)/set_marker(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
max_items(i32)/set_max_items(Option<i32>):
required: falseLimit the number of aliases returned.
- On success, responds with
ListAliasesOutputwith field(s):next_marker(Option<String>):The pagination token that’s included if more results are available.
aliases(Option<Vec::<AliasConfiguration>>):A list of aliases.
- On failure, responds with
SdkError<ListAliasesError>
Source§impl Client
impl Client
Sourcepub fn list_code_signing_configs(&self) -> ListCodeSigningConfigsFluentBuilder
pub fn list_code_signing_configs(&self) -> ListCodeSigningConfigsFluentBuilder
Constructs a fluent builder for the ListCodeSigningConfigs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
marker(impl Into<String>)/set_marker(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
max_items(i32)/set_max_items(Option<i32>):
required: falseMaximum number of items to return.
- On success, responds with
ListCodeSigningConfigsOutputwith field(s):next_marker(Option<String>):The pagination token that’s included if more results are available.
code_signing_configs(Option<Vec::<CodeSigningConfig>>):The code signing configurations
- On failure, responds with
SdkError<ListCodeSigningConfigsError>
Source§impl Client
impl Client
Sourcepub fn list_event_source_mappings(&self) -> ListEventSourceMappingsFluentBuilder
pub fn list_event_source_mappings(&self) -> ListEventSourceMappingsFluentBuilder
Constructs a fluent builder for the ListEventSourceMappings operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
event_source_arn(impl Into<String>)/set_event_source_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of the event source.
-
Amazon Kinesis – The ARN of the data stream or a stream consumer.
-
Amazon DynamoDB Streams – The ARN of the stream.
-
Amazon Simple Queue Service – The ARN of the queue.
-
Amazon Managed Streaming for Apache Kafka – The ARN of the cluster or the ARN of the VPC connection (for cross-account event source mappings).
-
Amazon MQ – The ARN of the broker.
-
Amazon DocumentDB – The ARN of the DocumentDB change stream.
-
function_name(impl Into<String>)/set_function_name(Option<String>):
required: falseThe name or ARN of the Lambda function.
Name formats
-
Function name –
MyFunction. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:MyFunction. -
Version or Alias ARN –
arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. -
Partial ARN –
123456789012:function:MyFunction.
The length constraint applies only to the full ARN. If you specify only the function name, it’s limited to 64 characters in length.
-
marker(impl Into<String>)/set_marker(Option<String>):
required: falseA pagination token returned by a previous call.
max_items(i32)/set_max_items(Option<i32>):
required: falseThe maximum number of event source mappings to return. Note that ListEventSourceMappings returns a maximum of 100 items in each response, even if you set the number higher.
- On success, responds with
ListEventSourceMappingsOutputwith field(s):next_marker(Option<String>):A pagination token that’s returned when the response doesn’t contain all event source mappings.
event_source_mappings(Option<Vec::<EventSourceMappingConfiguration>>):A list of event source mappings.
- On failure, responds with
SdkError<ListEventSourceMappingsError>
Source§impl Client
impl Client
Sourcepub fn list_function_event_invoke_configs(
&self,
) -> ListFunctionEventInvokeConfigsFluentBuilder
pub fn list_function_event_invoke_configs( &self, ) -> ListFunctionEventInvokeConfigsFluentBuilder
Constructs a fluent builder for the ListFunctionEventInvokeConfigs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name -
my-function. -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN -
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
marker(impl Into<String>)/set_marker(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
max_items(i32)/set_max_items(Option<i32>):
required: falseThe maximum number of configurations to return.
- On success, responds with
ListFunctionEventInvokeConfigsOutputwith field(s):function_event_invoke_configs(Option<Vec::<FunctionEventInvokeConfig>>):A list of configurations.
next_marker(Option<String>):The pagination token that’s included if more results are available.
- On failure, responds with
SdkError<ListFunctionEventInvokeConfigsError>
Source§impl Client
impl Client
Sourcepub fn list_function_url_configs(&self) -> ListFunctionUrlConfigsFluentBuilder
pub fn list_function_url_configs(&self) -> ListFunctionUrlConfigsFluentBuilder
Constructs a fluent builder for the ListFunctionUrlConfigs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
marker(impl Into<String>)/set_marker(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
max_items(i32)/set_max_items(Option<i32>):
required: falseThe maximum number of function URLs to return in the response. Note that
ListFunctionUrlConfigsreturns a maximum of 50 items in each response, even if you set the number higher.
- On success, responds with
ListFunctionUrlConfigsOutputwith field(s):function_url_configs(Vec::<FunctionUrlConfig>):A list of function URL configurations.
next_marker(Option<String>):The pagination token that’s included if more results are available.
- On failure, responds with
SdkError<ListFunctionUrlConfigsError>
Source§impl Client
impl Client
Sourcepub fn list_functions(&self) -> ListFunctionsFluentBuilder
pub fn list_functions(&self) -> ListFunctionsFluentBuilder
Constructs a fluent builder for the ListFunctions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
master_region(impl Into<String>)/set_master_region(Option<String>):
required: falseFor Lambda@Edge functions, the Amazon Web Services Region of the master function. For example,
us-east-1filters the list of functions to include only Lambda@Edge functions replicated from a master function in US East (N. Virginia). If specified, you must setFunctionVersiontoALL.function_version(FunctionVersion)/set_function_version(Option<FunctionVersion>):
required: falseSet to
ALLto include entries for all published versions of each function.marker(impl Into<String>)/set_marker(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
max_items(i32)/set_max_items(Option<i32>):
required: falseThe maximum number of functions to return in the response. Note that
ListFunctionsreturns a maximum of 50 items in each response, even if you set the number higher.
- On success, responds with
ListFunctionsOutputwith field(s):next_marker(Option<String>):The pagination token that’s included if more results are available.
functions(Option<Vec::<FunctionConfiguration>>):A list of Lambda functions.
- On failure, responds with
SdkError<ListFunctionsError>
Source§impl Client
impl Client
Sourcepub fn list_functions_by_code_signing_config(
&self,
) -> ListFunctionsByCodeSigningConfigFluentBuilder
pub fn list_functions_by_code_signing_config( &self, ) -> ListFunctionsByCodeSigningConfigFluentBuilder
Constructs a fluent builder for the ListFunctionsByCodeSigningConfig operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
code_signing_config_arn(impl Into<String>)/set_code_signing_config_arn(Option<String>):
required: trueThe The Amazon Resource Name (ARN) of the code signing configuration.
marker(impl Into<String>)/set_marker(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
max_items(i32)/set_max_items(Option<i32>):
required: falseMaximum number of items to return.
- On success, responds with
ListFunctionsByCodeSigningConfigOutputwith field(s):next_marker(Option<String>):The pagination token that’s included if more results are available.
function_arns(Option<Vec::<String>>):The function ARNs.
- On failure, responds with
SdkError<ListFunctionsByCodeSigningConfigError>
Source§impl Client
impl Client
Sourcepub fn list_layer_versions(&self) -> ListLayerVersionsFluentBuilder
pub fn list_layer_versions(&self) -> ListLayerVersionsFluentBuilder
Constructs a fluent builder for the ListLayerVersions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
compatible_runtime(Runtime)/set_compatible_runtime(Option<Runtime>):
required: falseA runtime identifier.
The following list includes deprecated runtimes. For more information, see Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
layer_name(impl Into<String>)/set_layer_name(Option<String>):
required: trueThe name or Amazon Resource Name (ARN) of the layer.
marker(impl Into<String>)/set_marker(Option<String>):
required: falseA pagination token returned by a previous call.
max_items(i32)/set_max_items(Option<i32>):
required: falseThe maximum number of versions to return.
compatible_architecture(Architecture)/set_compatible_architecture(Option<Architecture>):
required: falseThe compatible instruction set architecture.
- On success, responds with
ListLayerVersionsOutputwith field(s):next_marker(Option<String>):A pagination token returned when the response doesn’t contain all versions.
layer_versions(Option<Vec::<LayerVersionsListItem>>):A list of versions.
- On failure, responds with
SdkError<ListLayerVersionsError>
Source§impl Client
impl Client
Sourcepub fn list_layers(&self) -> ListLayersFluentBuilder
pub fn list_layers(&self) -> ListLayersFluentBuilder
Constructs a fluent builder for the ListLayers operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
compatible_runtime(Runtime)/set_compatible_runtime(Option<Runtime>):
required: falseA runtime identifier.
The following list includes deprecated runtimes. For more information, see Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
marker(impl Into<String>)/set_marker(Option<String>):
required: falseA pagination token returned by a previous call.
max_items(i32)/set_max_items(Option<i32>):
required: falseThe maximum number of layers to return.
compatible_architecture(Architecture)/set_compatible_architecture(Option<Architecture>):
required: falseThe compatible instruction set architecture.
- On success, responds with
ListLayersOutputwith field(s):next_marker(Option<String>):A pagination token returned when the response doesn’t contain all layers.
layers(Option<Vec::<LayersListItem>>):A list of function layers.
- On failure, responds with
SdkError<ListLayersError>
Source§impl Client
impl Client
Sourcepub fn list_provisioned_concurrency_configs(
&self,
) -> ListProvisionedConcurrencyConfigsFluentBuilder
pub fn list_provisioned_concurrency_configs( &self, ) -> ListProvisionedConcurrencyConfigsFluentBuilder
Constructs a fluent builder for the ListProvisionedConcurrencyConfigs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
marker(impl Into<String>)/set_marker(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
max_items(i32)/set_max_items(Option<i32>):
required: falseSpecify a number to limit the number of configurations returned.
- On success, responds with
ListProvisionedConcurrencyConfigsOutputwith field(s):provisioned_concurrency_configs(Option<Vec::<ProvisionedConcurrencyConfigListItem>>):A list of provisioned concurrency configurations.
next_marker(Option<String>):The pagination token that’s included if more results are available.
- On failure, responds with
SdkError<ListProvisionedConcurrencyConfigsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTags operation.
- The fluent builder is configurable:
resource(impl Into<String>)/set_resource(Option<String>):
required: trueThe resource’s Amazon Resource Name (ARN). Note: Lambda does not support adding tags to function aliases or versions.
- On success, responds with
ListTagsOutputwith field(s):tags(Option<HashMap::<String, String>>):The function’s tags.
- On failure, responds with
SdkError<ListTagsError>
Source§impl Client
impl Client
Sourcepub fn list_versions_by_function(&self) -> ListVersionsByFunctionFluentBuilder
pub fn list_versions_by_function(&self) -> ListVersionsByFunctionFluentBuilder
Constructs a fluent builder for the ListVersionsByFunction operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
marker(impl Into<String>)/set_marker(Option<String>):
required: falseSpecify the pagination token that’s returned by a previous request to retrieve the next page of results.
max_items(i32)/set_max_items(Option<i32>):
required: falseThe maximum number of versions to return. Note that
ListVersionsByFunctionreturns a maximum of 50 items in each response, even if you set the number higher.
- On success, responds with
ListVersionsByFunctionOutputwith field(s):next_marker(Option<String>):The pagination token that’s included if more results are available.
versions(Option<Vec::<FunctionConfiguration>>):A list of Lambda function versions.
- On failure, responds with
SdkError<ListVersionsByFunctionError>
Source§impl Client
impl Client
Sourcepub fn publish_layer_version(&self) -> PublishLayerVersionFluentBuilder
pub fn publish_layer_version(&self) -> PublishLayerVersionFluentBuilder
Constructs a fluent builder for the PublishLayerVersion operation.
- The fluent builder is configurable:
layer_name(impl Into<String>)/set_layer_name(Option<String>):
required: trueThe name or Amazon Resource Name (ARN) of the layer.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the version.
content(LayerVersionContentInput)/set_content(Option<LayerVersionContentInput>):
required: trueThe function layer archive.
compatible_runtimes(Runtime)/set_compatible_runtimes(Option<Vec::<Runtime>>):
required: falseA list of compatible function runtimes. Used for filtering with
ListLayersandListLayerVersions.The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.
license_info(impl Into<String>)/set_license_info(Option<String>):
required: falseThe layer’s software license. It can be any of the following:
-
An SPDX license identifier. For example,
MIT. -
The URL of a license hosted on the internet. For example,
https://opensource.org/licenses/MIT. -
The full text of the license.
-
compatible_architectures(Architecture)/set_compatible_architectures(Option<Vec::<Architecture>>):
required: falseA list of compatible instruction set architectures.
- On success, responds with
PublishLayerVersionOutputwith field(s):content(Option<LayerVersionContentOutput>):Details about the layer version.
layer_arn(Option<String>):The ARN of the layer.
layer_version_arn(Option<String>):The ARN of the layer version.
description(Option<String>):The description of the version.
created_date(Option<String>):The date that the layer version was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
version(i64):The version number.
compatible_runtimes(Option<Vec::<Runtime>>):The layer’s compatible runtimes.
The following list includes deprecated runtimes. For more information, see Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
license_info(Option<String>):The layer’s software license.
compatible_architectures(Option<Vec::<Architecture>>):A list of compatible instruction set architectures.
- On failure, responds with
SdkError<PublishLayerVersionError>
Source§impl Client
impl Client
Sourcepub fn publish_version(&self) -> PublishVersionFluentBuilder
pub fn publish_version(&self) -> PublishVersionFluentBuilder
Constructs a fluent builder for the PublishVersion operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
code_sha256(impl Into<String>)/set_code_sha256(Option<String>):
required: falseOnly 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.description(impl Into<String>)/set_description(Option<String>):
required: falseA description for the version to override the description in the function configuration.
revision_id(impl Into<String>)/set_revision_id(Option<String>):
required: falseOnly 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.
- On success, responds with
PublishVersionOutputwith field(s):function_name(Option<String>):The name of the function.
function_arn(Option<String>):The function’s Amazon Resource Name (ARN).
runtime(Option<Runtime>):The identifier of the function’s runtime. 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.
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 Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
role(Option<String>):The function’s execution role.
handler(Option<String>):The function that Lambda calls to begin running your function.
code_size(i64):The size of the function’s deployment package, in bytes.
description(Option<String>):The function’s description.
timeout(Option<i32>):The amount of time in seconds that Lambda allows a function to run before stopping it.
memory_size(Option<i32>):The amount of memory available to the function at runtime.
last_modified(Option<String>):The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
code_sha256(Option<String>):The SHA256 hash of the function’s deployment package.
version(Option<String>):The version of the Lambda function.
vpc_config(Option<VpcConfigResponse>):The function’s networking configuration.
dead_letter_config(Option<DeadLetterConfig>):The function’s dead letter queue.
environment(Option<EnvironmentResponse>):The function’s environment variables. Omitted from CloudTrail logs.
kms_key_arn(Option<String>):The ARN of the Key Management Service (KMS) customer managed key that’s used to encrypt the following resources:
-
The function’s environment variables.
-
The function’s Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn, the unzipped version of the .zip deployment package that’s used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
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 Function lifecycle.
If you don’t provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
-
tracing_config(Option<TracingConfigResponse>):The function’s X-Ray tracing configuration.
master_arn(Option<String>):For Lambda@Edge functions, the ARN of the main function.
revision_id(Option<String>):The latest updated revision of the function or alias.
layers(Option<Vec::<Layer>>):The function’s layers.
state(Option<State>):The current state of the function. When the state is
Inactive, you can reactivate the function by invoking it.state_reason(Option<String>):The reason for the function’s current state.
state_reason_code(Option<StateReasonCode>):The reason code for the function’s current state. When the code is
Creating, you can’t invoke or modify the function.last_update_status(Option<LastUpdateStatus>):The status of the last update that was performed on the function. This is first set to
Successfulafter function creation completes.last_update_status_reason(Option<String>):The reason for the last update that was performed on the function.
last_update_status_reason_code(Option<LastUpdateStatusReasonCode>):The reason code for the last update that was performed on the function.
file_system_configs(Option<Vec::<FileSystemConfig>>):Connection settings for an Amazon EFS file system.
package_type(Option<PackageType>):The type of deployment package. Set to
Imagefor container image and setZipfor .zip file archive.image_config_response(Option<ImageConfigResponse>):The function’s image configuration values.
signing_profile_version_arn(Option<String>):The ARN of the signing profile version.
signing_job_arn(Option<String>):The ARN of the signing job.
architectures(Option<Vec::<Architecture>>):The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is
x86_64.ephemeral_storage(Option<EphemeralStorage>):The size of the function’s
/tmpdirectory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).snap_start(Option<SnapStartResponse>):Set
ApplyOntoPublishedVersionsto create a snapshot of the initialized execution environment when you publish a function version. For more information, see Improving startup performance with Lambda SnapStart.runtime_version_config(Option<RuntimeVersionConfig>):The ARN of the runtime and any errors that occured.
logging_config(Option<LoggingConfig>):The function’s Amazon CloudWatch Logs configuration settings.
- On failure, responds with
SdkError<PublishVersionError>
Source§impl Client
impl Client
Sourcepub fn put_function_code_signing_config(
&self,
) -> PutFunctionCodeSigningConfigFluentBuilder
pub fn put_function_code_signing_config( &self, ) -> PutFunctionCodeSigningConfigFluentBuilder
Constructs a fluent builder for the PutFunctionCodeSigningConfig operation.
- The fluent builder is configurable:
code_signing_config_arn(impl Into<String>)/set_code_signing_config_arn(Option<String>):
required: trueThe The Amazon Resource Name (ARN) of the code signing configuration.
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
- On success, responds with
PutFunctionCodeSigningConfigOutputwith field(s):code_signing_config_arn(String):The The Amazon Resource Name (ARN) of the code signing configuration.
function_name(String):The name or ARN 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.
-
- On failure, responds with
SdkError<PutFunctionCodeSigningConfigError>
Source§impl Client
impl Client
Sourcepub fn put_function_concurrency(&self) -> PutFunctionConcurrencyFluentBuilder
pub fn put_function_concurrency(&self) -> PutFunctionConcurrencyFluentBuilder
Constructs a fluent builder for the PutFunctionConcurrency operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
reserved_concurrent_executions(i32)/set_reserved_concurrent_executions(Option<i32>):
required: trueThe number of simultaneous executions to reserve for the function.
- On success, responds with
PutFunctionConcurrencyOutputwith field(s):reserved_concurrent_executions(Option<i32>):The number of concurrent executions that are reserved for this function. For more information, see Managing Lambda reserved concurrency.
- On failure, responds with
SdkError<PutFunctionConcurrencyError>
Source§impl Client
impl Client
Sourcepub fn put_function_event_invoke_config(
&self,
) -> PutFunctionEventInvokeConfigFluentBuilder
pub fn put_function_event_invoke_config( &self, ) -> PutFunctionEventInvokeConfigFluentBuilder
Constructs a fluent builder for the PutFunctionEventInvokeConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name -
my-function(name-only),my-function:v1(with alias). -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN -
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseA version number or alias name.
maximum_retry_attempts(i32)/set_maximum_retry_attempts(Option<i32>):
required: falseThe maximum number of times to retry when the function returns an error.
maximum_event_age_in_seconds(i32)/set_maximum_event_age_in_seconds(Option<i32>):
required: falseThe maximum age of a request that Lambda sends to a function for processing.
destination_config(DestinationConfig)/set_destination_config(Option<DestinationConfig>):
required: falseA destination for events after they have been sent to a function for processing.
Destinations
-
Function - The Amazon Resource Name (ARN) of a Lambda function.
-
Queue - The ARN of a standard SQS queue.
-
Bucket - The ARN of an Amazon S3 bucket.
-
Topic - The ARN of a standard SNS topic.
-
Event Bus - The ARN of an Amazon EventBridge event bus.
S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type.
-
- On success, responds with
PutFunctionEventInvokeConfigOutputwith field(s):last_modified(Option<DateTime>):The date and time that the configuration was last updated.
function_arn(Option<String>):The Amazon Resource Name (ARN) of the function.
maximum_retry_attempts(Option<i32>):The maximum number of times to retry when the function returns an error.
maximum_event_age_in_seconds(Option<i32>):The maximum age of a request that Lambda sends to a function for processing.
destination_config(Option<DestinationConfig>):A destination for events after they have been sent to a function for processing.
Destinations
-
Function - The Amazon Resource Name (ARN) of a Lambda function.
-
Queue - The ARN of a standard SQS queue.
-
Bucket - The ARN of an Amazon S3 bucket.
-
Topic - The ARN of a standard SNS topic.
-
Event Bus - The ARN of an Amazon EventBridge event bus.
S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type.
-
- On failure, responds with
SdkError<PutFunctionEventInvokeConfigError>
Source§impl Client
impl Client
Sourcepub fn put_function_recursion_config(
&self,
) -> PutFunctionRecursionConfigFluentBuilder
pub fn put_function_recursion_config( &self, ) -> PutFunctionRecursionConfigFluentBuilder
Constructs a fluent builder for the PutFunctionRecursionConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
recursive_loop(RecursiveLoop)/set_recursive_loop(Option<RecursiveLoop>):
required: trueIf you set your function’s recursive loop detection configuration to
Allow, Lambda doesn’t take any action when it detects your function being invoked as part of a recursive loop. We recommend that you only use this setting if your design intentionally uses a Lambda function to write data back to the same Amazon Web Services resource that invokes it.If you set your function’s recursive loop detection configuration to
Terminate, Lambda stops your function being invoked and notifies you when it detects your function being invoked as part of a recursive loop.By default, Lambda sets your function’s configuration to
Terminate.If your design intentionally uses a Lambda function to write data back to the same Amazon Web Services resource that invokes the function, then use caution and implement suitable guard rails to prevent unexpected charges being billed to your Amazon Web Services account. To learn more about best practices for using recursive invocation patterns, see Recursive patterns that cause run-away Lambda functions in Serverless Land.
- On success, responds with
PutFunctionRecursionConfigOutputwith field(s):recursive_loop(Option<RecursiveLoop>):The status of your function’s recursive loop detection configuration.
When this value is set to
Allowand Lambda detects your function being invoked as part of a recursive loop, it doesn’t take any action.When this value is set to
Terminateand Lambda detects your function being invoked as part of a recursive loop, it stops your function being invoked and notifies you.
- On failure, responds with
SdkError<PutFunctionRecursionConfigError>
Source§impl Client
impl Client
Sourcepub fn put_provisioned_concurrency_config(
&self,
) -> PutProvisionedConcurrencyConfigFluentBuilder
pub fn put_provisioned_concurrency_config( &self, ) -> PutProvisionedConcurrencyConfigFluentBuilder
Constructs a fluent builder for the PutProvisionedConcurrencyConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: trueThe version number or alias name.
provisioned_concurrent_executions(i32)/set_provisioned_concurrent_executions(Option<i32>):
required: trueThe amount of provisioned concurrency to allocate for the version or alias.
- On success, responds with
PutProvisionedConcurrencyConfigOutputwith field(s):requested_provisioned_concurrent_executions(Option<i32>):The amount of provisioned concurrency requested.
available_provisioned_concurrent_executions(Option<i32>):The amount of provisioned concurrency available.
allocated_provisioned_concurrent_executions(Option<i32>):The amount of provisioned concurrency allocated. When a weighted alias is used during linear and canary deployments, this value fluctuates depending on the amount of concurrency that is provisioned for the function versions.
status(Option<ProvisionedConcurrencyStatusEnum>):The status of the allocation process.
status_reason(Option<String>):For failed allocations, the reason that provisioned concurrency could not be allocated.
last_modified(Option<String>):The date and time that a user last updated the configuration, in ISO 8601 format.
- On failure, responds with
SdkError<PutProvisionedConcurrencyConfigError>
Source§impl Client
impl Client
Sourcepub fn put_runtime_management_config(
&self,
) -> PutRuntimeManagementConfigFluentBuilder
pub fn put_runtime_management_config( &self, ) -> PutRuntimeManagementConfigFluentBuilder
Constructs a fluent builder for the PutRuntimeManagementConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseSpecify a version of the function. This can be
$LATESTor a published version number. If no value is specified, the configuration for the$LATESTversion is returned.update_runtime_on(UpdateRuntimeOn)/set_update_runtime_on(Option<UpdateRuntimeOn>):
required: trueSpecify the runtime update mode.
-
Auto (default) - Automatically update to the most recent and secure runtime version using a Two-phase runtime version rollout. This is the best choice for most customers to ensure they always benefit from runtime updates.
-
Function update - Lambda updates the runtime of your function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
-
Manual - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see Roll back a runtime version.
-
runtime_version_arn(impl Into<String>)/set_runtime_version_arn(Option<String>):
required: falseThe ARN of the runtime version you want the function to use.
This is only required if you’re using the Manual runtime update mode.
- On success, responds with
PutRuntimeManagementConfigOutputwith field(s):update_runtime_on(UpdateRuntimeOn):The runtime update mode.
function_arn(String):The ARN of the function
runtime_version_arn(Option<String>):The ARN of the runtime the function is configured to use. If the runtime update mode is manual, the ARN is returned, otherwise
nullis returned.
- On failure, responds with
SdkError<PutRuntimeManagementConfigError>
Source§impl Client
impl Client
Sourcepub fn remove_layer_version_permission(
&self,
) -> RemoveLayerVersionPermissionFluentBuilder
pub fn remove_layer_version_permission( &self, ) -> RemoveLayerVersionPermissionFluentBuilder
Constructs a fluent builder for the RemoveLayerVersionPermission operation.
- The fluent builder is configurable:
layer_name(impl Into<String>)/set_layer_name(Option<String>):
required: trueThe name or Amazon Resource Name (ARN) of the layer.
version_number(i64)/set_version_number(Option<i64>):
required: trueThe version number.
statement_id(impl Into<String>)/set_statement_id(Option<String>):
required: trueThe identifier that was specified when the statement was added.
revision_id(impl Into<String>)/set_revision_id(Option<String>):
required: falseOnly update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.
- On success, responds with
RemoveLayerVersionPermissionOutput - On failure, responds with
SdkError<RemoveLayerVersionPermissionError>
Source§impl Client
impl Client
Sourcepub fn remove_permission(&self) -> RemovePermissionFluentBuilder
pub fn remove_permission(&self) -> RemovePermissionFluentBuilder
Constructs a fluent builder for the RemovePermission operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name –
my-function(name-only),my-function:v1(with alias). -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
statement_id(impl Into<String>)/set_statement_id(Option<String>):
required: trueStatement ID of the permission to remove.
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseSpecify a version or alias to remove permissions from a published version of the function.
revision_id(impl Into<String>)/set_revision_id(Option<String>):
required: falseUpdate the policy only if the revision ID matches the ID that’s specified. Use this option to avoid modifying a policy that has changed since you last read it.
- On success, responds with
RemovePermissionOutput - On failure, responds with
SdkError<RemovePermissionError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource(impl Into<String>)/set_resource(Option<String>):
required: trueThe resource’s Amazon Resource Name (ARN).
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: trueA list of tags to apply to the resource.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource(impl Into<String>)/set_resource(Option<String>):
required: trueThe resource’s Amazon Resource Name (ARN).
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueA list of tag keys to remove from the resource.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_alias(&self) -> UpdateAliasFluentBuilder
pub fn update_alias(&self) -> UpdateAliasFluentBuilder
Constructs a fluent builder for the UpdateAlias operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN 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.
-
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the alias.
function_version(impl Into<String>)/set_function_version(Option<String>):
required: falseThe function version that the alias invokes.
description(impl Into<String>)/set_description(Option<String>):
required: falseA description of the alias.
routing_config(AliasRoutingConfiguration)/set_routing_config(Option<AliasRoutingConfiguration>):
required: falseThe routing configuration of the alias.
revision_id(impl Into<String>)/set_revision_id(Option<String>):
required: falseOnly update the alias if the revision ID matches the ID that’s specified. Use this option to avoid modifying an alias that has changed since you last read it.
- On success, responds with
UpdateAliasOutputwith field(s):alias_arn(Option<String>):The Amazon Resource Name (ARN) of the alias.
name(Option<String>):The name of the alias.
function_version(Option<String>):The function version that the alias invokes.
description(Option<String>):A description of the alias.
routing_config(Option<AliasRoutingConfiguration>):The routing configuration of the alias.
revision_id(Option<String>):A unique identifier that changes when you update the alias.
- On failure, responds with
SdkError<UpdateAliasError>
Source§impl Client
impl Client
Sourcepub fn update_code_signing_config(&self) -> UpdateCodeSigningConfigFluentBuilder
pub fn update_code_signing_config(&self) -> UpdateCodeSigningConfigFluentBuilder
Constructs a fluent builder for the UpdateCodeSigningConfig operation.
- The fluent builder is configurable:
code_signing_config_arn(impl Into<String>)/set_code_signing_config_arn(Option<String>):
required: trueThe The Amazon Resource Name (ARN) of the code signing configuration.
description(impl Into<String>)/set_description(Option<String>):
required: falseDescriptive name for this code signing configuration.
allowed_publishers(AllowedPublishers)/set_allowed_publishers(Option<AllowedPublishers>):
required: falseSigning profiles for this code signing configuration.
code_signing_policies(CodeSigningPolicies)/set_code_signing_policies(Option<CodeSigningPolicies>):
required: falseThe code signing policy.
- On success, responds with
UpdateCodeSigningConfigOutputwith field(s):code_signing_config(Option<CodeSigningConfig>):The code signing configuration
- On failure, responds with
SdkError<UpdateCodeSigningConfigError>
Source§impl Client
impl Client
Sourcepub fn update_event_source_mapping(
&self,
) -> UpdateEventSourceMappingFluentBuilder
pub fn update_event_source_mapping( &self, ) -> UpdateEventSourceMappingFluentBuilder
Constructs a fluent builder for the UpdateEventSourceMapping operation.
- The fluent builder is configurable:
uuid(impl Into<String>)/set_uuid(Option<String>):
required: trueThe identifier of the event source mapping.
function_name(impl Into<String>)/set_function_name(Option<String>):
required: falseThe name or ARN of the Lambda function.
Name formats
-
Function name –
MyFunction. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:MyFunction. -
Version or Alias ARN –
arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. -
Partial ARN –
123456789012:function:MyFunction.
The length constraint applies only to the full ARN. If you specify only the function name, it’s limited to 64 characters in length.
-
enabled(bool)/set_enabled(Option<bool>):
required: falseWhen true, the event source mapping is active. When false, Lambda pauses polling and invocation.
Default: True
batch_size(i32)/set_batch_size(Option<i32>):
required: falseThe maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
-
Amazon Kinesis – Default 100. Max 10,000.
-
Amazon DynamoDB Streams – Default 100. Max 10,000.
-
Amazon Simple Queue Service – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
-
Amazon Managed Streaming for Apache Kafka – Default 100. Max 10,000.
-
Self-managed Apache Kafka – Default 100. Max 10,000.
-
Amazon MQ (ActiveMQ and RabbitMQ) – Default 100. Max 10,000.
-
DocumentDB – Default 100. Max 10,000.
-
filter_criteria(FilterCriteria)/set_filter_criteria(Option<FilterCriteria>):
required: falseAn object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.
maximum_batching_window_in_seconds(i32)/set_maximum_batching_window_in_seconds(Option<i32>):
required: falseThe maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure
MaximumBatchingWindowInSecondsto any value from 0 seconds to 300 seconds in increments of seconds.For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change
MaximumBatchingWindowInSecondsin increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.destination_config(DestinationConfig)/set_destination_config(Option<DestinationConfig>):
required: false(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A configuration object that specifies the destination of an event after Lambda processes it.
maximum_record_age_in_seconds(i32)/set_maximum_record_age_in_seconds(Option<i32>):
required: false(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is infinite (-1).
bisect_batch_on_function_error(bool)/set_bisect_batch_on_function_error(Option<bool>):
required: false(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
maximum_retry_attempts(i32)/set_maximum_retry_attempts(Option<i32>):
required: false(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.
parallelization_factor(i32)/set_parallelization_factor(Option<i32>):
required: false(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.
source_access_configurations(SourceAccessConfiguration)/set_source_access_configurations(Option<Vec::<SourceAccessConfiguration>>):
required: falseAn array of authentication protocols or VPC components required to secure your event source.
tumbling_window_in_seconds(i32)/set_tumbling_window_in_seconds(Option<i32>):
required: false(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
function_response_types(FunctionResponseType)/set_function_response_types(Option<Vec::<FunctionResponseType>>):
required: false(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event source mapping.
scaling_config(ScalingConfig)/set_scaling_config(Option<ScalingConfig>):
required: false(Amazon SQS only) The scaling configuration for the event source. For more information, see Configuring maximum concurrency for Amazon SQS event sources.
document_db_event_source_config(DocumentDbEventSourceConfig)/set_document_db_event_source_config(Option<DocumentDbEventSourceConfig>):
required: falseSpecific configuration settings for a DocumentDB event source.
kms_key_arn(impl Into<String>)/set_kms_key_arn(Option<String>):
required: falseThe ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function’s filter criteria. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key.
metrics_config(EventSourceMappingMetricsConfig)/set_metrics_config(Option<EventSourceMappingMetricsConfig>):
required: falseThe metrics configuration for your event source. For more information, see Event source mapping metrics.
provisioned_poller_config(ProvisionedPollerConfig)/set_provisioned_poller_config(Option<ProvisionedPollerConfig>):
required: false(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source. For more information, see Provisioned Mode.
- On success, responds with
UpdateEventSourceMappingOutputwith field(s):uuid(Option<String>):The identifier of the event source mapping.
starting_position(Option<EventSourcePosition>):The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources.
AT_TIMESTAMPis supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.starting_position_timestamp(Option<DateTime>):With
StartingPositionset toAT_TIMESTAMP, the time from which to start reading.StartingPositionTimestampcannot be in the future.batch_size(Option<i32>):The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.
Related setting: When you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.maximum_batching_window_in_seconds(Option<i32>):The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure
MaximumBatchingWindowInSecondsto any value from 0 seconds to 300 seconds in increments of seconds.For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change
MaximumBatchingWindowInSecondsin increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.Related setting: For streams and Amazon SQS event sources, when you set
BatchSizeto a value greater than 10, you must setMaximumBatchingWindowInSecondsto at least 1.parallelization_factor(Option<i32>):(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
event_source_arn(Option<String>):The Amazon Resource Name (ARN) of the event source.
filter_criteria(Option<FilterCriteria>):An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.
If filter criteria is encrypted, this field shows up as
nullin the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you havekms:Decryptpermissions for the correct KMS key.function_arn(Option<String>):The ARN of the Lambda function.
last_modified(Option<DateTime>):The date that the event source mapping was last updated or that its state changed.
last_processing_result(Option<String>):The result of the last Lambda invocation of your function.
state(Option<String>):The state of the event source mapping. It can be one of the following:
Creating,Enabling,Enabled,Disabling,Disabled,Updating, orDeleting.state_transition_reason(Option<String>):Indicates whether a user or Lambda made the last change to the event source mapping.
destination_config(Option<DestinationConfig>):(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
topics(Option<Vec::<String>>):The name of the Kafka topic.
queues(Option<Vec::<String>>):(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
source_access_configurations(Option<Vec::<SourceAccessConfiguration>>):An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
self_managed_event_source(Option<SelfManagedEventSource>):The self-managed Apache Kafka cluster for your event source.
maximum_record_age_in_seconds(Option<i32>):(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.
The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter’s absolute range, they are not allowed
bisect_batch_on_function_error(Option<bool>):(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
maximum_retry_attempts(Option<i32>):(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
tumbling_window_in_seconds(Option<i32>):(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
function_response_types(Option<Vec::<FunctionResponseType>>):(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event source mapping.
amazon_managed_kafka_event_source_config(Option<AmazonManagedKafkaEventSourceConfig>):Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
self_managed_kafka_event_source_config(Option<SelfManagedKafkaEventSourceConfig>):Specific configuration settings for a self-managed Apache Kafka event source.
scaling_config(Option<ScalingConfig>):(Amazon SQS only) The scaling configuration for the event source. For more information, see Configuring maximum concurrency for Amazon SQS event sources.
document_db_event_source_config(Option<DocumentDbEventSourceConfig>):Specific configuration settings for a DocumentDB event source.
kms_key_arn(Option<String>):The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function’s filter criteria.
filter_criteria_error(Option<FilterCriteriaError>):An object that contains details about an error related to filter criteria encryption.
event_source_mapping_arn(Option<String>):The Amazon Resource Name (ARN) of the event source mapping.
metrics_config(Option<EventSourceMappingMetricsConfig>):The metrics configuration for your event source. For more information, see Event source mapping metrics.
provisioned_poller_config(Option<ProvisionedPollerConfig>):(Amazon MSK and self-managed Apache Kafka only) The Provisioned Mode configuration for the event source. For more information, see Provisioned Mode.
- On failure, responds with
SdkError<UpdateEventSourceMappingError>
Source§impl Client
impl Client
Sourcepub fn update_function_code(&self) -> UpdateFunctionCodeFluentBuilder
pub fn update_function_code(&self) -> UpdateFunctionCodeFluentBuilder
Constructs a fluent builder for the UpdateFunctionCode operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
zip_file(Blob)/set_zip_file(Option<Blob>):
required: falseThe base64-encoded contents of the deployment package. Amazon Web Services SDK and CLI clients handle the encoding for you. Use only with a function defined with a .zip file archive deployment package.
s3_bucket(impl Into<String>)/set_s3_bucket(Option<String>):
required: falseAn Amazon S3 bucket in the same Amazon Web Services Region as your function. The bucket can be in a different Amazon Web Services account. Use only with a function defined with a .zip file archive deployment package.
s3_key(impl Into<String>)/set_s3_key(Option<String>):
required: falseThe Amazon S3 key of the deployment package. Use only with a function defined with a .zip file archive deployment package.
s3_object_version(impl Into<String>)/set_s3_object_version(Option<String>):
required: falseFor versioned objects, the version of the deployment package object to use.
image_uri(impl Into<String>)/set_image_uri(Option<String>):
required: falseURI of a container image in the Amazon ECR registry. Do not use for a function defined with a .zip file archive.
publish(bool)/set_publish(Option<bool>):
required: falseSet to true to publish a new version of the function after updating the code. This has the same effect as calling
PublishVersionseparately.dry_run(bool)/set_dry_run(Option<bool>):
required: falseSet to true to validate the request parameters and access permissions without modifying the function code.
revision_id(impl Into<String>)/set_revision_id(Option<String>):
required: falseUpdate the function only if the revision ID matches the ID that’s specified. Use this option to avoid modifying a function that has changed since you last read it.
architectures(Architecture)/set_architectures(Option<Vec::<Architecture>>):
required: falseThe 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
x86_64.source_kms_key_arn(impl Into<String>)/set_source_kms_key_arn(Option<String>):
required: falseThe ARN of the Key Management Service (KMS) customer managed key that’s used to encrypt your function’s .zip deployment package. If you don’t provide a customer managed key, Lambda uses an Amazon Web Services managed key.
- On success, responds with
UpdateFunctionCodeOutputwith field(s):function_name(Option<String>):The name of the function.
function_arn(Option<String>):The function’s Amazon Resource Name (ARN).
runtime(Option<Runtime>):The identifier of the function’s runtime. 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.
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 Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
role(Option<String>):The function’s execution role.
handler(Option<String>):The function that Lambda calls to begin running your function.
code_size(i64):The size of the function’s deployment package, in bytes.
description(Option<String>):The function’s description.
timeout(Option<i32>):The amount of time in seconds that Lambda allows a function to run before stopping it.
memory_size(Option<i32>):The amount of memory available to the function at runtime.
last_modified(Option<String>):The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
code_sha256(Option<String>):The SHA256 hash of the function’s deployment package.
version(Option<String>):The version of the Lambda function.
vpc_config(Option<VpcConfigResponse>):The function’s networking configuration.
dead_letter_config(Option<DeadLetterConfig>):The function’s dead letter queue.
environment(Option<EnvironmentResponse>):The function’s environment variables. Omitted from CloudTrail logs.
kms_key_arn(Option<String>):The ARN of the Key Management Service (KMS) customer managed key that’s used to encrypt the following resources:
-
The function’s environment variables.
-
The function’s Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn, the unzipped version of the .zip deployment package that’s used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
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 Function lifecycle.
If you don’t provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
-
tracing_config(Option<TracingConfigResponse>):The function’s X-Ray tracing configuration.
master_arn(Option<String>):For Lambda@Edge functions, the ARN of the main function.
revision_id(Option<String>):The latest updated revision of the function or alias.
layers(Option<Vec::<Layer>>):The function’s layers.
state(Option<State>):The current state of the function. When the state is
Inactive, you can reactivate the function by invoking it.state_reason(Option<String>):The reason for the function’s current state.
state_reason_code(Option<StateReasonCode>):The reason code for the function’s current state. When the code is
Creating, you can’t invoke or modify the function.last_update_status(Option<LastUpdateStatus>):The status of the last update that was performed on the function. This is first set to
Successfulafter function creation completes.last_update_status_reason(Option<String>):The reason for the last update that was performed on the function.
last_update_status_reason_code(Option<LastUpdateStatusReasonCode>):The reason code for the last update that was performed on the function.
file_system_configs(Option<Vec::<FileSystemConfig>>):Connection settings for an Amazon EFS file system.
package_type(Option<PackageType>):The type of deployment package. Set to
Imagefor container image and setZipfor .zip file archive.image_config_response(Option<ImageConfigResponse>):The function’s image configuration values.
signing_profile_version_arn(Option<String>):The ARN of the signing profile version.
signing_job_arn(Option<String>):The ARN of the signing job.
architectures(Option<Vec::<Architecture>>):The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is
x86_64.ephemeral_storage(Option<EphemeralStorage>):The size of the function’s
/tmpdirectory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).snap_start(Option<SnapStartResponse>):Set
ApplyOntoPublishedVersionsto create a snapshot of the initialized execution environment when you publish a function version. For more information, see Improving startup performance with Lambda SnapStart.runtime_version_config(Option<RuntimeVersionConfig>):The ARN of the runtime and any errors that occured.
logging_config(Option<LoggingConfig>):The function’s Amazon CloudWatch Logs configuration settings.
- On failure, responds with
SdkError<UpdateFunctionCodeError>
Source§impl Client
impl Client
Sourcepub fn update_function_configuration(
&self,
) -> UpdateFunctionConfigurationFluentBuilder
pub fn update_function_configuration( &self, ) -> UpdateFunctionConfigurationFluentBuilder
Constructs a fluent builder for the UpdateFunctionConfiguration operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
role(impl Into<String>)/set_role(Option<String>):
required: falseThe Amazon Resource Name (ARN) of the function’s execution role.
handler(impl Into<String>)/set_handler(Option<String>):
required: falseThe 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 Lambda programming model.
description(impl Into<String>)/set_description(Option<String>):
required: falseA description of the function.
timeout(i32)/set_timeout(Option<i32>):
required: falseThe 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 Lambda execution environment.
memory_size(i32)/set_memory_size(Option<i32>):
required: falseThe amount of memory available to the function 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.
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseFor 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 Configuring a Lambda function to access resources in a VPC.
environment(Environment)/set_environment(Option<Environment>):
required: falseEnvironment variables that are accessible from function code during execution.
runtime(Runtime)/set_runtime(Option<Runtime>):
required: falseThe identifier of the function’s runtime. 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.
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 Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
dead_letter_config(DeadLetterConfig)/set_dead_letter_config(Option<DeadLetterConfig>):
required: falseA dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
kms_key_arn(impl Into<String>)/set_kms_key_arn(Option<String>):
required: falseThe ARN of the Key Management Service (KMS) customer managed key that’s used to encrypt the following resources:
-
The function’s environment variables.
-
The function’s Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn, the unzipped version of the .zip deployment package that’s used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
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 Function lifecycle.
If you don’t provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
-
tracing_config(TracingConfig)/set_tracing_config(Option<TracingConfig>):
required: falseSet
ModetoActiveto sample and trace a subset of incoming requests with X-Ray.revision_id(impl Into<String>)/set_revision_id(Option<String>):
required: falseUpdate the function only if the revision ID matches the ID that’s specified. Use this option to avoid modifying a function that has changed since you last read it.
layers(impl Into<String>)/set_layers(Option<Vec::<String>>):
required: falseA list of function layers to add to the function’s execution environment. Specify each layer by its ARN, including the version.
file_system_configs(FileSystemConfig)/set_file_system_configs(Option<Vec::<FileSystemConfig>>):
required: falseConnection settings for an Amazon EFS file system.
image_config(ImageConfig)/set_image_config(Option<ImageConfig>):
required: falseContainer image configuration values that override the values in the container image Docker file.
ephemeral_storage(EphemeralStorage)/set_ephemeral_storage(Option<EphemeralStorage>):
required: falseThe size of the function’s
/tmpdirectory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).snap_start(SnapStart)/set_snap_start(Option<SnapStart>):
required: falseThe function’s SnapStart setting.
logging_config(LoggingConfig)/set_logging_config(Option<LoggingConfig>):
required: falseThe function’s Amazon CloudWatch Logs configuration settings.
- On success, responds with
UpdateFunctionConfigurationOutputwith field(s):function_name(Option<String>):The name of the function.
function_arn(Option<String>):The function’s Amazon Resource Name (ARN).
runtime(Option<Runtime>):The identifier of the function’s runtime. 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.
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 Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
role(Option<String>):The function’s execution role.
handler(Option<String>):The function that Lambda calls to begin running your function.
code_size(i64):The size of the function’s deployment package, in bytes.
description(Option<String>):The function’s description.
timeout(Option<i32>):The amount of time in seconds that Lambda allows a function to run before stopping it.
memory_size(Option<i32>):The amount of memory available to the function at runtime.
last_modified(Option<String>):The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
code_sha256(Option<String>):The SHA256 hash of the function’s deployment package.
version(Option<String>):The version of the Lambda function.
vpc_config(Option<VpcConfigResponse>):The function’s networking configuration.
dead_letter_config(Option<DeadLetterConfig>):The function’s dead letter queue.
environment(Option<EnvironmentResponse>):The function’s environment variables. Omitted from CloudTrail logs.
kms_key_arn(Option<String>):The ARN of the Key Management Service (KMS) customer managed key that’s used to encrypt the following resources:
-
The function’s environment variables.
-
The function’s Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn, the unzipped version of the .zip deployment package that’s used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
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 Function lifecycle.
If you don’t provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
-
tracing_config(Option<TracingConfigResponse>):The function’s X-Ray tracing configuration.
master_arn(Option<String>):For Lambda@Edge functions, the ARN of the main function.
revision_id(Option<String>):The latest updated revision of the function or alias.
layers(Option<Vec::<Layer>>):The function’s layers.
state(Option<State>):The current state of the function. When the state is
Inactive, you can reactivate the function by invoking it.state_reason(Option<String>):The reason for the function’s current state.
state_reason_code(Option<StateReasonCode>):The reason code for the function’s current state. When the code is
Creating, you can’t invoke or modify the function.last_update_status(Option<LastUpdateStatus>):The status of the last update that was performed on the function. This is first set to
Successfulafter function creation completes.last_update_status_reason(Option<String>):The reason for the last update that was performed on the function.
last_update_status_reason_code(Option<LastUpdateStatusReasonCode>):The reason code for the last update that was performed on the function.
file_system_configs(Option<Vec::<FileSystemConfig>>):Connection settings for an Amazon EFS file system.
package_type(Option<PackageType>):The type of deployment package. Set to
Imagefor container image and setZipfor .zip file archive.image_config_response(Option<ImageConfigResponse>):The function’s image configuration values.
signing_profile_version_arn(Option<String>):The ARN of the signing profile version.
signing_job_arn(Option<String>):The ARN of the signing job.
architectures(Option<Vec::<Architecture>>):The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is
x86_64.ephemeral_storage(Option<EphemeralStorage>):The size of the function’s
/tmpdirectory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).snap_start(Option<SnapStartResponse>):Set
ApplyOntoPublishedVersionsto create a snapshot of the initialized execution environment when you publish a function version. For more information, see Improving startup performance with Lambda SnapStart.runtime_version_config(Option<RuntimeVersionConfig>):The ARN of the runtime and any errors that occured.
logging_config(Option<LoggingConfig>):The function’s Amazon CloudWatch Logs configuration settings.
- On failure, responds with
SdkError<UpdateFunctionConfigurationError>
Source§impl Client
impl Client
Sourcepub fn update_function_event_invoke_config(
&self,
) -> UpdateFunctionEventInvokeConfigFluentBuilder
pub fn update_function_event_invoke_config( &self, ) -> UpdateFunctionEventInvokeConfigFluentBuilder
Constructs a fluent builder for the UpdateFunctionEventInvokeConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function, version, or alias.
Name formats
-
Function name -
my-function(name-only),my-function:v1(with alias). -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN -
123456789012:function:my-function.
You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseA version number or alias name.
maximum_retry_attempts(i32)/set_maximum_retry_attempts(Option<i32>):
required: falseThe maximum number of times to retry when the function returns an error.
maximum_event_age_in_seconds(i32)/set_maximum_event_age_in_seconds(Option<i32>):
required: falseThe maximum age of a request that Lambda sends to a function for processing.
destination_config(DestinationConfig)/set_destination_config(Option<DestinationConfig>):
required: falseA destination for events after they have been sent to a function for processing.
Destinations
-
Function - The Amazon Resource Name (ARN) of a Lambda function.
-
Queue - The ARN of a standard SQS queue.
-
Bucket - The ARN of an Amazon S3 bucket.
-
Topic - The ARN of a standard SNS topic.
-
Event Bus - The ARN of an Amazon EventBridge event bus.
S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type.
-
- On success, responds with
UpdateFunctionEventInvokeConfigOutputwith field(s):last_modified(Option<DateTime>):The date and time that the configuration was last updated.
function_arn(Option<String>):The Amazon Resource Name (ARN) of the function.
maximum_retry_attempts(Option<i32>):The maximum number of times to retry when the function returns an error.
maximum_event_age_in_seconds(Option<i32>):The maximum age of a request that Lambda sends to a function for processing.
destination_config(Option<DestinationConfig>):A destination for events after they have been sent to a function for processing.
Destinations
-
Function - The Amazon Resource Name (ARN) of a Lambda function.
-
Queue - The ARN of a standard SQS queue.
-
Bucket - The ARN of an Amazon S3 bucket.
-
Topic - The ARN of a standard SNS topic.
-
Event Bus - The ARN of an Amazon EventBridge event bus.
S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type.
-
- On failure, responds with
SdkError<UpdateFunctionEventInvokeConfigError>
Source§impl Client
impl Client
Sourcepub fn update_function_url_config(&self) -> UpdateFunctionUrlConfigFluentBuilder
pub fn update_function_url_config(&self) -> UpdateFunctionUrlConfigFluentBuilder
Constructs a fluent builder for the UpdateFunctionUrlConfig operation.
- The fluent builder is configurable:
function_name(impl Into<String>)/set_function_name(Option<String>):
required: trueThe name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
-
qualifier(impl Into<String>)/set_qualifier(Option<String>):
required: falseThe alias name.
auth_type(FunctionUrlAuthType)/set_auth_type(Option<FunctionUrlAuthType>):
required: falseThe type of authentication that your function URL uses. Set to
AWS_IAMif you want to restrict access to authenticated users only. Set toNONEif you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs.cors(Cors)/set_cors(Option<Cors>):
required: falseThe cross-origin resource sharing (CORS) settings for your function URL.
invoke_mode(InvokeMode)/set_invoke_mode(Option<InvokeMode>):
required: falseUse one of the following options:
-
BUFFERED– This is the default option. Lambda invokes your function using theInvokeAPI operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB. -
RESPONSE_STREAM– Your function streams payload results as they become available. Lambda invokes your function using theInvokeWithResponseStreamAPI operation. The maximum response payload size is 20 MB, however, you can request a quota increase.
-
- On success, responds with
UpdateFunctionUrlConfigOutputwith field(s):function_url(String):The HTTP URL endpoint for your function.
function_arn(String):The Amazon Resource Name (ARN) of your function.
auth_type(FunctionUrlAuthType):The type of authentication that your function URL uses. Set to
AWS_IAMif you want to restrict access to authenticated users only. Set toNONEif you want to bypass IAM authentication to create a public endpoint. For more information, see Security and auth model for Lambda function URLs.cors(Option<Cors>):The cross-origin resource sharing (CORS) settings for your function URL.
creation_time(String):When the function URL was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
last_modified_time(String):When the function URL configuration was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
invoke_mode(Option<InvokeMode>):Use one of the following options:
-
BUFFERED– This is the default option. Lambda invokes your function using theInvokeAPI operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB. -
RESPONSE_STREAM– Your function streams payload results as they become available. Lambda invokes your function using theInvokeWithResponseStreamAPI operation. The maximum response payload size is 20 MB, however, you can request a quota increase.
-
- On failure, responds with
SdkError<UpdateFunctionUrlConfigError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Source§impl Waiters for Client
impl Waiters for Client
Source§fn wait_until_function_active_v2(&self) -> FunctionActiveV2FluentBuilder
fn wait_until_function_active_v2(&self) -> FunctionActiveV2FluentBuilder
Source§fn wait_until_function_exists(&self) -> FunctionExistsFluentBuilder
fn wait_until_function_exists(&self) -> FunctionExistsFluentBuilder
function_existsSource§fn wait_until_function_updated_v2(&self) -> FunctionUpdatedV2FluentBuilder
fn wait_until_function_updated_v2(&self) -> FunctionUpdatedV2FluentBuilder
Source§fn wait_until_function_active(&self) -> FunctionActiveFluentBuilder
fn wait_until_function_active(&self) -> FunctionActiveFluentBuilder
Source§fn wait_until_function_updated(&self) -> FunctionUpdatedFluentBuilder
fn wait_until_function_updated(&self) -> FunctionUpdatedFluentBuilder
Source§fn wait_until_published_version_active(
&self,
) -> PublishedVersionActiveFluentBuilder
fn wait_until_published_version_active( &self, ) -> PublishedVersionActiveFluentBuilder
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightBlack.
§Example
println!("{}", value.bright_black());Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightGreen.
§Example
println!("{}", value.bright_green());Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightYellow.
§Example
println!("{}", value.bright_yellow());Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightMagenta.
§Example
println!("{}", value.bright_magenta());Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightWhite.
§Example
println!("{}", value.bright_white());Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightBlack.
§Example
println!("{}", value.on_bright_black());Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightGreen.
§Example
println!("{}", value.on_bright_green());Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightYellow.
§Example
println!("{}", value.on_bright_yellow());Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightBlue.
§Example
println!("{}", value.on_bright_blue());Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightMagenta.
§Example
println!("{}", value.on_bright_magenta());Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightCyan.
§Example
println!("{}", value.on_bright_cyan());Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightWhite.
§Example
println!("{}", value.on_bright_white());Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::Underline.
§Example
println!("{}", value.underline());Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::RapidBlink.
§Example
println!("{}", value.rapid_blink());Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);