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