Class: Aws::LambdaPreview::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::LambdaPreview::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-lambdapreview/client.rb
Overview
An API client for LambdaPreview. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::LambdaPreview::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#add_event_source(params = {}) ⇒ Types::EventSourceConfiguration
Identifies a stream as an event source for an AWS Lambda function.
-
#delete_function(params = {}) ⇒ Struct
Deletes the specified Lambda function code and configuration.
-
#get_event_source(params = {}) ⇒ Types::EventSourceConfiguration
Returns configuration information for the specified event source mapping (see AddEventSource).
-
#get_function(params = {}) ⇒ Types::GetFunctionResponse
Returns the configuration information of the Lambda function and a presigned URL link to the .zip file you uploaded with UploadFunction so you can download the .zip file.
-
#get_function_configuration(params = {}) ⇒ Types::FunctionConfiguration
Returns the configuration information of the Lambda function.
-
#invoke_async(params = {}) ⇒ Types::InvokeAsyncResponse
Submits an invocation request to AWS Lambda.
-
#list_event_sources(params = {}) ⇒ Types::ListEventSourcesResponse
Returns a list of event source mappings you created using the ‘AddEventSource` (see AddEventSource), where you identify a stream as event source.
-
#list_functions(params = {}) ⇒ Types::ListFunctionsResponse
Returns a list of your Lambda functions.
-
#remove_event_source(params = {}) ⇒ Struct
Removes an event source mapping.
-
#update_function_configuration(params = {}) ⇒ Types::FunctionConfiguration
Updates the configuration parameters for the specified Lambda function by using the values provided in the request.
-
#upload_function(params = {}) ⇒ Types::FunctionConfiguration
Creates a new Lambda function or updates an existing function.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
430 431 432 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 430 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1136 1137 1138 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1136 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1139 1140 1141 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1139 def errors_module Errors end |
Instance Method Details
#add_event_source(params = {}) ⇒ Types::EventSourceConfiguration
Identifies a stream as an event source for an AWS Lambda function. It can be either an Amazon Kinesis stream or a Amazon DynamoDB stream. AWS Lambda invokes the specified function when records are posted to the stream.
This is the pull model, where AWS Lambda invokes the function. For more information, go to [AWS Lambda: How it Works] in the AWS Lambda Developer Guide.
This association between an Amazon Kinesis stream and an AWS Lambda function is called the event source mapping. You provide the configuration information (for example, which stream to read from and which AWS Lambda function to invoke) for the event source mapping in the request body.
Each event source, such as a Kinesis stream, can only be associated with one AWS Lambda function. If you call AddEventSource for an event source that is already mapped to another AWS Lambda function, the existing mapping is updated to call the new function instead of the old one.
This operation requires permission for the ‘iam:PassRole` action for the IAM role. It also requires permission for the `lambda:AddEventSource` action.
[1]: docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html
536 537 538 539 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 536 def add_event_source(params = {}, = {}) req = build_request(:add_event_source, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1109 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::LambdaPreview') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-lambdapreview' context[:gem_version] = '1.50.0' Seahorse::Client::Request.new(handlers, context) end |
#delete_function(params = {}) ⇒ Struct
Deletes the specified Lambda function code and configuration.
This operation requires permission for the ‘lambda:DeleteFunction` action.
561 562 563 564 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 561 def delete_function(params = {}, = {}) req = build_request(:delete_function, params) req.send_request() end |
#get_event_source(params = {}) ⇒ Types::EventSourceConfiguration
Returns configuration information for the specified event source mapping (see AddEventSource).
This operation requires permission for the ‘lambda:GetEventSource` action.
610 611 612 613 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 610 def get_event_source(params = {}, = {}) req = build_request(:get_event_source, params) req.send_request() end |
#get_function(params = {}) ⇒ Types::GetFunctionResponse
Returns the configuration information of the Lambda function and a presigned URL link to the .zip file you uploaded with UploadFunction so you can download the .zip file. Note that the URL is valid for up to 10 minutes. The configuration information is the same information you provided as parameters when uploading the function.
This operation requires permission for the ‘lambda:GetFunction` action.
659 660 661 662 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 659 def get_function(params = {}, = {}) req = build_request(:get_function, params) req.send_request() end |
#get_function_configuration(params = {}) ⇒ Types::FunctionConfiguration
Returns the configuration information of the Lambda function. This the same information you provided as parameters when uploading the function by using UploadFunction.
This operation requires permission for the ‘lambda:GetFunctionConfiguration` operation.
715 716 717 718 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 715 def get_function_configuration(params = {}, = {}) req = build_request(:get_function_configuration, params) req.send_request() end |
#invoke_async(params = {}) ⇒ Types::InvokeAsyncResponse
Submits an invocation request to AWS Lambda. Upon receiving the request, Lambda executes the specified function asynchronously. To see the logs generated by the Lambda function execution, see the CloudWatch logs console.
This operation requires permission for the ‘lambda:InvokeFunction` action.
753 754 755 756 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 753 def invoke_async(params = {}, = {}) req = build_request(:invoke_async, params) req.send_request() end |
#list_event_sources(params = {}) ⇒ Types::ListEventSourcesResponse
Returns a list of event source mappings you created using the ‘AddEventSource` (see AddEventSource), where you identify a stream as event source. This list does not include Amazon S3 event sources.
For each mapping, the API returns configuration information. You can optionally specify filters to retrieve specific event source mappings.
This operation requires permission for the ‘lambda:ListEventSources` action.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
818 819 820 821 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 818 def list_event_sources(params = {}, = {}) req = build_request(:list_event_sources, params) req.send_request() end |
#list_functions(params = {}) ⇒ Types::ListFunctionsResponse
Returns a list of your Lambda functions. For each function, the response includes the function configuration information. You must use GetFunction to retrieve the code for your function.
This operation requires permission for the ‘lambda:ListFunctions` action.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
874 875 876 877 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 874 def list_functions(params = {}, = {}) req = build_request(:list_functions, params) req.send_request() end |
#remove_event_source(params = {}) ⇒ Struct
Removes an event source mapping. This means AWS Lambda will no longer invoke the function for events in the associated source.
This operation requires permission for the ‘lambda:RemoveEventSource` action.
900 901 902 903 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 900 def remove_event_source(params = {}, = {}) req = build_request(:remove_event_source, params) req.send_request() end |
#update_function_configuration(params = {}) ⇒ Types::FunctionConfiguration
Updates the configuration parameters for the specified Lambda function by using the values provided in the request. You provide only the parameters you want to change. This operation must only be used on an existing Lambda function and cannot be used to update the function’s code.
This operation requires permission for the ‘lambda:UpdateFunctionConfiguration` action.
988 989 990 991 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 988 def update_function_configuration(params = {}, = {}) req = build_request(:update_function_configuration, params) req.send_request() end |
#upload_function(params = {}) ⇒ Types::FunctionConfiguration
Creates a new Lambda function or updates an existing function. The function metadata is created from the request parameters, and the code for the function is provided by a .zip file in the request body. If the function name already exists, the existing Lambda function is updated with the new code and metadata.
This operation requires permission for the ‘lambda:UploadFunction` action.
1100 1101 1102 1103 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1100 def upload_function(params = {}, = {}) req = build_request(:upload_function, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1129 1130 1131 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1129 def waiter_names [] end |