@Generated(value="software.amazon.awssdk:codegen") public final class CreateEventSourceMappingRequest extends LambdaRequest implements ToCopyableBuilder<CreateEventSourceMappingRequest.Builder,CreateEventSourceMappingRequest>
Modifier and Type | Class and Description |
---|---|
static interface |
CreateEventSourceMappingRequest.Builder |
Modifier and Type | Method and Description |
---|---|
Integer |
batchSize()
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your
function.
|
static CreateEventSourceMappingRequest.Builder |
builder() |
Boolean |
enabled()
Indicates whether AWS Lambda should begin polling the event source.
|
boolean |
equals(Object obj) |
String |
eventSourceArn()
The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon DynamoDB stream that is the event source.
|
String |
functionName()
The Lambda function to invoke when AWS Lambda detects an event on the stream.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
int |
hashCode() |
static Class<? extends CreateEventSourceMappingRequest.Builder> |
serializableBuilderClass() |
EventSourcePosition |
startingPosition()
The position in the stream where AWS Lambda should start reading.
|
String |
startingPositionAsString()
The position in the stream where AWS Lambda should start reading.
|
Instant |
startingPositionTimestamp()
The timestamp of the data record from which to start reading.
|
CreateEventSourceMappingRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
overrideConfiguration
copy
public String eventSourceArn()
The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon DynamoDB stream that is the event source. Any
record added to this stream could cause AWS Lambda to invoke your Lambda function, it depends on the
BatchSize
. AWS Lambda POSTs the Amazon Kinesis event, containing records, to your Lambda function as
JSON.
BatchSize
. AWS Lambda POSTs the Amazon Kinesis event, containing records, to your
Lambda function as JSON.public String functionName()
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.
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.
public Boolean enabled()
Indicates whether AWS Lambda should begin polling the event source. By default, Enabled
is true.
Enabled
is
true.public Integer batchSize()
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 is 100 records.
public EventSourcePosition startingPosition()
The position in the stream where AWS Lambda should start reading. Valid only for Kinesis streams. For more information, see ShardIteratorType in the Amazon Kinesis API Reference.
If the service returns an enum value that is not available in the current SDK version, startingPosition
will return EventSourcePosition.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from startingPositionAsString()
.
EventSourcePosition
public String startingPositionAsString()
The position in the stream where AWS Lambda should start reading. Valid only for Kinesis streams. For more information, see ShardIteratorType in the Amazon Kinesis API Reference.
If the service returns an enum value that is not available in the current SDK version, startingPosition
will return EventSourcePosition.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is
available from startingPositionAsString()
.
EventSourcePosition
public Instant startingPositionTimestamp()
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.
public CreateEventSourceMappingRequest.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<CreateEventSourceMappingRequest.Builder,CreateEventSourceMappingRequest>
toBuilder
in class LambdaRequest
public static CreateEventSourceMappingRequest.Builder builder()
public static Class<? extends CreateEventSourceMappingRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.