{ "FailedRecordCount": 0, "Records": [
{
"SequenceNumber": "49543463076548007577105092703039560359975228518395019266", "ShardId": "shardId-000000000000"
}, {
"SequenceNumber": "49543463076570308322303623326179887152428262250726293522", "ShardId": "shardId-000000000001"
}, {
"SequenceNumber": "49543463076570308322303623326179887152428262250726293588", "ShardId": "shardId-000000000003"
} ] }
To add data to a stream, with a partially successful response
The following JSON example adds data to the specified stream with a partially successful response and contains failed records.
"StreamName": "exampleStreamName"
}
See Also
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes>
Date: <Date>
{ "FailedRecordCount": 2, "Records": [
{
"SequenceNumber": "49543463076548007577105092703039560359975228518395012686", "ShardId": "shardId-000000000000"
}, {
"ErrorCode": "ProvisionedThroughputExceededException",
"ErrorMessage": "Rate exceeded for shard shardId-000000000001 in stream exampleStreamName under account 111111111111."
}, {
"ErrorCode": "InternalFailure",
"ErrorMessage": "Internal service failure."
} ] }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
RegisterStreamConsumer
RegisterStreamConsumer
Registers a consumer with a Kinesis data stream. When you use this operation, the consumer you register can then call SubscribeToShard (p. 95) to receive data from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every shard you subscribe to. This rate is unaffected by the total number of consumers that read from the same stream.
You can register up to 20 consumers per stream. A given consumer can only be registered with one stream at a time.
For an example of how to use this operations, see Enhanced Fan-Out Using the Kinesis Data Streams API.
The use of this operation has a limit of five transactions per second per account. Also, only 5 consumers can be created simultaneously. In other words, you cannot have more than 5 consumers in a CREATING status at the same time. Registering a 6th consumer while there are 5 in a CREATING status results in a LimitExceededException.
Request Syntax
{ "ConsumerName": "string", "StreamARN": "string"
}
Request Parameters
The request accepts the following data in JSON format.
ConsumerName (p. 79)
For a given Kinesis data stream, each consumer must have a unique name. However, consumer names don't have to be unique across data streams.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [a-zA-Z0-9_.-]+
Required: Yes StreamARN (p. 79)
The ARN of the Kinesis data stream that you want to register the consumer with. For more info, see Amazon Resource Names (ARNs) and AWS Service Namespaces.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Pattern: arn:aws.*:kinesis:.*:\d{12}:stream/.+
Required: Yes
Response Syntax
{
Response Elements
"Consumer": {
"ConsumerARN": "string",
"ConsumerCreationTimestamp": number, "ConsumerName": "string",
"ConsumerStatus": "string"
} }
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
Consumer (p. 79)
An object that represents the details of the consumer you registered. When you register a consumer, it gets an ARN that is generated by Kinesis Data Streams.
Type: Consumer (p. 107) object
Errors
For information about the errors that are common to all actions, see Common Errors (p. 135).
InvalidArgumentException
A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.
HTTP Status Code: 400 LimitExceededException
The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed.
HTTP Status Code: 400 ResourceInUseException
The resource is not available for this operation. For successful operation, the resource must be in the ACTIVE state.
HTTP Status Code: 400 ResourceNotFoundException
The requested resource could not be found. The stream might not be specified correctly.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
See Also
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
RemoveTagsFromStream
RemoveTagsFromStream
Removes tags from the specified Kinesis data stream. Removed tags are deleted and cannot be recovered after this operation successfully completes.
If you specify a tag that does not exist, it is ignored.
RemoveTagsFromStream (p. 82) has a limit of five transactions per second per account.
Request Syntax
{
"StreamName": "string", "TagKeys": [ "string" ] }
Request Parameters
The request accepts the following data in JSON format.
StreamName (p. 82) The name of the stream.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [a-zA-Z0-9_.-]+
Required: Yes TagKeys (p. 82)
A list of tag keys. Each corresponding tag is removed from the stream.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 50 items.
Length Constraints: Minimum length of 1. Maximum length of 128.
Required: Yes
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 135).
InvalidArgumentException
A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.
Examples
HTTP Status Code: 400 LimitExceededException
The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed.
HTTP Status Code: 400 ResourceInUseException
The resource is not available for this operation. For successful operation, the resource must be in the ACTIVE state.
HTTP Status Code: 400 ResourceNotFoundException
The requested resource could not be found. The stream might not be specified correctly.
HTTP Status Code: 400