Struct aws_sdk_lambda::Client

source ·
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.

Examples

Constructing a client and invoking an operation

    // create a shared configuration. This can be used & shared between multiple service clients.
    let shared_config = aws_config::load_from_env().await;
    let client = aws_sdk_lambda::Client::new(&shared_config);
    // invoke an operation
    /* let rsp = client
        .<operation_name>().
        .<param>("some value")
        .send().await; */

Constructing a client with custom configuration

use aws_config::retry::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_lambda::config::Builder::from(&shared_config)
  .retry_config(RetryConfig::disabled())
  .build();
let client = aws_sdk_lambda::Client::from_conf(config);

Implementations§

Creates a client with the given service configuration.

Returns the client’s configuration.

Constructs a fluent builder for the AddLayerVersionPermission operation.

Constructs a fluent builder for the AddPermission operation.

Constructs a fluent builder for the CreateAlias operation.

Constructs a fluent builder for the CreateCodeSigningConfig operation.

Constructs a fluent builder for the CreateEventSourceMapping operation.

Constructs a fluent builder for the CreateFunction operation.

Constructs a fluent builder for the CreateFunctionUrlConfig operation.

Constructs a fluent builder for the DeleteAlias operation.

Constructs a fluent builder for the DeleteCodeSigningConfig operation.

Constructs a fluent builder for the DeleteEventSourceMapping operation.

Constructs a fluent builder for the DeleteFunction operation.

Constructs a fluent builder for the DeleteFunctionCodeSigningConfig operation.

Constructs a fluent builder for the DeleteFunctionConcurrency operation.

Constructs a fluent builder for the DeleteFunctionEventInvokeConfig operation.

Constructs a fluent builder for the DeleteFunctionUrlConfig operation.

Constructs a fluent builder for the DeleteLayerVersion operation.

Constructs a fluent builder for the DeleteProvisionedConcurrencyConfig operation.

Constructs a fluent builder for the GetAccountSettings operation.

Constructs a fluent builder for the GetAlias operation.

Constructs a fluent builder for the GetCodeSigningConfig operation.

Constructs a fluent builder for the GetEventSourceMapping operation.

Constructs a fluent builder for the GetFunction operation.

Constructs a fluent builder for the GetFunctionCodeSigningConfig operation.

  • The fluent builder is configurable:
    • function_name(impl Into<String>) / set_function_name(Option<String>):

      The name of the Lambda function.

      Name formats

      • Function name - MyFunction.

      • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.

      • Partial ARN - 123456789012:function:MyFunction.

      The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

  • On success, responds with GetFunctionCodeSigningConfigOutput with field(s):
    • code_signing_config_arn(Option<String>):

      The The Amazon Resource Name (ARN) of the code signing configuration.

    • function_name(Option<String>):

      The name of the Lambda function.

      Name formats

      • Function name - MyFunction.

      • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.

      • Partial ARN - 123456789012:function:MyFunction.

      The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

  • On failure, responds with SdkError<GetFunctionCodeSigningConfigError>

Constructs a fluent builder for the GetFunctionConcurrency operation.

Constructs a fluent builder for the GetFunctionConfiguration operation.

Constructs a fluent builder for the GetFunctionEventInvokeConfig operation.

Constructs a fluent builder for the GetFunctionUrlConfig operation.

Constructs a fluent builder for the GetLayerVersion operation.

Constructs a fluent builder for the GetLayerVersionByArn operation.

Constructs a fluent builder for the GetLayerVersionPolicy operation.

Constructs a fluent builder for the GetPolicy operation.

Constructs a fluent builder for the GetProvisionedConcurrencyConfig operation.

Constructs a fluent builder for the GetRuntimeManagementConfig operation.

Constructs a fluent builder for the Invoke operation.

  • The fluent builder is configurable:
    • function_name(impl Into<String>) / set_function_name(Option<String>):

      The name of the Lambda function, version, or alias.

      Name formats

      • Function namemy-function (name-only), my-function:v1 (with alias).

      • Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function.

      • Partial ARN123456789012: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>):

      Choose 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>):

      Set to Tail to include the execution log in the response. Applies to synchronously invoked functions only.

    • client_context(impl Into<String>) / set_client_context(Option<String>):

      Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.

    • payload(Blob) / set_payload(Option<Blob>):

      The 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>):

      Specify a version or alias to invoke a published version of the function.

  • On success, responds with InvokeOutput with field(s):
    • status_code(i32):

      The HTTP status code is in the 200 range for a successful request. For the RequestResponse invocation type, this status code is 200. For the Event invocation type, this status code is 202. For the DryRun invocation 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>

Constructs a fluent builder for the InvokeAsync operation.

Constructs a fluent builder for the ListAliases operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListCodeSigningConfigs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListEventSourceMappings operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListFunctionEventInvokeConfigs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListFunctions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListFunctionsByCodeSigningConfig operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListFunctionUrlConfigs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListLayers operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListLayerVersions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListProvisionedConcurrencyConfigs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTags operation.

Constructs a fluent builder for the ListVersionsByFunction operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the PublishLayerVersion operation.

Constructs a fluent builder for the PublishVersion operation.

Constructs a fluent builder for the PutFunctionCodeSigningConfig operation.

Constructs a fluent builder for the PutFunctionConcurrency operation.

Constructs a fluent builder for the PutFunctionEventInvokeConfig operation.

Constructs a fluent builder for the PutProvisionedConcurrencyConfig operation.

Constructs a fluent builder for the PutRuntimeManagementConfig operation.

Constructs a fluent builder for the RemoveLayerVersionPermission operation.

Constructs a fluent builder for the RemovePermission operation.

Constructs a fluent builder for the TagResource operation.

Constructs a fluent builder for the UntagResource operation.

Constructs a fluent builder for the UpdateAlias operation.

Constructs a fluent builder for the UpdateCodeSigningConfig operation.

Constructs a fluent builder for the UpdateEventSourceMapping operation.

Constructs a fluent builder for the UpdateFunctionCode operation.

Constructs a fluent builder for the UpdateFunctionConfiguration operation.

Constructs a fluent builder for the UpdateFunctionEventInvokeConfig operation.

Constructs a fluent builder for the UpdateFunctionUrlConfig operation.

Creates a new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Creates a new client from the service Config.

Panics
  • This method will panic if the conf is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the conf is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more