Class: AWS.Kinesis
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.Kinesis
- Identifier:
- kinesis
- API Version:
- 2013-12-02
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Amazon Kinesis Data Streams is a managed service that scales elastically for real-time processing of streaming big data.
Sending a Request Using Kinesis
var kinesis = new AWS.Kinesis();
kinesis.addTagsToStream(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 Kinesis object uses this specific API, you can
construct the object by passing the apiVersion option to the constructor:
var kinesis = new AWS.Kinesis({apiVersion: '2013-12-02'});
You can also set the API version globally in AWS.config.apiVersions using
the kinesis service identifier:
AWS.config.apiVersions = {
kinesis: '2013-12-02',
// other service API versions
};
var kinesis = new AWS.Kinesis();
Waiter Resource States
This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:
Constructor Summary collapse
-
new AWS.Kinesis(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
addTagsToStream(params = {}, callback) ⇒ AWS.Request
Adds or updates tags for the specified Kinesis data stream.
-
createStream(params = {}, callback) ⇒ AWS.Request
Creates a Kinesis data stream.
-
decreaseStreamRetentionPeriod(params = {}, callback) ⇒ AWS.Request
Decreases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream.
-
deleteResourcePolicy(params = {}, callback) ⇒ AWS.Request
Delete a policy for the specified data stream or consumer.
-
deleteStream(params = {}, callback) ⇒ AWS.Request
Deletes a Kinesis data stream and all its shards and data.
-
deregisterStreamConsumer(params = {}, callback) ⇒ AWS.Request
To deregister a consumer, provide its ARN.
-
describeLimits(params = {}, callback) ⇒ AWS.Request
Describes the shard limits and usage for the account.
If you update your account limits, the old limits might be returned for a few minutes.
This operation has a limit of one transaction per second per account.
. -
describeStream(params = {}, callback) ⇒ AWS.Request
Describes the specified Kinesis data stream.
Note: This API has been revised.- describeStreamConsumer(params = {}, callback) ⇒ AWS.Request
To get the description of a registered consumer, provide the ARN of the consumer.
- describeStreamSummary(params = {}, callback) ⇒ AWS.Request
Provides a summarized description of the specified Kinesis data stream without the shard list.
Note: When invoking this API, you must use either theStreamARNor theStreamNameparameter, or both.- disableEnhancedMonitoring(params = {}, callback) ⇒ AWS.Request
Disables enhanced monitoring.
Note: When invoking this API, you must use either theStreamARNor theStreamNameparameter, or both.- enableEnhancedMonitoring(params = {}, callback) ⇒ AWS.Request
Enables enhanced Kinesis data stream monitoring for shard-level metrics.
Note: When invoking this API, you must use either theStreamARNor theStreamNameparameter, or both.- getRecords(params = {}, callback) ⇒ AWS.Request
Gets data records from a Kinesis data stream's shard.
Note: When invoking this API, you must use either theStreamARNor theStreamNameparameter, or both.- getResourcePolicy(params = {}, callback) ⇒ AWS.Request
Returns a policy attached to the specified data stream or consumer.
- getShardIterator(params = {}, callback) ⇒ AWS.Request
Gets an Amazon Kinesis shard iterator.
- increaseStreamRetentionPeriod(params = {}, callback) ⇒ AWS.Request
Increases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream.
- listShards(params = {}, callback) ⇒ AWS.Request
Lists the shards in a stream and provides information about each shard.
- listStreamConsumers(params = {}, callback) ⇒ AWS.Request
Lists the consumers registered to receive data from a stream using enhanced fan-out, and provides information about each consumer.
This operation has a limit of 5 transactions per second per stream.
.- listStreams(params = {}, callback) ⇒ AWS.Request
Lists your Kinesis data streams.
The number of streams may be too large to return from a single call to
ListStreams.- listTagsForStream(params = {}, callback) ⇒ AWS.Request
Lists the tags for the specified Kinesis data stream.
- mergeShards(params = {}, callback) ⇒ AWS.Request
Merges two adjacent shards in a Kinesis data stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data.
- putRecord(params = {}, callback) ⇒ AWS.Request
Writes a single data record into an Amazon Kinesis data stream.
- putRecords(params = {}, callback) ⇒ AWS.Request
Writes multiple data records into a Kinesis data stream in a single call (also referred to as a
PutRecordsrequest).- putResourcePolicy(params = {}, callback) ⇒ AWS.Request
Attaches a resource-based policy to a data stream or registered consumer.
- registerStreamConsumer(params = {}, callback) ⇒ AWS.Request
Registers a consumer with a Kinesis data stream.
- removeTagsFromStream(params = {}, callback) ⇒ AWS.Request
Removes tags from the specified Kinesis data stream.
- splitShard(params = {}, callback) ⇒ AWS.Request
Splits a shard into two new shards in the Kinesis data stream, to increase the stream's capacity to ingest and transport data.
- startStreamEncryption(params = {}, callback) ⇒ AWS.Request
Enables or updates server-side encryption using an Amazon Web Services KMS key for a specified stream.
- stopStreamEncryption(params = {}, callback) ⇒ AWS.Request
Disables server-side encryption for a specified stream.
- updateShardCount(params = {}, callback) ⇒ AWS.Request
Updates the shard count of the specified stream to the specified number of shards.
- updateStreamMode(params = {}, callback) ⇒ AWS.Request
Updates the capacity mode of the data stream.
- waitFor(state, params = {}, callback) ⇒ AWS.Request
Waits for a given Kinesis resource.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService
Constructor Details
new AWS.Kinesis(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
Method Details
addTagsToStream(params = {}, callback) ⇒ AWS.Request
Adds or updates tags for the specified Kinesis data stream. You can assign up to 50 tags to a data stream.
Note: When invoking this API, you must use either theStreamARNor theStreamNameparameter, or both. It is recommended that you use theStreamARNinput parameter when you invoke this API.If tags have already been assigned to the stream,
AddTagsToStreamoverwrites any existing tags that correspond to the specified tag keys.AddTagsToStream has a limit of five transactions per second per account.
createStream(params = {}, callback) ⇒ AWS.Request
Creates a Kinesis data stream. A stream captures and transports data records that are continuously emitted from different data sources or producers. Scale-out within a stream is explicitly supported by means of shards, which are uniquely identified groups of data records in a stream.
You can create your data stream using either on-demand or provisioned capacity mode. Data streams with an on-demand mode require no capacity planning and automatically scale to handle gigabytes of write and read throughput per minute. With the on-demand mode, Kinesis Data Streams automatically manages the shards in order to provide the necessary throughput. For the data streams with a provisioned mode, you must specify the number of shards for the data stream. Each shard can support reads up to five transactions per second, up to a maximum data read total of 2 MiB per second. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per second. If the amount of data input increases or decreases, you can add or remove shards.
The stream name identifies the stream. The name is scoped to the Amazon Web Services account used by the application. It is also scoped by Amazon Web Services Region. That is, two streams in two different accounts can have the same name, and two streams in the same account, but in two different Regions, can have the same name.
CreateStreamis an asynchronous operation. Upon receiving aCreateStreamrequest, Kinesis Data Streams immediately returns and sets the stream status toCREATING. After the stream is created, Kinesis Data Streams sets the stream status toACTIVE. You should perform read and write operations only on anACTIVEstream.You receive a
LimitExceededExceptionwhen making aCreateStreamrequest when you try to do one of the following:-
Have more than five streams in the
CREATINGstate at any point in time. -
Create more shards than are authorized for your account.
For the default shard limit for an Amazon Web Services account, see Amazon Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer Guide. To increase this limit, contact Amazon Web Services Support.
You can use DescribeStreamSummary to check the stream status, which is returned in
StreamStatus.CreateStream has a limit of five transactions per second per account.
decreaseStreamRetentionPeriod(params = {}, callback) ⇒ AWS.Request
Decreases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The minimum value of a stream's retention period is 24 hours.
Note: When invoking this API, you must use either theStreamARNor theStreamNameparameter, or both. It is recommended that you use theStreamARNinput parameter when you invoke this API.This operation may result in lost data. For example, if the stream's retention period is 48 hours and is decreased to 24 hours, any data already in the stream that is older than 24 hours is inaccessible.
deleteResourcePolicy(params = {}, callback) ⇒ AWS.Request
Delete a policy for the specified data stream or consumer. Request patterns can be one of the following:
-
Data stream pattern:
arn:aws.*:kinesis:.*:\d{12}:.*stream/\S+ -
Consumer pattern:
^(arn):aws.*:kinesis:.*:\d{12}:.*stream\/[a-zA-Z0-9_.-]+\/consumer\/[a-zA-Z0-9_.-]+:[0-9]+
deleteStream(params = {}, callback) ⇒ AWS.Request
Deletes a Kinesis data stream and all its shards and data. You must shut down any applications that are operating on the stream before you delete the stream. If an application attempts to operate on a deleted stream, it receives the exception
ResourceNotFoundException.Note: When invoking this API, you must use either theStreamARNor theStreamNameparameter, or both. It is recommended that you use theStreamARNinput parameter when you invoke this API.If the stream is in the
ACTIVEstate, you can delete it. After aDeleteStreamrequest, the specified stream is in theDELETINGstate until Kinesis Data Streams completes the deletion.Note: Kinesis Data Streams might continue to accept data read and write operations, such as PutRecord, PutRecords, and GetRecords, on a stream in the
DELETINGstate until the stream deletion is complete.When you delete a stream, any shards in that stream are also deleted, and any tags are dissociated from the stream.
You can use the DescribeStreamSummary operation to check the state of the stream, which is returned in
StreamStatus.DeleteStream has a limit of five transactions per second per account.
deregisterStreamConsumer(params = {}, callback) ⇒ AWS.Request
To deregister a consumer, provide its ARN. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its name and ARN.
This operation has a limit of five transactions per second per stream.
describeLimits(params = {}, callback) ⇒ AWS.Request
Describes the shard limits and usage for the account.
If you update your account limits, the old limits might be returned for a few minutes.
This operation has a limit of one transaction per second per account.
describeStream(params = {}, callback) ⇒ AWS.Request
Describes the specified Kinesis data stream.
Note: This API has been revised. It's highly recommended that you use the DescribeStreamSummary API to get a summarized description of the specified Kinesis data stream and the ListShards API to list the shards in a specified data stream and obtain information about each shard.Note: When invoking this API, you must use either theStreamARNor theStreamNameparameter, or both. It is recommended that you use theStreamARNinput parameter when you invoke this API.The information returned includes the stream name, Amazon Resource Name (ARN), creation time, enhanced metric configuration, and shard map. The shard map is an array of shard objects. For each shard object, there is the hash key and sequence number ranges that the shard spans, and the IDs of any earlier shards that played in a role in creating the shard. Every record ingested in the stream is identified by a sequence number, which is assigned when the record is put into the stream.
You can limit the number of shards returned by each call. For more information, see Retrieving Shards from a Stream in the Amazon Kinesis Data Streams Developer Guide.
There are no guarantees about the chronological order shards returned. To process shards in chronological order, use the ID of the parent shard to track the lineage to the oldest shard.
This operation has a limit of 10 transactions per second per account.
- describeStreamConsumer(params = {}, callback) ⇒ AWS.Request