Class: Aws::Lambda::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Lambda::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-lambda/client.rb
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#add_permission(params = {}) ⇒ Types::AddPermissionResponse
Adds a permission to the resource policy associated with the specified AWS Lambda function.
-
#create_alias(params = {}) ⇒ Types::AliasConfiguration
Creates an alias that points to the specified Lambda function version.
-
#create_event_source_mapping(params = {}) ⇒ Types::EventSourceMappingConfiguration
Creates a mapping between an event source and an AWS Lambda function.
-
#create_function(params = {}) ⇒ Types::FunctionConfiguration
Creates a new Lambda function.
-
#delete_alias(params = {}) ⇒ Struct
Deletes the specified Lambda function alias.
-
#delete_event_source_mapping(params = {}) ⇒ Types::EventSourceMappingConfiguration
Deletes an event source mapping.
-
#delete_function(params = {}) ⇒ Struct
Deletes a Lambda function.
-
#delete_function_concurrency(params = {}) ⇒ Struct
Removes concurrent execution limits from this function.
-
#get_account_settings(params = {}) ⇒ Types::GetAccountSettingsResponse
Retrieves details about your account’s [limits] and usage in a region.
-
#get_alias(params = {}) ⇒ Types::AliasConfiguration
Returns the specified alias information such as the alias ARN, description, and function version it is pointing to.
-
#get_event_source_mapping(params = {}) ⇒ Types::EventSourceMappingConfiguration
Returns details about an event source mapping.
-
#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 CreateFunction so you can download the .zip file.
-
#get_function_configuration(params = {}) ⇒ Types::FunctionConfiguration
Returns the configuration information of the Lambda function.
-
#get_policy(params = {}) ⇒ Types::GetPolicyResponse
Returns the resource policy associated with the specified Lambda function.
-
#invoke(params = {}) ⇒ Types::InvocationResponse
Invokes a Lambda function.
-
#invoke_async(params = {}) ⇒ Types::InvokeAsyncResponse
For asynchronous function invocation, use Invoke.
-
#list_aliases(params = {}) ⇒ Types::ListAliasesResponse
Returns list of aliases created for a Lambda function.
-
#list_event_source_mappings(params = {}) ⇒ Types::ListEventSourceMappingsResponse
Lists event source mappings.
-
#list_functions(params = {}) ⇒ Types::ListFunctionsResponse
Returns a list of your Lambda functions.
-
#list_tags(params = {}) ⇒ Types::ListTagsResponse
Returns a list of tags assigned to a function when supplied the function ARN (Amazon Resource Name).
-
#list_versions_by_function(params = {}) ⇒ Types::ListVersionsByFunctionResponse
Lists all versions of a function.
-
#publish_version(params = {}) ⇒ Types::FunctionConfiguration
Publishes a version of your function from the current snapshot of $LATEST.
-
#put_function_concurrency(params = {}) ⇒ Types::Concurrency
Sets a limit on the number of concurrent executions available to this function.
-
#remove_permission(params = {}) ⇒ Struct
Removes permissions from a function.
-
#tag_resource(params = {}) ⇒ Struct
Creates a list of tags (key-value pairs) on the Lambda function.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from a Lambda function.
-
#update_alias(params = {}) ⇒ Types::AliasConfiguration
Using this API you can update the function version to which the alias points and the alias description.
-
#update_event_source_mapping(params = {}) ⇒ Types::EventSourceMappingConfiguration
Updates an event source mapping.
-
#update_function_code(params = {}) ⇒ Types::FunctionConfiguration
Updates the code for the specified Lambda function.
-
#update_function_configuration(params = {}) ⇒ Types::FunctionConfiguration
Updates the configuration parameters for the specified Lambda function by using the values provided in the request.
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.
202 203 204 |
# File 'lib/aws-sdk-lambda/client.rb', line 202 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.
3165 3166 3167 |
# File 'lib/aws-sdk-lambda/client.rb', line 3165 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.
3168 3169 3170 |
# File 'lib/aws-sdk-lambda/client.rb', line 3168 def errors_module Errors end |
Instance Method Details
#add_permission(params = {}) ⇒ Types::AddPermissionResponse
Adds a permission to the resource policy associated with the specified AWS Lambda function. You use resource policies to grant permissions to event sources that use the push model. In a push model, event sources (such as Amazon S3 and custom applications) invoke your Lambda function. Each permission you add to the resource policy allows an event source permission to invoke the Lambda function.
Permissions apply to the Amazon Resource Name (ARN) used to invoke the function, which can be unqualified (the unpublished version of the function), or include a version or alias. If a client uses a version or alias to invoke a function, use the ‘Qualifier` parameter to apply permissions to that ARN. For more information about versioning, see [AWS Lambda Function Versioning and Aliases].
This operation requires permission for the ‘lambda:AddPermission` action.
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
338 339 340 341 |
# File 'lib/aws-sdk-lambda/client.rb', line 338 def (params = {}, = {}) req = build_request(:add_permission, 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.
3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 |
# File 'lib/aws-sdk-lambda/client.rb', line 3143 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-lambda' context[:gem_version] = '1.15.0' Seahorse::Client::Request.new(handlers, context) end |
#create_alias(params = {}) ⇒ Types::AliasConfiguration
Creates an alias that points to the specified Lambda function version. For more information, see [Introduction to AWS Lambda Aliases].
Alias names are unique for a given function. This requires permission for the lambda:CreateAlias action.
[1]: docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html
423 424 425 426 |
# File 'lib/aws-sdk-lambda/client.rb', line 423 def create_alias(params = {}, = {}) req = build_request(:create_alias, params) req.send_request() end |
#create_event_source_mapping(params = {}) ⇒ Types::EventSourceMappingConfiguration
Creates a mapping between an event source and an AWS Lambda function. Lambda reads items from the event source and triggers the function.
For details about each event source type, see the following topics.
- Using AWS Lambda with Amazon Kinesis][1
- Using AWS Lambda with Amazon SQS][2
- Using AWS Lambda with Amazon DynamoDB][3
[1]: docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html [2]: docs.aws.amazon.com/lambda/latest/dg/with-sqs.html [3]: docs.aws.amazon.com/lambda/latest/dg/with-ddb.html
531 532 533 534 |
# File 'lib/aws-sdk-lambda/client.rb', line 531 def create_event_source_mapping(params = {}, = {}) req = build_request(:create_event_source_mapping, params) req.send_request() end |
#create_function(params = {}) ⇒ Types::FunctionConfiguration
Creates a new Lambda function. The function configuration is created from the request parameters, and the code for the function is provided by a .zip file. The function name is case-sensitive.
This operation requires permission for the ‘lambda:CreateFunction` action.
763 764 765 766 |
# File 'lib/aws-sdk-lambda/client.rb', line 763 def create_function(params = {}, = {}) req = build_request(:create_function, params) req.send_request() end |
#delete_alias(params = {}) ⇒ Struct
Deletes the specified Lambda function alias. For more information, see [Introduction to AWS Lambda Aliases].
This requires permission for the lambda:DeleteAlias action.
[1]: docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html
818 819 820 821 |
# File 'lib/aws-sdk-lambda/client.rb', line 818 def delete_alias(params = {}, = {}) req = build_request(:delete_alias, params) req.send_request() end |
#delete_event_source_mapping(params = {}) ⇒ Types::EventSourceMappingConfiguration
Deletes an event source mapping.
881 882 883 884 |
# File 'lib/aws-sdk-lambda/client.rb', line 881 def delete_event_source_mapping(params = {}, = {}) req = build_request(:delete_event_source_mapping, params) req.send_request() end |
#delete_function(params = {}) ⇒ Struct
Deletes a Lambda function. To delete a specific function version, use the ‘Qualifier` parameter. Otherwise, all versions and aliases are deleted. Event source mappings are not deleted.
This operation requires permission for the ‘lambda:DeleteFunction` action.
935 936 937 938 |
# File 'lib/aws-sdk-lambda/client.rb', line 935 def delete_function(params = {}, = {}) req = build_request(:delete_function, params) req.send_request() end |
#delete_function_concurrency(params = {}) ⇒ Struct
Removes concurrent execution limits from this function. For more information, see [Managing Concurrency].
[1]: docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html
974 975 976 977 |
# File 'lib/aws-sdk-lambda/client.rb', line 974 def delete_function_concurrency(params = {}, = {}) req = build_request(:delete_function_concurrency, params) req.send_request() end |
#get_account_settings(params = {}) ⇒ Types::GetAccountSettingsResponse
Retrieves details about your account’s [limits] and usage in a region.
1021 1022 1023 1024 |
# File 'lib/aws-sdk-lambda/client.rb', line 1021 def get_account_settings(params = {}, = {}) req = build_request(:get_account_settings, params) req.send_request() end |
#get_alias(params = {}) ⇒ Types::AliasConfiguration
Returns the specified alias information such as the alias ARN, description, and function version it is pointing to. For more information, see [Introduction to AWS Lambda Aliases].
This requires permission for the ‘lambda:GetAlias` action.
[1]: docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html
1102 1103 1104 1105 |
# File 'lib/aws-sdk-lambda/client.rb', line 1102 def get_alias(params = {}, = {}) req = build_request(:get_alias, params) req.send_request() end |
#get_event_source_mapping(params = {}) ⇒ Types::EventSourceMappingConfiguration
Returns details about an event source mapping.
1165 1166 1167 1168 |
# File 'lib/aws-sdk-lambda/client.rb', line 1165 def get_event_source_mapping(params = {}, = {}) req = build_request(:get_event_source_mapping, 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 CreateFunction 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.
Use the ‘Qualifier` parameter to retrieve a published version of the function. Otherwise, returns the unpublished version (`$LATEST`). For more information, see [AWS Lambda Function Versioning and Aliases].
This operation requires permission for the ‘lambda:GetFunction` action.
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
1301 1302 1303 1304 |
# File 'lib/aws-sdk-lambda/client.rb', line 1301 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 CreateFunction.
If you are using the versioning feature, you can retrieve this information for a specific function version by using the optional ‘Qualifier` parameter and specifying the function version or alias that points to it. If you don’t provide it, the API returns information about the $LATEST version of the function. For more information about versioning, see [AWS Lambda Function Versioning and Aliases].
This operation requires permission for the ‘lambda:GetFunctionConfiguration` operation.
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
1439 1440 1441 1442 |
# File 'lib/aws-sdk-lambda/client.rb', line 1439 def get_function_configuration(params = {}, = {}) req = build_request(:get_function_configuration, params) req.send_request() end |
#get_policy(params = {}) ⇒ Types::GetPolicyResponse
Returns the resource policy associated with the specified Lambda function.
This action requires permission for the ‘lambda:GetPolicy action.`
1507 1508 1509 1510 |
# File 'lib/aws-sdk-lambda/client.rb', line 1507 def get_policy(params = {}, = {}) req = build_request(:get_policy, params) req.send_request() end |
#invoke(params = {}) ⇒ Types::InvocationResponse
Invokes a Lambda function. For an example, see [Create the Lambda Function and Test It Manually].
Specify just a function name to invoke the latest version of the function. To invoke a published version, use the ‘Qualifier` parameter to specify a [version or alias].
If you use the ‘RequestResponse` (synchronous) invocation option, the function will be invoked only once. If you use the `Event` (asynchronous) invocation option, the function will be invoked at least once in response to an event and the function must be idempotent to handle this.
For functions with a long timeout, your client may be disconnected during synchronous invocation while it waits for a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections with timeout or keep-alive settings.
This operation requires permission for the ‘lambda:InvokeFunction` action.
The ‘TooManyRequestsException` noted below will return the following: `ConcurrentInvocationLimitExceeded` will be returned if you have no functions with reserved concurrency and have exceeded your account concurrent limit or if a function without reserved concurrency exceeds the account’s unreserved concurrency limit. ‘ReservedFunctionConcurrentInvocationLimitExceeded` will be returned when a function with reserved concurrency exceeds its configured concurrency limit.
[1]: docs.aws.amazon.com/lambda/latest/dg/with-dynamodb-create-function.html#with-dbb-invoke-manually [2]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
1661 1662 1663 1664 |
# File 'lib/aws-sdk-lambda/client.rb', line 1661 def invoke(params = {}, = {}) req = build_request(:invoke, params) req.send_request() end |
#invoke_async(params = {}) ⇒ Types::InvokeAsyncResponse
For asynchronous function invocation, use Invoke.
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.
1728 1729 1730 1731 |
# File 'lib/aws-sdk-lambda/client.rb', line 1728 def invoke_async(params = {}, = {}) req = build_request(:invoke_async, params) req.send_request() end |
#list_aliases(params = {}) ⇒ Types::ListAliasesResponse
Returns list of aliases created for a Lambda function. For each alias, the response includes information such as the alias ARN, description, alias name, and the function version to which it points. For more information, see [Introduction to AWS Lambda Aliases].
This requires permission for the lambda:ListAliases action.
[1]: docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html
1823 1824 1825 1826 |
# File 'lib/aws-sdk-lambda/client.rb', line 1823 def list_aliases(params = {}, = {}) req = build_request(:list_aliases, params) req.send_request() end |
#list_event_source_mappings(params = {}) ⇒ Types::ListEventSourceMappingsResponse
Lists event source mappings. Specify an ‘EventSourceArn` to only show event source mappings for a single event source.
1896 1897 1898 1899 |
# File 'lib/aws-sdk-lambda/client.rb', line 1896 def list_event_source_mappings(params = {}, = {}) req = build_request(:list_event_source_mappings, 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.
If you are using the versioning feature, you can list all of your functions or only ‘$LATEST` versions. For information about the versioning feature, see [AWS Lambda Function Versioning and Aliases].
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
2003 2004 2005 2006 |
# File 'lib/aws-sdk-lambda/client.rb', line 2003 def list_functions(params = {}, = {}) req = build_request(:list_functions, params) req.send_request() end |
#list_tags(params = {}) ⇒ Types::ListTagsResponse
Returns a list of tags assigned to a function when supplied the function ARN (Amazon Resource Name). For more information on Tagging, see [Tagging Lambda Functions] in the **AWS Lambda Developer Guide**.
2045 2046 2047 2048 |
# File 'lib/aws-sdk-lambda/client.rb', line 2045 def (params = {}, = {}) req = build_request(:list_tags, params) req.send_request() end |
#list_versions_by_function(params = {}) ⇒ Types::ListVersionsByFunctionResponse
Lists all versions of a function. For information about versioning, see [AWS Lambda Function Versioning and Aliases].
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
2148 2149 2150 2151 |
# File 'lib/aws-sdk-lambda/client.rb', line 2148 def list_versions_by_function(params = {}, = {}) req = build_request(:list_versions_by_function, params) req.send_request() end |
#publish_version(params = {}) ⇒ Types::FunctionConfiguration
Publishes a version of your function from the current snapshot of $LATEST. That is, AWS Lambda takes a snapshot of the function code and configuration information from $LATEST and publishes a new version. The code and configuration cannot be modified after publication. For information about the versioning feature, see [AWS Lambda Function Versioning and Aliases].
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
2292 2293 2294 2295 |
# File 'lib/aws-sdk-lambda/client.rb', line 2292 def publish_version(params = {}, = {}) req = build_request(:publish_version, params) req.send_request() end |
#put_function_concurrency(params = {}) ⇒ Types::Concurrency
Sets a limit on the number of concurrent executions available to this function. It is a subset of your account’s total concurrent execution limit per region. Note that Lambda automatically reserves a buffer of 100 concurrent executions for functions without any reserved concurrency limit. This means if your account limit is 1000, you have a total of 900 available to allocate to individual functions. For more information, see [Managing Concurrency].
[1]: docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html
2346 2347 2348 2349 |
# File 'lib/aws-sdk-lambda/client.rb', line 2346 def put_function_concurrency(params = {}, = {}) req = build_request(:put_function_concurrency, params) req.send_request() end |
#remove_permission(params = {}) ⇒ Struct
Removes permissions from a function. You can remove individual permissions from an resource policy associated with a Lambda function by providing a statement ID that you provided when you added the permission. When you remove permissions, disable the event source mapping or trigger configuration first to avoid errors.
Permissions apply to the Amazon Resource Name (ARN) used to invoke the function, which can be unqualified (the unpublished version of the function), or include a version or alias. If a client uses a version or alias to invoke a function, use the ‘Qualifier` parameter to apply permissions to that ARN. For more information about versioning, see [AWS Lambda Function Versioning and Aliases].
You need permission for the ‘lambda:RemovePermission` action.
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
2426 2427 2428 2429 |
# File 'lib/aws-sdk-lambda/client.rb', line 2426 def (params = {}, = {}) req = build_request(:remove_permission, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Creates a list of tags (key-value pairs) on the Lambda function. Requires the Lambda function ARN (Amazon Resource Name). If a key is specified without a value, Lambda creates a tag with the specified key and a value of null. For more information, see [Tagging Lambda Functions] in the **AWS Lambda Developer Guide**.
2474 2475 2476 2477 |
# File 'lib/aws-sdk-lambda/client.rb', line 2474 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from a Lambda function. Requires the function ARN (Amazon Resource Name). For more information, see [Tagging Lambda Functions] in the **AWS Lambda Developer Guide**.
2518 2519 2520 2521 |
# File 'lib/aws-sdk-lambda/client.rb', line 2518 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_alias(params = {}) ⇒ Types::AliasConfiguration
Using this API you can update the function version to which the alias points and the alias description. For more information, see [Introduction to AWS Lambda Aliases].
This requires permission for the lambda:UpdateAlias action.
[1]: docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html
2633 2634 2635 2636 |
# File 'lib/aws-sdk-lambda/client.rb', line 2633 def update_alias(params = {}, = {}) req = build_request(:update_alias, params) req.send_request() end |
#update_event_source_mapping(params = {}) ⇒ Types::EventSourceMappingConfiguration
Updates an event source mapping. You can change the function that AWS Lambda invokes, or pause invocation and resume later from the same location.
2734 2735 2736 2737 |
# File 'lib/aws-sdk-lambda/client.rb', line 2734 def update_event_source_mapping(params = {}, = {}) req = build_request(:update_event_source_mapping, params) req.send_request() end |
#update_function_code(params = {}) ⇒ Types::FunctionConfiguration
Updates the code for the specified Lambda function. This operation must only be used on an existing Lambda function and cannot be used to update the function configuration.
If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see [AWS Lambda Function Versioning and Aliases].
This operation requires permission for the ‘lambda:UpdateFunctionCode` action.
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
2914 2915 2916 2917 |
# File 'lib/aws-sdk-lambda/client.rb', line 2914 def update_function_code(params = {}, = {}) req = build_request(:update_function_code, 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.
If you are using the versioning feature, note this API will always update the $LATEST version of your Lambda function. For information about the versioning feature, see [AWS Lambda Function Versioning and Aliases].
This operation requires permission for the ‘lambda:UpdateFunctionConfiguration` action.
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
3134 3135 3136 3137 |
# File 'lib/aws-sdk-lambda/client.rb', line 3134 def update_function_configuration(params = {}, = {}) req = build_request(:update_function_configuration, 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.
3158 3159 3160 |
# File 'lib/aws-sdk-lambda/client.rb', line 3158 def waiter_names [] end |