Class: Aws::Lambda::Types::CreateEventSourceMappingRequest
- Inherits:
-
Struct
- Object
- Struct
- Aws::Lambda::Types::CreateEventSourceMappingRequest
- Includes:
- Structure
- Defined in:
- lib/aws-sdk-lambda/types.rb
Overview
When making an API call, you may pass CreateEventSourceMappingRequest data as a hash:
{
event_source_arn: "Arn", # required
function_name: "FunctionName", # required
enabled: false,
batch_size: 1,
starting_position: "TRIM_HORIZON", # accepts TRIM_HORIZON, LATEST, AT_TIMESTAMP
starting_position_timestamp: Time.now,
}
Instance Attribute Summary collapse
-
#batch_size ⇒ Integer
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
-
#enabled ⇒ Boolean
Indicates whether AWS Lambda should begin polling the event source.
-
#event_source_arn ⇒ String
The Amazon Resource Name (ARN) of the event source.
-
#function_name ⇒ String
The Lambda function to invoke when AWS Lambda detects an event on the stream.
-
#starting_position ⇒ String
The position in the DynamoDB or Kinesis stream where AWS Lambda should start reading.
-
#starting_position_timestamp ⇒ Time
The timestamp of the data record from which to start reading.
Instance Attribute Details
#batch_size ⇒ Integer
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. Your function receives an event with all the retrieved records. The default for Amazon Kinesis and Amazon DynamoDB is 100 records. For SQS, the default is 1.
436 437 438 439 440 441 442 443 444 |
# File 'lib/aws-sdk-lambda/types.rb', line 436 class CreateEventSourceMappingRequest < Struct.new( :event_source_arn, :function_name, :enabled, :batch_size, :starting_position, :starting_position_timestamp) include Aws::Structure end |
#enabled ⇒ Boolean
Indicates whether AWS Lambda should begin polling the event source. By default, ‘Enabled` is true.
436 437 438 439 440 441 442 443 444 |
# File 'lib/aws-sdk-lambda/types.rb', line 436 class CreateEventSourceMappingRequest < Struct.new( :event_source_arn, :function_name, :enabled, :batch_size, :starting_position, :starting_position_timestamp) include Aws::Structure end |
#event_source_arn ⇒ String
The Amazon Resource Name (ARN) of the event source. Any record added to this source could cause AWS Lambda to invoke your Lambda function, it depends on the ‘BatchSize`. AWS Lambda POSTs the event’s records to your Lambda function as JSON.
436 437 438 439 440 441 442 443 444 |
# File 'lib/aws-sdk-lambda/types.rb', line 436 class CreateEventSourceMappingRequest < Struct.new( :event_source_arn, :function_name, :enabled, :batch_size, :starting_position, :starting_position_timestamp) include Aws::Structure end |
#function_name ⇒ String
The Lambda function to invoke when AWS Lambda detects an event on the stream.
You can specify the function name (for example, ‘Thumbnail`) or you can specify Amazon Resource Name (ARN) of the function (for example, `arn:aws:lambda:us-west-2:account-id:function:ThumbNail`).
If you are using versioning, you can also provide a qualified function ARN (ARN that is qualified with function version or alias name as suffix). For more information about versioning, see [AWS Lambda Function Versioning and Aliases]
AWS Lambda also allows you to specify only the function name with the account ID qualifier (for example, ‘account-id:Thumbnail`).
Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 characters in length.
[1]: docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html
436 437 438 439 440 441 442 443 444 |
# File 'lib/aws-sdk-lambda/types.rb', line 436 class CreateEventSourceMappingRequest < Struct.new( :event_source_arn, :function_name, :enabled, :batch_size, :starting_position, :starting_position_timestamp) include Aws::Structure end |
#starting_position ⇒ String
The position in the DynamoDB or Kinesis stream where AWS Lambda should start reading. For more information, see
- GetShardIterator][1
-
in the *Amazon Kinesis API Reference Guide* or
- GetShardIterator][2
-
in the *Amazon DynamoDB API Reference Guide*.
The ‘AT_TIMESTAMP` value is supported only for [Kinesis streams].
[1]: docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType [2]: docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html [3]: docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html
436 437 438 439 440 441 442 443 444 |
# File 'lib/aws-sdk-lambda/types.rb', line 436 class CreateEventSourceMappingRequest < Struct.new( :event_source_arn, :function_name, :enabled, :batch_size, :starting_position, :starting_position_timestamp) include Aws::Structure end |
#starting_position_timestamp ⇒ Time
The timestamp of the data record from which to start reading. Used with [shard iterator type] AT_TIMESTAMP. If a record with this exact timestamp does not exist, the iterator returned is for the next (later) record. If the timestamp is older than the current trim horizon, the iterator returned is for the oldest untrimmed data record (TRIM_HORIZON). Valid only for [Kinesis streams].
[1]: docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType [2]: docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html
436 437 438 439 440 441 442 443 444 |
# File 'lib/aws-sdk-lambda/types.rb', line 436 class CreateEventSourceMappingRequest < Struct.new( :event_source_arn, :function_name, :enabled, :batch_size, :starting_position, :starting_position_timestamp) include Aws::Structure end |