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.
418 419 420 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 418 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.
1119 1120 1121 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1119 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.
1122 1123 1124 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1122 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
524 525 526 527 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 524 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.
1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1097 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-lambdapreview' context[:gem_version] = '1.49.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.
549 550 551 552 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 549 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.
598 599 600 601 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 598 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.
647 648 649 650 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 647 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.
703 704 705 706 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 703 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.
741 742 743 744 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 741 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.
806 807 808 809 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 806 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.
862 863 864 865 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 862 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.
888 889 890 891 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 888 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.
976 977 978 979 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 976 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.
1088 1089 1090 1091 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1088 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.
1112 1113 1114 |
# File 'lib/aws-sdk-lambdapreview/client.rb', line 1112 def waiter_names [] end |