github.com/aavshr/aws-sdk-go@v1.41.3/service/dynamodbstreams/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package dynamodbstreams 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/service/dynamodb" 14 ) 15 16 const opDescribeStream = "DescribeStream" 17 18 // DescribeStreamRequest generates a "aws/request.Request" representing the 19 // client's request for the DescribeStream operation. The "output" return 20 // value will be populated with the request's response once the request completes 21 // successfully. 22 // 23 // Use "Send" method on the returned Request to send the API call to the service. 24 // the "output" return value is not valid until after Send returns without error. 25 // 26 // See DescribeStream for more information on using the DescribeStream 27 // API call, and error handling. 28 // 29 // This method is useful when you want to inject custom logic or configuration 30 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 31 // 32 // 33 // // Example sending a request using the DescribeStreamRequest method. 34 // req, resp := client.DescribeStreamRequest(params) 35 // 36 // err := req.Send() 37 // if err == nil { // resp is now filled 38 // fmt.Println(resp) 39 // } 40 // 41 // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/DescribeStream 42 func (c *DynamoDBStreams) DescribeStreamRequest(input *DescribeStreamInput) (req *request.Request, output *DescribeStreamOutput) { 43 op := &request.Operation{ 44 Name: opDescribeStream, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &DescribeStreamInput{} 51 } 52 53 output = &DescribeStreamOutput{} 54 req = c.newRequest(op, input, output) 55 return 56 } 57 58 // DescribeStream API operation for Amazon DynamoDB Streams. 59 // 60 // Returns information about a stream, including the current status of the stream, 61 // its Amazon Resource Name (ARN), the composition of its shards, and its corresponding 62 // DynamoDB table. 63 // 64 // You can call DescribeStream at a maximum rate of 10 times per second. 65 // 66 // Each shard in the stream has a SequenceNumberRange associated with it. If 67 // the SequenceNumberRange has a StartingSequenceNumber but no EndingSequenceNumber, 68 // then the shard is still open (able to receive more stream records). If both 69 // StartingSequenceNumber and EndingSequenceNumber are present, then that shard 70 // is closed and can no longer receive more data. 71 // 72 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 73 // with awserr.Error's Code and Message methods to get detailed information about 74 // the error. 75 // 76 // See the AWS API reference guide for Amazon DynamoDB Streams's 77 // API operation DescribeStream for usage and error information. 78 // 79 // Returned Error Types: 80 // * ResourceNotFoundException 81 // The operation tried to access a nonexistent table or index. The resource 82 // might not be specified correctly, or its status might not be ACTIVE. 83 // 84 // * InternalServerError 85 // An error occurred on the server side. 86 // 87 // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/DescribeStream 88 func (c *DynamoDBStreams) DescribeStream(input *DescribeStreamInput) (*DescribeStreamOutput, error) { 89 req, out := c.DescribeStreamRequest(input) 90 return out, req.Send() 91 } 92 93 // DescribeStreamWithContext is the same as DescribeStream with the addition of 94 // the ability to pass a context and additional request options. 95 // 96 // See DescribeStream for details on how to use this API operation. 97 // 98 // The context must be non-nil and will be used for request cancellation. If 99 // the context is nil a panic will occur. In the future the SDK may create 100 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 101 // for more information on using Contexts. 102 func (c *DynamoDBStreams) DescribeStreamWithContext(ctx aws.Context, input *DescribeStreamInput, opts ...request.Option) (*DescribeStreamOutput, error) { 103 req, out := c.DescribeStreamRequest(input) 104 req.SetContext(ctx) 105 req.ApplyOptions(opts...) 106 return out, req.Send() 107 } 108 109 const opGetRecords = "GetRecords" 110 111 // GetRecordsRequest generates a "aws/request.Request" representing the 112 // client's request for the GetRecords operation. The "output" return 113 // value will be populated with the request's response once the request completes 114 // successfully. 115 // 116 // Use "Send" method on the returned Request to send the API call to the service. 117 // the "output" return value is not valid until after Send returns without error. 118 // 119 // See GetRecords for more information on using the GetRecords 120 // API call, and error handling. 121 // 122 // This method is useful when you want to inject custom logic or configuration 123 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 124 // 125 // 126 // // Example sending a request using the GetRecordsRequest method. 127 // req, resp := client.GetRecordsRequest(params) 128 // 129 // err := req.Send() 130 // if err == nil { // resp is now filled 131 // fmt.Println(resp) 132 // } 133 // 134 // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetRecords 135 func (c *DynamoDBStreams) GetRecordsRequest(input *GetRecordsInput) (req *request.Request, output *GetRecordsOutput) { 136 op := &request.Operation{ 137 Name: opGetRecords, 138 HTTPMethod: "POST", 139 HTTPPath: "/", 140 } 141 142 if input == nil { 143 input = &GetRecordsInput{} 144 } 145 146 output = &GetRecordsOutput{} 147 req = c.newRequest(op, input, output) 148 return 149 } 150 151 // GetRecords API operation for Amazon DynamoDB Streams. 152 // 153 // Retrieves the stream records from a given shard. 154 // 155 // Specify a shard iterator using the ShardIterator parameter. The shard iterator 156 // specifies the position in the shard from which you want to start reading 157 // stream records sequentially. If there are no stream records available in 158 // the portion of the shard that the iterator points to, GetRecords returns 159 // an empty list. Note that it might take multiple calls to get to a portion 160 // of the shard that contains stream records. 161 // 162 // GetRecords can retrieve a maximum of 1 MB of data or 1000 stream records, 163 // whichever comes first. 164 // 165 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 166 // with awserr.Error's Code and Message methods to get detailed information about 167 // the error. 168 // 169 // See the AWS API reference guide for Amazon DynamoDB Streams's 170 // API operation GetRecords for usage and error information. 171 // 172 // Returned Error Types: 173 // * ResourceNotFoundException 174 // The operation tried to access a nonexistent table or index. The resource 175 // might not be specified correctly, or its status might not be ACTIVE. 176 // 177 // * LimitExceededException 178 // There is no limit to the number of daily on-demand backups that can be taken. 179 // 180 // Up to 50 simultaneous table operations are allowed per account. These operations 181 // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, 182 // and RestoreTableToPointInTime. 183 // 184 // The only exception is when you are creating a table with one or more secondary 185 // indexes. You can have up to 25 such requests running at a time; however, 186 // if the table or index specifications are complex, DynamoDB might temporarily 187 // reduce the number of concurrent operations. 188 // 189 // There is a soft account quota of 256 tables. 190 // 191 // * InternalServerError 192 // An error occurred on the server side. 193 // 194 // * ExpiredIteratorException 195 // The shard iterator has expired and can no longer be used to retrieve stream 196 // records. A shard iterator expires 15 minutes after it is retrieved using 197 // the GetShardIterator action. 198 // 199 // * TrimmedDataAccessException 200 // The operation attempted to read past the oldest stream record in a shard. 201 // 202 // In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records 203 // whose age exceeds this limit are subject to removal (trimming) from the stream. 204 // You might receive a TrimmedDataAccessException if: 205 // 206 // * You request a shard iterator with a sequence number older than the trim 207 // point (24 hours). 208 // 209 // * You obtain a shard iterator, but before you use the iterator in a GetRecords 210 // request, a stream record in the shard exceeds the 24 hour period and is 211 // trimmed. This causes the iterator to access a record that no longer exists. 212 // 213 // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetRecords 214 func (c *DynamoDBStreams) GetRecords(input *GetRecordsInput) (*GetRecordsOutput, error) { 215 req, out := c.GetRecordsRequest(input) 216 return out, req.Send() 217 } 218 219 // GetRecordsWithContext is the same as GetRecords with the addition of 220 // the ability to pass a context and additional request options. 221 // 222 // See GetRecords for details on how to use this API operation. 223 // 224 // The context must be non-nil and will be used for request cancellation. If 225 // the context is nil a panic will occur. In the future the SDK may create 226 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 227 // for more information on using Contexts. 228 func (c *DynamoDBStreams) GetRecordsWithContext(ctx aws.Context, input *GetRecordsInput, opts ...request.Option) (*GetRecordsOutput, error) { 229 req, out := c.GetRecordsRequest(input) 230 req.SetContext(ctx) 231 req.ApplyOptions(opts...) 232 return out, req.Send() 233 } 234 235 const opGetShardIterator = "GetShardIterator" 236 237 // GetShardIteratorRequest generates a "aws/request.Request" representing the 238 // client's request for the GetShardIterator operation. The "output" return 239 // value will be populated with the request's response once the request completes 240 // successfully. 241 // 242 // Use "Send" method on the returned Request to send the API call to the service. 243 // the "output" return value is not valid until after Send returns without error. 244 // 245 // See GetShardIterator for more information on using the GetShardIterator 246 // API call, and error handling. 247 // 248 // This method is useful when you want to inject custom logic or configuration 249 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 250 // 251 // 252 // // Example sending a request using the GetShardIteratorRequest method. 253 // req, resp := client.GetShardIteratorRequest(params) 254 // 255 // err := req.Send() 256 // if err == nil { // resp is now filled 257 // fmt.Println(resp) 258 // } 259 // 260 // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetShardIterator 261 func (c *DynamoDBStreams) GetShardIteratorRequest(input *GetShardIteratorInput) (req *request.Request, output *GetShardIteratorOutput) { 262 op := &request.Operation{ 263 Name: opGetShardIterator, 264 HTTPMethod: "POST", 265 HTTPPath: "/", 266 } 267 268 if input == nil { 269 input = &GetShardIteratorInput{} 270 } 271 272 output = &GetShardIteratorOutput{} 273 req = c.newRequest(op, input, output) 274 return 275 } 276 277 // GetShardIterator API operation for Amazon DynamoDB Streams. 278 // 279 // Returns a shard iterator. A shard iterator provides information about how 280 // to retrieve the stream records from within a shard. Use the shard iterator 281 // in a subsequent GetRecords request to read the stream records from the shard. 282 // 283 // A shard iterator expires 15 minutes after it is returned to the requester. 284 // 285 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 286 // with awserr.Error's Code and Message methods to get detailed information about 287 // the error. 288 // 289 // See the AWS API reference guide for Amazon DynamoDB Streams's 290 // API operation GetShardIterator for usage and error information. 291 // 292 // Returned Error Types: 293 // * ResourceNotFoundException 294 // The operation tried to access a nonexistent table or index. The resource 295 // might not be specified correctly, or its status might not be ACTIVE. 296 // 297 // * InternalServerError 298 // An error occurred on the server side. 299 // 300 // * TrimmedDataAccessException 301 // The operation attempted to read past the oldest stream record in a shard. 302 // 303 // In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records 304 // whose age exceeds this limit are subject to removal (trimming) from the stream. 305 // You might receive a TrimmedDataAccessException if: 306 // 307 // * You request a shard iterator with a sequence number older than the trim 308 // point (24 hours). 309 // 310 // * You obtain a shard iterator, but before you use the iterator in a GetRecords 311 // request, a stream record in the shard exceeds the 24 hour period and is 312 // trimmed. This causes the iterator to access a record that no longer exists. 313 // 314 // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetShardIterator 315 func (c *DynamoDBStreams) GetShardIterator(input *GetShardIteratorInput) (*GetShardIteratorOutput, error) { 316 req, out := c.GetShardIteratorRequest(input) 317 return out, req.Send() 318 } 319 320 // GetShardIteratorWithContext is the same as GetShardIterator with the addition of 321 // the ability to pass a context and additional request options. 322 // 323 // See GetShardIterator for details on how to use this API operation. 324 // 325 // The context must be non-nil and will be used for request cancellation. If 326 // the context is nil a panic will occur. In the future the SDK may create 327 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 328 // for more information on using Contexts. 329 func (c *DynamoDBStreams) GetShardIteratorWithContext(ctx aws.Context, input *GetShardIteratorInput, opts ...request.Option) (*GetShardIteratorOutput, error) { 330 req, out := c.GetShardIteratorRequest(input) 331 req.SetContext(ctx) 332 req.ApplyOptions(opts...) 333 return out, req.Send() 334 } 335 336 const opListStreams = "ListStreams" 337 338 // ListStreamsRequest generates a "aws/request.Request" representing the 339 // client's request for the ListStreams operation. The "output" return 340 // value will be populated with the request's response once the request completes 341 // successfully. 342 // 343 // Use "Send" method on the returned Request to send the API call to the service. 344 // the "output" return value is not valid until after Send returns without error. 345 // 346 // See ListStreams for more information on using the ListStreams 347 // API call, and error handling. 348 // 349 // This method is useful when you want to inject custom logic or configuration 350 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 351 // 352 // 353 // // Example sending a request using the ListStreamsRequest method. 354 // req, resp := client.ListStreamsRequest(params) 355 // 356 // err := req.Send() 357 // if err == nil { // resp is now filled 358 // fmt.Println(resp) 359 // } 360 // 361 // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/ListStreams 362 func (c *DynamoDBStreams) ListStreamsRequest(input *ListStreamsInput) (req *request.Request, output *ListStreamsOutput) { 363 op := &request.Operation{ 364 Name: opListStreams, 365 HTTPMethod: "POST", 366 HTTPPath: "/", 367 } 368 369 if input == nil { 370 input = &ListStreamsInput{} 371 } 372 373 output = &ListStreamsOutput{} 374 req = c.newRequest(op, input, output) 375 return 376 } 377 378 // ListStreams API operation for Amazon DynamoDB Streams. 379 // 380 // Returns an array of stream ARNs associated with the current account and endpoint. 381 // If the TableName parameter is present, then ListStreams will return only 382 // the streams ARNs for that table. 383 // 384 // You can call ListStreams at a maximum rate of 5 times per second. 385 // 386 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 387 // with awserr.Error's Code and Message methods to get detailed information about 388 // the error. 389 // 390 // See the AWS API reference guide for Amazon DynamoDB Streams's 391 // API operation ListStreams for usage and error information. 392 // 393 // Returned Error Types: 394 // * ResourceNotFoundException 395 // The operation tried to access a nonexistent table or index. The resource 396 // might not be specified correctly, or its status might not be ACTIVE. 397 // 398 // * InternalServerError 399 // An error occurred on the server side. 400 // 401 // See also, https://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/ListStreams 402 func (c *DynamoDBStreams) ListStreams(input *ListStreamsInput) (*ListStreamsOutput, error) { 403 req, out := c.ListStreamsRequest(input) 404 return out, req.Send() 405 } 406 407 // ListStreamsWithContext is the same as ListStreams with the addition of 408 // the ability to pass a context and additional request options. 409 // 410 // See ListStreams for details on how to use this API operation. 411 // 412 // The context must be non-nil and will be used for request cancellation. If 413 // the context is nil a panic will occur. In the future the SDK may create 414 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 415 // for more information on using Contexts. 416 func (c *DynamoDBStreams) ListStreamsWithContext(ctx aws.Context, input *ListStreamsInput, opts ...request.Option) (*ListStreamsOutput, error) { 417 req, out := c.ListStreamsRequest(input) 418 req.SetContext(ctx) 419 req.ApplyOptions(opts...) 420 return out, req.Send() 421 } 422 423 // Represents the input of a DescribeStream operation. 424 type DescribeStreamInput struct { 425 _ struct{} `type:"structure"` 426 427 // The shard ID of the first item that this operation will evaluate. Use the 428 // value that was returned for LastEvaluatedShardId in the previous operation. 429 ExclusiveStartShardId *string `min:"28" type:"string"` 430 431 // The maximum number of shard objects to return. The upper limit is 100. 432 Limit *int64 `min:"1" type:"integer"` 433 434 // The Amazon Resource Name (ARN) for the stream. 435 // 436 // StreamArn is a required field 437 StreamArn *string `min:"37" type:"string" required:"true"` 438 } 439 440 // String returns the string representation. 441 // 442 // API parameter values that are decorated as "sensitive" in the API will not 443 // be included in the string output. The member name will be present, but the 444 // value will be replaced with "sensitive". 445 func (s DescribeStreamInput) String() string { 446 return awsutil.Prettify(s) 447 } 448 449 // GoString returns the string representation. 450 // 451 // API parameter values that are decorated as "sensitive" in the API will not 452 // be included in the string output. The member name will be present, but the 453 // value will be replaced with "sensitive". 454 func (s DescribeStreamInput) GoString() string { 455 return s.String() 456 } 457 458 // Validate inspects the fields of the type to determine if they are valid. 459 func (s *DescribeStreamInput) Validate() error { 460 invalidParams := request.ErrInvalidParams{Context: "DescribeStreamInput"} 461 if s.ExclusiveStartShardId != nil && len(*s.ExclusiveStartShardId) < 28 { 462 invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartShardId", 28)) 463 } 464 if s.Limit != nil && *s.Limit < 1 { 465 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 466 } 467 if s.StreamArn == nil { 468 invalidParams.Add(request.NewErrParamRequired("StreamArn")) 469 } 470 if s.StreamArn != nil && len(*s.StreamArn) < 37 { 471 invalidParams.Add(request.NewErrParamMinLen("StreamArn", 37)) 472 } 473 474 if invalidParams.Len() > 0 { 475 return invalidParams 476 } 477 return nil 478 } 479 480 // SetExclusiveStartShardId sets the ExclusiveStartShardId field's value. 481 func (s *DescribeStreamInput) SetExclusiveStartShardId(v string) *DescribeStreamInput { 482 s.ExclusiveStartShardId = &v 483 return s 484 } 485 486 // SetLimit sets the Limit field's value. 487 func (s *DescribeStreamInput) SetLimit(v int64) *DescribeStreamInput { 488 s.Limit = &v 489 return s 490 } 491 492 // SetStreamArn sets the StreamArn field's value. 493 func (s *DescribeStreamInput) SetStreamArn(v string) *DescribeStreamInput { 494 s.StreamArn = &v 495 return s 496 } 497 498 // Represents the output of a DescribeStream operation. 499 type DescribeStreamOutput struct { 500 _ struct{} `type:"structure"` 501 502 // A complete description of the stream, including its creation date and time, 503 // the DynamoDB table associated with the stream, the shard IDs within the stream, 504 // and the beginning and ending sequence numbers of stream records within the 505 // shards. 506 StreamDescription *StreamDescription `type:"structure"` 507 } 508 509 // String returns the string representation. 510 // 511 // API parameter values that are decorated as "sensitive" in the API will not 512 // be included in the string output. The member name will be present, but the 513 // value will be replaced with "sensitive". 514 func (s DescribeStreamOutput) String() string { 515 return awsutil.Prettify(s) 516 } 517 518 // GoString returns the string representation. 519 // 520 // API parameter values that are decorated as "sensitive" in the API will not 521 // be included in the string output. The member name will be present, but the 522 // value will be replaced with "sensitive". 523 func (s DescribeStreamOutput) GoString() string { 524 return s.String() 525 } 526 527 // SetStreamDescription sets the StreamDescription field's value. 528 func (s *DescribeStreamOutput) SetStreamDescription(v *StreamDescription) *DescribeStreamOutput { 529 s.StreamDescription = v 530 return s 531 } 532 533 // The shard iterator has expired and can no longer be used to retrieve stream 534 // records. A shard iterator expires 15 minutes after it is retrieved using 535 // the GetShardIterator action. 536 type ExpiredIteratorException struct { 537 _ struct{} `type:"structure"` 538 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 539 540 // The provided iterator exceeds the maximum age allowed. 541 Message_ *string `locationName:"message" type:"string"` 542 } 543 544 // String returns the string representation. 545 // 546 // API parameter values that are decorated as "sensitive" in the API will not 547 // be included in the string output. The member name will be present, but the 548 // value will be replaced with "sensitive". 549 func (s ExpiredIteratorException) String() string { 550 return awsutil.Prettify(s) 551 } 552 553 // GoString returns the string representation. 554 // 555 // API parameter values that are decorated as "sensitive" in the API will not 556 // be included in the string output. The member name will be present, but the 557 // value will be replaced with "sensitive". 558 func (s ExpiredIteratorException) GoString() string { 559 return s.String() 560 } 561 562 func newErrorExpiredIteratorException(v protocol.ResponseMetadata) error { 563 return &ExpiredIteratorException{ 564 RespMetadata: v, 565 } 566 } 567 568 // Code returns the exception type name. 569 func (s *ExpiredIteratorException) Code() string { 570 return "ExpiredIteratorException" 571 } 572 573 // Message returns the exception's message. 574 func (s *ExpiredIteratorException) Message() string { 575 if s.Message_ != nil { 576 return *s.Message_ 577 } 578 return "" 579 } 580 581 // OrigErr always returns nil, satisfies awserr.Error interface. 582 func (s *ExpiredIteratorException) OrigErr() error { 583 return nil 584 } 585 586 func (s *ExpiredIteratorException) Error() string { 587 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 588 } 589 590 // Status code returns the HTTP status code for the request's response error. 591 func (s *ExpiredIteratorException) StatusCode() int { 592 return s.RespMetadata.StatusCode 593 } 594 595 // RequestID returns the service's response RequestID for request. 596 func (s *ExpiredIteratorException) RequestID() string { 597 return s.RespMetadata.RequestID 598 } 599 600 // Represents the input of a GetRecords operation. 601 type GetRecordsInput struct { 602 _ struct{} `type:"structure"` 603 604 // The maximum number of records to return from the shard. The upper limit is 605 // 1000. 606 Limit *int64 `min:"1" type:"integer"` 607 608 // A shard iterator that was retrieved from a previous GetShardIterator operation. 609 // This iterator can be used to access the stream records in this shard. 610 // 611 // ShardIterator is a required field 612 ShardIterator *string `min:"1" type:"string" required:"true"` 613 } 614 615 // String returns the string representation. 616 // 617 // API parameter values that are decorated as "sensitive" in the API will not 618 // be included in the string output. The member name will be present, but the 619 // value will be replaced with "sensitive". 620 func (s GetRecordsInput) String() string { 621 return awsutil.Prettify(s) 622 } 623 624 // GoString returns the string representation. 625 // 626 // API parameter values that are decorated as "sensitive" in the API will not 627 // be included in the string output. The member name will be present, but the 628 // value will be replaced with "sensitive". 629 func (s GetRecordsInput) GoString() string { 630 return s.String() 631 } 632 633 // Validate inspects the fields of the type to determine if they are valid. 634 func (s *GetRecordsInput) Validate() error { 635 invalidParams := request.ErrInvalidParams{Context: "GetRecordsInput"} 636 if s.Limit != nil && *s.Limit < 1 { 637 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 638 } 639 if s.ShardIterator == nil { 640 invalidParams.Add(request.NewErrParamRequired("ShardIterator")) 641 } 642 if s.ShardIterator != nil && len(*s.ShardIterator) < 1 { 643 invalidParams.Add(request.NewErrParamMinLen("ShardIterator", 1)) 644 } 645 646 if invalidParams.Len() > 0 { 647 return invalidParams 648 } 649 return nil 650 } 651 652 // SetLimit sets the Limit field's value. 653 func (s *GetRecordsInput) SetLimit(v int64) *GetRecordsInput { 654 s.Limit = &v 655 return s 656 } 657 658 // SetShardIterator sets the ShardIterator field's value. 659 func (s *GetRecordsInput) SetShardIterator(v string) *GetRecordsInput { 660 s.ShardIterator = &v 661 return s 662 } 663 664 // Represents the output of a GetRecords operation. 665 type GetRecordsOutput struct { 666 _ struct{} `type:"structure"` 667 668 // The next position in the shard from which to start sequentially reading stream 669 // records. If set to null, the shard has been closed and the requested iterator 670 // will not return any more data. 671 NextShardIterator *string `min:"1" type:"string"` 672 673 // The stream records from the shard, which were retrieved using the shard iterator. 674 Records []*Record `type:"list"` 675 } 676 677 // String returns the string representation. 678 // 679 // API parameter values that are decorated as "sensitive" in the API will not 680 // be included in the string output. The member name will be present, but the 681 // value will be replaced with "sensitive". 682 func (s GetRecordsOutput) String() string { 683 return awsutil.Prettify(s) 684 } 685 686 // GoString returns the string representation. 687 // 688 // API parameter values that are decorated as "sensitive" in the API will not 689 // be included in the string output. The member name will be present, but the 690 // value will be replaced with "sensitive". 691 func (s GetRecordsOutput) GoString() string { 692 return s.String() 693 } 694 695 // SetNextShardIterator sets the NextShardIterator field's value. 696 func (s *GetRecordsOutput) SetNextShardIterator(v string) *GetRecordsOutput { 697 s.NextShardIterator = &v 698 return s 699 } 700 701 // SetRecords sets the Records field's value. 702 func (s *GetRecordsOutput) SetRecords(v []*Record) *GetRecordsOutput { 703 s.Records = v 704 return s 705 } 706 707 // Represents the input of a GetShardIterator operation. 708 type GetShardIteratorInput struct { 709 _ struct{} `type:"structure"` 710 711 // The sequence number of a stream record in the shard from which to start reading. 712 SequenceNumber *string `min:"21" type:"string"` 713 714 // The identifier of the shard. The iterator will be returned for this shard 715 // ID. 716 // 717 // ShardId is a required field 718 ShardId *string `min:"28" type:"string" required:"true"` 719 720 // Determines how the shard iterator is used to start reading stream records 721 // from the shard: 722 // 723 // * AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted 724 // by a specific sequence number. 725 // 726 // * AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted 727 // by a specific sequence number. 728 // 729 // * TRIM_HORIZON - Start reading at the last (untrimmed) stream record, 730 // which is the oldest record in the shard. In DynamoDB Streams, there is 731 // a 24 hour limit on data retention. Stream records whose age exceeds this 732 // limit are subject to removal (trimming) from the stream. 733 // 734 // * LATEST - Start reading just after the most recent stream record in the 735 // shard, so that you always read the most recent data in the shard. 736 // 737 // ShardIteratorType is a required field 738 ShardIteratorType *string `type:"string" required:"true" enum:"ShardIteratorType"` 739 740 // The Amazon Resource Name (ARN) for the stream. 741 // 742 // StreamArn is a required field 743 StreamArn *string `min:"37" type:"string" required:"true"` 744 } 745 746 // String returns the string representation. 747 // 748 // API parameter values that are decorated as "sensitive" in the API will not 749 // be included in the string output. The member name will be present, but the 750 // value will be replaced with "sensitive". 751 func (s GetShardIteratorInput) String() string { 752 return awsutil.Prettify(s) 753 } 754 755 // GoString returns the string representation. 756 // 757 // API parameter values that are decorated as "sensitive" in the API will not 758 // be included in the string output. The member name will be present, but the 759 // value will be replaced with "sensitive". 760 func (s GetShardIteratorInput) GoString() string { 761 return s.String() 762 } 763 764 // Validate inspects the fields of the type to determine if they are valid. 765 func (s *GetShardIteratorInput) Validate() error { 766 invalidParams := request.ErrInvalidParams{Context: "GetShardIteratorInput"} 767 if s.SequenceNumber != nil && len(*s.SequenceNumber) < 21 { 768 invalidParams.Add(request.NewErrParamMinLen("SequenceNumber", 21)) 769 } 770 if s.ShardId == nil { 771 invalidParams.Add(request.NewErrParamRequired("ShardId")) 772 } 773 if s.ShardId != nil && len(*s.ShardId) < 28 { 774 invalidParams.Add(request.NewErrParamMinLen("ShardId", 28)) 775 } 776 if s.ShardIteratorType == nil { 777 invalidParams.Add(request.NewErrParamRequired("ShardIteratorType")) 778 } 779 if s.StreamArn == nil { 780 invalidParams.Add(request.NewErrParamRequired("StreamArn")) 781 } 782 if s.StreamArn != nil && len(*s.StreamArn) < 37 { 783 invalidParams.Add(request.NewErrParamMinLen("StreamArn", 37)) 784 } 785 786 if invalidParams.Len() > 0 { 787 return invalidParams 788 } 789 return nil 790 } 791 792 // SetSequenceNumber sets the SequenceNumber field's value. 793 func (s *GetShardIteratorInput) SetSequenceNumber(v string) *GetShardIteratorInput { 794 s.SequenceNumber = &v 795 return s 796 } 797 798 // SetShardId sets the ShardId field's value. 799 func (s *GetShardIteratorInput) SetShardId(v string) *GetShardIteratorInput { 800 s.ShardId = &v 801 return s 802 } 803 804 // SetShardIteratorType sets the ShardIteratorType field's value. 805 func (s *GetShardIteratorInput) SetShardIteratorType(v string) *GetShardIteratorInput { 806 s.ShardIteratorType = &v 807 return s 808 } 809 810 // SetStreamArn sets the StreamArn field's value. 811 func (s *GetShardIteratorInput) SetStreamArn(v string) *GetShardIteratorInput { 812 s.StreamArn = &v 813 return s 814 } 815 816 // Represents the output of a GetShardIterator operation. 817 type GetShardIteratorOutput struct { 818 _ struct{} `type:"structure"` 819 820 // The position in the shard from which to start reading stream records sequentially. 821 // A shard iterator specifies this position using the sequence number of a stream 822 // record in a shard. 823 ShardIterator *string `min:"1" type:"string"` 824 } 825 826 // String returns the string representation. 827 // 828 // API parameter values that are decorated as "sensitive" in the API will not 829 // be included in the string output. The member name will be present, but the 830 // value will be replaced with "sensitive". 831 func (s GetShardIteratorOutput) String() string { 832 return awsutil.Prettify(s) 833 } 834 835 // GoString returns the string representation. 836 // 837 // API parameter values that are decorated as "sensitive" in the API will not 838 // be included in the string output. The member name will be present, but the 839 // value will be replaced with "sensitive". 840 func (s GetShardIteratorOutput) GoString() string { 841 return s.String() 842 } 843 844 // SetShardIterator sets the ShardIterator field's value. 845 func (s *GetShardIteratorOutput) SetShardIterator(v string) *GetShardIteratorOutput { 846 s.ShardIterator = &v 847 return s 848 } 849 850 // Contains details about the type of identity that made the request. 851 type Identity struct { 852 _ struct{} `type:"structure"` 853 854 // A unique identifier for the entity that made the call. For Time To Live, 855 // the principalId is "dynamodb.amazonaws.com". 856 PrincipalId *string `type:"string"` 857 858 // The type of the identity. For Time To Live, the type is "Service". 859 Type *string `type:"string"` 860 } 861 862 // String returns the string representation. 863 // 864 // API parameter values that are decorated as "sensitive" in the API will not 865 // be included in the string output. The member name will be present, but the 866 // value will be replaced with "sensitive". 867 func (s Identity) String() string { 868 return awsutil.Prettify(s) 869 } 870 871 // GoString returns the string representation. 872 // 873 // API parameter values that are decorated as "sensitive" in the API will not 874 // be included in the string output. The member name will be present, but the 875 // value will be replaced with "sensitive". 876 func (s Identity) GoString() string { 877 return s.String() 878 } 879 880 // SetPrincipalId sets the PrincipalId field's value. 881 func (s *Identity) SetPrincipalId(v string) *Identity { 882 s.PrincipalId = &v 883 return s 884 } 885 886 // SetType sets the Type field's value. 887 func (s *Identity) SetType(v string) *Identity { 888 s.Type = &v 889 return s 890 } 891 892 // An error occurred on the server side. 893 type InternalServerError struct { 894 _ struct{} `type:"structure"` 895 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 896 897 // The server encountered an internal error trying to fulfill the request. 898 Message_ *string `locationName:"message" type:"string"` 899 } 900 901 // String returns the string representation. 902 // 903 // API parameter values that are decorated as "sensitive" in the API will not 904 // be included in the string output. The member name will be present, but the 905 // value will be replaced with "sensitive". 906 func (s InternalServerError) String() string { 907 return awsutil.Prettify(s) 908 } 909 910 // GoString returns the string representation. 911 // 912 // API parameter values that are decorated as "sensitive" in the API will not 913 // be included in the string output. The member name will be present, but the 914 // value will be replaced with "sensitive". 915 func (s InternalServerError) GoString() string { 916 return s.String() 917 } 918 919 func newErrorInternalServerError(v protocol.ResponseMetadata) error { 920 return &InternalServerError{ 921 RespMetadata: v, 922 } 923 } 924 925 // Code returns the exception type name. 926 func (s *InternalServerError) Code() string { 927 return "InternalServerError" 928 } 929 930 // Message returns the exception's message. 931 func (s *InternalServerError) Message() string { 932 if s.Message_ != nil { 933 return *s.Message_ 934 } 935 return "" 936 } 937 938 // OrigErr always returns nil, satisfies awserr.Error interface. 939 func (s *InternalServerError) OrigErr() error { 940 return nil 941 } 942 943 func (s *InternalServerError) Error() string { 944 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 945 } 946 947 // Status code returns the HTTP status code for the request's response error. 948 func (s *InternalServerError) StatusCode() int { 949 return s.RespMetadata.StatusCode 950 } 951 952 // RequestID returns the service's response RequestID for request. 953 func (s *InternalServerError) RequestID() string { 954 return s.RespMetadata.RequestID 955 } 956 957 // There is no limit to the number of daily on-demand backups that can be taken. 958 // 959 // Up to 50 simultaneous table operations are allowed per account. These operations 960 // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, 961 // and RestoreTableToPointInTime. 962 // 963 // The only exception is when you are creating a table with one or more secondary 964 // indexes. You can have up to 25 such requests running at a time; however, 965 // if the table or index specifications are complex, DynamoDB might temporarily 966 // reduce the number of concurrent operations. 967 // 968 // There is a soft account quota of 256 tables. 969 type LimitExceededException struct { 970 _ struct{} `type:"structure"` 971 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 972 973 // Too many operations for a given subscriber. 974 Message_ *string `locationName:"message" type:"string"` 975 } 976 977 // String returns the string representation. 978 // 979 // API parameter values that are decorated as "sensitive" in the API will not 980 // be included in the string output. The member name will be present, but the 981 // value will be replaced with "sensitive". 982 func (s LimitExceededException) String() string { 983 return awsutil.Prettify(s) 984 } 985 986 // GoString returns the string representation. 987 // 988 // API parameter values that are decorated as "sensitive" in the API will not 989 // be included in the string output. The member name will be present, but the 990 // value will be replaced with "sensitive". 991 func (s LimitExceededException) GoString() string { 992 return s.String() 993 } 994 995 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 996 return &LimitExceededException{ 997 RespMetadata: v, 998 } 999 } 1000 1001 // Code returns the exception type name. 1002 func (s *LimitExceededException) Code() string { 1003 return "LimitExceededException" 1004 } 1005 1006 // Message returns the exception's message. 1007 func (s *LimitExceededException) Message() string { 1008 if s.Message_ != nil { 1009 return *s.Message_ 1010 } 1011 return "" 1012 } 1013 1014 // OrigErr always returns nil, satisfies awserr.Error interface. 1015 func (s *LimitExceededException) OrigErr() error { 1016 return nil 1017 } 1018 1019 func (s *LimitExceededException) Error() string { 1020 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1021 } 1022 1023 // Status code returns the HTTP status code for the request's response error. 1024 func (s *LimitExceededException) StatusCode() int { 1025 return s.RespMetadata.StatusCode 1026 } 1027 1028 // RequestID returns the service's response RequestID for request. 1029 func (s *LimitExceededException) RequestID() string { 1030 return s.RespMetadata.RequestID 1031 } 1032 1033 // Represents the input of a ListStreams operation. 1034 type ListStreamsInput struct { 1035 _ struct{} `type:"structure"` 1036 1037 // The ARN (Amazon Resource Name) of the first item that this operation will 1038 // evaluate. Use the value that was returned for LastEvaluatedStreamArn in the 1039 // previous operation. 1040 ExclusiveStartStreamArn *string `min:"37" type:"string"` 1041 1042 // The maximum number of streams to return. The upper limit is 100. 1043 Limit *int64 `min:"1" type:"integer"` 1044 1045 // If this parameter is provided, then only the streams associated with this 1046 // table name are returned. 1047 TableName *string `min:"3" type:"string"` 1048 } 1049 1050 // String returns the string representation. 1051 // 1052 // API parameter values that are decorated as "sensitive" in the API will not 1053 // be included in the string output. The member name will be present, but the 1054 // value will be replaced with "sensitive". 1055 func (s ListStreamsInput) String() string { 1056 return awsutil.Prettify(s) 1057 } 1058 1059 // GoString returns the string representation. 1060 // 1061 // API parameter values that are decorated as "sensitive" in the API will not 1062 // be included in the string output. The member name will be present, but the 1063 // value will be replaced with "sensitive". 1064 func (s ListStreamsInput) GoString() string { 1065 return s.String() 1066 } 1067 1068 // Validate inspects the fields of the type to determine if they are valid. 1069 func (s *ListStreamsInput) Validate() error { 1070 invalidParams := request.ErrInvalidParams{Context: "ListStreamsInput"} 1071 if s.ExclusiveStartStreamArn != nil && len(*s.ExclusiveStartStreamArn) < 37 { 1072 invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartStreamArn", 37)) 1073 } 1074 if s.Limit != nil && *s.Limit < 1 { 1075 invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) 1076 } 1077 if s.TableName != nil && len(*s.TableName) < 3 { 1078 invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) 1079 } 1080 1081 if invalidParams.Len() > 0 { 1082 return invalidParams 1083 } 1084 return nil 1085 } 1086 1087 // SetExclusiveStartStreamArn sets the ExclusiveStartStreamArn field's value. 1088 func (s *ListStreamsInput) SetExclusiveStartStreamArn(v string) *ListStreamsInput { 1089 s.ExclusiveStartStreamArn = &v 1090 return s 1091 } 1092 1093 // SetLimit sets the Limit field's value. 1094 func (s *ListStreamsInput) SetLimit(v int64) *ListStreamsInput { 1095 s.Limit = &v 1096 return s 1097 } 1098 1099 // SetTableName sets the TableName field's value. 1100 func (s *ListStreamsInput) SetTableName(v string) *ListStreamsInput { 1101 s.TableName = &v 1102 return s 1103 } 1104 1105 // Represents the output of a ListStreams operation. 1106 type ListStreamsOutput struct { 1107 _ struct{} `type:"structure"` 1108 1109 // The stream ARN of the item where the operation stopped, inclusive of the 1110 // previous result set. Use this value to start a new operation, excluding this 1111 // value in the new request. 1112 // 1113 // If LastEvaluatedStreamArn is empty, then the "last page" of results has been 1114 // processed and there is no more data to be retrieved. 1115 // 1116 // If LastEvaluatedStreamArn is not empty, it does not necessarily mean that 1117 // there is more data in the result set. The only way to know when you have 1118 // reached the end of the result set is when LastEvaluatedStreamArn is empty. 1119 LastEvaluatedStreamArn *string `min:"37" type:"string"` 1120 1121 // A list of stream descriptors associated with the current account and endpoint. 1122 Streams []*Stream `type:"list"` 1123 } 1124 1125 // String returns the string representation. 1126 // 1127 // API parameter values that are decorated as "sensitive" in the API will not 1128 // be included in the string output. The member name will be present, but the 1129 // value will be replaced with "sensitive". 1130 func (s ListStreamsOutput) String() string { 1131 return awsutil.Prettify(s) 1132 } 1133 1134 // GoString returns the string representation. 1135 // 1136 // API parameter values that are decorated as "sensitive" in the API will not 1137 // be included in the string output. The member name will be present, but the 1138 // value will be replaced with "sensitive". 1139 func (s ListStreamsOutput) GoString() string { 1140 return s.String() 1141 } 1142 1143 // SetLastEvaluatedStreamArn sets the LastEvaluatedStreamArn field's value. 1144 func (s *ListStreamsOutput) SetLastEvaluatedStreamArn(v string) *ListStreamsOutput { 1145 s.LastEvaluatedStreamArn = &v 1146 return s 1147 } 1148 1149 // SetStreams sets the Streams field's value. 1150 func (s *ListStreamsOutput) SetStreams(v []*Stream) *ListStreamsOutput { 1151 s.Streams = v 1152 return s 1153 } 1154 1155 // A description of a unique event within a stream. 1156 type Record struct { 1157 _ struct{} `type:"structure"` 1158 1159 // The region in which the GetRecords request was received. 1160 AwsRegion *string `locationName:"awsRegion" type:"string"` 1161 1162 // The main body of the stream record, containing all of the DynamoDB-specific 1163 // fields. 1164 Dynamodb *StreamRecord `locationName:"dynamodb" type:"structure"` 1165 1166 // A globally unique identifier for the event that was recorded in this stream 1167 // record. 1168 EventID *string `locationName:"eventID" type:"string"` 1169 1170 // The type of data modification that was performed on the DynamoDB table: 1171 // 1172 // * INSERT - a new item was added to the table. 1173 // 1174 // * MODIFY - one or more of an existing item's attributes were modified. 1175 // 1176 // * REMOVE - the item was deleted from the table 1177 EventName *string `locationName:"eventName" type:"string" enum:"OperationType"` 1178 1179 // The AWS service from which the stream record originated. For DynamoDB Streams, 1180 // this is aws:dynamodb. 1181 EventSource *string `locationName:"eventSource" type:"string"` 1182 1183 // The version number of the stream record format. This number is updated whenever 1184 // the structure of Record is modified. 1185 // 1186 // Client applications must not assume that eventVersion will remain at a particular 1187 // value, as this number is subject to change at any time. In general, eventVersion 1188 // will only increase as the low-level DynamoDB Streams API evolves. 1189 EventVersion *string `locationName:"eventVersion" type:"string"` 1190 1191 // Items that are deleted by the Time to Live process after expiration have 1192 // the following fields: 1193 // 1194 // * Records[].userIdentity.type "Service" 1195 // 1196 // * Records[].userIdentity.principalId "dynamodb.amazonaws.com" 1197 UserIdentity *Identity `locationName:"userIdentity" type:"structure"` 1198 } 1199 1200 // String returns the string representation. 1201 // 1202 // API parameter values that are decorated as "sensitive" in the API will not 1203 // be included in the string output. The member name will be present, but the 1204 // value will be replaced with "sensitive". 1205 func (s Record) String() string { 1206 return awsutil.Prettify(s) 1207 } 1208 1209 // GoString returns the string representation. 1210 // 1211 // API parameter values that are decorated as "sensitive" in the API will not 1212 // be included in the string output. The member name will be present, but the 1213 // value will be replaced with "sensitive". 1214 func (s Record) GoString() string { 1215 return s.String() 1216 } 1217 1218 // SetAwsRegion sets the AwsRegion field's value. 1219 func (s *Record) SetAwsRegion(v string) *Record { 1220 s.AwsRegion = &v 1221 return s 1222 } 1223 1224 // SetDynamodb sets the Dynamodb field's value. 1225 func (s *Record) SetDynamodb(v *StreamRecord) *Record { 1226 s.Dynamodb = v 1227 return s 1228 } 1229 1230 // SetEventID sets the EventID field's value. 1231 func (s *Record) SetEventID(v string) *Record { 1232 s.EventID = &v 1233 return s 1234 } 1235 1236 // SetEventName sets the EventName field's value. 1237 func (s *Record) SetEventName(v string) *Record { 1238 s.EventName = &v 1239 return s 1240 } 1241 1242 // SetEventSource sets the EventSource field's value. 1243 func (s *Record) SetEventSource(v string) *Record { 1244 s.EventSource = &v 1245 return s 1246 } 1247 1248 // SetEventVersion sets the EventVersion field's value. 1249 func (s *Record) SetEventVersion(v string) *Record { 1250 s.EventVersion = &v 1251 return s 1252 } 1253 1254 // SetUserIdentity sets the UserIdentity field's value. 1255 func (s *Record) SetUserIdentity(v *Identity) *Record { 1256 s.UserIdentity = v 1257 return s 1258 } 1259 1260 // The operation tried to access a nonexistent table or index. The resource 1261 // might not be specified correctly, or its status might not be ACTIVE. 1262 type ResourceNotFoundException struct { 1263 _ struct{} `type:"structure"` 1264 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1265 1266 // The resource which is being requested does not exist. 1267 Message_ *string `locationName:"message" type:"string"` 1268 } 1269 1270 // String returns the string representation. 1271 // 1272 // API parameter values that are decorated as "sensitive" in the API will not 1273 // be included in the string output. The member name will be present, but the 1274 // value will be replaced with "sensitive". 1275 func (s ResourceNotFoundException) String() string { 1276 return awsutil.Prettify(s) 1277 } 1278 1279 // GoString returns the string representation. 1280 // 1281 // API parameter values that are decorated as "sensitive" in the API will not 1282 // be included in the string output. The member name will be present, but the 1283 // value will be replaced with "sensitive". 1284 func (s ResourceNotFoundException) GoString() string { 1285 return s.String() 1286 } 1287 1288 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 1289 return &ResourceNotFoundException{ 1290 RespMetadata: v, 1291 } 1292 } 1293 1294 // Code returns the exception type name. 1295 func (s *ResourceNotFoundException) Code() string { 1296 return "ResourceNotFoundException" 1297 } 1298 1299 // Message returns the exception's message. 1300 func (s *ResourceNotFoundException) Message() string { 1301 if s.Message_ != nil { 1302 return *s.Message_ 1303 } 1304 return "" 1305 } 1306 1307 // OrigErr always returns nil, satisfies awserr.Error interface. 1308 func (s *ResourceNotFoundException) OrigErr() error { 1309 return nil 1310 } 1311 1312 func (s *ResourceNotFoundException) Error() string { 1313 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1314 } 1315 1316 // Status code returns the HTTP status code for the request's response error. 1317 func (s *ResourceNotFoundException) StatusCode() int { 1318 return s.RespMetadata.StatusCode 1319 } 1320 1321 // RequestID returns the service's response RequestID for request. 1322 func (s *ResourceNotFoundException) RequestID() string { 1323 return s.RespMetadata.RequestID 1324 } 1325 1326 // The beginning and ending sequence numbers for the stream records contained 1327 // within a shard. 1328 type SequenceNumberRange struct { 1329 _ struct{} `type:"structure"` 1330 1331 // The last sequence number for the stream records contained within a shard. 1332 // String contains numeric characters only. 1333 EndingSequenceNumber *string `min:"21" type:"string"` 1334 1335 // The first sequence number for the stream records contained within a shard. 1336 // String contains numeric characters only. 1337 StartingSequenceNumber *string `min:"21" type:"string"` 1338 } 1339 1340 // String returns the string representation. 1341 // 1342 // API parameter values that are decorated as "sensitive" in the API will not 1343 // be included in the string output. The member name will be present, but the 1344 // value will be replaced with "sensitive". 1345 func (s SequenceNumberRange) String() string { 1346 return awsutil.Prettify(s) 1347 } 1348 1349 // GoString returns the string representation. 1350 // 1351 // API parameter values that are decorated as "sensitive" in the API will not 1352 // be included in the string output. The member name will be present, but the 1353 // value will be replaced with "sensitive". 1354 func (s SequenceNumberRange) GoString() string { 1355 return s.String() 1356 } 1357 1358 // SetEndingSequenceNumber sets the EndingSequenceNumber field's value. 1359 func (s *SequenceNumberRange) SetEndingSequenceNumber(v string) *SequenceNumberRange { 1360 s.EndingSequenceNumber = &v 1361 return s 1362 } 1363 1364 // SetStartingSequenceNumber sets the StartingSequenceNumber field's value. 1365 func (s *SequenceNumberRange) SetStartingSequenceNumber(v string) *SequenceNumberRange { 1366 s.StartingSequenceNumber = &v 1367 return s 1368 } 1369 1370 // A uniquely identified group of stream records within a stream. 1371 type Shard struct { 1372 _ struct{} `type:"structure"` 1373 1374 // The shard ID of the current shard's parent. 1375 ParentShardId *string `min:"28" type:"string"` 1376 1377 // The range of possible sequence numbers for the shard. 1378 SequenceNumberRange *SequenceNumberRange `type:"structure"` 1379 1380 // The system-generated identifier for this shard. 1381 ShardId *string `min:"28" type:"string"` 1382 } 1383 1384 // String returns the string representation. 1385 // 1386 // API parameter values that are decorated as "sensitive" in the API will not 1387 // be included in the string output. The member name will be present, but the 1388 // value will be replaced with "sensitive". 1389 func (s Shard) String() string { 1390 return awsutil.Prettify(s) 1391 } 1392 1393 // GoString returns the string representation. 1394 // 1395 // API parameter values that are decorated as "sensitive" in the API will not 1396 // be included in the string output. The member name will be present, but the 1397 // value will be replaced with "sensitive". 1398 func (s Shard) GoString() string { 1399 return s.String() 1400 } 1401 1402 // SetParentShardId sets the ParentShardId field's value. 1403 func (s *Shard) SetParentShardId(v string) *Shard { 1404 s.ParentShardId = &v 1405 return s 1406 } 1407 1408 // SetSequenceNumberRange sets the SequenceNumberRange field's value. 1409 func (s *Shard) SetSequenceNumberRange(v *SequenceNumberRange) *Shard { 1410 s.SequenceNumberRange = v 1411 return s 1412 } 1413 1414 // SetShardId sets the ShardId field's value. 1415 func (s *Shard) SetShardId(v string) *Shard { 1416 s.ShardId = &v 1417 return s 1418 } 1419 1420 // Represents all of the data describing a particular stream. 1421 type Stream struct { 1422 _ struct{} `type:"structure"` 1423 1424 // The Amazon Resource Name (ARN) for the stream. 1425 StreamArn *string `min:"37" type:"string"` 1426 1427 // A timestamp, in ISO 8601 format, for this stream. 1428 // 1429 // Note that LatestStreamLabel is not a unique identifier for the stream, because 1430 // it is possible that a stream from another table might have the same timestamp. 1431 // However, the combination of the following three elements is guaranteed to 1432 // be unique: 1433 // 1434 // * the AWS customer ID. 1435 // 1436 // * the table name 1437 // 1438 // * the StreamLabel 1439 StreamLabel *string `type:"string"` 1440 1441 // The DynamoDB table with which the stream is associated. 1442 TableName *string `min:"3" type:"string"` 1443 } 1444 1445 // String returns the string representation. 1446 // 1447 // API parameter values that are decorated as "sensitive" in the API will not 1448 // be included in the string output. The member name will be present, but the 1449 // value will be replaced with "sensitive". 1450 func (s Stream) String() string { 1451 return awsutil.Prettify(s) 1452 } 1453 1454 // GoString returns the string representation. 1455 // 1456 // API parameter values that are decorated as "sensitive" in the API will not 1457 // be included in the string output. The member name will be present, but the 1458 // value will be replaced with "sensitive". 1459 func (s Stream) GoString() string { 1460 return s.String() 1461 } 1462 1463 // SetStreamArn sets the StreamArn field's value. 1464 func (s *Stream) SetStreamArn(v string) *Stream { 1465 s.StreamArn = &v 1466 return s 1467 } 1468 1469 // SetStreamLabel sets the StreamLabel field's value. 1470 func (s *Stream) SetStreamLabel(v string) *Stream { 1471 s.StreamLabel = &v 1472 return s 1473 } 1474 1475 // SetTableName sets the TableName field's value. 1476 func (s *Stream) SetTableName(v string) *Stream { 1477 s.TableName = &v 1478 return s 1479 } 1480 1481 // Represents all of the data describing a particular stream. 1482 type StreamDescription struct { 1483 _ struct{} `type:"structure"` 1484 1485 // The date and time when the request to create this stream was issued. 1486 CreationRequestDateTime *time.Time `type:"timestamp"` 1487 1488 // The key attribute(s) of the stream's DynamoDB table. 1489 KeySchema []*dynamodb.KeySchemaElement `min:"1" type:"list"` 1490 1491 // The shard ID of the item where the operation stopped, inclusive of the previous 1492 // result set. Use this value to start a new operation, excluding this value 1493 // in the new request. 1494 // 1495 // If LastEvaluatedShardId is empty, then the "last page" of results has been 1496 // processed and there is currently no more data to be retrieved. 1497 // 1498 // If LastEvaluatedShardId is not empty, it does not necessarily mean that there 1499 // is more data in the result set. The only way to know when you have reached 1500 // the end of the result set is when LastEvaluatedShardId is empty. 1501 LastEvaluatedShardId *string `min:"28" type:"string"` 1502 1503 // The shards that comprise the stream. 1504 Shards []*Shard `type:"list"` 1505 1506 // The Amazon Resource Name (ARN) for the stream. 1507 StreamArn *string `min:"37" type:"string"` 1508 1509 // A timestamp, in ISO 8601 format, for this stream. 1510 // 1511 // Note that LatestStreamLabel is not a unique identifier for the stream, because 1512 // it is possible that a stream from another table might have the same timestamp. 1513 // However, the combination of the following three elements is guaranteed to 1514 // be unique: 1515 // 1516 // * the AWS customer ID. 1517 // 1518 // * the table name 1519 // 1520 // * the StreamLabel 1521 StreamLabel *string `type:"string"` 1522 1523 // Indicates the current status of the stream: 1524 // 1525 // * ENABLING - Streams is currently being enabled on the DynamoDB table. 1526 // 1527 // * ENABLED - the stream is enabled. 1528 // 1529 // * DISABLING - Streams is currently being disabled on the DynamoDB table. 1530 // 1531 // * DISABLED - the stream is disabled. 1532 StreamStatus *string `type:"string" enum:"StreamStatus"` 1533 1534 // Indicates the format of the records within this stream: 1535 // 1536 // * KEYS_ONLY - only the key attributes of items that were modified in the 1537 // DynamoDB table. 1538 // 1539 // * NEW_IMAGE - entire items from the table, as they appeared after they 1540 // were modified. 1541 // 1542 // * OLD_IMAGE - entire items from the table, as they appeared before they 1543 // were modified. 1544 // 1545 // * NEW_AND_OLD_IMAGES - both the new and the old images of the items from 1546 // the table. 1547 StreamViewType *string `type:"string" enum:"StreamViewType"` 1548 1549 // The DynamoDB table with which the stream is associated. 1550 TableName *string `min:"3" type:"string"` 1551 } 1552 1553 // String returns the string representation. 1554 // 1555 // API parameter values that are decorated as "sensitive" in the API will not 1556 // be included in the string output. The member name will be present, but the 1557 // value will be replaced with "sensitive". 1558 func (s StreamDescription) String() string { 1559 return awsutil.Prettify(s) 1560 } 1561 1562 // GoString returns the string representation. 1563 // 1564 // API parameter values that are decorated as "sensitive" in the API will not 1565 // be included in the string output. The member name will be present, but the 1566 // value will be replaced with "sensitive". 1567 func (s StreamDescription) GoString() string { 1568 return s.String() 1569 } 1570 1571 // SetCreationRequestDateTime sets the CreationRequestDateTime field's value. 1572 func (s *StreamDescription) SetCreationRequestDateTime(v time.Time) *StreamDescription { 1573 s.CreationRequestDateTime = &v 1574 return s 1575 } 1576 1577 // SetKeySchema sets the KeySchema field's value. 1578 func (s *StreamDescription) SetKeySchema(v []*dynamodb.KeySchemaElement) *StreamDescription { 1579 s.KeySchema = v 1580 return s 1581 } 1582 1583 // SetLastEvaluatedShardId sets the LastEvaluatedShardId field's value. 1584 func (s *StreamDescription) SetLastEvaluatedShardId(v string) *StreamDescription { 1585 s.LastEvaluatedShardId = &v 1586 return s 1587 } 1588 1589 // SetShards sets the Shards field's value. 1590 func (s *StreamDescription) SetShards(v []*Shard) *StreamDescription { 1591 s.Shards = v 1592 return s 1593 } 1594 1595 // SetStreamArn sets the StreamArn field's value. 1596 func (s *StreamDescription) SetStreamArn(v string) *StreamDescription { 1597 s.StreamArn = &v 1598 return s 1599 } 1600 1601 // SetStreamLabel sets the StreamLabel field's value. 1602 func (s *StreamDescription) SetStreamLabel(v string) *StreamDescription { 1603 s.StreamLabel = &v 1604 return s 1605 } 1606 1607 // SetStreamStatus sets the StreamStatus field's value. 1608 func (s *StreamDescription) SetStreamStatus(v string) *StreamDescription { 1609 s.StreamStatus = &v 1610 return s 1611 } 1612 1613 // SetStreamViewType sets the StreamViewType field's value. 1614 func (s *StreamDescription) SetStreamViewType(v string) *StreamDescription { 1615 s.StreamViewType = &v 1616 return s 1617 } 1618 1619 // SetTableName sets the TableName field's value. 1620 func (s *StreamDescription) SetTableName(v string) *StreamDescription { 1621 s.TableName = &v 1622 return s 1623 } 1624 1625 // A description of a single data modification that was performed on an item 1626 // in a DynamoDB table. 1627 type StreamRecord struct { 1628 _ struct{} `type:"structure"` 1629 1630 // The approximate date and time when the stream record was created, in UNIX 1631 // epoch time (http://www.epochconverter.com/) format. 1632 ApproximateCreationDateTime *time.Time `type:"timestamp"` 1633 1634 // The primary key attribute(s) for the DynamoDB item that was modified. 1635 Keys map[string]*dynamodb.AttributeValue `type:"map"` 1636 1637 // The item in the DynamoDB table as it appeared after it was modified. 1638 NewImage map[string]*dynamodb.AttributeValue `type:"map"` 1639 1640 // The item in the DynamoDB table as it appeared before it was modified. 1641 OldImage map[string]*dynamodb.AttributeValue `type:"map"` 1642 1643 // The sequence number of the stream record. 1644 SequenceNumber *string `min:"21" type:"string"` 1645 1646 // The size of the stream record, in bytes. 1647 SizeBytes *int64 `min:"1" type:"long"` 1648 1649 // The type of data from the modified DynamoDB item that was captured in this 1650 // stream record: 1651 // 1652 // * KEYS_ONLY - only the key attributes of the modified item. 1653 // 1654 // * NEW_IMAGE - the entire item, as it appeared after it was modified. 1655 // 1656 // * OLD_IMAGE - the entire item, as it appeared before it was modified. 1657 // 1658 // * NEW_AND_OLD_IMAGES - both the new and the old item images of the item. 1659 StreamViewType *string `type:"string" enum:"StreamViewType"` 1660 } 1661 1662 // String returns the string representation. 1663 // 1664 // API parameter values that are decorated as "sensitive" in the API will not 1665 // be included in the string output. The member name will be present, but the 1666 // value will be replaced with "sensitive". 1667 func (s StreamRecord) String() string { 1668 return awsutil.Prettify(s) 1669 } 1670 1671 // GoString returns the string representation. 1672 // 1673 // API parameter values that are decorated as "sensitive" in the API will not 1674 // be included in the string output. The member name will be present, but the 1675 // value will be replaced with "sensitive". 1676 func (s StreamRecord) GoString() string { 1677 return s.String() 1678 } 1679 1680 // SetApproximateCreationDateTime sets the ApproximateCreationDateTime field's value. 1681 func (s *StreamRecord) SetApproximateCreationDateTime(v time.Time) *StreamRecord { 1682 s.ApproximateCreationDateTime = &v 1683 return s 1684 } 1685 1686 // SetKeys sets the Keys field's value. 1687 func (s *StreamRecord) SetKeys(v map[string]*dynamodb.AttributeValue) *StreamRecord { 1688 s.Keys = v 1689 return s 1690 } 1691 1692 // SetNewImage sets the NewImage field's value. 1693 func (s *StreamRecord) SetNewImage(v map[string]*dynamodb.AttributeValue) *StreamRecord { 1694 s.NewImage = v 1695 return s 1696 } 1697 1698 // SetOldImage sets the OldImage field's value. 1699 func (s *StreamRecord) SetOldImage(v map[string]*dynamodb.AttributeValue) *StreamRecord { 1700 s.OldImage = v 1701 return s 1702 } 1703 1704 // SetSequenceNumber sets the SequenceNumber field's value. 1705 func (s *StreamRecord) SetSequenceNumber(v string) *StreamRecord { 1706 s.SequenceNumber = &v 1707 return s 1708 } 1709 1710 // SetSizeBytes sets the SizeBytes field's value. 1711 func (s *StreamRecord) SetSizeBytes(v int64) *StreamRecord { 1712 s.SizeBytes = &v 1713 return s 1714 } 1715 1716 // SetStreamViewType sets the StreamViewType field's value. 1717 func (s *StreamRecord) SetStreamViewType(v string) *StreamRecord { 1718 s.StreamViewType = &v 1719 return s 1720 } 1721 1722 // The operation attempted to read past the oldest stream record in a shard. 1723 // 1724 // In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records 1725 // whose age exceeds this limit are subject to removal (trimming) from the stream. 1726 // You might receive a TrimmedDataAccessException if: 1727 // 1728 // * You request a shard iterator with a sequence number older than the trim 1729 // point (24 hours). 1730 // 1731 // * You obtain a shard iterator, but before you use the iterator in a GetRecords 1732 // request, a stream record in the shard exceeds the 24 hour period and is 1733 // trimmed. This causes the iterator to access a record that no longer exists. 1734 type TrimmedDataAccessException struct { 1735 _ struct{} `type:"structure"` 1736 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1737 1738 // "The data you are trying to access has been trimmed. 1739 Message_ *string `locationName:"message" type:"string"` 1740 } 1741 1742 // String returns the string representation. 1743 // 1744 // API parameter values that are decorated as "sensitive" in the API will not 1745 // be included in the string output. The member name will be present, but the 1746 // value will be replaced with "sensitive". 1747 func (s TrimmedDataAccessException) String() string { 1748 return awsutil.Prettify(s) 1749 } 1750 1751 // GoString returns the string representation. 1752 // 1753 // API parameter values that are decorated as "sensitive" in the API will not 1754 // be included in the string output. The member name will be present, but the 1755 // value will be replaced with "sensitive". 1756 func (s TrimmedDataAccessException) GoString() string { 1757 return s.String() 1758 } 1759 1760 func newErrorTrimmedDataAccessException(v protocol.ResponseMetadata) error { 1761 return &TrimmedDataAccessException{ 1762 RespMetadata: v, 1763 } 1764 } 1765 1766 // Code returns the exception type name. 1767 func (s *TrimmedDataAccessException) Code() string { 1768 return "TrimmedDataAccessException" 1769 } 1770 1771 // Message returns the exception's message. 1772 func (s *TrimmedDataAccessException) Message() string { 1773 if s.Message_ != nil { 1774 return *s.Message_ 1775 } 1776 return "" 1777 } 1778 1779 // OrigErr always returns nil, satisfies awserr.Error interface. 1780 func (s *TrimmedDataAccessException) OrigErr() error { 1781 return nil 1782 } 1783 1784 func (s *TrimmedDataAccessException) Error() string { 1785 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1786 } 1787 1788 // Status code returns the HTTP status code for the request's response error. 1789 func (s *TrimmedDataAccessException) StatusCode() int { 1790 return s.RespMetadata.StatusCode 1791 } 1792 1793 // RequestID returns the service's response RequestID for request. 1794 func (s *TrimmedDataAccessException) RequestID() string { 1795 return s.RespMetadata.RequestID 1796 } 1797 1798 const ( 1799 // KeyTypeHash is a KeyType enum value 1800 KeyTypeHash = "HASH" 1801 1802 // KeyTypeRange is a KeyType enum value 1803 KeyTypeRange = "RANGE" 1804 ) 1805 1806 // KeyType_Values returns all elements of the KeyType enum 1807 func KeyType_Values() []string { 1808 return []string{ 1809 KeyTypeHash, 1810 KeyTypeRange, 1811 } 1812 } 1813 1814 const ( 1815 // OperationTypeInsert is a OperationType enum value 1816 OperationTypeInsert = "INSERT" 1817 1818 // OperationTypeModify is a OperationType enum value 1819 OperationTypeModify = "MODIFY" 1820 1821 // OperationTypeRemove is a OperationType enum value 1822 OperationTypeRemove = "REMOVE" 1823 ) 1824 1825 // OperationType_Values returns all elements of the OperationType enum 1826 func OperationType_Values() []string { 1827 return []string{ 1828 OperationTypeInsert, 1829 OperationTypeModify, 1830 OperationTypeRemove, 1831 } 1832 } 1833 1834 const ( 1835 // ShardIteratorTypeTrimHorizon is a ShardIteratorType enum value 1836 ShardIteratorTypeTrimHorizon = "TRIM_HORIZON" 1837 1838 // ShardIteratorTypeLatest is a ShardIteratorType enum value 1839 ShardIteratorTypeLatest = "LATEST" 1840 1841 // ShardIteratorTypeAtSequenceNumber is a ShardIteratorType enum value 1842 ShardIteratorTypeAtSequenceNumber = "AT_SEQUENCE_NUMBER" 1843 1844 // ShardIteratorTypeAfterSequenceNumber is a ShardIteratorType enum value 1845 ShardIteratorTypeAfterSequenceNumber = "AFTER_SEQUENCE_NUMBER" 1846 ) 1847 1848 // ShardIteratorType_Values returns all elements of the ShardIteratorType enum 1849 func ShardIteratorType_Values() []string { 1850 return []string{ 1851 ShardIteratorTypeTrimHorizon, 1852 ShardIteratorTypeLatest, 1853 ShardIteratorTypeAtSequenceNumber, 1854 ShardIteratorTypeAfterSequenceNumber, 1855 } 1856 } 1857 1858 const ( 1859 // StreamStatusEnabling is a StreamStatus enum value 1860 StreamStatusEnabling = "ENABLING" 1861 1862 // StreamStatusEnabled is a StreamStatus enum value 1863 StreamStatusEnabled = "ENABLED" 1864 1865 // StreamStatusDisabling is a StreamStatus enum value 1866 StreamStatusDisabling = "DISABLING" 1867 1868 // StreamStatusDisabled is a StreamStatus enum value 1869 StreamStatusDisabled = "DISABLED" 1870 ) 1871 1872 // StreamStatus_Values returns all elements of the StreamStatus enum 1873 func StreamStatus_Values() []string { 1874 return []string{ 1875 StreamStatusEnabling, 1876 StreamStatusEnabled, 1877 StreamStatusDisabling, 1878 StreamStatusDisabled, 1879 } 1880 } 1881 1882 const ( 1883 // StreamViewTypeNewImage is a StreamViewType enum value 1884 StreamViewTypeNewImage = "NEW_IMAGE" 1885 1886 // StreamViewTypeOldImage is a StreamViewType enum value 1887 StreamViewTypeOldImage = "OLD_IMAGE" 1888 1889 // StreamViewTypeNewAndOldImages is a StreamViewType enum value 1890 StreamViewTypeNewAndOldImages = "NEW_AND_OLD_IMAGES" 1891 1892 // StreamViewTypeKeysOnly is a StreamViewType enum value 1893 StreamViewTypeKeysOnly = "KEYS_ONLY" 1894 ) 1895 1896 // StreamViewType_Values returns all elements of the StreamViewType enum 1897 func StreamViewType_Values() []string { 1898 return []string{ 1899 StreamViewTypeNewImage, 1900 StreamViewTypeOldImage, 1901 StreamViewTypeNewAndOldImages, 1902 StreamViewTypeKeysOnly, 1903 } 1904 }