AWS.DynamoDBStreams — AWS SDK for JavaScript (original) (raw)
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Amazon DynamoDB Streams provides API actions for accessing streams and processing stream records. To learn more about application development with Streams, see Capturing Table Activity with DynamoDB Streams in the Amazon DynamoDB Developer Guide.
Sending a Request Using DynamoDBStreams
var dynamodbstreams = new AWS.DynamoDBStreams();
dynamodbstreams.describeStream(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the DynamoDBStreams object uses this specific API, you can construct the object by passing the apiVersion
option to the constructor:
var dynamodbstreams = new AWS.DynamoDBStreams({apiVersion: '2012-08-10'});
You can also set the API version globally in AWS.config.apiVersions
using the dynamodbstreams service identifier:
AWS.config.apiVersions = {
dynamodbstreams: '2012-08-10',
// other service API versions
};
var dynamodbstreams = new AWS.DynamoDBStreams();
Constructor Summarycollapse
- new AWS.DynamoDBStreams(options = {}) ⇒ Object constructor
Constructs a service object.
Property Summarycollapse
- endpoint ⇒ AWS.Endpoint readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summarycollapse
- describeStream(params = {}, callback) ⇒ AWS.Request
Returns information about a stream, including the current status of the stream, its Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB table.
Note: You can callDescribeStream
at a maximum rate of 10 times per second. - getRecords(params = {}, callback) ⇒ AWS.Request
Retrieves the stream records from a given shard.
Specify a shard iterator using theShardIterator
parameter. - getShardIterator(params = {}, callback) ⇒ AWS.Request
Returns a shard iterator. - listStreams(params = {}, callback) ⇒ AWS.Request
Returns an array of stream ARNs associated with the current account and endpoint.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.DynamoDBStreams(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
endpoint ⇒ AWS.Endpoint
Returns an Endpoint object representing the endpoint URL for service requests.
Method Details
describeStream(params = {}, callback) ⇒ AWS.Request
Returns information about a stream, including the current status of the stream, its Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB table.
Note: You can call DescribeStream
at a maximum rate of 10 times per second.
Each shard in the stream has a SequenceNumberRange
associated with it. If the SequenceNumberRange
has a StartingSequenceNumber
but no EndingSequenceNumber
, then the shard is still open (able to receive more stream records). If both StartingSequenceNumber
and EndingSequenceNumber
are present, then that shard is closed and can no longer receive more data.
getRecords(params = {}, callback) ⇒ AWS.Request
Retrieves the stream records from a given shard.
Specify a shard iterator using the ShardIterator
parameter. The shard iterator specifies the position in the shard from which you want to start reading stream records sequentially. If there are no stream records available in the portion of the shard that the iterator points to, GetRecords
returns an empty list. Note that it might take multiple calls to get to a portion of the shard that contains stream records.
Note: GetRecords
can retrieve a maximum of 1 MB of data or 1000 stream records, whichever comes first.
getShardIterator(params = {}, callback) ⇒ AWS.Request
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.
Note: A shard iterator expires 15 minutes after it is returned to the requester.
listStreams(params = {}, callback) ⇒ AWS.Request
Returns an array of stream ARNs associated with the current account and endpoint. If the TableName
parameter is present, then ListStreams
will return only the streams ARNs for that table.
Note: You can call ListStreams
at a maximum rate of 5 times per second.