1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package types
4
5import (
6	smithydocument "github.com/aws/smithy-go/document"
7	"time"
8)
9
10type ChildShard struct {
11
12	// The range of possible hash key values for the shard, which is a set of ordered
13	// contiguous positive integers.
14	//
15	// This member is required.
16	HashKeyRange *HashKeyRange
17
18	// This member is required.
19	ParentShards []string
20
21	// This member is required.
22	ShardId *string
23
24	noSmithyDocumentSerde
25}
26
27// An object that represents the details of the consumer you registered. This type
28// of object is returned by RegisterStreamConsumer.
29type Consumer struct {
30
31	// When you register a consumer, Kinesis Data Streams generates an ARN for it. You
32	// need this ARN to be able to call SubscribeToShard. If you delete a consumer and
33	// then create a new one with the same name, it won't have the same ARN. That's
34	// because consumer ARNs contain the creation timestamp. This is important to keep
35	// in mind if you have IAM policies that reference consumer ARNs.
36	//
37	// This member is required.
38	ConsumerARN *string
39
40	//
41	//
42	// This member is required.
43	ConsumerCreationTimestamp *time.Time
44
45	// The name of the consumer is something you choose when you register the consumer.
46	//
47	// This member is required.
48	ConsumerName *string
49
50	// A consumer can't read data while in the CREATING or DELETING states.
51	//
52	// This member is required.
53	ConsumerStatus ConsumerStatus
54
55	noSmithyDocumentSerde
56}
57
58// An object that represents the details of a registered consumer. This type of
59// object is returned by DescribeStreamConsumer.
60type ConsumerDescription struct {
61
62	// When you register a consumer, Kinesis Data Streams generates an ARN for it. You
63	// need this ARN to be able to call SubscribeToShard. If you delete a consumer and
64	// then create a new one with the same name, it won't have the same ARN. That's
65	// because consumer ARNs contain the creation timestamp. This is important to keep
66	// in mind if you have IAM policies that reference consumer ARNs.
67	//
68	// This member is required.
69	ConsumerARN *string
70
71	//
72	//
73	// This member is required.
74	ConsumerCreationTimestamp *time.Time
75
76	// The name of the consumer is something you choose when you register the consumer.
77	//
78	// This member is required.
79	ConsumerName *string
80
81	// A consumer can't read data while in the CREATING or DELETING states.
82	//
83	// This member is required.
84	ConsumerStatus ConsumerStatus
85
86	// The ARN of the stream with which you registered the consumer.
87	//
88	// This member is required.
89	StreamARN *string
90
91	noSmithyDocumentSerde
92}
93
94// Represents enhanced metrics types.
95type EnhancedMetrics struct {
96
97	// List of shard-level metrics. The following are the valid shard-level metrics.
98	// The value "ALL" enhances every metric.
99	//
100	// * IncomingBytes
101	//
102	// * IncomingRecords
103	//
104	// *
105	// OutgoingBytes
106	//
107	// * OutgoingRecords
108	//
109	// * WriteProvisionedThroughputExceeded
110	//
111	// *
112	// ReadProvisionedThroughputExceeded
113	//
114	// * IteratorAgeMilliseconds
115	//
116	// * ALL
117	//
118	// For more
119	// information, see Monitoring the Amazon Kinesis Data Streams Service with Amazon
120	// CloudWatch
121	// (https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html)
122	// in the Amazon Kinesis Data Streams Developer Guide.
123	ShardLevelMetrics []MetricsName
124
125	noSmithyDocumentSerde
126}
127
128// The range of possible hash key values for the shard, which is a set of ordered
129// contiguous positive integers.
130type HashKeyRange struct {
131
132	// The ending hash key of the hash key range.
133	//
134	// This member is required.
135	EndingHashKey *string
136
137	// The starting hash key of the hash key range.
138	//
139	// This member is required.
140	StartingHashKey *string
141
142	noSmithyDocumentSerde
143}
144
145// Represents the output for PutRecords.
146type PutRecordsRequestEntry struct {
147
148	// The data blob to put into the record, which is base64-encoded when the blob is
149	// serialized. When the data blob (the payload before base64-encoding) is added to
150	// the partition key size, the total size must not exceed the maximum record size
151	// (1 MiB).
152	//
153	// This member is required.
154	Data []byte
155
156	// Determines which shard in the stream the data record is assigned to. Partition
157	// keys are Unicode strings with a maximum length limit of 256 characters for each
158	// key. Amazon Kinesis Data Streams uses the partition key as input to a hash
159	// function that maps the partition key and associated data to a specific shard.
160	// Specifically, an MD5 hash function is used to map partition keys to 128-bit
161	// integer values and to map associated data records to shards. As a result of this
162	// hashing mechanism, all data records with the same partition key map to the same
163	// shard within the stream.
164	//
165	// This member is required.
166	PartitionKey *string
167
168	// The hash value used to determine explicitly the shard that the data record is
169	// assigned to by overriding the partition key hash.
170	ExplicitHashKey *string
171
172	noSmithyDocumentSerde
173}
174
175// Represents the result of an individual record from a PutRecords request. A
176// record that is successfully added to a stream includes SequenceNumber and
177// ShardId in the result. A record that fails to be added to the stream includes
178// ErrorCode and ErrorMessage in the result.
179type PutRecordsResultEntry struct {
180
181	// The error code for an individual record result. ErrorCodes can be either
182	// ProvisionedThroughputExceededException or InternalFailure.
183	ErrorCode *string
184
185	// The error message for an individual record result. An ErrorCode value of
186	// ProvisionedThroughputExceededException has an error message that includes the
187	// account ID, stream name, and shard ID. An ErrorCode value of InternalFailure has
188	// the error message "Internal Service Failure".
189	ErrorMessage *string
190
191	// The sequence number for an individual record result.
192	SequenceNumber *string
193
194	// The shard ID for an individual record result.
195	ShardId *string
196
197	noSmithyDocumentSerde
198}
199
200// The unit of data of the Kinesis data stream, which is composed of a sequence
201// number, a partition key, and a data blob.
202type Record struct {
203
204	// The data blob. The data in the blob is both opaque and immutable to Kinesis Data
205	// Streams, which does not inspect, interpret, or change the data in the blob in
206	// any way. When the data blob (the payload before base64-encoding) is added to the
207	// partition key size, the total size must not exceed the maximum record size (1
208	// MiB).
209	//
210	// This member is required.
211	Data []byte
212
213	// Identifies which shard in the stream the data record is assigned to.
214	//
215	// This member is required.
216	PartitionKey *string
217
218	// The unique identifier of the record within its shard.
219	//
220	// This member is required.
221	SequenceNumber *string
222
223	// The approximate time that the record was inserted into the stream.
224	ApproximateArrivalTimestamp *time.Time
225
226	// The encryption type used on the record. This parameter can be one of the
227	// following values:
228	//
229	// * NONE: Do not encrypt the records in the stream.
230	//
231	// * KMS: Use
232	// server-side encryption on the records in the stream using a customer-managed AWS
233	// KMS key.
234	EncryptionType EncryptionType
235
236	noSmithyDocumentSerde
237}
238
239// The range of possible sequence numbers for the shard.
240type SequenceNumberRange struct {
241
242	// The starting sequence number for the range.
243	//
244	// This member is required.
245	StartingSequenceNumber *string
246
247	// The ending sequence number for the range. Shards that are in the OPEN state have
248	// an ending sequence number of null.
249	EndingSequenceNumber *string
250
251	noSmithyDocumentSerde
252}
253
254// A uniquely identified group of data records in a Kinesis data stream.
255type Shard struct {
256
257	// The range of possible hash key values for the shard, which is a set of ordered
258	// contiguous positive integers.
259	//
260	// This member is required.
261	HashKeyRange *HashKeyRange
262
263	// The range of possible sequence numbers for the shard.
264	//
265	// This member is required.
266	SequenceNumberRange *SequenceNumberRange
267
268	// The unique identifier of the shard within the stream.
269	//
270	// This member is required.
271	ShardId *string
272
273	// The shard ID of the shard adjacent to the shard's parent.
274	AdjacentParentShardId *string
275
276	// The shard ID of the shard's parent.
277	ParentShardId *string
278
279	noSmithyDocumentSerde
280}
281
282type ShardFilter struct {
283
284	// This member is required.
285	Type ShardFilterType
286
287	ShardId *string
288
289	Timestamp *time.Time
290
291	noSmithyDocumentSerde
292}
293
294// Represents the output for DescribeStream.
295type StreamDescription struct {
296
297	// Represents the current enhanced monitoring settings of the stream.
298	//
299	// This member is required.
300	EnhancedMonitoring []EnhancedMetrics
301
302	// If set to true, more shards in the stream are available to describe.
303	//
304	// This member is required.
305	HasMoreShards *bool
306
307	// The current retention period, in hours. Minimum value of 24. Maximum value of
308	// 168.
309	//
310	// This member is required.
311	RetentionPeriodHours *int32
312
313	// The shards that comprise the stream.
314	//
315	// This member is required.
316	Shards []Shard
317
318	// The Amazon Resource Name (ARN) for the stream being described.
319	//
320	// This member is required.
321	StreamARN *string
322
323	// The approximate time that the stream was created.
324	//
325	// This member is required.
326	StreamCreationTimestamp *time.Time
327
328	// The name of the stream being described.
329	//
330	// This member is required.
331	StreamName *string
332
333	// The current status of the stream being described. The stream status is one of
334	// the following states:
335	//
336	// * CREATING - The stream is being created. Kinesis Data
337	// Streams immediately returns and sets StreamStatus to CREATING.
338	//
339	// * DELETING - The
340	// stream is being deleted. The specified stream is in the DELETING state until
341	// Kinesis Data Streams completes the deletion.
342	//
343	// * ACTIVE - The stream exists and
344	// is ready for read and write operations or deletion. You should perform read and
345	// write operations only on an ACTIVE stream.
346	//
347	// * UPDATING - Shards in the stream
348	// are being merged or split. Read and write operations continue to work while the
349	// stream is in the UPDATING state.
350	//
351	// This member is required.
352	StreamStatus StreamStatus
353
354	// The server-side encryption type used on the stream. This parameter can be one of
355	// the following values:
356	//
357	// * NONE: Do not encrypt the records in the stream.
358	//
359	// * KMS:
360	// Use server-side encryption on the records in the stream using a customer-managed
361	// AWS KMS key.
362	EncryptionType EncryptionType
363
364	// The GUID for the customer-managed AWS KMS key to use for encryption. This value
365	// can be a globally unique identifier, a fully specified ARN to either an alias or
366	// a key, or an alias name prefixed by "alias/".You can also use a master key owned
367	// by Kinesis Data Streams by specifying the alias aws/kinesis.
368	//
369	// * Key ARN example:
370	// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
371	//
372	// *
373	// Alias ARN example: arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
374	//
375	// *
376	// Globally unique key ID example: 12345678-1234-1234-1234-123456789012
377	//
378	// * Alias
379	// name example: alias/MyAliasName
380	//
381	// * Master key owned by Kinesis Data Streams:
382	// alias/aws/kinesis
383	KeyId *string
384
385	noSmithyDocumentSerde
386}
387
388// Represents the output for DescribeStreamSummary
389type StreamDescriptionSummary struct {
390
391	// Represents the current enhanced monitoring settings of the stream.
392	//
393	// This member is required.
394	EnhancedMonitoring []EnhancedMetrics
395
396	// The number of open shards in the stream.
397	//
398	// This member is required.
399	OpenShardCount *int32
400
401	// The current retention period, in hours.
402	//
403	// This member is required.
404	RetentionPeriodHours *int32
405
406	// The Amazon Resource Name (ARN) for the stream being described.
407	//
408	// This member is required.
409	StreamARN *string
410
411	// The approximate time that the stream was created.
412	//
413	// This member is required.
414	StreamCreationTimestamp *time.Time
415
416	// The name of the stream being described.
417	//
418	// This member is required.
419	StreamName *string
420
421	// The current status of the stream being described. The stream status is one of
422	// the following states:
423	//
424	// * CREATING - The stream is being created. Kinesis Data
425	// Streams immediately returns and sets StreamStatus to CREATING.
426	//
427	// * DELETING - The
428	// stream is being deleted. The specified stream is in the DELETING state until
429	// Kinesis Data Streams completes the deletion.
430	//
431	// * ACTIVE - The stream exists and
432	// is ready for read and write operations or deletion. You should perform read and
433	// write operations only on an ACTIVE stream.
434	//
435	// * UPDATING - Shards in the stream
436	// are being merged or split. Read and write operations continue to work while the
437	// stream is in the UPDATING state.
438	//
439	// This member is required.
440	StreamStatus StreamStatus
441
442	// The number of enhanced fan-out consumers registered with the stream.
443	ConsumerCount *int32
444
445	// The encryption type used. This value is one of the following:
446	//
447	// * KMS
448	//
449	// * NONE
450	EncryptionType EncryptionType
451
452	// The GUID for the customer-managed AWS KMS key to use for encryption. This value
453	// can be a globally unique identifier, a fully specified ARN to either an alias or
454	// a key, or an alias name prefixed by "alias/".You can also use a master key owned
455	// by Kinesis Data Streams by specifying the alias aws/kinesis.
456	//
457	// * Key ARN example:
458	// arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
459	//
460	// *
461	// Alias ARN example:  arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
462	//
463	// *
464	// Globally unique key ID example: 12345678-1234-1234-1234-123456789012
465	//
466	// * Alias
467	// name example: alias/MyAliasName
468	//
469	// * Master key owned by Kinesis Data Streams:
470	// alias/aws/kinesis
471	KeyId *string
472
473	noSmithyDocumentSerde
474}
475
476// Metadata assigned to the stream, consisting of a key-value pair.
477type Tag struct {
478
479	// A unique identifier for the tag. Maximum length: 128 characters. Valid
480	// characters: Unicode letters, digits, white space, _ . / = + - % @
481	//
482	// This member is required.
483	Key *string
484
485	// An optional string, typically used to describe or define the tag. Maximum
486	// length: 256 characters. Valid characters: Unicode letters, digits, white space,
487	// _ . / = + - % @
488	Value *string
489
490	noSmithyDocumentSerde
491}
492
493type noSmithyDocumentSerde = smithydocument.NoSerde
494