getShardIterator
Returns a shard iterator. A shard iterator provides information about how to retrieve the stream records from within a shard. Use the shard iterator in a subsequent GetRecords
request to read the stream records from the shard.
A shard iterator expires 15 minutes after it is returned to the requester.
Samples
import aws.sdk.kotlin.services.dynamodbstreams.model.ShardIteratorType
fun main() {
//sampleStart
// The following example returns a shard iterator for the provided stream ARN and shard ID.
val resp = dynamoDbStreamsClient.getShardIterator {
streamArn = "arn:aws:dynamodb:us-west-2:111122223333:table/Forum/stream/2015-05-20T20:51:10.252"
shardId = "00000001414576573621-f55eea83"
shardIteratorType = ShardIteratorType.fromValue("TRIM_HORIZON")
}
//sampleEnd
}