Class: Aws::LambdaPreview::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::LambdaPreview::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-lambdapreview/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.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
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.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
361 362 363 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 361 def initialize(*args) super 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.
467 468 469 470 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 467 def add_event_source(params = {}, = {}) req = build_request(:add_event_source, params) req.send_request() end |
#delete_function(params = {}) ⇒ Struct
Deletes the specified Lambda function code and configuration.
This operation requires permission for the lambda:DeleteFunction
action.
492 493 494 495 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 492 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.
541 542 543 544 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 541 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.
590 591 592 593 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 590 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.
646 647 648 649 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 646 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.
684 685 686 687 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 684 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.
749 750 751 752 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 749 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.
805 806 807 808 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 805 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.
831 832 833 834 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 831 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.
919 920 921 922 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 919 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.
1031 1032 1033 1034 |
# File 'gems/aws-sdk-lambdapreview/lib/aws-sdk-lambdapreview/client.rb', line 1031 def upload_function(params = {}, = {}) req = build_request(:upload_function, params) req.send_request() end |