Skip to content

Commit 8212995

Browse files
author
awstools
committed
feat(client-kinesis): This release includes support to add tags when creating a stream
1 parent 3a5d854 commit 8212995

File tree

6 files changed

+32
-5
lines changed

6 files changed

+32
-5
lines changed

clients/client-kinesis/src/commands/CreateStreamCommand.ts

+8
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ export interface CreateStreamCommandOutput extends __MetadataBearer {}
7272
* <p>
7373
* <a>CreateStream</a> has a limit of five transactions per second per
7474
* account.</p>
75+
* <p>You can add tags to the stream when making a <code>CreateStream</code> request by
76+
* setting the <code>Tags</code> parameter. If you pass <code>Tags</code> parameter, in
77+
* addition to having <code>kinesis:createStream</code> permission, you must also have
78+
* <code>kinesis:addTagsToStream</code> permission for the stream that will be created.
79+
* Tags will take effect from the <code>CREATING</code> status of the stream. </p>
7580
* @example
7681
* Use a bare-bones client and the command you need to make an API call.
7782
* ```javascript
@@ -84,6 +89,9 @@ export interface CreateStreamCommandOutput extends __MetadataBearer {}
8489
* StreamModeDetails: { // StreamModeDetails
8590
* StreamMode: "PROVISIONED" || "ON_DEMAND", // required
8691
* },
92+
* Tags: { // TagMap
93+
* "<keys>": "STRING_VALUE",
94+
* },
8795
* };
8896
* const command = new CreateStreamCommand(input);
8997
* const response = await client.send(command);

clients/client-kinesis/src/commands/GetResourcePolicyCommand.ts

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ export interface GetResourcePolicyCommandOutput extends GetResourcePolicyOutput,
7474
* <p>The requested resource exceeds the maximum number allowed, or the number of concurrent
7575
* stream requests exceeds the maximum number allowed. </p>
7676
*
77+
* @throws {@link ResourceInUseException} (client fault)
78+
* <p>The resource is not available for this operation. For successful operation, the
79+
* resource must be in the <code>ACTIVE</code> state.</p>
80+
*
7781
* @throws {@link ResourceNotFoundException} (client fault)
7882
* <p>The requested resource could not be found. The stream might not be specified
7983
* correctly.</p>

clients/client-kinesis/src/commands/RegisterStreamConsumerCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface RegisterStreamConsumerCommandOutput extends RegisterStreamConsu
3535
* read from the same stream.</p>
3636
* <p>You can register up to 20 consumers per stream. A given consumer can only be
3737
* registered with one stream at a time.</p>
38-
* <p>For an example of how to use this operations, see <a href="/streams/latest/dev/building-enhanced-consumers-api.html">Enhanced Fan-Out
38+
* <p>For an example of how to use this operation, see <a href="https://docs.aws.amazon.com/streams/latest/dev/building-enhanced-consumers-api.html">Enhanced Fan-Out
3939
* Using the Kinesis Data Streams API</a>.</p>
4040
* <p>The use of this operation has a limit of five transactions per second per account.
4141
* Also, only 5 consumers can be created simultaneously. In other words, you cannot have

clients/client-kinesis/src/commands/SubscribeToShardCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export interface SubscribeToShardCommandOutput extends SubscribeToShardOutput, _
5353
* seconds or more after a successful call, the second call takes over the subscription and
5454
* the previous connection expires or fails with a
5555
* <code>ResourceInUseException</code>.</p>
56-
* <p>For an example of how to use this operations, see <a href="/streams/latest/dev/building-enhanced-consumers-api.html">Enhanced Fan-Out
56+
* <p>For an example of how to use this operation, see <a href="https://docs.aws.amazon.com/streams/latest/dev/building-enhanced-consumers-api.html">Enhanced Fan-Out
5757
* Using the Kinesis Data Streams API</a>.</p>
5858
* @example
5959
* Use a bare-bones client and the command you need to make an API call.

clients/client-kinesis/src/models/models_0.ts

+6
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,12 @@ export interface CreateStreamInput {
330330
* @public
331331
*/
332332
StreamModeDetails?: StreamModeDetails;
333+
334+
/**
335+
* <p>A set of up to 10 key-value pairs to use to create the tags.</p>
336+
* @public
337+
*/
338+
Tags?: Record<string, string>;
333339
}
334340

335341
/**

codegen/sdk-codegen/aws-models/kinesis.json

+12-3
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@
300300
}
301301
],
302302
"traits": {
303-
"smithy.api#documentation": "<p>Creates a Kinesis data stream. A stream captures and transports data records that are\n continuously emitted from different data sources or <i>producers</i>.\n Scale-out within a stream is explicitly supported by means of shards, which are uniquely\n identified groups of data records in a stream.</p>\n <p>You can create your data stream using either on-demand or provisioned capacity mode.\n Data streams with an on-demand mode require no capacity planning and automatically scale\n to handle gigabytes of write and read throughput per minute. With the on-demand mode,\n Kinesis Data Streams automatically manages the shards in order to provide the necessary\n throughput. For the data streams with a provisioned mode, you must specify the number of\n shards for the data stream. Each shard can support reads up to five transactions per\n second, up to a maximum data read total of 2 MiB per second. Each shard can support\n writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per\n second. If the amount of data input increases or decreases, you can add or remove\n shards.</p>\n <p>The stream name identifies the stream. The name is scoped to the Amazon Web Services\n account used by the application. It is also scoped by Amazon Web Services Region. That\n is, two streams in two different accounts can have the same name, and two streams in the\n same account, but in two different Regions, can have the same name.</p>\n <p>\n <code>CreateStream</code> is an asynchronous operation. Upon receiving a\n <code>CreateStream</code> request, Kinesis Data Streams immediately returns and sets\n the stream status to <code>CREATING</code>. After the stream is created, Kinesis Data\n Streams sets the stream status to <code>ACTIVE</code>. You should perform read and write\n operations only on an <code>ACTIVE</code> stream. </p>\n <p>You receive a <code>LimitExceededException</code> when making a\n <code>CreateStream</code> request when you try to do one of the following:</p>\n <ul>\n <li>\n <p>Have more than five streams in the <code>CREATING</code> state at any point in\n time.</p>\n </li>\n <li>\n <p>Create more shards than are authorized for your account.</p>\n </li>\n </ul>\n <p>For the default shard limit for an Amazon Web Services account, see <a href=\"https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html\">Amazon\n Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams\n Developer Guide</i>. To increase this limit, <a href=\"https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html\">contact Amazon Web Services\n Support</a>.</p>\n <p>You can use <a>DescribeStreamSummary</a> to check the stream status, which\n is returned in <code>StreamStatus</code>.</p>\n <p>\n <a>CreateStream</a> has a limit of five transactions per second per\n account.</p>"
303+
"smithy.api#documentation": "<p>Creates a Kinesis data stream. A stream captures and transports data records that are\n continuously emitted from different data sources or <i>producers</i>.\n Scale-out within a stream is explicitly supported by means of shards, which are uniquely\n identified groups of data records in a stream.</p>\n <p>You can create your data stream using either on-demand or provisioned capacity mode.\n Data streams with an on-demand mode require no capacity planning and automatically scale\n to handle gigabytes of write and read throughput per minute. With the on-demand mode,\n Kinesis Data Streams automatically manages the shards in order to provide the necessary\n throughput. For the data streams with a provisioned mode, you must specify the number of\n shards for the data stream. Each shard can support reads up to five transactions per\n second, up to a maximum data read total of 2 MiB per second. Each shard can support\n writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per\n second. If the amount of data input increases or decreases, you can add or remove\n shards.</p>\n <p>The stream name identifies the stream. The name is scoped to the Amazon Web Services\n account used by the application. It is also scoped by Amazon Web Services Region. That\n is, two streams in two different accounts can have the same name, and two streams in the\n same account, but in two different Regions, can have the same name.</p>\n <p>\n <code>CreateStream</code> is an asynchronous operation. Upon receiving a\n <code>CreateStream</code> request, Kinesis Data Streams immediately returns and sets\n the stream status to <code>CREATING</code>. After the stream is created, Kinesis Data\n Streams sets the stream status to <code>ACTIVE</code>. You should perform read and write\n operations only on an <code>ACTIVE</code> stream. </p>\n <p>You receive a <code>LimitExceededException</code> when making a\n <code>CreateStream</code> request when you try to do one of the following:</p>\n <ul>\n <li>\n <p>Have more than five streams in the <code>CREATING</code> state at any point in\n time.</p>\n </li>\n <li>\n <p>Create more shards than are authorized for your account.</p>\n </li>\n </ul>\n <p>For the default shard limit for an Amazon Web Services account, see <a href=\"https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html\">Amazon\n Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams\n Developer Guide</i>. To increase this limit, <a href=\"https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html\">contact Amazon Web Services\n Support</a>.</p>\n <p>You can use <a>DescribeStreamSummary</a> to check the stream status, which\n is returned in <code>StreamStatus</code>.</p>\n <p>\n <a>CreateStream</a> has a limit of five transactions per second per\n account.</p>\n <p>You can add tags to the stream when making a <code>CreateStream</code> request by\n setting the <code>Tags</code> parameter. If you pass <code>Tags</code> parameter, in\n addition to having <code>kinesis:createStream</code> permission, you must also have\n <code>kinesis:addTagsToStream</code> permission for the stream that will be created.\n Tags will take effect from the <code>CREATING</code> status of the stream. </p>"
304304
}
305305
},
306306
"com.amazonaws.kinesis#CreateStreamInput": {
@@ -324,6 +324,12 @@
324324
"traits": {
325325
"smithy.api#documentation": "<p> Indicates the capacity mode of the data stream. Currently, in Kinesis Data Streams,\n you can choose between an <b>on-demand</b> capacity mode and a\n <b>provisioned</b> capacity mode for your data\n streams.</p>"
326326
}
327+
},
328+
"Tags": {
329+
"target": "com.amazonaws.kinesis#TagMap",
330+
"traits": {
331+
"smithy.api#documentation": "<p>A set of up to 10 key-value pairs to use to create the tags.</p>"
332+
}
327333
}
328334
},
329335
"traits": {
@@ -1296,6 +1302,9 @@
12961302
{
12971303
"target": "com.amazonaws.kinesis#LimitExceededException"
12981304
},
1305+
{
1306+
"target": "com.amazonaws.kinesis#ResourceInUseException"
1307+
},
12991308
{
13001309
"target": "com.amazonaws.kinesis#ResourceNotFoundException"
13011310
}
@@ -6924,7 +6933,7 @@
69246933
}
69256934
],
69266935
"traits": {
6927-
"smithy.api#documentation": "<p>Registers a consumer with a Kinesis data stream. When you use this operation, the\n consumer you register can then call <a>SubscribeToShard</a> to receive data\n from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every\n shard you subscribe to. This rate is unaffected by the total number of consumers that\n read from the same stream.</p>\n <p>You can register up to 20 consumers per stream. A given consumer can only be\n registered with one stream at a time.</p>\n <p>For an example of how to use this operations, see <a href=\"/streams/latest/dev/building-enhanced-consumers-api.html\">Enhanced Fan-Out\n Using the Kinesis Data Streams API</a>.</p>\n <p>The use of this operation has a limit of five transactions per second per account.\n Also, only 5 consumers can be created simultaneously. In other words, you cannot have\n more than 5 consumers in a <code>CREATING</code> status at the same time. Registering a\n 6th consumer while there are 5 in a <code>CREATING</code> status results in a\n <code>LimitExceededException</code>.</p>",
6936+
"smithy.api#documentation": "<p>Registers a consumer with a Kinesis data stream. When you use this operation, the\n consumer you register can then call <a>SubscribeToShard</a> to receive data\n from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every\n shard you subscribe to. This rate is unaffected by the total number of consumers that\n read from the same stream.</p>\n <p>You can register up to 20 consumers per stream. A given consumer can only be\n registered with one stream at a time.</p>\n <p>For an example of how to use this operation, see <a href=\"https://docs.aws.amazon.com/streams/latest/dev/building-enhanced-consumers-api.html\">Enhanced Fan-Out\n Using the Kinesis Data Streams API</a>.</p>\n <p>The use of this operation has a limit of five transactions per second per account.\n Also, only 5 consumers can be created simultaneously. In other words, you cannot have\n more than 5 consumers in a <code>CREATING</code> status at the same time. Registering a\n 6th consumer while there are 5 in a <code>CREATING</code> status results in a\n <code>LimitExceededException</code>.</p>",
69286937
"smithy.rules#staticContextParams": {
69296938
"OperationType": {
69306939
"value": "control"
@@ -7884,7 +7893,7 @@
78847893
}
78857894
],
78867895
"traits": {
7887-
"smithy.api#documentation": "<p>This operation establishes an HTTP/2 connection between the consumer you specify in\n the <code>ConsumerARN</code> parameter and the shard you specify in the\n <code>ShardId</code> parameter. After the connection is successfully established,\n Kinesis Data Streams pushes records from the shard to the consumer over this connection.\n Before you call this operation, call <a>RegisterStreamConsumer</a> to\n register the consumer with Kinesis Data Streams.</p>\n <p>When the <code>SubscribeToShard</code> call succeeds, your consumer starts receiving\n events of type <a>SubscribeToShardEvent</a> over the HTTP/2 connection for up\n to 5 minutes, after which time you need to call <code>SubscribeToShard</code> again to\n renew the subscription if you want to continue to receive records.</p>\n <p>You can make one call to <code>SubscribeToShard</code> per second per registered\n consumer per shard. For example, if you have a 4000 shard stream and two registered\n stream consumers, you can make one <code>SubscribeToShard</code> request per second for\n each combination of shard and registered consumer, allowing you to subscribe both\n consumers to all 4000 shards in one second. </p>\n <p>If you call <code>SubscribeToShard</code> again with the same <code>ConsumerARN</code>\n and <code>ShardId</code> within 5 seconds of a successful call, you'll get a\n <code>ResourceInUseException</code>. If you call <code>SubscribeToShard</code> 5\n seconds or more after a successful call, the second call takes over the subscription and\n the previous connection expires or fails with a\n <code>ResourceInUseException</code>.</p>\n <p>For an example of how to use this operations, see <a href=\"/streams/latest/dev/building-enhanced-consumers-api.html\">Enhanced Fan-Out\n Using the Kinesis Data Streams API</a>.</p>",
7896+
"smithy.api#documentation": "<p>This operation establishes an HTTP/2 connection between the consumer you specify in\n the <code>ConsumerARN</code> parameter and the shard you specify in the\n <code>ShardId</code> parameter. After the connection is successfully established,\n Kinesis Data Streams pushes records from the shard to the consumer over this connection.\n Before you call this operation, call <a>RegisterStreamConsumer</a> to\n register the consumer with Kinesis Data Streams.</p>\n <p>When the <code>SubscribeToShard</code> call succeeds, your consumer starts receiving\n events of type <a>SubscribeToShardEvent</a> over the HTTP/2 connection for up\n to 5 minutes, after which time you need to call <code>SubscribeToShard</code> again to\n renew the subscription if you want to continue to receive records.</p>\n <p>You can make one call to <code>SubscribeToShard</code> per second per registered\n consumer per shard. For example, if you have a 4000 shard stream and two registered\n stream consumers, you can make one <code>SubscribeToShard</code> request per second for\n each combination of shard and registered consumer, allowing you to subscribe both\n consumers to all 4000 shards in one second. </p>\n <p>If you call <code>SubscribeToShard</code> again with the same <code>ConsumerARN</code>\n and <code>ShardId</code> within 5 seconds of a successful call, you'll get a\n <code>ResourceInUseException</code>. If you call <code>SubscribeToShard</code> 5\n seconds or more after a successful call, the second call takes over the subscription and\n the previous connection expires or fails with a\n <code>ResourceInUseException</code>.</p>\n <p>For an example of how to use this operation, see <a href=\"https://docs.aws.amazon.com/streams/latest/dev/building-enhanced-consumers-api.html\">Enhanced Fan-Out\n Using the Kinesis Data Streams API</a>.</p>",
78887897
"smithy.rules#staticContextParams": {
78897898
"OperationType": {
78907899
"value": "data"

0 commit comments

Comments
 (0)