github.com/aavshr/aws-sdk-go@v1.41.3/service/timestreamwrite/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package timestreamwrite 4 5 import ( 6 "fmt" 7 "net/url" 8 "strings" 9 "time" 10 11 "github.com/aavshr/aws-sdk-go/aws" 12 "github.com/aavshr/aws-sdk-go/aws/awsutil" 13 "github.com/aavshr/aws-sdk-go/aws/crr" 14 "github.com/aavshr/aws-sdk-go/aws/request" 15 "github.com/aavshr/aws-sdk-go/private/protocol" 16 "github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc" 17 ) 18 19 const opCreateDatabase = "CreateDatabase" 20 21 // CreateDatabaseRequest generates a "aws/request.Request" representing the 22 // client's request for the CreateDatabase operation. The "output" return 23 // value will be populated with the request's response once the request completes 24 // successfully. 25 // 26 // Use "Send" method on the returned Request to send the API call to the service. 27 // the "output" return value is not valid until after Send returns without error. 28 // 29 // See CreateDatabase for more information on using the CreateDatabase 30 // API call, and error handling. 31 // 32 // This method is useful when you want to inject custom logic or configuration 33 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 34 // 35 // 36 // // Example sending a request using the CreateDatabaseRequest method. 37 // req, resp := client.CreateDatabaseRequest(params) 38 // 39 // err := req.Send() 40 // if err == nil { // resp is now filled 41 // fmt.Println(resp) 42 // } 43 // 44 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/CreateDatabase 45 func (c *TimestreamWrite) CreateDatabaseRequest(input *CreateDatabaseInput) (req *request.Request, output *CreateDatabaseOutput) { 46 op := &request.Operation{ 47 Name: opCreateDatabase, 48 HTTPMethod: "POST", 49 HTTPPath: "/", 50 } 51 52 if input == nil { 53 input = &CreateDatabaseInput{} 54 } 55 56 output = &CreateDatabaseOutput{} 57 req = c.newRequest(op, input, output) 58 // if custom endpoint for the request is set to a non empty string, 59 // we skip the endpoint discovery workflow. 60 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 61 de := discovererDescribeEndpoints{ 62 Required: true, 63 EndpointCache: c.endpointCache, 64 Params: map[string]*string{ 65 "op": aws.String(req.Operation.Name), 66 }, 67 Client: c, 68 } 69 70 for k, v := range de.Params { 71 if v == nil { 72 delete(de.Params, k) 73 } 74 } 75 76 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 77 Name: "crr.endpointdiscovery", 78 Fn: de.Handler, 79 }) 80 } 81 return 82 } 83 84 // CreateDatabase API operation for Amazon Timestream Write. 85 // 86 // Creates a new Timestream database. If the KMS key is not specified, the database 87 // will be encrypted with a Timestream managed KMS key located in your account. 88 // Refer to AWS managed KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) 89 // for more info. Service quotas apply. For more information, see Access Management 90 // (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 91 // in the Timestream Developer Guide. 92 // 93 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 94 // with awserr.Error's Code and Message methods to get detailed information about 95 // the error. 96 // 97 // See the AWS API reference guide for Amazon Timestream Write's 98 // API operation CreateDatabase for usage and error information. 99 // 100 // Returned Error Types: 101 // * ConflictException 102 // Timestream was unable to process this request because it contains resource 103 // that already exists. 104 // 105 // * ValidationException 106 // Invalid or malformed request. 107 // 108 // * AccessDeniedException 109 // You are not authorized to perform this action. 110 // 111 // * ServiceQuotaExceededException 112 // Instance quota of resource exceeded for this account. 113 // 114 // * ThrottlingException 115 // Too many requests were made by a user exceeding service quotas. The request 116 // was throttled. 117 // 118 // * InvalidEndpointException 119 // The requested endpoint was invalid. 120 // 121 // * InternalServerException 122 // Timestream was unable to fully process this request because of an internal 123 // server error. 124 // 125 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/CreateDatabase 126 func (c *TimestreamWrite) CreateDatabase(input *CreateDatabaseInput) (*CreateDatabaseOutput, error) { 127 req, out := c.CreateDatabaseRequest(input) 128 return out, req.Send() 129 } 130 131 // CreateDatabaseWithContext is the same as CreateDatabase with the addition of 132 // the ability to pass a context and additional request options. 133 // 134 // See CreateDatabase for details on how to use this API operation. 135 // 136 // The context must be non-nil and will be used for request cancellation. If 137 // the context is nil a panic will occur. In the future the SDK may create 138 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 139 // for more information on using Contexts. 140 func (c *TimestreamWrite) CreateDatabaseWithContext(ctx aws.Context, input *CreateDatabaseInput, opts ...request.Option) (*CreateDatabaseOutput, error) { 141 req, out := c.CreateDatabaseRequest(input) 142 req.SetContext(ctx) 143 req.ApplyOptions(opts...) 144 return out, req.Send() 145 } 146 147 const opCreateTable = "CreateTable" 148 149 // CreateTableRequest generates a "aws/request.Request" representing the 150 // client's request for the CreateTable operation. The "output" return 151 // value will be populated with the request's response once the request completes 152 // successfully. 153 // 154 // Use "Send" method on the returned Request to send the API call to the service. 155 // the "output" return value is not valid until after Send returns without error. 156 // 157 // See CreateTable for more information on using the CreateTable 158 // API call, and error handling. 159 // 160 // This method is useful when you want to inject custom logic or configuration 161 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 162 // 163 // 164 // // Example sending a request using the CreateTableRequest method. 165 // req, resp := client.CreateTableRequest(params) 166 // 167 // err := req.Send() 168 // if err == nil { // resp is now filled 169 // fmt.Println(resp) 170 // } 171 // 172 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/CreateTable 173 func (c *TimestreamWrite) CreateTableRequest(input *CreateTableInput) (req *request.Request, output *CreateTableOutput) { 174 op := &request.Operation{ 175 Name: opCreateTable, 176 HTTPMethod: "POST", 177 HTTPPath: "/", 178 } 179 180 if input == nil { 181 input = &CreateTableInput{} 182 } 183 184 output = &CreateTableOutput{} 185 req = c.newRequest(op, input, output) 186 // if custom endpoint for the request is set to a non empty string, 187 // we skip the endpoint discovery workflow. 188 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 189 de := discovererDescribeEndpoints{ 190 Required: true, 191 EndpointCache: c.endpointCache, 192 Params: map[string]*string{ 193 "op": aws.String(req.Operation.Name), 194 }, 195 Client: c, 196 } 197 198 for k, v := range de.Params { 199 if v == nil { 200 delete(de.Params, k) 201 } 202 } 203 204 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 205 Name: "crr.endpointdiscovery", 206 Fn: de.Handler, 207 }) 208 } 209 return 210 } 211 212 // CreateTable API operation for Amazon Timestream Write. 213 // 214 // The CreateTable operation adds a new table to an existing database in your 215 // account. In an AWS account, table names must be at least unique within each 216 // Region if they are in the same database. You may have identical table names 217 // in the same Region if the tables are in seperate databases. While creating 218 // the table, you must specify the table name, database name, and the retention 219 // properties. Service quotas apply. For more information, see Access Management 220 // (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 221 // in the Timestream Developer Guide. 222 // 223 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 224 // with awserr.Error's Code and Message methods to get detailed information about 225 // the error. 226 // 227 // See the AWS API reference guide for Amazon Timestream Write's 228 // API operation CreateTable for usage and error information. 229 // 230 // Returned Error Types: 231 // * ConflictException 232 // Timestream was unable to process this request because it contains resource 233 // that already exists. 234 // 235 // * ValidationException 236 // Invalid or malformed request. 237 // 238 // * AccessDeniedException 239 // You are not authorized to perform this action. 240 // 241 // * ResourceNotFoundException 242 // The operation tried to access a nonexistent resource. The resource might 243 // not be specified correctly, or its status might not be ACTIVE. 244 // 245 // * ServiceQuotaExceededException 246 // Instance quota of resource exceeded for this account. 247 // 248 // * ThrottlingException 249 // Too many requests were made by a user exceeding service quotas. The request 250 // was throttled. 251 // 252 // * InternalServerException 253 // Timestream was unable to fully process this request because of an internal 254 // server error. 255 // 256 // * InvalidEndpointException 257 // The requested endpoint was invalid. 258 // 259 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/CreateTable 260 func (c *TimestreamWrite) CreateTable(input *CreateTableInput) (*CreateTableOutput, error) { 261 req, out := c.CreateTableRequest(input) 262 return out, req.Send() 263 } 264 265 // CreateTableWithContext is the same as CreateTable with the addition of 266 // the ability to pass a context and additional request options. 267 // 268 // See CreateTable for details on how to use this API operation. 269 // 270 // The context must be non-nil and will be used for request cancellation. If 271 // the context is nil a panic will occur. In the future the SDK may create 272 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 273 // for more information on using Contexts. 274 func (c *TimestreamWrite) CreateTableWithContext(ctx aws.Context, input *CreateTableInput, opts ...request.Option) (*CreateTableOutput, error) { 275 req, out := c.CreateTableRequest(input) 276 req.SetContext(ctx) 277 req.ApplyOptions(opts...) 278 return out, req.Send() 279 } 280 281 const opDeleteDatabase = "DeleteDatabase" 282 283 // DeleteDatabaseRequest generates a "aws/request.Request" representing the 284 // client's request for the DeleteDatabase operation. The "output" return 285 // value will be populated with the request's response once the request completes 286 // successfully. 287 // 288 // Use "Send" method on the returned Request to send the API call to the service. 289 // the "output" return value is not valid until after Send returns without error. 290 // 291 // See DeleteDatabase for more information on using the DeleteDatabase 292 // API call, and error handling. 293 // 294 // This method is useful when you want to inject custom logic or configuration 295 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 296 // 297 // 298 // // Example sending a request using the DeleteDatabaseRequest method. 299 // req, resp := client.DeleteDatabaseRequest(params) 300 // 301 // err := req.Send() 302 // if err == nil { // resp is now filled 303 // fmt.Println(resp) 304 // } 305 // 306 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DeleteDatabase 307 func (c *TimestreamWrite) DeleteDatabaseRequest(input *DeleteDatabaseInput) (req *request.Request, output *DeleteDatabaseOutput) { 308 op := &request.Operation{ 309 Name: opDeleteDatabase, 310 HTTPMethod: "POST", 311 HTTPPath: "/", 312 } 313 314 if input == nil { 315 input = &DeleteDatabaseInput{} 316 } 317 318 output = &DeleteDatabaseOutput{} 319 req = c.newRequest(op, input, output) 320 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 321 // if custom endpoint for the request is set to a non empty string, 322 // we skip the endpoint discovery workflow. 323 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 324 de := discovererDescribeEndpoints{ 325 Required: true, 326 EndpointCache: c.endpointCache, 327 Params: map[string]*string{ 328 "op": aws.String(req.Operation.Name), 329 }, 330 Client: c, 331 } 332 333 for k, v := range de.Params { 334 if v == nil { 335 delete(de.Params, k) 336 } 337 } 338 339 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 340 Name: "crr.endpointdiscovery", 341 Fn: de.Handler, 342 }) 343 } 344 return 345 } 346 347 // DeleteDatabase API operation for Amazon Timestream Write. 348 // 349 // Deletes a given Timestream database. This is an irreversible operation. After 350 // a database is deleted, the time series data from its tables cannot be recovered. 351 // 352 // All tables in the database must be deleted first, or a ValidationException 353 // error will be thrown. 354 // 355 // Due to the nature of distributed retries, the operation can return either 356 // success or a ResourceNotFoundException. Clients should consider them equivalent. 357 // 358 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 359 // with awserr.Error's Code and Message methods to get detailed information about 360 // the error. 361 // 362 // See the AWS API reference guide for Amazon Timestream Write's 363 // API operation DeleteDatabase for usage and error information. 364 // 365 // Returned Error Types: 366 // * InternalServerException 367 // Timestream was unable to fully process this request because of an internal 368 // server error. 369 // 370 // * ThrottlingException 371 // Too many requests were made by a user exceeding service quotas. The request 372 // was throttled. 373 // 374 // * ResourceNotFoundException 375 // The operation tried to access a nonexistent resource. The resource might 376 // not be specified correctly, or its status might not be ACTIVE. 377 // 378 // * ValidationException 379 // Invalid or malformed request. 380 // 381 // * AccessDeniedException 382 // You are not authorized to perform this action. 383 // 384 // * InvalidEndpointException 385 // The requested endpoint was invalid. 386 // 387 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DeleteDatabase 388 func (c *TimestreamWrite) DeleteDatabase(input *DeleteDatabaseInput) (*DeleteDatabaseOutput, error) { 389 req, out := c.DeleteDatabaseRequest(input) 390 return out, req.Send() 391 } 392 393 // DeleteDatabaseWithContext is the same as DeleteDatabase with the addition of 394 // the ability to pass a context and additional request options. 395 // 396 // See DeleteDatabase for details on how to use this API operation. 397 // 398 // The context must be non-nil and will be used for request cancellation. If 399 // the context is nil a panic will occur. In the future the SDK may create 400 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 401 // for more information on using Contexts. 402 func (c *TimestreamWrite) DeleteDatabaseWithContext(ctx aws.Context, input *DeleteDatabaseInput, opts ...request.Option) (*DeleteDatabaseOutput, error) { 403 req, out := c.DeleteDatabaseRequest(input) 404 req.SetContext(ctx) 405 req.ApplyOptions(opts...) 406 return out, req.Send() 407 } 408 409 const opDeleteTable = "DeleteTable" 410 411 // DeleteTableRequest generates a "aws/request.Request" representing the 412 // client's request for the DeleteTable operation. The "output" return 413 // value will be populated with the request's response once the request completes 414 // successfully. 415 // 416 // Use "Send" method on the returned Request to send the API call to the service. 417 // the "output" return value is not valid until after Send returns without error. 418 // 419 // See DeleteTable for more information on using the DeleteTable 420 // API call, and error handling. 421 // 422 // This method is useful when you want to inject custom logic or configuration 423 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 424 // 425 // 426 // // Example sending a request using the DeleteTableRequest method. 427 // req, resp := client.DeleteTableRequest(params) 428 // 429 // err := req.Send() 430 // if err == nil { // resp is now filled 431 // fmt.Println(resp) 432 // } 433 // 434 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DeleteTable 435 func (c *TimestreamWrite) DeleteTableRequest(input *DeleteTableInput) (req *request.Request, output *DeleteTableOutput) { 436 op := &request.Operation{ 437 Name: opDeleteTable, 438 HTTPMethod: "POST", 439 HTTPPath: "/", 440 } 441 442 if input == nil { 443 input = &DeleteTableInput{} 444 } 445 446 output = &DeleteTableOutput{} 447 req = c.newRequest(op, input, output) 448 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 449 // if custom endpoint for the request is set to a non empty string, 450 // we skip the endpoint discovery workflow. 451 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 452 de := discovererDescribeEndpoints{ 453 Required: true, 454 EndpointCache: c.endpointCache, 455 Params: map[string]*string{ 456 "op": aws.String(req.Operation.Name), 457 }, 458 Client: c, 459 } 460 461 for k, v := range de.Params { 462 if v == nil { 463 delete(de.Params, k) 464 } 465 } 466 467 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 468 Name: "crr.endpointdiscovery", 469 Fn: de.Handler, 470 }) 471 } 472 return 473 } 474 475 // DeleteTable API operation for Amazon Timestream Write. 476 // 477 // Deletes a given Timestream table. This is an irreversible operation. After 478 // a Timestream database table is deleted, the time series data stored in the 479 // table cannot be recovered. 480 // 481 // Due to the nature of distributed retries, the operation can return either 482 // success or a ResourceNotFoundException. Clients should consider them equivalent. 483 // 484 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 485 // with awserr.Error's Code and Message methods to get detailed information about 486 // the error. 487 // 488 // See the AWS API reference guide for Amazon Timestream Write's 489 // API operation DeleteTable for usage and error information. 490 // 491 // Returned Error Types: 492 // * InternalServerException 493 // Timestream was unable to fully process this request because of an internal 494 // server error. 495 // 496 // * ThrottlingException 497 // Too many requests were made by a user exceeding service quotas. The request 498 // was throttled. 499 // 500 // * ValidationException 501 // Invalid or malformed request. 502 // 503 // * ResourceNotFoundException 504 // The operation tried to access a nonexistent resource. The resource might 505 // not be specified correctly, or its status might not be ACTIVE. 506 // 507 // * AccessDeniedException 508 // You are not authorized to perform this action. 509 // 510 // * InvalidEndpointException 511 // The requested endpoint was invalid. 512 // 513 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DeleteTable 514 func (c *TimestreamWrite) DeleteTable(input *DeleteTableInput) (*DeleteTableOutput, error) { 515 req, out := c.DeleteTableRequest(input) 516 return out, req.Send() 517 } 518 519 // DeleteTableWithContext is the same as DeleteTable with the addition of 520 // the ability to pass a context and additional request options. 521 // 522 // See DeleteTable for details on how to use this API operation. 523 // 524 // The context must be non-nil and will be used for request cancellation. If 525 // the context is nil a panic will occur. In the future the SDK may create 526 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 527 // for more information on using Contexts. 528 func (c *TimestreamWrite) DeleteTableWithContext(ctx aws.Context, input *DeleteTableInput, opts ...request.Option) (*DeleteTableOutput, error) { 529 req, out := c.DeleteTableRequest(input) 530 req.SetContext(ctx) 531 req.ApplyOptions(opts...) 532 return out, req.Send() 533 } 534 535 const opDescribeDatabase = "DescribeDatabase" 536 537 // DescribeDatabaseRequest generates a "aws/request.Request" representing the 538 // client's request for the DescribeDatabase operation. The "output" return 539 // value will be populated with the request's response once the request completes 540 // successfully. 541 // 542 // Use "Send" method on the returned Request to send the API call to the service. 543 // the "output" return value is not valid until after Send returns without error. 544 // 545 // See DescribeDatabase for more information on using the DescribeDatabase 546 // API call, and error handling. 547 // 548 // This method is useful when you want to inject custom logic or configuration 549 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 550 // 551 // 552 // // Example sending a request using the DescribeDatabaseRequest method. 553 // req, resp := client.DescribeDatabaseRequest(params) 554 // 555 // err := req.Send() 556 // if err == nil { // resp is now filled 557 // fmt.Println(resp) 558 // } 559 // 560 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeDatabase 561 func (c *TimestreamWrite) DescribeDatabaseRequest(input *DescribeDatabaseInput) (req *request.Request, output *DescribeDatabaseOutput) { 562 op := &request.Operation{ 563 Name: opDescribeDatabase, 564 HTTPMethod: "POST", 565 HTTPPath: "/", 566 } 567 568 if input == nil { 569 input = &DescribeDatabaseInput{} 570 } 571 572 output = &DescribeDatabaseOutput{} 573 req = c.newRequest(op, input, output) 574 // if custom endpoint for the request is set to a non empty string, 575 // we skip the endpoint discovery workflow. 576 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 577 de := discovererDescribeEndpoints{ 578 Required: true, 579 EndpointCache: c.endpointCache, 580 Params: map[string]*string{ 581 "op": aws.String(req.Operation.Name), 582 }, 583 Client: c, 584 } 585 586 for k, v := range de.Params { 587 if v == nil { 588 delete(de.Params, k) 589 } 590 } 591 592 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 593 Name: "crr.endpointdiscovery", 594 Fn: de.Handler, 595 }) 596 } 597 return 598 } 599 600 // DescribeDatabase API operation for Amazon Timestream Write. 601 // 602 // Returns information about the database, including the database name, time 603 // that the database was created, and the total number of tables found within 604 // the database. Service quotas apply. For more information, see Access Management 605 // (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 606 // in the Timestream Developer Guide. 607 // 608 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 609 // with awserr.Error's Code and Message methods to get detailed information about 610 // the error. 611 // 612 // See the AWS API reference guide for Amazon Timestream Write's 613 // API operation DescribeDatabase for usage and error information. 614 // 615 // Returned Error Types: 616 // * ResourceNotFoundException 617 // The operation tried to access a nonexistent resource. The resource might 618 // not be specified correctly, or its status might not be ACTIVE. 619 // 620 // * ValidationException 621 // Invalid or malformed request. 622 // 623 // * AccessDeniedException 624 // You are not authorized to perform this action. 625 // 626 // * ThrottlingException 627 // Too many requests were made by a user exceeding service quotas. The request 628 // was throttled. 629 // 630 // * InternalServerException 631 // Timestream was unable to fully process this request because of an internal 632 // server error. 633 // 634 // * InvalidEndpointException 635 // The requested endpoint was invalid. 636 // 637 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeDatabase 638 func (c *TimestreamWrite) DescribeDatabase(input *DescribeDatabaseInput) (*DescribeDatabaseOutput, error) { 639 req, out := c.DescribeDatabaseRequest(input) 640 return out, req.Send() 641 } 642 643 // DescribeDatabaseWithContext is the same as DescribeDatabase with the addition of 644 // the ability to pass a context and additional request options. 645 // 646 // See DescribeDatabase for details on how to use this API operation. 647 // 648 // The context must be non-nil and will be used for request cancellation. If 649 // the context is nil a panic will occur. In the future the SDK may create 650 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 651 // for more information on using Contexts. 652 func (c *TimestreamWrite) DescribeDatabaseWithContext(ctx aws.Context, input *DescribeDatabaseInput, opts ...request.Option) (*DescribeDatabaseOutput, error) { 653 req, out := c.DescribeDatabaseRequest(input) 654 req.SetContext(ctx) 655 req.ApplyOptions(opts...) 656 return out, req.Send() 657 } 658 659 const opDescribeEndpoints = "DescribeEndpoints" 660 661 // DescribeEndpointsRequest generates a "aws/request.Request" representing the 662 // client's request for the DescribeEndpoints operation. The "output" return 663 // value will be populated with the request's response once the request completes 664 // successfully. 665 // 666 // Use "Send" method on the returned Request to send the API call to the service. 667 // the "output" return value is not valid until after Send returns without error. 668 // 669 // See DescribeEndpoints for more information on using the DescribeEndpoints 670 // API call, and error handling. 671 // 672 // This method is useful when you want to inject custom logic or configuration 673 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 674 // 675 // 676 // // Example sending a request using the DescribeEndpointsRequest method. 677 // req, resp := client.DescribeEndpointsRequest(params) 678 // 679 // err := req.Send() 680 // if err == nil { // resp is now filled 681 // fmt.Println(resp) 682 // } 683 // 684 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeEndpoints 685 func (c *TimestreamWrite) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) { 686 op := &request.Operation{ 687 Name: opDescribeEndpoints, 688 HTTPMethod: "POST", 689 HTTPPath: "/", 690 } 691 692 if input == nil { 693 input = &DescribeEndpointsInput{} 694 } 695 696 output = &DescribeEndpointsOutput{} 697 req = c.newRequest(op, input, output) 698 return 699 } 700 701 // DescribeEndpoints API operation for Amazon Timestream Write. 702 // 703 // DescribeEndpoints returns a list of available endpoints to make Timestream 704 // API calls against. This API is available through both Write and Query. 705 // 706 // Because Timestream’s SDKs are designed to transparently work with the service’s 707 // architecture, including the management and mapping of the service endpoints, 708 // it is not recommended that you use this API unless: 709 // 710 // * Your application uses a programming language that does not yet have 711 // SDK support 712 // 713 // * You require better control over the client-side implementation 714 // 715 // For detailed information on how to use DescribeEndpoints, see The Endpoint 716 // Discovery Pattern and REST APIs (https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.html). 717 // 718 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 719 // with awserr.Error's Code and Message methods to get detailed information about 720 // the error. 721 // 722 // See the AWS API reference guide for Amazon Timestream Write's 723 // API operation DescribeEndpoints for usage and error information. 724 // 725 // Returned Error Types: 726 // * InternalServerException 727 // Timestream was unable to fully process this request because of an internal 728 // server error. 729 // 730 // * ValidationException 731 // Invalid or malformed request. 732 // 733 // * ThrottlingException 734 // Too many requests were made by a user exceeding service quotas. The request 735 // was throttled. 736 // 737 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeEndpoints 738 func (c *TimestreamWrite) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) { 739 req, out := c.DescribeEndpointsRequest(input) 740 return out, req.Send() 741 } 742 743 // DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of 744 // the ability to pass a context and additional request options. 745 // 746 // See DescribeEndpoints for details on how to use this API operation. 747 // 748 // The context must be non-nil and will be used for request cancellation. If 749 // the context is nil a panic will occur. In the future the SDK may create 750 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 751 // for more information on using Contexts. 752 func (c *TimestreamWrite) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) { 753 req, out := c.DescribeEndpointsRequest(input) 754 req.SetContext(ctx) 755 req.ApplyOptions(opts...) 756 return out, req.Send() 757 } 758 759 type discovererDescribeEndpoints struct { 760 Client *TimestreamWrite 761 Required bool 762 EndpointCache *crr.EndpointCache 763 Params map[string]*string 764 Key string 765 req *request.Request 766 } 767 768 func (d *discovererDescribeEndpoints) Discover() (crr.Endpoint, error) { 769 input := &DescribeEndpointsInput{} 770 771 resp, err := d.Client.DescribeEndpoints(input) 772 if err != nil { 773 return crr.Endpoint{}, err 774 } 775 776 endpoint := crr.Endpoint{ 777 Key: d.Key, 778 } 779 780 for _, e := range resp.Endpoints { 781 if e.Address == nil { 782 continue 783 } 784 785 address := *e.Address 786 787 var scheme string 788 if idx := strings.Index(address, "://"); idx != -1 { 789 scheme = address[:idx] 790 } 791 792 if len(scheme) == 0 { 793 address = fmt.Sprintf("%s://%s", d.req.HTTPRequest.URL.Scheme, address) 794 } 795 796 cachedInMinutes := aws.Int64Value(e.CachePeriodInMinutes) 797 u, err := url.Parse(address) 798 if err != nil { 799 continue 800 } 801 802 addr := crr.WeightedAddress{ 803 URL: u, 804 Expired: time.Now().Add(time.Duration(cachedInMinutes) * time.Minute), 805 } 806 807 endpoint.Add(addr) 808 } 809 810 d.EndpointCache.Add(endpoint) 811 812 return endpoint, nil 813 } 814 815 func (d *discovererDescribeEndpoints) Handler(r *request.Request) { 816 endpointKey := crr.BuildEndpointKey(d.Params) 817 d.Key = endpointKey 818 d.req = r 819 820 endpoint, err := d.EndpointCache.Get(d, endpointKey, d.Required) 821 if err != nil { 822 r.Error = err 823 return 824 } 825 826 if endpoint.URL != nil && len(endpoint.URL.String()) > 0 { 827 r.HTTPRequest.URL = endpoint.URL 828 } 829 } 830 831 const opDescribeTable = "DescribeTable" 832 833 // DescribeTableRequest generates a "aws/request.Request" representing the 834 // client's request for the DescribeTable operation. The "output" return 835 // value will be populated with the request's response once the request completes 836 // successfully. 837 // 838 // Use "Send" method on the returned Request to send the API call to the service. 839 // the "output" return value is not valid until after Send returns without error. 840 // 841 // See DescribeTable for more information on using the DescribeTable 842 // API call, and error handling. 843 // 844 // This method is useful when you want to inject custom logic or configuration 845 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 846 // 847 // 848 // // Example sending a request using the DescribeTableRequest method. 849 // req, resp := client.DescribeTableRequest(params) 850 // 851 // err := req.Send() 852 // if err == nil { // resp is now filled 853 // fmt.Println(resp) 854 // } 855 // 856 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeTable 857 func (c *TimestreamWrite) DescribeTableRequest(input *DescribeTableInput) (req *request.Request, output *DescribeTableOutput) { 858 op := &request.Operation{ 859 Name: opDescribeTable, 860 HTTPMethod: "POST", 861 HTTPPath: "/", 862 } 863 864 if input == nil { 865 input = &DescribeTableInput{} 866 } 867 868 output = &DescribeTableOutput{} 869 req = c.newRequest(op, input, output) 870 // if custom endpoint for the request is set to a non empty string, 871 // we skip the endpoint discovery workflow. 872 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 873 de := discovererDescribeEndpoints{ 874 Required: true, 875 EndpointCache: c.endpointCache, 876 Params: map[string]*string{ 877 "op": aws.String(req.Operation.Name), 878 }, 879 Client: c, 880 } 881 882 for k, v := range de.Params { 883 if v == nil { 884 delete(de.Params, k) 885 } 886 } 887 888 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 889 Name: "crr.endpointdiscovery", 890 Fn: de.Handler, 891 }) 892 } 893 return 894 } 895 896 // DescribeTable API operation for Amazon Timestream Write. 897 // 898 // Returns information about the table, including the table name, database name, 899 // retention duration of the memory store and the magnetic store. Service quotas 900 // apply. For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 901 // in the Timestream Developer Guide. 902 // 903 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 904 // with awserr.Error's Code and Message methods to get detailed information about 905 // the error. 906 // 907 // See the AWS API reference guide for Amazon Timestream Write's 908 // API operation DescribeTable for usage and error information. 909 // 910 // Returned Error Types: 911 // * ResourceNotFoundException 912 // The operation tried to access a nonexistent resource. The resource might 913 // not be specified correctly, or its status might not be ACTIVE. 914 // 915 // * ValidationException 916 // Invalid or malformed request. 917 // 918 // * AccessDeniedException 919 // You are not authorized to perform this action. 920 // 921 // * ThrottlingException 922 // Too many requests were made by a user exceeding service quotas. The request 923 // was throttled. 924 // 925 // * InternalServerException 926 // Timestream was unable to fully process this request because of an internal 927 // server error. 928 // 929 // * InvalidEndpointException 930 // The requested endpoint was invalid. 931 // 932 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/DescribeTable 933 func (c *TimestreamWrite) DescribeTable(input *DescribeTableInput) (*DescribeTableOutput, error) { 934 req, out := c.DescribeTableRequest(input) 935 return out, req.Send() 936 } 937 938 // DescribeTableWithContext is the same as DescribeTable with the addition of 939 // the ability to pass a context and additional request options. 940 // 941 // See DescribeTable for details on how to use this API operation. 942 // 943 // The context must be non-nil and will be used for request cancellation. If 944 // the context is nil a panic will occur. In the future the SDK may create 945 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 946 // for more information on using Contexts. 947 func (c *TimestreamWrite) DescribeTableWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.Option) (*DescribeTableOutput, error) { 948 req, out := c.DescribeTableRequest(input) 949 req.SetContext(ctx) 950 req.ApplyOptions(opts...) 951 return out, req.Send() 952 } 953 954 const opListDatabases = "ListDatabases" 955 956 // ListDatabasesRequest generates a "aws/request.Request" representing the 957 // client's request for the ListDatabases operation. The "output" return 958 // value will be populated with the request's response once the request completes 959 // successfully. 960 // 961 // Use "Send" method on the returned Request to send the API call to the service. 962 // the "output" return value is not valid until after Send returns without error. 963 // 964 // See ListDatabases for more information on using the ListDatabases 965 // API call, and error handling. 966 // 967 // This method is useful when you want to inject custom logic or configuration 968 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 969 // 970 // 971 // // Example sending a request using the ListDatabasesRequest method. 972 // req, resp := client.ListDatabasesRequest(params) 973 // 974 // err := req.Send() 975 // if err == nil { // resp is now filled 976 // fmt.Println(resp) 977 // } 978 // 979 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListDatabases 980 func (c *TimestreamWrite) ListDatabasesRequest(input *ListDatabasesInput) (req *request.Request, output *ListDatabasesOutput) { 981 op := &request.Operation{ 982 Name: opListDatabases, 983 HTTPMethod: "POST", 984 HTTPPath: "/", 985 Paginator: &request.Paginator{ 986 InputTokens: []string{"NextToken"}, 987 OutputTokens: []string{"NextToken"}, 988 LimitToken: "MaxResults", 989 TruncationToken: "", 990 }, 991 } 992 993 if input == nil { 994 input = &ListDatabasesInput{} 995 } 996 997 output = &ListDatabasesOutput{} 998 req = c.newRequest(op, input, output) 999 // if custom endpoint for the request is set to a non empty string, 1000 // we skip the endpoint discovery workflow. 1001 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 1002 de := discovererDescribeEndpoints{ 1003 Required: true, 1004 EndpointCache: c.endpointCache, 1005 Params: map[string]*string{ 1006 "op": aws.String(req.Operation.Name), 1007 }, 1008 Client: c, 1009 } 1010 1011 for k, v := range de.Params { 1012 if v == nil { 1013 delete(de.Params, k) 1014 } 1015 } 1016 1017 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 1018 Name: "crr.endpointdiscovery", 1019 Fn: de.Handler, 1020 }) 1021 } 1022 return 1023 } 1024 1025 // ListDatabases API operation for Amazon Timestream Write. 1026 // 1027 // Returns a list of your Timestream databases. Service quotas apply. For more 1028 // information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 1029 // in the Timestream Developer Guide. 1030 // 1031 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1032 // with awserr.Error's Code and Message methods to get detailed information about 1033 // the error. 1034 // 1035 // See the AWS API reference guide for Amazon Timestream Write's 1036 // API operation ListDatabases for usage and error information. 1037 // 1038 // Returned Error Types: 1039 // * InternalServerException 1040 // Timestream was unable to fully process this request because of an internal 1041 // server error. 1042 // 1043 // * ThrottlingException 1044 // Too many requests were made by a user exceeding service quotas. The request 1045 // was throttled. 1046 // 1047 // * ValidationException 1048 // Invalid or malformed request. 1049 // 1050 // * AccessDeniedException 1051 // You are not authorized to perform this action. 1052 // 1053 // * InvalidEndpointException 1054 // The requested endpoint was invalid. 1055 // 1056 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListDatabases 1057 func (c *TimestreamWrite) ListDatabases(input *ListDatabasesInput) (*ListDatabasesOutput, error) { 1058 req, out := c.ListDatabasesRequest(input) 1059 return out, req.Send() 1060 } 1061 1062 // ListDatabasesWithContext is the same as ListDatabases with the addition of 1063 // the ability to pass a context and additional request options. 1064 // 1065 // See ListDatabases for details on how to use this API operation. 1066 // 1067 // The context must be non-nil and will be used for request cancellation. If 1068 // the context is nil a panic will occur. In the future the SDK may create 1069 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1070 // for more information on using Contexts. 1071 func (c *TimestreamWrite) ListDatabasesWithContext(ctx aws.Context, input *ListDatabasesInput, opts ...request.Option) (*ListDatabasesOutput, error) { 1072 req, out := c.ListDatabasesRequest(input) 1073 req.SetContext(ctx) 1074 req.ApplyOptions(opts...) 1075 return out, req.Send() 1076 } 1077 1078 // ListDatabasesPages iterates over the pages of a ListDatabases operation, 1079 // calling the "fn" function with the response data for each page. To stop 1080 // iterating, return false from the fn function. 1081 // 1082 // See ListDatabases method for more information on how to use this operation. 1083 // 1084 // Note: This operation can generate multiple requests to a service. 1085 // 1086 // // Example iterating over at most 3 pages of a ListDatabases operation. 1087 // pageNum := 0 1088 // err := client.ListDatabasesPages(params, 1089 // func(page *timestreamwrite.ListDatabasesOutput, lastPage bool) bool { 1090 // pageNum++ 1091 // fmt.Println(page) 1092 // return pageNum <= 3 1093 // }) 1094 // 1095 func (c *TimestreamWrite) ListDatabasesPages(input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool) error { 1096 return c.ListDatabasesPagesWithContext(aws.BackgroundContext(), input, fn) 1097 } 1098 1099 // ListDatabasesPagesWithContext same as ListDatabasesPages except 1100 // it takes a Context and allows setting request options on the pages. 1101 // 1102 // The context must be non-nil and will be used for request cancellation. If 1103 // the context is nil a panic will occur. In the future the SDK may create 1104 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1105 // for more information on using Contexts. 1106 func (c *TimestreamWrite) ListDatabasesPagesWithContext(ctx aws.Context, input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool, opts ...request.Option) error { 1107 p := request.Pagination{ 1108 NewRequest: func() (*request.Request, error) { 1109 var inCpy *ListDatabasesInput 1110 if input != nil { 1111 tmp := *input 1112 inCpy = &tmp 1113 } 1114 req, _ := c.ListDatabasesRequest(inCpy) 1115 req.SetContext(ctx) 1116 req.ApplyOptions(opts...) 1117 return req, nil 1118 }, 1119 } 1120 1121 for p.Next() { 1122 if !fn(p.Page().(*ListDatabasesOutput), !p.HasNextPage()) { 1123 break 1124 } 1125 } 1126 1127 return p.Err() 1128 } 1129 1130 const opListTables = "ListTables" 1131 1132 // ListTablesRequest generates a "aws/request.Request" representing the 1133 // client's request for the ListTables operation. The "output" return 1134 // value will be populated with the request's response once the request completes 1135 // successfully. 1136 // 1137 // Use "Send" method on the returned Request to send the API call to the service. 1138 // the "output" return value is not valid until after Send returns without error. 1139 // 1140 // See ListTables for more information on using the ListTables 1141 // API call, and error handling. 1142 // 1143 // This method is useful when you want to inject custom logic or configuration 1144 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1145 // 1146 // 1147 // // Example sending a request using the ListTablesRequest method. 1148 // req, resp := client.ListTablesRequest(params) 1149 // 1150 // err := req.Send() 1151 // if err == nil { // resp is now filled 1152 // fmt.Println(resp) 1153 // } 1154 // 1155 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListTables 1156 func (c *TimestreamWrite) ListTablesRequest(input *ListTablesInput) (req *request.Request, output *ListTablesOutput) { 1157 op := &request.Operation{ 1158 Name: opListTables, 1159 HTTPMethod: "POST", 1160 HTTPPath: "/", 1161 Paginator: &request.Paginator{ 1162 InputTokens: []string{"NextToken"}, 1163 OutputTokens: []string{"NextToken"}, 1164 LimitToken: "MaxResults", 1165 TruncationToken: "", 1166 }, 1167 } 1168 1169 if input == nil { 1170 input = &ListTablesInput{} 1171 } 1172 1173 output = &ListTablesOutput{} 1174 req = c.newRequest(op, input, output) 1175 // if custom endpoint for the request is set to a non empty string, 1176 // we skip the endpoint discovery workflow. 1177 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 1178 de := discovererDescribeEndpoints{ 1179 Required: true, 1180 EndpointCache: c.endpointCache, 1181 Params: map[string]*string{ 1182 "op": aws.String(req.Operation.Name), 1183 }, 1184 Client: c, 1185 } 1186 1187 for k, v := range de.Params { 1188 if v == nil { 1189 delete(de.Params, k) 1190 } 1191 } 1192 1193 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 1194 Name: "crr.endpointdiscovery", 1195 Fn: de.Handler, 1196 }) 1197 } 1198 return 1199 } 1200 1201 // ListTables API operation for Amazon Timestream Write. 1202 // 1203 // A list of tables, along with the name, status and retention properties of 1204 // each table. 1205 // 1206 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1207 // with awserr.Error's Code and Message methods to get detailed information about 1208 // the error. 1209 // 1210 // See the AWS API reference guide for Amazon Timestream Write's 1211 // API operation ListTables for usage and error information. 1212 // 1213 // Returned Error Types: 1214 // * InternalServerException 1215 // Timestream was unable to fully process this request because of an internal 1216 // server error. 1217 // 1218 // * ThrottlingException 1219 // Too many requests were made by a user exceeding service quotas. The request 1220 // was throttled. 1221 // 1222 // * ValidationException 1223 // Invalid or malformed request. 1224 // 1225 // * ResourceNotFoundException 1226 // The operation tried to access a nonexistent resource. The resource might 1227 // not be specified correctly, or its status might not be ACTIVE. 1228 // 1229 // * AccessDeniedException 1230 // You are not authorized to perform this action. 1231 // 1232 // * InvalidEndpointException 1233 // The requested endpoint was invalid. 1234 // 1235 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListTables 1236 func (c *TimestreamWrite) ListTables(input *ListTablesInput) (*ListTablesOutput, error) { 1237 req, out := c.ListTablesRequest(input) 1238 return out, req.Send() 1239 } 1240 1241 // ListTablesWithContext is the same as ListTables with the addition of 1242 // the ability to pass a context and additional request options. 1243 // 1244 // See ListTables for details on how to use this API operation. 1245 // 1246 // The context must be non-nil and will be used for request cancellation. If 1247 // the context is nil a panic will occur. In the future the SDK may create 1248 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1249 // for more information on using Contexts. 1250 func (c *TimestreamWrite) ListTablesWithContext(ctx aws.Context, input *ListTablesInput, opts ...request.Option) (*ListTablesOutput, error) { 1251 req, out := c.ListTablesRequest(input) 1252 req.SetContext(ctx) 1253 req.ApplyOptions(opts...) 1254 return out, req.Send() 1255 } 1256 1257 // ListTablesPages iterates over the pages of a ListTables operation, 1258 // calling the "fn" function with the response data for each page. To stop 1259 // iterating, return false from the fn function. 1260 // 1261 // See ListTables method for more information on how to use this operation. 1262 // 1263 // Note: This operation can generate multiple requests to a service. 1264 // 1265 // // Example iterating over at most 3 pages of a ListTables operation. 1266 // pageNum := 0 1267 // err := client.ListTablesPages(params, 1268 // func(page *timestreamwrite.ListTablesOutput, lastPage bool) bool { 1269 // pageNum++ 1270 // fmt.Println(page) 1271 // return pageNum <= 3 1272 // }) 1273 // 1274 func (c *TimestreamWrite) ListTablesPages(input *ListTablesInput, fn func(*ListTablesOutput, bool) bool) error { 1275 return c.ListTablesPagesWithContext(aws.BackgroundContext(), input, fn) 1276 } 1277 1278 // ListTablesPagesWithContext same as ListTablesPages except 1279 // it takes a Context and allows setting request options on the pages. 1280 // 1281 // The context must be non-nil and will be used for request cancellation. If 1282 // the context is nil a panic will occur. In the future the SDK may create 1283 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1284 // for more information on using Contexts. 1285 func (c *TimestreamWrite) ListTablesPagesWithContext(ctx aws.Context, input *ListTablesInput, fn func(*ListTablesOutput, bool) bool, opts ...request.Option) error { 1286 p := request.Pagination{ 1287 NewRequest: func() (*request.Request, error) { 1288 var inCpy *ListTablesInput 1289 if input != nil { 1290 tmp := *input 1291 inCpy = &tmp 1292 } 1293 req, _ := c.ListTablesRequest(inCpy) 1294 req.SetContext(ctx) 1295 req.ApplyOptions(opts...) 1296 return req, nil 1297 }, 1298 } 1299 1300 for p.Next() { 1301 if !fn(p.Page().(*ListTablesOutput), !p.HasNextPage()) { 1302 break 1303 } 1304 } 1305 1306 return p.Err() 1307 } 1308 1309 const opListTagsForResource = "ListTagsForResource" 1310 1311 // ListTagsForResourceRequest generates a "aws/request.Request" representing the 1312 // client's request for the ListTagsForResource operation. The "output" return 1313 // value will be populated with the request's response once the request completes 1314 // successfully. 1315 // 1316 // Use "Send" method on the returned Request to send the API call to the service. 1317 // the "output" return value is not valid until after Send returns without error. 1318 // 1319 // See ListTagsForResource for more information on using the ListTagsForResource 1320 // API call, and error handling. 1321 // 1322 // This method is useful when you want to inject custom logic or configuration 1323 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1324 // 1325 // 1326 // // Example sending a request using the ListTagsForResourceRequest method. 1327 // req, resp := client.ListTagsForResourceRequest(params) 1328 // 1329 // err := req.Send() 1330 // if err == nil { // resp is now filled 1331 // fmt.Println(resp) 1332 // } 1333 // 1334 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListTagsForResource 1335 func (c *TimestreamWrite) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1336 op := &request.Operation{ 1337 Name: opListTagsForResource, 1338 HTTPMethod: "POST", 1339 HTTPPath: "/", 1340 } 1341 1342 if input == nil { 1343 input = &ListTagsForResourceInput{} 1344 } 1345 1346 output = &ListTagsForResourceOutput{} 1347 req = c.newRequest(op, input, output) 1348 // if custom endpoint for the request is set to a non empty string, 1349 // we skip the endpoint discovery workflow. 1350 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 1351 de := discovererDescribeEndpoints{ 1352 Required: true, 1353 EndpointCache: c.endpointCache, 1354 Params: map[string]*string{ 1355 "op": aws.String(req.Operation.Name), 1356 }, 1357 Client: c, 1358 } 1359 1360 for k, v := range de.Params { 1361 if v == nil { 1362 delete(de.Params, k) 1363 } 1364 } 1365 1366 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 1367 Name: "crr.endpointdiscovery", 1368 Fn: de.Handler, 1369 }) 1370 } 1371 return 1372 } 1373 1374 // ListTagsForResource API operation for Amazon Timestream Write. 1375 // 1376 // List all tags on a Timestream resource. 1377 // 1378 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1379 // with awserr.Error's Code and Message methods to get detailed information about 1380 // the error. 1381 // 1382 // See the AWS API reference guide for Amazon Timestream Write's 1383 // API operation ListTagsForResource for usage and error information. 1384 // 1385 // Returned Error Types: 1386 // * ResourceNotFoundException 1387 // The operation tried to access a nonexistent resource. The resource might 1388 // not be specified correctly, or its status might not be ACTIVE. 1389 // 1390 // * ThrottlingException 1391 // Too many requests were made by a user exceeding service quotas. The request 1392 // was throttled. 1393 // 1394 // * ValidationException 1395 // Invalid or malformed request. 1396 // 1397 // * InvalidEndpointException 1398 // The requested endpoint was invalid. 1399 // 1400 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/ListTagsForResource 1401 func (c *TimestreamWrite) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1402 req, out := c.ListTagsForResourceRequest(input) 1403 return out, req.Send() 1404 } 1405 1406 // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1407 // the ability to pass a context and additional request options. 1408 // 1409 // See ListTagsForResource for details on how to use this API operation. 1410 // 1411 // The context must be non-nil and will be used for request cancellation. If 1412 // the context is nil a panic will occur. In the future the SDK may create 1413 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1414 // for more information on using Contexts. 1415 func (c *TimestreamWrite) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1416 req, out := c.ListTagsForResourceRequest(input) 1417 req.SetContext(ctx) 1418 req.ApplyOptions(opts...) 1419 return out, req.Send() 1420 } 1421 1422 const opTagResource = "TagResource" 1423 1424 // TagResourceRequest generates a "aws/request.Request" representing the 1425 // client's request for the TagResource operation. The "output" return 1426 // value will be populated with the request's response once the request completes 1427 // successfully. 1428 // 1429 // Use "Send" method on the returned Request to send the API call to the service. 1430 // the "output" return value is not valid until after Send returns without error. 1431 // 1432 // See TagResource for more information on using the TagResource 1433 // API call, and error handling. 1434 // 1435 // This method is useful when you want to inject custom logic or configuration 1436 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1437 // 1438 // 1439 // // Example sending a request using the TagResourceRequest method. 1440 // req, resp := client.TagResourceRequest(params) 1441 // 1442 // err := req.Send() 1443 // if err == nil { // resp is now filled 1444 // fmt.Println(resp) 1445 // } 1446 // 1447 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/TagResource 1448 func (c *TimestreamWrite) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 1449 op := &request.Operation{ 1450 Name: opTagResource, 1451 HTTPMethod: "POST", 1452 HTTPPath: "/", 1453 } 1454 1455 if input == nil { 1456 input = &TagResourceInput{} 1457 } 1458 1459 output = &TagResourceOutput{} 1460 req = c.newRequest(op, input, output) 1461 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1462 // if custom endpoint for the request is set to a non empty string, 1463 // we skip the endpoint discovery workflow. 1464 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 1465 de := discovererDescribeEndpoints{ 1466 Required: true, 1467 EndpointCache: c.endpointCache, 1468 Params: map[string]*string{ 1469 "op": aws.String(req.Operation.Name), 1470 }, 1471 Client: c, 1472 } 1473 1474 for k, v := range de.Params { 1475 if v == nil { 1476 delete(de.Params, k) 1477 } 1478 } 1479 1480 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 1481 Name: "crr.endpointdiscovery", 1482 Fn: de.Handler, 1483 }) 1484 } 1485 return 1486 } 1487 1488 // TagResource API operation for Amazon Timestream Write. 1489 // 1490 // Associate a set of tags with a Timestream resource. You can then activate 1491 // these user-defined tags so that they appear on the Billing and Cost Management 1492 // console for cost allocation tracking. 1493 // 1494 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1495 // with awserr.Error's Code and Message methods to get detailed information about 1496 // the error. 1497 // 1498 // See the AWS API reference guide for Amazon Timestream Write's 1499 // API operation TagResource for usage and error information. 1500 // 1501 // Returned Error Types: 1502 // * ResourceNotFoundException 1503 // The operation tried to access a nonexistent resource. The resource might 1504 // not be specified correctly, or its status might not be ACTIVE. 1505 // 1506 // * ServiceQuotaExceededException 1507 // Instance quota of resource exceeded for this account. 1508 // 1509 // * ThrottlingException 1510 // Too many requests were made by a user exceeding service quotas. The request 1511 // was throttled. 1512 // 1513 // * ValidationException 1514 // Invalid or malformed request. 1515 // 1516 // * InvalidEndpointException 1517 // The requested endpoint was invalid. 1518 // 1519 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/TagResource 1520 func (c *TimestreamWrite) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1521 req, out := c.TagResourceRequest(input) 1522 return out, req.Send() 1523 } 1524 1525 // TagResourceWithContext is the same as TagResource with the addition of 1526 // the ability to pass a context and additional request options. 1527 // 1528 // See TagResource for details on how to use this API operation. 1529 // 1530 // The context must be non-nil and will be used for request cancellation. If 1531 // the context is nil a panic will occur. In the future the SDK may create 1532 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1533 // for more information on using Contexts. 1534 func (c *TimestreamWrite) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1535 req, out := c.TagResourceRequest(input) 1536 req.SetContext(ctx) 1537 req.ApplyOptions(opts...) 1538 return out, req.Send() 1539 } 1540 1541 const opUntagResource = "UntagResource" 1542 1543 // UntagResourceRequest generates a "aws/request.Request" representing the 1544 // client's request for the UntagResource operation. The "output" return 1545 // value will be populated with the request's response once the request completes 1546 // successfully. 1547 // 1548 // Use "Send" method on the returned Request to send the API call to the service. 1549 // the "output" return value is not valid until after Send returns without error. 1550 // 1551 // See UntagResource for more information on using the UntagResource 1552 // API call, and error handling. 1553 // 1554 // This method is useful when you want to inject custom logic or configuration 1555 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1556 // 1557 // 1558 // // Example sending a request using the UntagResourceRequest method. 1559 // req, resp := client.UntagResourceRequest(params) 1560 // 1561 // err := req.Send() 1562 // if err == nil { // resp is now filled 1563 // fmt.Println(resp) 1564 // } 1565 // 1566 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UntagResource 1567 func (c *TimestreamWrite) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 1568 op := &request.Operation{ 1569 Name: opUntagResource, 1570 HTTPMethod: "POST", 1571 HTTPPath: "/", 1572 } 1573 1574 if input == nil { 1575 input = &UntagResourceInput{} 1576 } 1577 1578 output = &UntagResourceOutput{} 1579 req = c.newRequest(op, input, output) 1580 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1581 // if custom endpoint for the request is set to a non empty string, 1582 // we skip the endpoint discovery workflow. 1583 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 1584 de := discovererDescribeEndpoints{ 1585 Required: true, 1586 EndpointCache: c.endpointCache, 1587 Params: map[string]*string{ 1588 "op": aws.String(req.Operation.Name), 1589 }, 1590 Client: c, 1591 } 1592 1593 for k, v := range de.Params { 1594 if v == nil { 1595 delete(de.Params, k) 1596 } 1597 } 1598 1599 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 1600 Name: "crr.endpointdiscovery", 1601 Fn: de.Handler, 1602 }) 1603 } 1604 return 1605 } 1606 1607 // UntagResource API operation for Amazon Timestream Write. 1608 // 1609 // Removes the association of tags from a Timestream resource. 1610 // 1611 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1612 // with awserr.Error's Code and Message methods to get detailed information about 1613 // the error. 1614 // 1615 // See the AWS API reference guide for Amazon Timestream Write's 1616 // API operation UntagResource for usage and error information. 1617 // 1618 // Returned Error Types: 1619 // * ValidationException 1620 // Invalid or malformed request. 1621 // 1622 // * ServiceQuotaExceededException 1623 // Instance quota of resource exceeded for this account. 1624 // 1625 // * ThrottlingException 1626 // Too many requests were made by a user exceeding service quotas. The request 1627 // was throttled. 1628 // 1629 // * ResourceNotFoundException 1630 // The operation tried to access a nonexistent resource. The resource might 1631 // not be specified correctly, or its status might not be ACTIVE. 1632 // 1633 // * InvalidEndpointException 1634 // The requested endpoint was invalid. 1635 // 1636 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UntagResource 1637 func (c *TimestreamWrite) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 1638 req, out := c.UntagResourceRequest(input) 1639 return out, req.Send() 1640 } 1641 1642 // UntagResourceWithContext is the same as UntagResource with the addition of 1643 // the ability to pass a context and additional request options. 1644 // 1645 // See UntagResource for details on how to use this API operation. 1646 // 1647 // The context must be non-nil and will be used for request cancellation. If 1648 // the context is nil a panic will occur. In the future the SDK may create 1649 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1650 // for more information on using Contexts. 1651 func (c *TimestreamWrite) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 1652 req, out := c.UntagResourceRequest(input) 1653 req.SetContext(ctx) 1654 req.ApplyOptions(opts...) 1655 return out, req.Send() 1656 } 1657 1658 const opUpdateDatabase = "UpdateDatabase" 1659 1660 // UpdateDatabaseRequest generates a "aws/request.Request" representing the 1661 // client's request for the UpdateDatabase operation. The "output" return 1662 // value will be populated with the request's response once the request completes 1663 // successfully. 1664 // 1665 // Use "Send" method on the returned Request to send the API call to the service. 1666 // the "output" return value is not valid until after Send returns without error. 1667 // 1668 // See UpdateDatabase for more information on using the UpdateDatabase 1669 // API call, and error handling. 1670 // 1671 // This method is useful when you want to inject custom logic or configuration 1672 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1673 // 1674 // 1675 // // Example sending a request using the UpdateDatabaseRequest method. 1676 // req, resp := client.UpdateDatabaseRequest(params) 1677 // 1678 // err := req.Send() 1679 // if err == nil { // resp is now filled 1680 // fmt.Println(resp) 1681 // } 1682 // 1683 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UpdateDatabase 1684 func (c *TimestreamWrite) UpdateDatabaseRequest(input *UpdateDatabaseInput) (req *request.Request, output *UpdateDatabaseOutput) { 1685 op := &request.Operation{ 1686 Name: opUpdateDatabase, 1687 HTTPMethod: "POST", 1688 HTTPPath: "/", 1689 } 1690 1691 if input == nil { 1692 input = &UpdateDatabaseInput{} 1693 } 1694 1695 output = &UpdateDatabaseOutput{} 1696 req = c.newRequest(op, input, output) 1697 // if custom endpoint for the request is set to a non empty string, 1698 // we skip the endpoint discovery workflow. 1699 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 1700 de := discovererDescribeEndpoints{ 1701 Required: true, 1702 EndpointCache: c.endpointCache, 1703 Params: map[string]*string{ 1704 "op": aws.String(req.Operation.Name), 1705 }, 1706 Client: c, 1707 } 1708 1709 for k, v := range de.Params { 1710 if v == nil { 1711 delete(de.Params, k) 1712 } 1713 } 1714 1715 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 1716 Name: "crr.endpointdiscovery", 1717 Fn: de.Handler, 1718 }) 1719 } 1720 return 1721 } 1722 1723 // UpdateDatabase API operation for Amazon Timestream Write. 1724 // 1725 // Modifies the KMS key for an existing database. While updating the database, 1726 // you must specify the database name and the identifier of the new KMS key 1727 // to be used (KmsKeyId). If there are any concurrent UpdateDatabase requests, 1728 // first writer wins. 1729 // 1730 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1731 // with awserr.Error's Code and Message methods to get detailed information about 1732 // the error. 1733 // 1734 // See the AWS API reference guide for Amazon Timestream Write's 1735 // API operation UpdateDatabase for usage and error information. 1736 // 1737 // Returned Error Types: 1738 // * ValidationException 1739 // Invalid or malformed request. 1740 // 1741 // * AccessDeniedException 1742 // You are not authorized to perform this action. 1743 // 1744 // * ResourceNotFoundException 1745 // The operation tried to access a nonexistent resource. The resource might 1746 // not be specified correctly, or its status might not be ACTIVE. 1747 // 1748 // * ServiceQuotaExceededException 1749 // Instance quota of resource exceeded for this account. 1750 // 1751 // * ThrottlingException 1752 // Too many requests were made by a user exceeding service quotas. The request 1753 // was throttled. 1754 // 1755 // * InternalServerException 1756 // Timestream was unable to fully process this request because of an internal 1757 // server error. 1758 // 1759 // * InvalidEndpointException 1760 // The requested endpoint was invalid. 1761 // 1762 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UpdateDatabase 1763 func (c *TimestreamWrite) UpdateDatabase(input *UpdateDatabaseInput) (*UpdateDatabaseOutput, error) { 1764 req, out := c.UpdateDatabaseRequest(input) 1765 return out, req.Send() 1766 } 1767 1768 // UpdateDatabaseWithContext is the same as UpdateDatabase with the addition of 1769 // the ability to pass a context and additional request options. 1770 // 1771 // See UpdateDatabase for details on how to use this API operation. 1772 // 1773 // The context must be non-nil and will be used for request cancellation. If 1774 // the context is nil a panic will occur. In the future the SDK may create 1775 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1776 // for more information on using Contexts. 1777 func (c *TimestreamWrite) UpdateDatabaseWithContext(ctx aws.Context, input *UpdateDatabaseInput, opts ...request.Option) (*UpdateDatabaseOutput, error) { 1778 req, out := c.UpdateDatabaseRequest(input) 1779 req.SetContext(ctx) 1780 req.ApplyOptions(opts...) 1781 return out, req.Send() 1782 } 1783 1784 const opUpdateTable = "UpdateTable" 1785 1786 // UpdateTableRequest generates a "aws/request.Request" representing the 1787 // client's request for the UpdateTable operation. The "output" return 1788 // value will be populated with the request's response once the request completes 1789 // successfully. 1790 // 1791 // Use "Send" method on the returned Request to send the API call to the service. 1792 // the "output" return value is not valid until after Send returns without error. 1793 // 1794 // See UpdateTable for more information on using the UpdateTable 1795 // API call, and error handling. 1796 // 1797 // This method is useful when you want to inject custom logic or configuration 1798 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1799 // 1800 // 1801 // // Example sending a request using the UpdateTableRequest method. 1802 // req, resp := client.UpdateTableRequest(params) 1803 // 1804 // err := req.Send() 1805 // if err == nil { // resp is now filled 1806 // fmt.Println(resp) 1807 // } 1808 // 1809 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UpdateTable 1810 func (c *TimestreamWrite) UpdateTableRequest(input *UpdateTableInput) (req *request.Request, output *UpdateTableOutput) { 1811 op := &request.Operation{ 1812 Name: opUpdateTable, 1813 HTTPMethod: "POST", 1814 HTTPPath: "/", 1815 } 1816 1817 if input == nil { 1818 input = &UpdateTableInput{} 1819 } 1820 1821 output = &UpdateTableOutput{} 1822 req = c.newRequest(op, input, output) 1823 // if custom endpoint for the request is set to a non empty string, 1824 // we skip the endpoint discovery workflow. 1825 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 1826 de := discovererDescribeEndpoints{ 1827 Required: true, 1828 EndpointCache: c.endpointCache, 1829 Params: map[string]*string{ 1830 "op": aws.String(req.Operation.Name), 1831 }, 1832 Client: c, 1833 } 1834 1835 for k, v := range de.Params { 1836 if v == nil { 1837 delete(de.Params, k) 1838 } 1839 } 1840 1841 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 1842 Name: "crr.endpointdiscovery", 1843 Fn: de.Handler, 1844 }) 1845 } 1846 return 1847 } 1848 1849 // UpdateTable API operation for Amazon Timestream Write. 1850 // 1851 // Modifies the retention duration of the memory store and magnetic store for 1852 // your Timestream table. Note that the change in retention duration takes effect 1853 // immediately. For example, if the retention period of the memory store was 1854 // initially set to 2 hours and then changed to 24 hours, the memory store will 1855 // be capable of holding 24 hours of data, but will be populated with 24 hours 1856 // of data 22 hours after this change was made. Timestream does not retrieve 1857 // data from the magnetic store to populate the memory store. 1858 // 1859 // Service quotas apply. For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 1860 // in the Timestream Developer Guide. 1861 // 1862 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1863 // with awserr.Error's Code and Message methods to get detailed information about 1864 // the error. 1865 // 1866 // See the AWS API reference guide for Amazon Timestream Write's 1867 // API operation UpdateTable for usage and error information. 1868 // 1869 // Returned Error Types: 1870 // * InternalServerException 1871 // Timestream was unable to fully process this request because of an internal 1872 // server error. 1873 // 1874 // * ThrottlingException 1875 // Too many requests were made by a user exceeding service quotas. The request 1876 // was throttled. 1877 // 1878 // * ValidationException 1879 // Invalid or malformed request. 1880 // 1881 // * ResourceNotFoundException 1882 // The operation tried to access a nonexistent resource. The resource might 1883 // not be specified correctly, or its status might not be ACTIVE. 1884 // 1885 // * AccessDeniedException 1886 // You are not authorized to perform this action. 1887 // 1888 // * InvalidEndpointException 1889 // The requested endpoint was invalid. 1890 // 1891 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/UpdateTable 1892 func (c *TimestreamWrite) UpdateTable(input *UpdateTableInput) (*UpdateTableOutput, error) { 1893 req, out := c.UpdateTableRequest(input) 1894 return out, req.Send() 1895 } 1896 1897 // UpdateTableWithContext is the same as UpdateTable with the addition of 1898 // the ability to pass a context and additional request options. 1899 // 1900 // See UpdateTable for details on how to use this API operation. 1901 // 1902 // The context must be non-nil and will be used for request cancellation. If 1903 // the context is nil a panic will occur. In the future the SDK may create 1904 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1905 // for more information on using Contexts. 1906 func (c *TimestreamWrite) UpdateTableWithContext(ctx aws.Context, input *UpdateTableInput, opts ...request.Option) (*UpdateTableOutput, error) { 1907 req, out := c.UpdateTableRequest(input) 1908 req.SetContext(ctx) 1909 req.ApplyOptions(opts...) 1910 return out, req.Send() 1911 } 1912 1913 const opWriteRecords = "WriteRecords" 1914 1915 // WriteRecordsRequest generates a "aws/request.Request" representing the 1916 // client's request for the WriteRecords operation. The "output" return 1917 // value will be populated with the request's response once the request completes 1918 // successfully. 1919 // 1920 // Use "Send" method on the returned Request to send the API call to the service. 1921 // the "output" return value is not valid until after Send returns without error. 1922 // 1923 // See WriteRecords for more information on using the WriteRecords 1924 // API call, and error handling. 1925 // 1926 // This method is useful when you want to inject custom logic or configuration 1927 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1928 // 1929 // 1930 // // Example sending a request using the WriteRecordsRequest method. 1931 // req, resp := client.WriteRecordsRequest(params) 1932 // 1933 // err := req.Send() 1934 // if err == nil { // resp is now filled 1935 // fmt.Println(resp) 1936 // } 1937 // 1938 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/WriteRecords 1939 func (c *TimestreamWrite) WriteRecordsRequest(input *WriteRecordsInput) (req *request.Request, output *WriteRecordsOutput) { 1940 op := &request.Operation{ 1941 Name: opWriteRecords, 1942 HTTPMethod: "POST", 1943 HTTPPath: "/", 1944 } 1945 1946 if input == nil { 1947 input = &WriteRecordsInput{} 1948 } 1949 1950 output = &WriteRecordsOutput{} 1951 req = c.newRequest(op, input, output) 1952 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1953 // if custom endpoint for the request is set to a non empty string, 1954 // we skip the endpoint discovery workflow. 1955 if req.Config.Endpoint == nil || *req.Config.Endpoint == "" { 1956 de := discovererDescribeEndpoints{ 1957 Required: true, 1958 EndpointCache: c.endpointCache, 1959 Params: map[string]*string{ 1960 "op": aws.String(req.Operation.Name), 1961 }, 1962 Client: c, 1963 } 1964 1965 for k, v := range de.Params { 1966 if v == nil { 1967 delete(de.Params, k) 1968 } 1969 } 1970 1971 req.Handlers.Build.PushFrontNamed(request.NamedHandler{ 1972 Name: "crr.endpointdiscovery", 1973 Fn: de.Handler, 1974 }) 1975 } 1976 return 1977 } 1978 1979 // WriteRecords API operation for Amazon Timestream Write. 1980 // 1981 // The WriteRecords operation enables you to write your time series data into 1982 // Timestream. You can specify a single data point or a batch of data points 1983 // to be inserted into the system. Timestream offers you with a flexible schema 1984 // that auto detects the column names and data types for your Timestream tables 1985 // based on the dimension names and data types of the data points you specify 1986 // when invoking writes into the database. Timestream support eventual consistency 1987 // read semantics. This means that when you query data immediately after writing 1988 // a batch of data into Timestream, the query results might not reflect the 1989 // results of a recently completed write operation. The results may also include 1990 // some stale data. If you repeat the query request after a short time, the 1991 // results should return the latest data. Service quotas apply. For more information, 1992 // see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 1993 // in the Timestream Developer Guide. 1994 // 1995 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1996 // with awserr.Error's Code and Message methods to get detailed information about 1997 // the error. 1998 // 1999 // See the AWS API reference guide for Amazon Timestream Write's 2000 // API operation WriteRecords for usage and error information. 2001 // 2002 // Returned Error Types: 2003 // * InternalServerException 2004 // Timestream was unable to fully process this request because of an internal 2005 // server error. 2006 // 2007 // * ThrottlingException 2008 // Too many requests were made by a user exceeding service quotas. The request 2009 // was throttled. 2010 // 2011 // * ValidationException 2012 // Invalid or malformed request. 2013 // 2014 // * ResourceNotFoundException 2015 // The operation tried to access a nonexistent resource. The resource might 2016 // not be specified correctly, or its status might not be ACTIVE. 2017 // 2018 // * AccessDeniedException 2019 // You are not authorized to perform this action. 2020 // 2021 // * RejectedRecordsException 2022 // WriteRecords would throw this exception in the following cases: 2023 // 2024 // * Records with duplicate data where there are multiple records with the 2025 // same dimensions, timestamps, and measure names but different measure values. 2026 // 2027 // * Records with timestamps that lie outside the retention duration of the 2028 // memory store 2029 // 2030 // * Records with dimensions or measures that exceed the Timestream defined 2031 // limits. 2032 // 2033 // For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 2034 // in the Timestream Developer Guide. 2035 // 2036 // * InvalidEndpointException 2037 // The requested endpoint was invalid. 2038 // 2039 // See also, https://docs.aws.amazon.com/goto/WebAPI/timestream-write-2018-11-01/WriteRecords 2040 func (c *TimestreamWrite) WriteRecords(input *WriteRecordsInput) (*WriteRecordsOutput, error) { 2041 req, out := c.WriteRecordsRequest(input) 2042 return out, req.Send() 2043 } 2044 2045 // WriteRecordsWithContext is the same as WriteRecords with the addition of 2046 // the ability to pass a context and additional request options. 2047 // 2048 // See WriteRecords for details on how to use this API operation. 2049 // 2050 // The context must be non-nil and will be used for request cancellation. If 2051 // the context is nil a panic will occur. In the future the SDK may create 2052 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2053 // for more information on using Contexts. 2054 func (c *TimestreamWrite) WriteRecordsWithContext(ctx aws.Context, input *WriteRecordsInput, opts ...request.Option) (*WriteRecordsOutput, error) { 2055 req, out := c.WriteRecordsRequest(input) 2056 req.SetContext(ctx) 2057 req.ApplyOptions(opts...) 2058 return out, req.Send() 2059 } 2060 2061 // You are not authorized to perform this action. 2062 type AccessDeniedException struct { 2063 _ struct{} `type:"structure"` 2064 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2065 2066 Message_ *string `locationName:"Message" type:"string"` 2067 } 2068 2069 // String returns the string representation. 2070 // 2071 // API parameter values that are decorated as "sensitive" in the API will not 2072 // be included in the string output. The member name will be present, but the 2073 // value will be replaced with "sensitive". 2074 func (s AccessDeniedException) String() string { 2075 return awsutil.Prettify(s) 2076 } 2077 2078 // GoString returns the string representation. 2079 // 2080 // API parameter values that are decorated as "sensitive" in the API will not 2081 // be included in the string output. The member name will be present, but the 2082 // value will be replaced with "sensitive". 2083 func (s AccessDeniedException) GoString() string { 2084 return s.String() 2085 } 2086 2087 func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 2088 return &AccessDeniedException{ 2089 RespMetadata: v, 2090 } 2091 } 2092 2093 // Code returns the exception type name. 2094 func (s *AccessDeniedException) Code() string { 2095 return "AccessDeniedException" 2096 } 2097 2098 // Message returns the exception's message. 2099 func (s *AccessDeniedException) Message() string { 2100 if s.Message_ != nil { 2101 return *s.Message_ 2102 } 2103 return "" 2104 } 2105 2106 // OrigErr always returns nil, satisfies awserr.Error interface. 2107 func (s *AccessDeniedException) OrigErr() error { 2108 return nil 2109 } 2110 2111 func (s *AccessDeniedException) Error() string { 2112 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2113 } 2114 2115 // Status code returns the HTTP status code for the request's response error. 2116 func (s *AccessDeniedException) StatusCode() int { 2117 return s.RespMetadata.StatusCode 2118 } 2119 2120 // RequestID returns the service's response RequestID for request. 2121 func (s *AccessDeniedException) RequestID() string { 2122 return s.RespMetadata.RequestID 2123 } 2124 2125 // Timestream was unable to process this request because it contains resource 2126 // that already exists. 2127 type ConflictException struct { 2128 _ struct{} `type:"structure"` 2129 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2130 2131 Message_ *string `locationName:"Message" type:"string"` 2132 } 2133 2134 // String returns the string representation. 2135 // 2136 // API parameter values that are decorated as "sensitive" in the API will not 2137 // be included in the string output. The member name will be present, but the 2138 // value will be replaced with "sensitive". 2139 func (s ConflictException) String() string { 2140 return awsutil.Prettify(s) 2141 } 2142 2143 // GoString returns the string representation. 2144 // 2145 // API parameter values that are decorated as "sensitive" in the API will not 2146 // be included in the string output. The member name will be present, but the 2147 // value will be replaced with "sensitive". 2148 func (s ConflictException) GoString() string { 2149 return s.String() 2150 } 2151 2152 func newErrorConflictException(v protocol.ResponseMetadata) error { 2153 return &ConflictException{ 2154 RespMetadata: v, 2155 } 2156 } 2157 2158 // Code returns the exception type name. 2159 func (s *ConflictException) Code() string { 2160 return "ConflictException" 2161 } 2162 2163 // Message returns the exception's message. 2164 func (s *ConflictException) Message() string { 2165 if s.Message_ != nil { 2166 return *s.Message_ 2167 } 2168 return "" 2169 } 2170 2171 // OrigErr always returns nil, satisfies awserr.Error interface. 2172 func (s *ConflictException) OrigErr() error { 2173 return nil 2174 } 2175 2176 func (s *ConflictException) Error() string { 2177 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2178 } 2179 2180 // Status code returns the HTTP status code for the request's response error. 2181 func (s *ConflictException) StatusCode() int { 2182 return s.RespMetadata.StatusCode 2183 } 2184 2185 // RequestID returns the service's response RequestID for request. 2186 func (s *ConflictException) RequestID() string { 2187 return s.RespMetadata.RequestID 2188 } 2189 2190 type CreateDatabaseInput struct { 2191 _ struct{} `type:"structure"` 2192 2193 // The name of the Timestream database. 2194 // 2195 // DatabaseName is a required field 2196 DatabaseName *string `min:"3" type:"string" required:"true"` 2197 2198 // The KMS key for the database. If the KMS key is not specified, the database 2199 // will be encrypted with a Timestream managed KMS key located in your account. 2200 // Refer to AWS managed KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) 2201 // for more info. 2202 KmsKeyId *string `min:"1" type:"string"` 2203 2204 // A list of key-value pairs to label the table. 2205 Tags []*Tag `type:"list"` 2206 } 2207 2208 // String returns the string representation. 2209 // 2210 // API parameter values that are decorated as "sensitive" in the API will not 2211 // be included in the string output. The member name will be present, but the 2212 // value will be replaced with "sensitive". 2213 func (s CreateDatabaseInput) String() string { 2214 return awsutil.Prettify(s) 2215 } 2216 2217 // GoString returns the string representation. 2218 // 2219 // API parameter values that are decorated as "sensitive" in the API will not 2220 // be included in the string output. The member name will be present, but the 2221 // value will be replaced with "sensitive". 2222 func (s CreateDatabaseInput) GoString() string { 2223 return s.String() 2224 } 2225 2226 // Validate inspects the fields of the type to determine if they are valid. 2227 func (s *CreateDatabaseInput) Validate() error { 2228 invalidParams := request.ErrInvalidParams{Context: "CreateDatabaseInput"} 2229 if s.DatabaseName == nil { 2230 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 2231 } 2232 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 2233 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 2234 } 2235 if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 { 2236 invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1)) 2237 } 2238 if s.Tags != nil { 2239 for i, v := range s.Tags { 2240 if v == nil { 2241 continue 2242 } 2243 if err := v.Validate(); err != nil { 2244 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2245 } 2246 } 2247 } 2248 2249 if invalidParams.Len() > 0 { 2250 return invalidParams 2251 } 2252 return nil 2253 } 2254 2255 // SetDatabaseName sets the DatabaseName field's value. 2256 func (s *CreateDatabaseInput) SetDatabaseName(v string) *CreateDatabaseInput { 2257 s.DatabaseName = &v 2258 return s 2259 } 2260 2261 // SetKmsKeyId sets the KmsKeyId field's value. 2262 func (s *CreateDatabaseInput) SetKmsKeyId(v string) *CreateDatabaseInput { 2263 s.KmsKeyId = &v 2264 return s 2265 } 2266 2267 // SetTags sets the Tags field's value. 2268 func (s *CreateDatabaseInput) SetTags(v []*Tag) *CreateDatabaseInput { 2269 s.Tags = v 2270 return s 2271 } 2272 2273 type CreateDatabaseOutput struct { 2274 _ struct{} `type:"structure"` 2275 2276 // The newly created Timestream database. 2277 Database *Database `type:"structure"` 2278 } 2279 2280 // String returns the string representation. 2281 // 2282 // API parameter values that are decorated as "sensitive" in the API will not 2283 // be included in the string output. The member name will be present, but the 2284 // value will be replaced with "sensitive". 2285 func (s CreateDatabaseOutput) String() string { 2286 return awsutil.Prettify(s) 2287 } 2288 2289 // GoString returns the string representation. 2290 // 2291 // API parameter values that are decorated as "sensitive" in the API will not 2292 // be included in the string output. The member name will be present, but the 2293 // value will be replaced with "sensitive". 2294 func (s CreateDatabaseOutput) GoString() string { 2295 return s.String() 2296 } 2297 2298 // SetDatabase sets the Database field's value. 2299 func (s *CreateDatabaseOutput) SetDatabase(v *Database) *CreateDatabaseOutput { 2300 s.Database = v 2301 return s 2302 } 2303 2304 type CreateTableInput struct { 2305 _ struct{} `type:"structure"` 2306 2307 // The name of the Timestream database. 2308 // 2309 // DatabaseName is a required field 2310 DatabaseName *string `min:"3" type:"string" required:"true"` 2311 2312 // The duration for which your time series data must be stored in the memory 2313 // store and the magnetic store. 2314 RetentionProperties *RetentionProperties `type:"structure"` 2315 2316 // The name of the Timestream table. 2317 // 2318 // TableName is a required field 2319 TableName *string `min:"3" type:"string" required:"true"` 2320 2321 // A list of key-value pairs to label the table. 2322 Tags []*Tag `type:"list"` 2323 } 2324 2325 // String returns the string representation. 2326 // 2327 // API parameter values that are decorated as "sensitive" in the API will not 2328 // be included in the string output. The member name will be present, but the 2329 // value will be replaced with "sensitive". 2330 func (s CreateTableInput) String() string { 2331 return awsutil.Prettify(s) 2332 } 2333 2334 // GoString returns the string representation. 2335 // 2336 // API parameter values that are decorated as "sensitive" in the API will not 2337 // be included in the string output. The member name will be present, but the 2338 // value will be replaced with "sensitive". 2339 func (s CreateTableInput) GoString() string { 2340 return s.String() 2341 } 2342 2343 // Validate inspects the fields of the type to determine if they are valid. 2344 func (s *CreateTableInput) Validate() error { 2345 invalidParams := request.ErrInvalidParams{Context: "CreateTableInput"} 2346 if s.DatabaseName == nil { 2347 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 2348 } 2349 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 2350 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 2351 } 2352 if s.TableName == nil { 2353 invalidParams.Add(request.NewErrParamRequired("TableName")) 2354 } 2355 if s.TableName != nil && len(*s.TableName) < 3 { 2356 invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) 2357 } 2358 if s.RetentionProperties != nil { 2359 if err := s.RetentionProperties.Validate(); err != nil { 2360 invalidParams.AddNested("RetentionProperties", err.(request.ErrInvalidParams)) 2361 } 2362 } 2363 if s.Tags != nil { 2364 for i, v := range s.Tags { 2365 if v == nil { 2366 continue 2367 } 2368 if err := v.Validate(); err != nil { 2369 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2370 } 2371 } 2372 } 2373 2374 if invalidParams.Len() > 0 { 2375 return invalidParams 2376 } 2377 return nil 2378 } 2379 2380 // SetDatabaseName sets the DatabaseName field's value. 2381 func (s *CreateTableInput) SetDatabaseName(v string) *CreateTableInput { 2382 s.DatabaseName = &v 2383 return s 2384 } 2385 2386 // SetRetentionProperties sets the RetentionProperties field's value. 2387 func (s *CreateTableInput) SetRetentionProperties(v *RetentionProperties) *CreateTableInput { 2388 s.RetentionProperties = v 2389 return s 2390 } 2391 2392 // SetTableName sets the TableName field's value. 2393 func (s *CreateTableInput) SetTableName(v string) *CreateTableInput { 2394 s.TableName = &v 2395 return s 2396 } 2397 2398 // SetTags sets the Tags field's value. 2399 func (s *CreateTableInput) SetTags(v []*Tag) *CreateTableInput { 2400 s.Tags = v 2401 return s 2402 } 2403 2404 type CreateTableOutput struct { 2405 _ struct{} `type:"structure"` 2406 2407 // The newly created Timestream table. 2408 Table *Table `type:"structure"` 2409 } 2410 2411 // String returns the string representation. 2412 // 2413 // API parameter values that are decorated as "sensitive" in the API will not 2414 // be included in the string output. The member name will be present, but the 2415 // value will be replaced with "sensitive". 2416 func (s CreateTableOutput) String() string { 2417 return awsutil.Prettify(s) 2418 } 2419 2420 // GoString returns the string representation. 2421 // 2422 // API parameter values that are decorated as "sensitive" in the API will not 2423 // be included in the string output. The member name will be present, but the 2424 // value will be replaced with "sensitive". 2425 func (s CreateTableOutput) GoString() string { 2426 return s.String() 2427 } 2428 2429 // SetTable sets the Table field's value. 2430 func (s *CreateTableOutput) SetTable(v *Table) *CreateTableOutput { 2431 s.Table = v 2432 return s 2433 } 2434 2435 // A top level container for a table. Databases and tables are the fundamental 2436 // management concepts in Amazon Timestream. All tables in a database are encrypted 2437 // with the same KMS key. 2438 type Database struct { 2439 _ struct{} `type:"structure"` 2440 2441 // The Amazon Resource Name that uniquely identifies this database. 2442 Arn *string `type:"string"` 2443 2444 // The time when the database was created, calculated from the Unix epoch time. 2445 CreationTime *time.Time `type:"timestamp"` 2446 2447 // The name of the Timestream database. 2448 DatabaseName *string `min:"3" type:"string"` 2449 2450 // The identifier of the KMS key used to encrypt the data stored in the database. 2451 KmsKeyId *string `min:"1" type:"string"` 2452 2453 // The last time that this database was updated. 2454 LastUpdatedTime *time.Time `type:"timestamp"` 2455 2456 // The total number of tables found within a Timestream database. 2457 TableCount *int64 `type:"long"` 2458 } 2459 2460 // String returns the string representation. 2461 // 2462 // API parameter values that are decorated as "sensitive" in the API will not 2463 // be included in the string output. The member name will be present, but the 2464 // value will be replaced with "sensitive". 2465 func (s Database) String() string { 2466 return awsutil.Prettify(s) 2467 } 2468 2469 // GoString returns the string representation. 2470 // 2471 // API parameter values that are decorated as "sensitive" in the API will not 2472 // be included in the string output. The member name will be present, but the 2473 // value will be replaced with "sensitive". 2474 func (s Database) GoString() string { 2475 return s.String() 2476 } 2477 2478 // SetArn sets the Arn field's value. 2479 func (s *Database) SetArn(v string) *Database { 2480 s.Arn = &v 2481 return s 2482 } 2483 2484 // SetCreationTime sets the CreationTime field's value. 2485 func (s *Database) SetCreationTime(v time.Time) *Database { 2486 s.CreationTime = &v 2487 return s 2488 } 2489 2490 // SetDatabaseName sets the DatabaseName field's value. 2491 func (s *Database) SetDatabaseName(v string) *Database { 2492 s.DatabaseName = &v 2493 return s 2494 } 2495 2496 // SetKmsKeyId sets the KmsKeyId field's value. 2497 func (s *Database) SetKmsKeyId(v string) *Database { 2498 s.KmsKeyId = &v 2499 return s 2500 } 2501 2502 // SetLastUpdatedTime sets the LastUpdatedTime field's value. 2503 func (s *Database) SetLastUpdatedTime(v time.Time) *Database { 2504 s.LastUpdatedTime = &v 2505 return s 2506 } 2507 2508 // SetTableCount sets the TableCount field's value. 2509 func (s *Database) SetTableCount(v int64) *Database { 2510 s.TableCount = &v 2511 return s 2512 } 2513 2514 type DeleteDatabaseInput struct { 2515 _ struct{} `type:"structure"` 2516 2517 // The name of the Timestream database to be deleted. 2518 // 2519 // DatabaseName is a required field 2520 DatabaseName *string `min:"3" type:"string" required:"true"` 2521 } 2522 2523 // String returns the string representation. 2524 // 2525 // API parameter values that are decorated as "sensitive" in the API will not 2526 // be included in the string output. The member name will be present, but the 2527 // value will be replaced with "sensitive". 2528 func (s DeleteDatabaseInput) String() string { 2529 return awsutil.Prettify(s) 2530 } 2531 2532 // GoString returns the string representation. 2533 // 2534 // API parameter values that are decorated as "sensitive" in the API will not 2535 // be included in the string output. The member name will be present, but the 2536 // value will be replaced with "sensitive". 2537 func (s DeleteDatabaseInput) GoString() string { 2538 return s.String() 2539 } 2540 2541 // Validate inspects the fields of the type to determine if they are valid. 2542 func (s *DeleteDatabaseInput) Validate() error { 2543 invalidParams := request.ErrInvalidParams{Context: "DeleteDatabaseInput"} 2544 if s.DatabaseName == nil { 2545 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 2546 } 2547 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 2548 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 2549 } 2550 2551 if invalidParams.Len() > 0 { 2552 return invalidParams 2553 } 2554 return nil 2555 } 2556 2557 // SetDatabaseName sets the DatabaseName field's value. 2558 func (s *DeleteDatabaseInput) SetDatabaseName(v string) *DeleteDatabaseInput { 2559 s.DatabaseName = &v 2560 return s 2561 } 2562 2563 type DeleteDatabaseOutput struct { 2564 _ struct{} `type:"structure"` 2565 } 2566 2567 // String returns the string representation. 2568 // 2569 // API parameter values that are decorated as "sensitive" in the API will not 2570 // be included in the string output. The member name will be present, but the 2571 // value will be replaced with "sensitive". 2572 func (s DeleteDatabaseOutput) String() string { 2573 return awsutil.Prettify(s) 2574 } 2575 2576 // GoString returns the string representation. 2577 // 2578 // API parameter values that are decorated as "sensitive" in the API will not 2579 // be included in the string output. The member name will be present, but the 2580 // value will be replaced with "sensitive". 2581 func (s DeleteDatabaseOutput) GoString() string { 2582 return s.String() 2583 } 2584 2585 type DeleteTableInput struct { 2586 _ struct{} `type:"structure"` 2587 2588 // The name of the database where the Timestream database is to be deleted. 2589 // 2590 // DatabaseName is a required field 2591 DatabaseName *string `min:"3" type:"string" required:"true"` 2592 2593 // The name of the Timestream table to be deleted. 2594 // 2595 // TableName is a required field 2596 TableName *string `min:"3" type:"string" required:"true"` 2597 } 2598 2599 // String returns the string representation. 2600 // 2601 // API parameter values that are decorated as "sensitive" in the API will not 2602 // be included in the string output. The member name will be present, but the 2603 // value will be replaced with "sensitive". 2604 func (s DeleteTableInput) String() string { 2605 return awsutil.Prettify(s) 2606 } 2607 2608 // GoString returns the string representation. 2609 // 2610 // API parameter values that are decorated as "sensitive" in the API will not 2611 // be included in the string output. The member name will be present, but the 2612 // value will be replaced with "sensitive". 2613 func (s DeleteTableInput) GoString() string { 2614 return s.String() 2615 } 2616 2617 // Validate inspects the fields of the type to determine if they are valid. 2618 func (s *DeleteTableInput) Validate() error { 2619 invalidParams := request.ErrInvalidParams{Context: "DeleteTableInput"} 2620 if s.DatabaseName == nil { 2621 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 2622 } 2623 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 2624 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 2625 } 2626 if s.TableName == nil { 2627 invalidParams.Add(request.NewErrParamRequired("TableName")) 2628 } 2629 if s.TableName != nil && len(*s.TableName) < 3 { 2630 invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) 2631 } 2632 2633 if invalidParams.Len() > 0 { 2634 return invalidParams 2635 } 2636 return nil 2637 } 2638 2639 // SetDatabaseName sets the DatabaseName field's value. 2640 func (s *DeleteTableInput) SetDatabaseName(v string) *DeleteTableInput { 2641 s.DatabaseName = &v 2642 return s 2643 } 2644 2645 // SetTableName sets the TableName field's value. 2646 func (s *DeleteTableInput) SetTableName(v string) *DeleteTableInput { 2647 s.TableName = &v 2648 return s 2649 } 2650 2651 type DeleteTableOutput struct { 2652 _ struct{} `type:"structure"` 2653 } 2654 2655 // String returns the string representation. 2656 // 2657 // API parameter values that are decorated as "sensitive" in the API will not 2658 // be included in the string output. The member name will be present, but the 2659 // value will be replaced with "sensitive". 2660 func (s DeleteTableOutput) String() string { 2661 return awsutil.Prettify(s) 2662 } 2663 2664 // GoString returns the string representation. 2665 // 2666 // API parameter values that are decorated as "sensitive" in the API will not 2667 // be included in the string output. The member name will be present, but the 2668 // value will be replaced with "sensitive". 2669 func (s DeleteTableOutput) GoString() string { 2670 return s.String() 2671 } 2672 2673 type DescribeDatabaseInput struct { 2674 _ struct{} `type:"structure"` 2675 2676 // The name of the Timestream database. 2677 // 2678 // DatabaseName is a required field 2679 DatabaseName *string `min:"3" type:"string" required:"true"` 2680 } 2681 2682 // String returns the string representation. 2683 // 2684 // API parameter values that are decorated as "sensitive" in the API will not 2685 // be included in the string output. The member name will be present, but the 2686 // value will be replaced with "sensitive". 2687 func (s DescribeDatabaseInput) String() string { 2688 return awsutil.Prettify(s) 2689 } 2690 2691 // GoString returns the string representation. 2692 // 2693 // API parameter values that are decorated as "sensitive" in the API will not 2694 // be included in the string output. The member name will be present, but the 2695 // value will be replaced with "sensitive". 2696 func (s DescribeDatabaseInput) GoString() string { 2697 return s.String() 2698 } 2699 2700 // Validate inspects the fields of the type to determine if they are valid. 2701 func (s *DescribeDatabaseInput) Validate() error { 2702 invalidParams := request.ErrInvalidParams{Context: "DescribeDatabaseInput"} 2703 if s.DatabaseName == nil { 2704 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 2705 } 2706 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 2707 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 2708 } 2709 2710 if invalidParams.Len() > 0 { 2711 return invalidParams 2712 } 2713 return nil 2714 } 2715 2716 // SetDatabaseName sets the DatabaseName field's value. 2717 func (s *DescribeDatabaseInput) SetDatabaseName(v string) *DescribeDatabaseInput { 2718 s.DatabaseName = &v 2719 return s 2720 } 2721 2722 type DescribeDatabaseOutput struct { 2723 _ struct{} `type:"structure"` 2724 2725 // The name of the Timestream table. 2726 Database *Database `type:"structure"` 2727 } 2728 2729 // String returns the string representation. 2730 // 2731 // API parameter values that are decorated as "sensitive" in the API will not 2732 // be included in the string output. The member name will be present, but the 2733 // value will be replaced with "sensitive". 2734 func (s DescribeDatabaseOutput) String() string { 2735 return awsutil.Prettify(s) 2736 } 2737 2738 // GoString returns the string representation. 2739 // 2740 // API parameter values that are decorated as "sensitive" in the API will not 2741 // be included in the string output. The member name will be present, but the 2742 // value will be replaced with "sensitive". 2743 func (s DescribeDatabaseOutput) GoString() string { 2744 return s.String() 2745 } 2746 2747 // SetDatabase sets the Database field's value. 2748 func (s *DescribeDatabaseOutput) SetDatabase(v *Database) *DescribeDatabaseOutput { 2749 s.Database = v 2750 return s 2751 } 2752 2753 type DescribeEndpointsInput struct { 2754 _ struct{} `type:"structure"` 2755 } 2756 2757 // String returns the string representation. 2758 // 2759 // API parameter values that are decorated as "sensitive" in the API will not 2760 // be included in the string output. The member name will be present, but the 2761 // value will be replaced with "sensitive". 2762 func (s DescribeEndpointsInput) String() string { 2763 return awsutil.Prettify(s) 2764 } 2765 2766 // GoString returns the string representation. 2767 // 2768 // API parameter values that are decorated as "sensitive" in the API will not 2769 // be included in the string output. The member name will be present, but the 2770 // value will be replaced with "sensitive". 2771 func (s DescribeEndpointsInput) GoString() string { 2772 return s.String() 2773 } 2774 2775 type DescribeEndpointsOutput struct { 2776 _ struct{} `type:"structure"` 2777 2778 // An Endpoints object is returned when a DescribeEndpoints request is made. 2779 // 2780 // Endpoints is a required field 2781 Endpoints []*Endpoint `type:"list" required:"true"` 2782 } 2783 2784 // String returns the string representation. 2785 // 2786 // API parameter values that are decorated as "sensitive" in the API will not 2787 // be included in the string output. The member name will be present, but the 2788 // value will be replaced with "sensitive". 2789 func (s DescribeEndpointsOutput) String() string { 2790 return awsutil.Prettify(s) 2791 } 2792 2793 // GoString returns the string representation. 2794 // 2795 // API parameter values that are decorated as "sensitive" in the API will not 2796 // be included in the string output. The member name will be present, but the 2797 // value will be replaced with "sensitive". 2798 func (s DescribeEndpointsOutput) GoString() string { 2799 return s.String() 2800 } 2801 2802 // SetEndpoints sets the Endpoints field's value. 2803 func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput { 2804 s.Endpoints = v 2805 return s 2806 } 2807 2808 type DescribeTableInput struct { 2809 _ struct{} `type:"structure"` 2810 2811 // The name of the Timestream database. 2812 // 2813 // DatabaseName is a required field 2814 DatabaseName *string `min:"3" type:"string" required:"true"` 2815 2816 // The name of the Timestream table. 2817 // 2818 // TableName is a required field 2819 TableName *string `min:"3" type:"string" required:"true"` 2820 } 2821 2822 // String returns the string representation. 2823 // 2824 // API parameter values that are decorated as "sensitive" in the API will not 2825 // be included in the string output. The member name will be present, but the 2826 // value will be replaced with "sensitive". 2827 func (s DescribeTableInput) String() string { 2828 return awsutil.Prettify(s) 2829 } 2830 2831 // GoString returns the string representation. 2832 // 2833 // API parameter values that are decorated as "sensitive" in the API will not 2834 // be included in the string output. The member name will be present, but the 2835 // value will be replaced with "sensitive". 2836 func (s DescribeTableInput) GoString() string { 2837 return s.String() 2838 } 2839 2840 // Validate inspects the fields of the type to determine if they are valid. 2841 func (s *DescribeTableInput) Validate() error { 2842 invalidParams := request.ErrInvalidParams{Context: "DescribeTableInput"} 2843 if s.DatabaseName == nil { 2844 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 2845 } 2846 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 2847 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 2848 } 2849 if s.TableName == nil { 2850 invalidParams.Add(request.NewErrParamRequired("TableName")) 2851 } 2852 if s.TableName != nil && len(*s.TableName) < 3 { 2853 invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) 2854 } 2855 2856 if invalidParams.Len() > 0 { 2857 return invalidParams 2858 } 2859 return nil 2860 } 2861 2862 // SetDatabaseName sets the DatabaseName field's value. 2863 func (s *DescribeTableInput) SetDatabaseName(v string) *DescribeTableInput { 2864 s.DatabaseName = &v 2865 return s 2866 } 2867 2868 // SetTableName sets the TableName field's value. 2869 func (s *DescribeTableInput) SetTableName(v string) *DescribeTableInput { 2870 s.TableName = &v 2871 return s 2872 } 2873 2874 type DescribeTableOutput struct { 2875 _ struct{} `type:"structure"` 2876 2877 // The Timestream table. 2878 Table *Table `type:"structure"` 2879 } 2880 2881 // String returns the string representation. 2882 // 2883 // API parameter values that are decorated as "sensitive" in the API will not 2884 // be included in the string output. The member name will be present, but the 2885 // value will be replaced with "sensitive". 2886 func (s DescribeTableOutput) String() string { 2887 return awsutil.Prettify(s) 2888 } 2889 2890 // GoString returns the string representation. 2891 // 2892 // API parameter values that are decorated as "sensitive" in the API will not 2893 // be included in the string output. The member name will be present, but the 2894 // value will be replaced with "sensitive". 2895 func (s DescribeTableOutput) GoString() string { 2896 return s.String() 2897 } 2898 2899 // SetTable sets the Table field's value. 2900 func (s *DescribeTableOutput) SetTable(v *Table) *DescribeTableOutput { 2901 s.Table = v 2902 return s 2903 } 2904 2905 // Dimension represents the meta data attributes of the time series. For example, 2906 // the name and availability zone of an EC2 instance or the name of the manufacturer 2907 // of a wind turbine are dimensions. 2908 type Dimension struct { 2909 _ struct{} `type:"structure"` 2910 2911 // The data type of the dimension for the time series data point. 2912 DimensionValueType *string `type:"string" enum:"DimensionValueType"` 2913 2914 // Dimension represents the meta data attributes of the time series. For example, 2915 // the name and availability zone of an EC2 instance or the name of the manufacturer 2916 // of a wind turbine are dimensions. 2917 // 2918 // For constraints on Dimension names, see Naming Constraints (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html#limits.naming). 2919 // 2920 // Name is a required field 2921 Name *string `min:"1" type:"string" required:"true"` 2922 2923 // The value of the dimension. 2924 // 2925 // Value is a required field 2926 Value *string `min:"1" type:"string" required:"true"` 2927 } 2928 2929 // String returns the string representation. 2930 // 2931 // API parameter values that are decorated as "sensitive" in the API will not 2932 // be included in the string output. The member name will be present, but the 2933 // value will be replaced with "sensitive". 2934 func (s Dimension) String() string { 2935 return awsutil.Prettify(s) 2936 } 2937 2938 // GoString returns the string representation. 2939 // 2940 // API parameter values that are decorated as "sensitive" in the API will not 2941 // be included in the string output. The member name will be present, but the 2942 // value will be replaced with "sensitive". 2943 func (s Dimension) GoString() string { 2944 return s.String() 2945 } 2946 2947 // Validate inspects the fields of the type to determine if they are valid. 2948 func (s *Dimension) Validate() error { 2949 invalidParams := request.ErrInvalidParams{Context: "Dimension"} 2950 if s.Name == nil { 2951 invalidParams.Add(request.NewErrParamRequired("Name")) 2952 } 2953 if s.Name != nil && len(*s.Name) < 1 { 2954 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2955 } 2956 if s.Value == nil { 2957 invalidParams.Add(request.NewErrParamRequired("Value")) 2958 } 2959 if s.Value != nil && len(*s.Value) < 1 { 2960 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 2961 } 2962 2963 if invalidParams.Len() > 0 { 2964 return invalidParams 2965 } 2966 return nil 2967 } 2968 2969 // SetDimensionValueType sets the DimensionValueType field's value. 2970 func (s *Dimension) SetDimensionValueType(v string) *Dimension { 2971 s.DimensionValueType = &v 2972 return s 2973 } 2974 2975 // SetName sets the Name field's value. 2976 func (s *Dimension) SetName(v string) *Dimension { 2977 s.Name = &v 2978 return s 2979 } 2980 2981 // SetValue sets the Value field's value. 2982 func (s *Dimension) SetValue(v string) *Dimension { 2983 s.Value = &v 2984 return s 2985 } 2986 2987 // Represents an available endpoint against which to make API calls agaisnt, 2988 // as well as the TTL for that endpoint. 2989 type Endpoint struct { 2990 _ struct{} `type:"structure"` 2991 2992 // An endpoint address. 2993 // 2994 // Address is a required field 2995 Address *string `type:"string" required:"true"` 2996 2997 // The TTL for the endpoint, in minutes. 2998 // 2999 // CachePeriodInMinutes is a required field 3000 CachePeriodInMinutes *int64 `type:"long" required:"true"` 3001 } 3002 3003 // String returns the string representation. 3004 // 3005 // API parameter values that are decorated as "sensitive" in the API will not 3006 // be included in the string output. The member name will be present, but the 3007 // value will be replaced with "sensitive". 3008 func (s Endpoint) String() string { 3009 return awsutil.Prettify(s) 3010 } 3011 3012 // GoString returns the string representation. 3013 // 3014 // API parameter values that are decorated as "sensitive" in the API will not 3015 // be included in the string output. The member name will be present, but the 3016 // value will be replaced with "sensitive". 3017 func (s Endpoint) GoString() string { 3018 return s.String() 3019 } 3020 3021 // SetAddress sets the Address field's value. 3022 func (s *Endpoint) SetAddress(v string) *Endpoint { 3023 s.Address = &v 3024 return s 3025 } 3026 3027 // SetCachePeriodInMinutes sets the CachePeriodInMinutes field's value. 3028 func (s *Endpoint) SetCachePeriodInMinutes(v int64) *Endpoint { 3029 s.CachePeriodInMinutes = &v 3030 return s 3031 } 3032 3033 // Timestream was unable to fully process this request because of an internal 3034 // server error. 3035 type InternalServerException struct { 3036 _ struct{} `type:"structure"` 3037 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3038 3039 Message_ *string `locationName:"Message" type:"string"` 3040 } 3041 3042 // String returns the string representation. 3043 // 3044 // API parameter values that are decorated as "sensitive" in the API will not 3045 // be included in the string output. The member name will be present, but the 3046 // value will be replaced with "sensitive". 3047 func (s InternalServerException) String() string { 3048 return awsutil.Prettify(s) 3049 } 3050 3051 // GoString returns the string representation. 3052 // 3053 // API parameter values that are decorated as "sensitive" in the API will not 3054 // be included in the string output. The member name will be present, but the 3055 // value will be replaced with "sensitive". 3056 func (s InternalServerException) GoString() string { 3057 return s.String() 3058 } 3059 3060 func newErrorInternalServerException(v protocol.ResponseMetadata) error { 3061 return &InternalServerException{ 3062 RespMetadata: v, 3063 } 3064 } 3065 3066 // Code returns the exception type name. 3067 func (s *InternalServerException) Code() string { 3068 return "InternalServerException" 3069 } 3070 3071 // Message returns the exception's message. 3072 func (s *InternalServerException) Message() string { 3073 if s.Message_ != nil { 3074 return *s.Message_ 3075 } 3076 return "" 3077 } 3078 3079 // OrigErr always returns nil, satisfies awserr.Error interface. 3080 func (s *InternalServerException) OrigErr() error { 3081 return nil 3082 } 3083 3084 func (s *InternalServerException) Error() string { 3085 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3086 } 3087 3088 // Status code returns the HTTP status code for the request's response error. 3089 func (s *InternalServerException) StatusCode() int { 3090 return s.RespMetadata.StatusCode 3091 } 3092 3093 // RequestID returns the service's response RequestID for request. 3094 func (s *InternalServerException) RequestID() string { 3095 return s.RespMetadata.RequestID 3096 } 3097 3098 // The requested endpoint was invalid. 3099 type InvalidEndpointException struct { 3100 _ struct{} `type:"structure"` 3101 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3102 3103 Message_ *string `locationName:"Message" type:"string"` 3104 } 3105 3106 // String returns the string representation. 3107 // 3108 // API parameter values that are decorated as "sensitive" in the API will not 3109 // be included in the string output. The member name will be present, but the 3110 // value will be replaced with "sensitive". 3111 func (s InvalidEndpointException) String() string { 3112 return awsutil.Prettify(s) 3113 } 3114 3115 // GoString returns the string representation. 3116 // 3117 // API parameter values that are decorated as "sensitive" in the API will not 3118 // be included in the string output. The member name will be present, but the 3119 // value will be replaced with "sensitive". 3120 func (s InvalidEndpointException) GoString() string { 3121 return s.String() 3122 } 3123 3124 func newErrorInvalidEndpointException(v protocol.ResponseMetadata) error { 3125 return &InvalidEndpointException{ 3126 RespMetadata: v, 3127 } 3128 } 3129 3130 // Code returns the exception type name. 3131 func (s *InvalidEndpointException) Code() string { 3132 return "InvalidEndpointException" 3133 } 3134 3135 // Message returns the exception's message. 3136 func (s *InvalidEndpointException) Message() string { 3137 if s.Message_ != nil { 3138 return *s.Message_ 3139 } 3140 return "" 3141 } 3142 3143 // OrigErr always returns nil, satisfies awserr.Error interface. 3144 func (s *InvalidEndpointException) OrigErr() error { 3145 return nil 3146 } 3147 3148 func (s *InvalidEndpointException) Error() string { 3149 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3150 } 3151 3152 // Status code returns the HTTP status code for the request's response error. 3153 func (s *InvalidEndpointException) StatusCode() int { 3154 return s.RespMetadata.StatusCode 3155 } 3156 3157 // RequestID returns the service's response RequestID for request. 3158 func (s *InvalidEndpointException) RequestID() string { 3159 return s.RespMetadata.RequestID 3160 } 3161 3162 type ListDatabasesInput struct { 3163 _ struct{} `type:"structure"` 3164 3165 // The total number of items to return in the output. If the total number of 3166 // items available is more than the value specified, a NextToken is provided 3167 // in the output. To resume pagination, provide the NextToken value as argument 3168 // of a subsequent API invocation. 3169 MaxResults *int64 `min:"1" type:"integer"` 3170 3171 // The pagination token. To resume pagination, provide the NextToken value as 3172 // argument of a subsequent API invocation. 3173 NextToken *string `type:"string"` 3174 } 3175 3176 // String returns the string representation. 3177 // 3178 // API parameter values that are decorated as "sensitive" in the API will not 3179 // be included in the string output. The member name will be present, but the 3180 // value will be replaced with "sensitive". 3181 func (s ListDatabasesInput) String() string { 3182 return awsutil.Prettify(s) 3183 } 3184 3185 // GoString returns the string representation. 3186 // 3187 // API parameter values that are decorated as "sensitive" in the API will not 3188 // be included in the string output. The member name will be present, but the 3189 // value will be replaced with "sensitive". 3190 func (s ListDatabasesInput) GoString() string { 3191 return s.String() 3192 } 3193 3194 // Validate inspects the fields of the type to determine if they are valid. 3195 func (s *ListDatabasesInput) Validate() error { 3196 invalidParams := request.ErrInvalidParams{Context: "ListDatabasesInput"} 3197 if s.MaxResults != nil && *s.MaxResults < 1 { 3198 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3199 } 3200 3201 if invalidParams.Len() > 0 { 3202 return invalidParams 3203 } 3204 return nil 3205 } 3206 3207 // SetMaxResults sets the MaxResults field's value. 3208 func (s *ListDatabasesInput) SetMaxResults(v int64) *ListDatabasesInput { 3209 s.MaxResults = &v 3210 return s 3211 } 3212 3213 // SetNextToken sets the NextToken field's value. 3214 func (s *ListDatabasesInput) SetNextToken(v string) *ListDatabasesInput { 3215 s.NextToken = &v 3216 return s 3217 } 3218 3219 type ListDatabasesOutput struct { 3220 _ struct{} `type:"structure"` 3221 3222 // A list of database names. 3223 Databases []*Database `type:"list"` 3224 3225 // The pagination token. This parameter is returned when the response is truncated. 3226 NextToken *string `type:"string"` 3227 } 3228 3229 // String returns the string representation. 3230 // 3231 // API parameter values that are decorated as "sensitive" in the API will not 3232 // be included in the string output. The member name will be present, but the 3233 // value will be replaced with "sensitive". 3234 func (s ListDatabasesOutput) String() string { 3235 return awsutil.Prettify(s) 3236 } 3237 3238 // GoString returns the string representation. 3239 // 3240 // API parameter values that are decorated as "sensitive" in the API will not 3241 // be included in the string output. The member name will be present, but the 3242 // value will be replaced with "sensitive". 3243 func (s ListDatabasesOutput) GoString() string { 3244 return s.String() 3245 } 3246 3247 // SetDatabases sets the Databases field's value. 3248 func (s *ListDatabasesOutput) SetDatabases(v []*Database) *ListDatabasesOutput { 3249 s.Databases = v 3250 return s 3251 } 3252 3253 // SetNextToken sets the NextToken field's value. 3254 func (s *ListDatabasesOutput) SetNextToken(v string) *ListDatabasesOutput { 3255 s.NextToken = &v 3256 return s 3257 } 3258 3259 type ListTablesInput struct { 3260 _ struct{} `type:"structure"` 3261 3262 // The name of the Timestream database. 3263 DatabaseName *string `min:"3" type:"string"` 3264 3265 // The total number of items to return in the output. If the total number of 3266 // items available is more than the value specified, a NextToken is provided 3267 // in the output. To resume pagination, provide the NextToken value as argument 3268 // of a subsequent API invocation. 3269 MaxResults *int64 `min:"1" type:"integer"` 3270 3271 // The pagination token. To resume pagination, provide the NextToken value as 3272 // argument of a subsequent API invocation. 3273 NextToken *string `type:"string"` 3274 } 3275 3276 // String returns the string representation. 3277 // 3278 // API parameter values that are decorated as "sensitive" in the API will not 3279 // be included in the string output. The member name will be present, but the 3280 // value will be replaced with "sensitive". 3281 func (s ListTablesInput) String() string { 3282 return awsutil.Prettify(s) 3283 } 3284 3285 // GoString returns the string representation. 3286 // 3287 // API parameter values that are decorated as "sensitive" in the API will not 3288 // be included in the string output. The member name will be present, but the 3289 // value will be replaced with "sensitive". 3290 func (s ListTablesInput) GoString() string { 3291 return s.String() 3292 } 3293 3294 // Validate inspects the fields of the type to determine if they are valid. 3295 func (s *ListTablesInput) Validate() error { 3296 invalidParams := request.ErrInvalidParams{Context: "ListTablesInput"} 3297 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 3298 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 3299 } 3300 if s.MaxResults != nil && *s.MaxResults < 1 { 3301 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3302 } 3303 3304 if invalidParams.Len() > 0 { 3305 return invalidParams 3306 } 3307 return nil 3308 } 3309 3310 // SetDatabaseName sets the DatabaseName field's value. 3311 func (s *ListTablesInput) SetDatabaseName(v string) *ListTablesInput { 3312 s.DatabaseName = &v 3313 return s 3314 } 3315 3316 // SetMaxResults sets the MaxResults field's value. 3317 func (s *ListTablesInput) SetMaxResults(v int64) *ListTablesInput { 3318 s.MaxResults = &v 3319 return s 3320 } 3321 3322 // SetNextToken sets the NextToken field's value. 3323 func (s *ListTablesInput) SetNextToken(v string) *ListTablesInput { 3324 s.NextToken = &v 3325 return s 3326 } 3327 3328 type ListTablesOutput struct { 3329 _ struct{} `type:"structure"` 3330 3331 // A token to specify where to start paginating. This is the NextToken from 3332 // a previously truncated response. 3333 NextToken *string `type:"string"` 3334 3335 // A list of tables. 3336 Tables []*Table `type:"list"` 3337 } 3338 3339 // String returns the string representation. 3340 // 3341 // API parameter values that are decorated as "sensitive" in the API will not 3342 // be included in the string output. The member name will be present, but the 3343 // value will be replaced with "sensitive". 3344 func (s ListTablesOutput) String() string { 3345 return awsutil.Prettify(s) 3346 } 3347 3348 // GoString returns the string representation. 3349 // 3350 // API parameter values that are decorated as "sensitive" in the API will not 3351 // be included in the string output. The member name will be present, but the 3352 // value will be replaced with "sensitive". 3353 func (s ListTablesOutput) GoString() string { 3354 return s.String() 3355 } 3356 3357 // SetNextToken sets the NextToken field's value. 3358 func (s *ListTablesOutput) SetNextToken(v string) *ListTablesOutput { 3359 s.NextToken = &v 3360 return s 3361 } 3362 3363 // SetTables sets the Tables field's value. 3364 func (s *ListTablesOutput) SetTables(v []*Table) *ListTablesOutput { 3365 s.Tables = v 3366 return s 3367 } 3368 3369 type ListTagsForResourceInput struct { 3370 _ struct{} `type:"structure"` 3371 3372 // The Timestream resource with tags to be listed. This value is an Amazon Resource 3373 // Name (ARN). 3374 // 3375 // ResourceARN is a required field 3376 ResourceARN *string `min:"1" type:"string" required:"true"` 3377 } 3378 3379 // String returns the string representation. 3380 // 3381 // API parameter values that are decorated as "sensitive" in the API will not 3382 // be included in the string output. The member name will be present, but the 3383 // value will be replaced with "sensitive". 3384 func (s ListTagsForResourceInput) String() string { 3385 return awsutil.Prettify(s) 3386 } 3387 3388 // GoString returns the string representation. 3389 // 3390 // API parameter values that are decorated as "sensitive" in the API will not 3391 // be included in the string output. The member name will be present, but the 3392 // value will be replaced with "sensitive". 3393 func (s ListTagsForResourceInput) GoString() string { 3394 return s.String() 3395 } 3396 3397 // Validate inspects the fields of the type to determine if they are valid. 3398 func (s *ListTagsForResourceInput) Validate() error { 3399 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 3400 if s.ResourceARN == nil { 3401 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 3402 } 3403 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 3404 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 3405 } 3406 3407 if invalidParams.Len() > 0 { 3408 return invalidParams 3409 } 3410 return nil 3411 } 3412 3413 // SetResourceARN sets the ResourceARN field's value. 3414 func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { 3415 s.ResourceARN = &v 3416 return s 3417 } 3418 3419 type ListTagsForResourceOutput struct { 3420 _ struct{} `type:"structure"` 3421 3422 // The tags currently associated with the Timestream resource. 3423 Tags []*Tag `type:"list"` 3424 } 3425 3426 // String returns the string representation. 3427 // 3428 // API parameter values that are decorated as "sensitive" in the API will not 3429 // be included in the string output. The member name will be present, but the 3430 // value will be replaced with "sensitive". 3431 func (s ListTagsForResourceOutput) String() string { 3432 return awsutil.Prettify(s) 3433 } 3434 3435 // GoString returns the string representation. 3436 // 3437 // API parameter values that are decorated as "sensitive" in the API will not 3438 // be included in the string output. The member name will be present, but the 3439 // value will be replaced with "sensitive". 3440 func (s ListTagsForResourceOutput) GoString() string { 3441 return s.String() 3442 } 3443 3444 // SetTags sets the Tags field's value. 3445 func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 3446 s.Tags = v 3447 return s 3448 } 3449 3450 // Record represents a time series data point being written into Timestream. 3451 // Each record contains an array of dimensions. Dimensions represent the meta 3452 // data attributes of a time series data point such as the instance name or 3453 // availability zone of an EC2 instance. A record also contains the measure 3454 // name which is the name of the measure being collected for example the CPU 3455 // utilization of an EC2 instance. A record also contains the measure value 3456 // and the value type which is the data type of the measure value. In addition, 3457 // the record contains the timestamp when the measure was collected that the 3458 // timestamp unit which represents the granularity of the timestamp. 3459 type Record struct { 3460 _ struct{} `type:"structure"` 3461 3462 // Contains the list of dimensions for time series data points. 3463 Dimensions []*Dimension `type:"list"` 3464 3465 // Measure represents the data attribute of the time series. For example, the 3466 // CPU utilization of an EC2 instance or the RPM of a wind turbine are measures. 3467 MeasureName *string `min:"1" type:"string"` 3468 3469 // Contains the measure value for the time series data point. 3470 MeasureValue *string `min:"1" type:"string"` 3471 3472 // Contains the data type of the measure value for the time series data point. 3473 MeasureValueType *string `type:"string" enum:"MeasureValueType"` 3474 3475 // Contains the time at which the measure value for the data point was collected. 3476 // The time value plus the unit provides the time elapsed since the epoch. For 3477 // example, if the time value is 12345 and the unit is ms, then 12345 ms have 3478 // elapsed since the epoch. 3479 Time *string `min:"1" type:"string"` 3480 3481 // The granularity of the timestamp unit. It indicates if the time value is 3482 // in seconds, milliseconds, nanoseconds or other supported values. 3483 TimeUnit *string `type:"string" enum:"TimeUnit"` 3484 3485 // 64-bit attribute used for record updates. Write requests for duplicate data 3486 // with a higher version number will update the existing measure value and version. 3487 // In cases where the measure value is the same, Version will still be updated 3488 // . Default value is to 1. 3489 Version *int64 `type:"long"` 3490 } 3491 3492 // String returns the string representation. 3493 // 3494 // API parameter values that are decorated as "sensitive" in the API will not 3495 // be included in the string output. The member name will be present, but the 3496 // value will be replaced with "sensitive". 3497 func (s Record) String() string { 3498 return awsutil.Prettify(s) 3499 } 3500 3501 // GoString returns the string representation. 3502 // 3503 // API parameter values that are decorated as "sensitive" in the API will not 3504 // be included in the string output. The member name will be present, but the 3505 // value will be replaced with "sensitive". 3506 func (s Record) GoString() string { 3507 return s.String() 3508 } 3509 3510 // Validate inspects the fields of the type to determine if they are valid. 3511 func (s *Record) Validate() error { 3512 invalidParams := request.ErrInvalidParams{Context: "Record"} 3513 if s.MeasureName != nil && len(*s.MeasureName) < 1 { 3514 invalidParams.Add(request.NewErrParamMinLen("MeasureName", 1)) 3515 } 3516 if s.MeasureValue != nil && len(*s.MeasureValue) < 1 { 3517 invalidParams.Add(request.NewErrParamMinLen("MeasureValue", 1)) 3518 } 3519 if s.Time != nil && len(*s.Time) < 1 { 3520 invalidParams.Add(request.NewErrParamMinLen("Time", 1)) 3521 } 3522 if s.Dimensions != nil { 3523 for i, v := range s.Dimensions { 3524 if v == nil { 3525 continue 3526 } 3527 if err := v.Validate(); err != nil { 3528 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams)) 3529 } 3530 } 3531 } 3532 3533 if invalidParams.Len() > 0 { 3534 return invalidParams 3535 } 3536 return nil 3537 } 3538 3539 // SetDimensions sets the Dimensions field's value. 3540 func (s *Record) SetDimensions(v []*Dimension) *Record { 3541 s.Dimensions = v 3542 return s 3543 } 3544 3545 // SetMeasureName sets the MeasureName field's value. 3546 func (s *Record) SetMeasureName(v string) *Record { 3547 s.MeasureName = &v 3548 return s 3549 } 3550 3551 // SetMeasureValue sets the MeasureValue field's value. 3552 func (s *Record) SetMeasureValue(v string) *Record { 3553 s.MeasureValue = &v 3554 return s 3555 } 3556 3557 // SetMeasureValueType sets the MeasureValueType field's value. 3558 func (s *Record) SetMeasureValueType(v string) *Record { 3559 s.MeasureValueType = &v 3560 return s 3561 } 3562 3563 // SetTime sets the Time field's value. 3564 func (s *Record) SetTime(v string) *Record { 3565 s.Time = &v 3566 return s 3567 } 3568 3569 // SetTimeUnit sets the TimeUnit field's value. 3570 func (s *Record) SetTimeUnit(v string) *Record { 3571 s.TimeUnit = &v 3572 return s 3573 } 3574 3575 // SetVersion sets the Version field's value. 3576 func (s *Record) SetVersion(v int64) *Record { 3577 s.Version = &v 3578 return s 3579 } 3580 3581 // Records that were not successfully inserted into Timestream due to data validation 3582 // issues that must be resolved prior to reinserting time series data into the 3583 // system. 3584 type RejectedRecord struct { 3585 _ struct{} `type:"structure"` 3586 3587 // The existing version of the record. This value is populated in scenarios 3588 // where an identical record exists with a higher version than the version in 3589 // the write request. 3590 ExistingVersion *int64 `type:"long"` 3591 3592 // The reason why a record was not successfully inserted into Timestream. Possible 3593 // causes of failure include: 3594 // 3595 // * Records with duplicate data where there are multiple records with the 3596 // same dimensions, timestamps, and measure names but different measure values. 3597 // 3598 // * Records with timestamps that lie outside the retention duration of the 3599 // memory store When the retention window is updated, you will receive a 3600 // RejectedRecords exception if you immediately try to ingest data within 3601 // the new window. To avoid a RejectedRecords exception, wait until the duration 3602 // of the new window to ingest new data. For further information, see Best 3603 // Practices for Configuring Timestream (https://docs.aws.amazon.com/timestream/latest/developerguide/best-practices.html#configuration) 3604 // and the explanation of how storage works in Timestream (https://docs.aws.amazon.com/timestream/latest/developerguide/storage.html). 3605 // 3606 // * Records with dimensions or measures that exceed the Timestream defined 3607 // limits. 3608 // 3609 // For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 3610 // in the Timestream Developer Guide. 3611 Reason *string `type:"string"` 3612 3613 // The index of the record in the input request for WriteRecords. Indexes begin 3614 // with 0. 3615 RecordIndex *int64 `type:"integer"` 3616 } 3617 3618 // String returns the string representation. 3619 // 3620 // API parameter values that are decorated as "sensitive" in the API will not 3621 // be included in the string output. The member name will be present, but the 3622 // value will be replaced with "sensitive". 3623 func (s RejectedRecord) String() string { 3624 return awsutil.Prettify(s) 3625 } 3626 3627 // GoString returns the string representation. 3628 // 3629 // API parameter values that are decorated as "sensitive" in the API will not 3630 // be included in the string output. The member name will be present, but the 3631 // value will be replaced with "sensitive". 3632 func (s RejectedRecord) GoString() string { 3633 return s.String() 3634 } 3635 3636 // SetExistingVersion sets the ExistingVersion field's value. 3637 func (s *RejectedRecord) SetExistingVersion(v int64) *RejectedRecord { 3638 s.ExistingVersion = &v 3639 return s 3640 } 3641 3642 // SetReason sets the Reason field's value. 3643 func (s *RejectedRecord) SetReason(v string) *RejectedRecord { 3644 s.Reason = &v 3645 return s 3646 } 3647 3648 // SetRecordIndex sets the RecordIndex field's value. 3649 func (s *RejectedRecord) SetRecordIndex(v int64) *RejectedRecord { 3650 s.RecordIndex = &v 3651 return s 3652 } 3653 3654 // WriteRecords would throw this exception in the following cases: 3655 // 3656 // * Records with duplicate data where there are multiple records with the 3657 // same dimensions, timestamps, and measure names but different measure values. 3658 // 3659 // * Records with timestamps that lie outside the retention duration of the 3660 // memory store 3661 // 3662 // * Records with dimensions or measures that exceed the Timestream defined 3663 // limits. 3664 // 3665 // For more information, see Access Management (https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html) 3666 // in the Timestream Developer Guide. 3667 type RejectedRecordsException struct { 3668 _ struct{} `type:"structure"` 3669 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3670 3671 Message_ *string `locationName:"Message" type:"string"` 3672 3673 RejectedRecords []*RejectedRecord `type:"list"` 3674 } 3675 3676 // String returns the string representation. 3677 // 3678 // API parameter values that are decorated as "sensitive" in the API will not 3679 // be included in the string output. The member name will be present, but the 3680 // value will be replaced with "sensitive". 3681 func (s RejectedRecordsException) String() string { 3682 return awsutil.Prettify(s) 3683 } 3684 3685 // GoString returns the string representation. 3686 // 3687 // API parameter values that are decorated as "sensitive" in the API will not 3688 // be included in the string output. The member name will be present, but the 3689 // value will be replaced with "sensitive". 3690 func (s RejectedRecordsException) GoString() string { 3691 return s.String() 3692 } 3693 3694 func newErrorRejectedRecordsException(v protocol.ResponseMetadata) error { 3695 return &RejectedRecordsException{ 3696 RespMetadata: v, 3697 } 3698 } 3699 3700 // Code returns the exception type name. 3701 func (s *RejectedRecordsException) Code() string { 3702 return "RejectedRecordsException" 3703 } 3704 3705 // Message returns the exception's message. 3706 func (s *RejectedRecordsException) Message() string { 3707 if s.Message_ != nil { 3708 return *s.Message_ 3709 } 3710 return "" 3711 } 3712 3713 // OrigErr always returns nil, satisfies awserr.Error interface. 3714 func (s *RejectedRecordsException) OrigErr() error { 3715 return nil 3716 } 3717 3718 func (s *RejectedRecordsException) Error() string { 3719 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 3720 } 3721 3722 // Status code returns the HTTP status code for the request's response error. 3723 func (s *RejectedRecordsException) StatusCode() int { 3724 return s.RespMetadata.StatusCode 3725 } 3726 3727 // RequestID returns the service's response RequestID for request. 3728 func (s *RejectedRecordsException) RequestID() string { 3729 return s.RespMetadata.RequestID 3730 } 3731 3732 // The operation tried to access a nonexistent resource. The resource might 3733 // not be specified correctly, or its status might not be ACTIVE. 3734 type ResourceNotFoundException struct { 3735 _ struct{} `type:"structure"` 3736 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3737 3738 Message_ *string `locationName:"Message" type:"string"` 3739 } 3740 3741 // String returns the string representation. 3742 // 3743 // API parameter values that are decorated as "sensitive" in the API will not 3744 // be included in the string output. The member name will be present, but the 3745 // value will be replaced with "sensitive". 3746 func (s ResourceNotFoundException) String() string { 3747 return awsutil.Prettify(s) 3748 } 3749 3750 // GoString returns the string representation. 3751 // 3752 // API parameter values that are decorated as "sensitive" in the API will not 3753 // be included in the string output. The member name will be present, but the 3754 // value will be replaced with "sensitive". 3755 func (s ResourceNotFoundException) GoString() string { 3756 return s.String() 3757 } 3758 3759 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 3760 return &ResourceNotFoundException{ 3761 RespMetadata: v, 3762 } 3763 } 3764 3765 // Code returns the exception type name. 3766 func (s *ResourceNotFoundException) Code() string { 3767 return "ResourceNotFoundException" 3768 } 3769 3770 // Message returns the exception's message. 3771 func (s *ResourceNotFoundException) Message() string { 3772 if s.Message_ != nil { 3773 return *s.Message_ 3774 } 3775 return "" 3776 } 3777 3778 // OrigErr always returns nil, satisfies awserr.Error interface. 3779 func (s *ResourceNotFoundException) OrigErr() error { 3780 return nil 3781 } 3782 3783 func (s *ResourceNotFoundException) Error() string { 3784 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3785 } 3786 3787 // Status code returns the HTTP status code for the request's response error. 3788 func (s *ResourceNotFoundException) StatusCode() int { 3789 return s.RespMetadata.StatusCode 3790 } 3791 3792 // RequestID returns the service's response RequestID for request. 3793 func (s *ResourceNotFoundException) RequestID() string { 3794 return s.RespMetadata.RequestID 3795 } 3796 3797 // Retention properties contain the duration for which your time series data 3798 // must be stored in the magnetic store and the memory store. 3799 type RetentionProperties struct { 3800 _ struct{} `type:"structure"` 3801 3802 // The duration for which data must be stored in the magnetic store. 3803 // 3804 // MagneticStoreRetentionPeriodInDays is a required field 3805 MagneticStoreRetentionPeriodInDays *int64 `min:"1" type:"long" required:"true"` 3806 3807 // The duration for which data must be stored in the memory store. 3808 // 3809 // MemoryStoreRetentionPeriodInHours is a required field 3810 MemoryStoreRetentionPeriodInHours *int64 `min:"1" type:"long" required:"true"` 3811 } 3812 3813 // String returns the string representation. 3814 // 3815 // API parameter values that are decorated as "sensitive" in the API will not 3816 // be included in the string output. The member name will be present, but the 3817 // value will be replaced with "sensitive". 3818 func (s RetentionProperties) String() string { 3819 return awsutil.Prettify(s) 3820 } 3821 3822 // GoString returns the string representation. 3823 // 3824 // API parameter values that are decorated as "sensitive" in the API will not 3825 // be included in the string output. The member name will be present, but the 3826 // value will be replaced with "sensitive". 3827 func (s RetentionProperties) GoString() string { 3828 return s.String() 3829 } 3830 3831 // Validate inspects the fields of the type to determine if they are valid. 3832 func (s *RetentionProperties) Validate() error { 3833 invalidParams := request.ErrInvalidParams{Context: "RetentionProperties"} 3834 if s.MagneticStoreRetentionPeriodInDays == nil { 3835 invalidParams.Add(request.NewErrParamRequired("MagneticStoreRetentionPeriodInDays")) 3836 } 3837 if s.MagneticStoreRetentionPeriodInDays != nil && *s.MagneticStoreRetentionPeriodInDays < 1 { 3838 invalidParams.Add(request.NewErrParamMinValue("MagneticStoreRetentionPeriodInDays", 1)) 3839 } 3840 if s.MemoryStoreRetentionPeriodInHours == nil { 3841 invalidParams.Add(request.NewErrParamRequired("MemoryStoreRetentionPeriodInHours")) 3842 } 3843 if s.MemoryStoreRetentionPeriodInHours != nil && *s.MemoryStoreRetentionPeriodInHours < 1 { 3844 invalidParams.Add(request.NewErrParamMinValue("MemoryStoreRetentionPeriodInHours", 1)) 3845 } 3846 3847 if invalidParams.Len() > 0 { 3848 return invalidParams 3849 } 3850 return nil 3851 } 3852 3853 // SetMagneticStoreRetentionPeriodInDays sets the MagneticStoreRetentionPeriodInDays field's value. 3854 func (s *RetentionProperties) SetMagneticStoreRetentionPeriodInDays(v int64) *RetentionProperties { 3855 s.MagneticStoreRetentionPeriodInDays = &v 3856 return s 3857 } 3858 3859 // SetMemoryStoreRetentionPeriodInHours sets the MemoryStoreRetentionPeriodInHours field's value. 3860 func (s *RetentionProperties) SetMemoryStoreRetentionPeriodInHours(v int64) *RetentionProperties { 3861 s.MemoryStoreRetentionPeriodInHours = &v 3862 return s 3863 } 3864 3865 // Instance quota of resource exceeded for this account. 3866 type ServiceQuotaExceededException struct { 3867 _ struct{} `type:"structure"` 3868 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3869 3870 Message_ *string `locationName:"Message" type:"string"` 3871 } 3872 3873 // String returns the string representation. 3874 // 3875 // API parameter values that are decorated as "sensitive" in the API will not 3876 // be included in the string output. The member name will be present, but the 3877 // value will be replaced with "sensitive". 3878 func (s ServiceQuotaExceededException) String() string { 3879 return awsutil.Prettify(s) 3880 } 3881 3882 // GoString returns the string representation. 3883 // 3884 // API parameter values that are decorated as "sensitive" in the API will not 3885 // be included in the string output. The member name will be present, but the 3886 // value will be replaced with "sensitive". 3887 func (s ServiceQuotaExceededException) GoString() string { 3888 return s.String() 3889 } 3890 3891 func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { 3892 return &ServiceQuotaExceededException{ 3893 RespMetadata: v, 3894 } 3895 } 3896 3897 // Code returns the exception type name. 3898 func (s *ServiceQuotaExceededException) Code() string { 3899 return "ServiceQuotaExceededException" 3900 } 3901 3902 // Message returns the exception's message. 3903 func (s *ServiceQuotaExceededException) Message() string { 3904 if s.Message_ != nil { 3905 return *s.Message_ 3906 } 3907 return "" 3908 } 3909 3910 // OrigErr always returns nil, satisfies awserr.Error interface. 3911 func (s *ServiceQuotaExceededException) OrigErr() error { 3912 return nil 3913 } 3914 3915 func (s *ServiceQuotaExceededException) Error() string { 3916 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3917 } 3918 3919 // Status code returns the HTTP status code for the request's response error. 3920 func (s *ServiceQuotaExceededException) StatusCode() int { 3921 return s.RespMetadata.StatusCode 3922 } 3923 3924 // RequestID returns the service's response RequestID for request. 3925 func (s *ServiceQuotaExceededException) RequestID() string { 3926 return s.RespMetadata.RequestID 3927 } 3928 3929 // Table represents a database table in Timestream. Tables contain one or more 3930 // related time series. You can modify the retention duration of the memory 3931 // store and the magnetic store for a table. 3932 type Table struct { 3933 _ struct{} `type:"structure"` 3934 3935 // The Amazon Resource Name that uniquely identifies this table. 3936 Arn *string `type:"string"` 3937 3938 // The time when the Timestream table was created. 3939 CreationTime *time.Time `type:"timestamp"` 3940 3941 // The name of the Timestream database that contains this table. 3942 DatabaseName *string `min:"3" type:"string"` 3943 3944 // The time when the Timestream table was last updated. 3945 LastUpdatedTime *time.Time `type:"timestamp"` 3946 3947 // The retention duration for the memory store and magnetic store. 3948 RetentionProperties *RetentionProperties `type:"structure"` 3949 3950 // The name of the Timestream table. 3951 TableName *string `min:"3" type:"string"` 3952 3953 // The current state of the table: 3954 // 3955 // * DELETING - The table is being deleted. 3956 // 3957 // * ACTIVE - The table is ready for use. 3958 TableStatus *string `type:"string" enum:"TableStatus"` 3959 } 3960 3961 // String returns the string representation. 3962 // 3963 // API parameter values that are decorated as "sensitive" in the API will not 3964 // be included in the string output. The member name will be present, but the 3965 // value will be replaced with "sensitive". 3966 func (s Table) String() string { 3967 return awsutil.Prettify(s) 3968 } 3969 3970 // GoString returns the string representation. 3971 // 3972 // API parameter values that are decorated as "sensitive" in the API will not 3973 // be included in the string output. The member name will be present, but the 3974 // value will be replaced with "sensitive". 3975 func (s Table) GoString() string { 3976 return s.String() 3977 } 3978 3979 // SetArn sets the Arn field's value. 3980 func (s *Table) SetArn(v string) *Table { 3981 s.Arn = &v 3982 return s 3983 } 3984 3985 // SetCreationTime sets the CreationTime field's value. 3986 func (s *Table) SetCreationTime(v time.Time) *Table { 3987 s.CreationTime = &v 3988 return s 3989 } 3990 3991 // SetDatabaseName sets the DatabaseName field's value. 3992 func (s *Table) SetDatabaseName(v string) *Table { 3993 s.DatabaseName = &v 3994 return s 3995 } 3996 3997 // SetLastUpdatedTime sets the LastUpdatedTime field's value. 3998 func (s *Table) SetLastUpdatedTime(v time.Time) *Table { 3999 s.LastUpdatedTime = &v 4000 return s 4001 } 4002 4003 // SetRetentionProperties sets the RetentionProperties field's value. 4004 func (s *Table) SetRetentionProperties(v *RetentionProperties) *Table { 4005 s.RetentionProperties = v 4006 return s 4007 } 4008 4009 // SetTableName sets the TableName field's value. 4010 func (s *Table) SetTableName(v string) *Table { 4011 s.TableName = &v 4012 return s 4013 } 4014 4015 // SetTableStatus sets the TableStatus field's value. 4016 func (s *Table) SetTableStatus(v string) *Table { 4017 s.TableStatus = &v 4018 return s 4019 } 4020 4021 // A tag is a label that you assign to a Timestream database and/or table. Each 4022 // tag consists of a key and an optional value, both of which you define. Tags 4023 // enable you to categorize databases and/or tables, for example, by purpose, 4024 // owner, or environment. 4025 type Tag struct { 4026 _ struct{} `type:"structure"` 4027 4028 // The key of the tag. Tag keys are case sensitive. 4029 // 4030 // Key is a required field 4031 Key *string `min:"1" type:"string" required:"true"` 4032 4033 // The value of the tag. Tag values are case-sensitive and can be null. 4034 // 4035 // Value is a required field 4036 Value *string `type:"string" required:"true"` 4037 } 4038 4039 // String returns the string representation. 4040 // 4041 // API parameter values that are decorated as "sensitive" in the API will not 4042 // be included in the string output. The member name will be present, but the 4043 // value will be replaced with "sensitive". 4044 func (s Tag) String() string { 4045 return awsutil.Prettify(s) 4046 } 4047 4048 // GoString returns the string representation. 4049 // 4050 // API parameter values that are decorated as "sensitive" in the API will not 4051 // be included in the string output. The member name will be present, but the 4052 // value will be replaced with "sensitive". 4053 func (s Tag) GoString() string { 4054 return s.String() 4055 } 4056 4057 // Validate inspects the fields of the type to determine if they are valid. 4058 func (s *Tag) Validate() error { 4059 invalidParams := request.ErrInvalidParams{Context: "Tag"} 4060 if s.Key == nil { 4061 invalidParams.Add(request.NewErrParamRequired("Key")) 4062 } 4063 if s.Key != nil && len(*s.Key) < 1 { 4064 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 4065 } 4066 if s.Value == nil { 4067 invalidParams.Add(request.NewErrParamRequired("Value")) 4068 } 4069 4070 if invalidParams.Len() > 0 { 4071 return invalidParams 4072 } 4073 return nil 4074 } 4075 4076 // SetKey sets the Key field's value. 4077 func (s *Tag) SetKey(v string) *Tag { 4078 s.Key = &v 4079 return s 4080 } 4081 4082 // SetValue sets the Value field's value. 4083 func (s *Tag) SetValue(v string) *Tag { 4084 s.Value = &v 4085 return s 4086 } 4087 4088 type TagResourceInput struct { 4089 _ struct{} `type:"structure"` 4090 4091 // Identifies the Timestream resource to which tags should be added. This value 4092 // is an Amazon Resource Name (ARN). 4093 // 4094 // ResourceARN is a required field 4095 ResourceARN *string `min:"1" type:"string" required:"true"` 4096 4097 // The tags to be assigned to the Timestream resource. 4098 // 4099 // Tags is a required field 4100 Tags []*Tag `type:"list" required:"true"` 4101 } 4102 4103 // String returns the string representation. 4104 // 4105 // API parameter values that are decorated as "sensitive" in the API will not 4106 // be included in the string output. The member name will be present, but the 4107 // value will be replaced with "sensitive". 4108 func (s TagResourceInput) String() string { 4109 return awsutil.Prettify(s) 4110 } 4111 4112 // GoString returns the string representation. 4113 // 4114 // API parameter values that are decorated as "sensitive" in the API will not 4115 // be included in the string output. The member name will be present, but the 4116 // value will be replaced with "sensitive". 4117 func (s TagResourceInput) GoString() string { 4118 return s.String() 4119 } 4120 4121 // Validate inspects the fields of the type to determine if they are valid. 4122 func (s *TagResourceInput) Validate() error { 4123 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 4124 if s.ResourceARN == nil { 4125 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 4126 } 4127 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 4128 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 4129 } 4130 if s.Tags == nil { 4131 invalidParams.Add(request.NewErrParamRequired("Tags")) 4132 } 4133 if s.Tags != nil { 4134 for i, v := range s.Tags { 4135 if v == nil { 4136 continue 4137 } 4138 if err := v.Validate(); err != nil { 4139 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 4140 } 4141 } 4142 } 4143 4144 if invalidParams.Len() > 0 { 4145 return invalidParams 4146 } 4147 return nil 4148 } 4149 4150 // SetResourceARN sets the ResourceARN field's value. 4151 func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { 4152 s.ResourceARN = &v 4153 return s 4154 } 4155 4156 // SetTags sets the Tags field's value. 4157 func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 4158 s.Tags = v 4159 return s 4160 } 4161 4162 type TagResourceOutput struct { 4163 _ struct{} `type:"structure"` 4164 } 4165 4166 // String returns the string representation. 4167 // 4168 // API parameter values that are decorated as "sensitive" in the API will not 4169 // be included in the string output. The member name will be present, but the 4170 // value will be replaced with "sensitive". 4171 func (s TagResourceOutput) String() string { 4172 return awsutil.Prettify(s) 4173 } 4174 4175 // GoString returns the string representation. 4176 // 4177 // API parameter values that are decorated as "sensitive" in the API will not 4178 // be included in the string output. The member name will be present, but the 4179 // value will be replaced with "sensitive". 4180 func (s TagResourceOutput) GoString() string { 4181 return s.String() 4182 } 4183 4184 // Too many requests were made by a user exceeding service quotas. The request 4185 // was throttled. 4186 type ThrottlingException struct { 4187 _ struct{} `type:"structure"` 4188 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4189 4190 Message_ *string `locationName:"Message" type:"string"` 4191 } 4192 4193 // String returns the string representation. 4194 // 4195 // API parameter values that are decorated as "sensitive" in the API will not 4196 // be included in the string output. The member name will be present, but the 4197 // value will be replaced with "sensitive". 4198 func (s ThrottlingException) String() string { 4199 return awsutil.Prettify(s) 4200 } 4201 4202 // GoString returns the string representation. 4203 // 4204 // API parameter values that are decorated as "sensitive" in the API will not 4205 // be included in the string output. The member name will be present, but the 4206 // value will be replaced with "sensitive". 4207 func (s ThrottlingException) GoString() string { 4208 return s.String() 4209 } 4210 4211 func newErrorThrottlingException(v protocol.ResponseMetadata) error { 4212 return &ThrottlingException{ 4213 RespMetadata: v, 4214 } 4215 } 4216 4217 // Code returns the exception type name. 4218 func (s *ThrottlingException) Code() string { 4219 return "ThrottlingException" 4220 } 4221 4222 // Message returns the exception's message. 4223 func (s *ThrottlingException) Message() string { 4224 if s.Message_ != nil { 4225 return *s.Message_ 4226 } 4227 return "" 4228 } 4229 4230 // OrigErr always returns nil, satisfies awserr.Error interface. 4231 func (s *ThrottlingException) OrigErr() error { 4232 return nil 4233 } 4234 4235 func (s *ThrottlingException) Error() string { 4236 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4237 } 4238 4239 // Status code returns the HTTP status code for the request's response error. 4240 func (s *ThrottlingException) StatusCode() int { 4241 return s.RespMetadata.StatusCode 4242 } 4243 4244 // RequestID returns the service's response RequestID for request. 4245 func (s *ThrottlingException) RequestID() string { 4246 return s.RespMetadata.RequestID 4247 } 4248 4249 type UntagResourceInput struct { 4250 _ struct{} `type:"structure"` 4251 4252 // The Timestream resource that the tags will be removed from. This value is 4253 // an Amazon Resource Name (ARN). 4254 // 4255 // ResourceARN is a required field 4256 ResourceARN *string `min:"1" type:"string" required:"true"` 4257 4258 // A list of tags keys. Existing tags of the resource whose keys are members 4259 // of this list will be removed from the Timestream resource. 4260 // 4261 // TagKeys is a required field 4262 TagKeys []*string `type:"list" required:"true"` 4263 } 4264 4265 // String returns the string representation. 4266 // 4267 // API parameter values that are decorated as "sensitive" in the API will not 4268 // be included in the string output. The member name will be present, but the 4269 // value will be replaced with "sensitive". 4270 func (s UntagResourceInput) String() string { 4271 return awsutil.Prettify(s) 4272 } 4273 4274 // GoString returns the string representation. 4275 // 4276 // API parameter values that are decorated as "sensitive" in the API will not 4277 // be included in the string output. The member name will be present, but the 4278 // value will be replaced with "sensitive". 4279 func (s UntagResourceInput) GoString() string { 4280 return s.String() 4281 } 4282 4283 // Validate inspects the fields of the type to determine if they are valid. 4284 func (s *UntagResourceInput) Validate() error { 4285 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 4286 if s.ResourceARN == nil { 4287 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 4288 } 4289 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 4290 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 4291 } 4292 if s.TagKeys == nil { 4293 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 4294 } 4295 4296 if invalidParams.Len() > 0 { 4297 return invalidParams 4298 } 4299 return nil 4300 } 4301 4302 // SetResourceARN sets the ResourceARN field's value. 4303 func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { 4304 s.ResourceARN = &v 4305 return s 4306 } 4307 4308 // SetTagKeys sets the TagKeys field's value. 4309 func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 4310 s.TagKeys = v 4311 return s 4312 } 4313 4314 type UntagResourceOutput struct { 4315 _ struct{} `type:"structure"` 4316 } 4317 4318 // String returns the string representation. 4319 // 4320 // API parameter values that are decorated as "sensitive" in the API will not 4321 // be included in the string output. The member name will be present, but the 4322 // value will be replaced with "sensitive". 4323 func (s UntagResourceOutput) String() string { 4324 return awsutil.Prettify(s) 4325 } 4326 4327 // GoString returns the string representation. 4328 // 4329 // API parameter values that are decorated as "sensitive" in the API will not 4330 // be included in the string output. The member name will be present, but the 4331 // value will be replaced with "sensitive". 4332 func (s UntagResourceOutput) GoString() string { 4333 return s.String() 4334 } 4335 4336 type UpdateDatabaseInput struct { 4337 _ struct{} `type:"structure"` 4338 4339 // The name of the database. 4340 // 4341 // DatabaseName is a required field 4342 DatabaseName *string `min:"3" type:"string" required:"true"` 4343 4344 // The identifier of the new KMS key (KmsKeyId) to be used to encrypt the data 4345 // stored in the database. If the KmsKeyId currently registered with the database 4346 // is the same as the KmsKeyId in the request, there will not be any update. 4347 // 4348 // You can specify the KmsKeyId using any of the following: 4349 // 4350 // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab 4351 // 4352 // * Key ARN: arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab 4353 // 4354 // * Alias name: alias/ExampleAlias 4355 // 4356 // * Alias ARN: arn:aws:kms:us-east-1:111122223333:alias/ExampleAlias 4357 // 4358 // KmsKeyId is a required field 4359 KmsKeyId *string `min:"1" type:"string" required:"true"` 4360 } 4361 4362 // String returns the string representation. 4363 // 4364 // API parameter values that are decorated as "sensitive" in the API will not 4365 // be included in the string output. The member name will be present, but the 4366 // value will be replaced with "sensitive". 4367 func (s UpdateDatabaseInput) String() string { 4368 return awsutil.Prettify(s) 4369 } 4370 4371 // GoString returns the string representation. 4372 // 4373 // API parameter values that are decorated as "sensitive" in the API will not 4374 // be included in the string output. The member name will be present, but the 4375 // value will be replaced with "sensitive". 4376 func (s UpdateDatabaseInput) GoString() string { 4377 return s.String() 4378 } 4379 4380 // Validate inspects the fields of the type to determine if they are valid. 4381 func (s *UpdateDatabaseInput) Validate() error { 4382 invalidParams := request.ErrInvalidParams{Context: "UpdateDatabaseInput"} 4383 if s.DatabaseName == nil { 4384 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 4385 } 4386 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 4387 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 4388 } 4389 if s.KmsKeyId == nil { 4390 invalidParams.Add(request.NewErrParamRequired("KmsKeyId")) 4391 } 4392 if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 { 4393 invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1)) 4394 } 4395 4396 if invalidParams.Len() > 0 { 4397 return invalidParams 4398 } 4399 return nil 4400 } 4401 4402 // SetDatabaseName sets the DatabaseName field's value. 4403 func (s *UpdateDatabaseInput) SetDatabaseName(v string) *UpdateDatabaseInput { 4404 s.DatabaseName = &v 4405 return s 4406 } 4407 4408 // SetKmsKeyId sets the KmsKeyId field's value. 4409 func (s *UpdateDatabaseInput) SetKmsKeyId(v string) *UpdateDatabaseInput { 4410 s.KmsKeyId = &v 4411 return s 4412 } 4413 4414 type UpdateDatabaseOutput struct { 4415 _ struct{} `type:"structure"` 4416 4417 // A top level container for a table. Databases and tables are the fundamental 4418 // management concepts in Amazon Timestream. All tables in a database are encrypted 4419 // with the same KMS key. 4420 Database *Database `type:"structure"` 4421 } 4422 4423 // String returns the string representation. 4424 // 4425 // API parameter values that are decorated as "sensitive" in the API will not 4426 // be included in the string output. The member name will be present, but the 4427 // value will be replaced with "sensitive". 4428 func (s UpdateDatabaseOutput) String() string { 4429 return awsutil.Prettify(s) 4430 } 4431 4432 // GoString returns the string representation. 4433 // 4434 // API parameter values that are decorated as "sensitive" in the API will not 4435 // be included in the string output. The member name will be present, but the 4436 // value will be replaced with "sensitive". 4437 func (s UpdateDatabaseOutput) GoString() string { 4438 return s.String() 4439 } 4440 4441 // SetDatabase sets the Database field's value. 4442 func (s *UpdateDatabaseOutput) SetDatabase(v *Database) *UpdateDatabaseOutput { 4443 s.Database = v 4444 return s 4445 } 4446 4447 type UpdateTableInput struct { 4448 _ struct{} `type:"structure"` 4449 4450 // The name of the Timestream database. 4451 // 4452 // DatabaseName is a required field 4453 DatabaseName *string `min:"3" type:"string" required:"true"` 4454 4455 // The retention duration of the memory store and the magnetic store. 4456 // 4457 // RetentionProperties is a required field 4458 RetentionProperties *RetentionProperties `type:"structure" required:"true"` 4459 4460 // The name of the Timesream table. 4461 // 4462 // TableName is a required field 4463 TableName *string `min:"3" type:"string" required:"true"` 4464 } 4465 4466 // String returns the string representation. 4467 // 4468 // API parameter values that are decorated as "sensitive" in the API will not 4469 // be included in the string output. The member name will be present, but the 4470 // value will be replaced with "sensitive". 4471 func (s UpdateTableInput) String() string { 4472 return awsutil.Prettify(s) 4473 } 4474 4475 // GoString returns the string representation. 4476 // 4477 // API parameter values that are decorated as "sensitive" in the API will not 4478 // be included in the string output. The member name will be present, but the 4479 // value will be replaced with "sensitive". 4480 func (s UpdateTableInput) GoString() string { 4481 return s.String() 4482 } 4483 4484 // Validate inspects the fields of the type to determine if they are valid. 4485 func (s *UpdateTableInput) Validate() error { 4486 invalidParams := request.ErrInvalidParams{Context: "UpdateTableInput"} 4487 if s.DatabaseName == nil { 4488 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 4489 } 4490 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 4491 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 4492 } 4493 if s.RetentionProperties == nil { 4494 invalidParams.Add(request.NewErrParamRequired("RetentionProperties")) 4495 } 4496 if s.TableName == nil { 4497 invalidParams.Add(request.NewErrParamRequired("TableName")) 4498 } 4499 if s.TableName != nil && len(*s.TableName) < 3 { 4500 invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) 4501 } 4502 if s.RetentionProperties != nil { 4503 if err := s.RetentionProperties.Validate(); err != nil { 4504 invalidParams.AddNested("RetentionProperties", err.(request.ErrInvalidParams)) 4505 } 4506 } 4507 4508 if invalidParams.Len() > 0 { 4509 return invalidParams 4510 } 4511 return nil 4512 } 4513 4514 // SetDatabaseName sets the DatabaseName field's value. 4515 func (s *UpdateTableInput) SetDatabaseName(v string) *UpdateTableInput { 4516 s.DatabaseName = &v 4517 return s 4518 } 4519 4520 // SetRetentionProperties sets the RetentionProperties field's value. 4521 func (s *UpdateTableInput) SetRetentionProperties(v *RetentionProperties) *UpdateTableInput { 4522 s.RetentionProperties = v 4523 return s 4524 } 4525 4526 // SetTableName sets the TableName field's value. 4527 func (s *UpdateTableInput) SetTableName(v string) *UpdateTableInput { 4528 s.TableName = &v 4529 return s 4530 } 4531 4532 type UpdateTableOutput struct { 4533 _ struct{} `type:"structure"` 4534 4535 // The updated Timestream table. 4536 Table *Table `type:"structure"` 4537 } 4538 4539 // String returns the string representation. 4540 // 4541 // API parameter values that are decorated as "sensitive" in the API will not 4542 // be included in the string output. The member name will be present, but the 4543 // value will be replaced with "sensitive". 4544 func (s UpdateTableOutput) String() string { 4545 return awsutil.Prettify(s) 4546 } 4547 4548 // GoString returns the string representation. 4549 // 4550 // API parameter values that are decorated as "sensitive" in the API will not 4551 // be included in the string output. The member name will be present, but the 4552 // value will be replaced with "sensitive". 4553 func (s UpdateTableOutput) GoString() string { 4554 return s.String() 4555 } 4556 4557 // SetTable sets the Table field's value. 4558 func (s *UpdateTableOutput) SetTable(v *Table) *UpdateTableOutput { 4559 s.Table = v 4560 return s 4561 } 4562 4563 // Invalid or malformed request. 4564 type ValidationException struct { 4565 _ struct{} `type:"structure"` 4566 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4567 4568 Message_ *string `locationName:"Message" type:"string"` 4569 } 4570 4571 // String returns the string representation. 4572 // 4573 // API parameter values that are decorated as "sensitive" in the API will not 4574 // be included in the string output. The member name will be present, but the 4575 // value will be replaced with "sensitive". 4576 func (s ValidationException) String() string { 4577 return awsutil.Prettify(s) 4578 } 4579 4580 // GoString returns the string representation. 4581 // 4582 // API parameter values that are decorated as "sensitive" in the API will not 4583 // be included in the string output. The member name will be present, but the 4584 // value will be replaced with "sensitive". 4585 func (s ValidationException) GoString() string { 4586 return s.String() 4587 } 4588 4589 func newErrorValidationException(v protocol.ResponseMetadata) error { 4590 return &ValidationException{ 4591 RespMetadata: v, 4592 } 4593 } 4594 4595 // Code returns the exception type name. 4596 func (s *ValidationException) Code() string { 4597 return "ValidationException" 4598 } 4599 4600 // Message returns the exception's message. 4601 func (s *ValidationException) Message() string { 4602 if s.Message_ != nil { 4603 return *s.Message_ 4604 } 4605 return "" 4606 } 4607 4608 // OrigErr always returns nil, satisfies awserr.Error interface. 4609 func (s *ValidationException) OrigErr() error { 4610 return nil 4611 } 4612 4613 func (s *ValidationException) Error() string { 4614 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4615 } 4616 4617 // Status code returns the HTTP status code for the request's response error. 4618 func (s *ValidationException) StatusCode() int { 4619 return s.RespMetadata.StatusCode 4620 } 4621 4622 // RequestID returns the service's response RequestID for request. 4623 func (s *ValidationException) RequestID() string { 4624 return s.RespMetadata.RequestID 4625 } 4626 4627 type WriteRecordsInput struct { 4628 _ struct{} `type:"structure"` 4629 4630 // A record containing the common measure and dimension attributes shared across 4631 // all the records in the request. The measure and dimension attributes specified 4632 // in here will be merged with the measure and dimension attributes in the records 4633 // object when the data is written into Timestream. 4634 CommonAttributes *Record `type:"structure"` 4635 4636 // The name of the Timestream database. 4637 // 4638 // DatabaseName is a required field 4639 DatabaseName *string `min:"3" type:"string" required:"true"` 4640 4641 // An array of records containing the unique dimension and measure attributes 4642 // for each time series data point. 4643 // 4644 // Records is a required field 4645 Records []*Record `min:"1" type:"list" required:"true"` 4646 4647 // The name of the Timesream table. 4648 // 4649 // TableName is a required field 4650 TableName *string `min:"3" type:"string" required:"true"` 4651 } 4652 4653 // String returns the string representation. 4654 // 4655 // API parameter values that are decorated as "sensitive" in the API will not 4656 // be included in the string output. The member name will be present, but the 4657 // value will be replaced with "sensitive". 4658 func (s WriteRecordsInput) String() string { 4659 return awsutil.Prettify(s) 4660 } 4661 4662 // GoString returns the string representation. 4663 // 4664 // API parameter values that are decorated as "sensitive" in the API will not 4665 // be included in the string output. The member name will be present, but the 4666 // value will be replaced with "sensitive". 4667 func (s WriteRecordsInput) GoString() string { 4668 return s.String() 4669 } 4670 4671 // Validate inspects the fields of the type to determine if they are valid. 4672 func (s *WriteRecordsInput) Validate() error { 4673 invalidParams := request.ErrInvalidParams{Context: "WriteRecordsInput"} 4674 if s.DatabaseName == nil { 4675 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 4676 } 4677 if s.DatabaseName != nil && len(*s.DatabaseName) < 3 { 4678 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 3)) 4679 } 4680 if s.Records == nil { 4681 invalidParams.Add(request.NewErrParamRequired("Records")) 4682 } 4683 if s.Records != nil && len(s.Records) < 1 { 4684 invalidParams.Add(request.NewErrParamMinLen("Records", 1)) 4685 } 4686 if s.TableName == nil { 4687 invalidParams.Add(request.NewErrParamRequired("TableName")) 4688 } 4689 if s.TableName != nil && len(*s.TableName) < 3 { 4690 invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) 4691 } 4692 if s.CommonAttributes != nil { 4693 if err := s.CommonAttributes.Validate(); err != nil { 4694 invalidParams.AddNested("CommonAttributes", err.(request.ErrInvalidParams)) 4695 } 4696 } 4697 if s.Records != nil { 4698 for i, v := range s.Records { 4699 if v == nil { 4700 continue 4701 } 4702 if err := v.Validate(); err != nil { 4703 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Records", i), err.(request.ErrInvalidParams)) 4704 } 4705 } 4706 } 4707 4708 if invalidParams.Len() > 0 { 4709 return invalidParams 4710 } 4711 return nil 4712 } 4713 4714 // SetCommonAttributes sets the CommonAttributes field's value. 4715 func (s *WriteRecordsInput) SetCommonAttributes(v *Record) *WriteRecordsInput { 4716 s.CommonAttributes = v 4717 return s 4718 } 4719 4720 // SetDatabaseName sets the DatabaseName field's value. 4721 func (s *WriteRecordsInput) SetDatabaseName(v string) *WriteRecordsInput { 4722 s.DatabaseName = &v 4723 return s 4724 } 4725 4726 // SetRecords sets the Records field's value. 4727 func (s *WriteRecordsInput) SetRecords(v []*Record) *WriteRecordsInput { 4728 s.Records = v 4729 return s 4730 } 4731 4732 // SetTableName sets the TableName field's value. 4733 func (s *WriteRecordsInput) SetTableName(v string) *WriteRecordsInput { 4734 s.TableName = &v 4735 return s 4736 } 4737 4738 type WriteRecordsOutput struct { 4739 _ struct{} `type:"structure"` 4740 } 4741 4742 // String returns the string representation. 4743 // 4744 // API parameter values that are decorated as "sensitive" in the API will not 4745 // be included in the string output. The member name will be present, but the 4746 // value will be replaced with "sensitive". 4747 func (s WriteRecordsOutput) String() string { 4748 return awsutil.Prettify(s) 4749 } 4750 4751 // GoString returns the string representation. 4752 // 4753 // API parameter values that are decorated as "sensitive" in the API will not 4754 // be included in the string output. The member name will be present, but the 4755 // value will be replaced with "sensitive". 4756 func (s WriteRecordsOutput) GoString() string { 4757 return s.String() 4758 } 4759 4760 const ( 4761 // DimensionValueTypeVarchar is a DimensionValueType enum value 4762 DimensionValueTypeVarchar = "VARCHAR" 4763 ) 4764 4765 // DimensionValueType_Values returns all elements of the DimensionValueType enum 4766 func DimensionValueType_Values() []string { 4767 return []string{ 4768 DimensionValueTypeVarchar, 4769 } 4770 } 4771 4772 const ( 4773 // MeasureValueTypeDouble is a MeasureValueType enum value 4774 MeasureValueTypeDouble = "DOUBLE" 4775 4776 // MeasureValueTypeBigint is a MeasureValueType enum value 4777 MeasureValueTypeBigint = "BIGINT" 4778 4779 // MeasureValueTypeVarchar is a MeasureValueType enum value 4780 MeasureValueTypeVarchar = "VARCHAR" 4781 4782 // MeasureValueTypeBoolean is a MeasureValueType enum value 4783 MeasureValueTypeBoolean = "BOOLEAN" 4784 ) 4785 4786 // MeasureValueType_Values returns all elements of the MeasureValueType enum 4787 func MeasureValueType_Values() []string { 4788 return []string{ 4789 MeasureValueTypeDouble, 4790 MeasureValueTypeBigint, 4791 MeasureValueTypeVarchar, 4792 MeasureValueTypeBoolean, 4793 } 4794 } 4795 4796 const ( 4797 // TableStatusActive is a TableStatus enum value 4798 TableStatusActive = "ACTIVE" 4799 4800 // TableStatusDeleting is a TableStatus enum value 4801 TableStatusDeleting = "DELETING" 4802 ) 4803 4804 // TableStatus_Values returns all elements of the TableStatus enum 4805 func TableStatus_Values() []string { 4806 return []string{ 4807 TableStatusActive, 4808 TableStatusDeleting, 4809 } 4810 } 4811 4812 const ( 4813 // TimeUnitMilliseconds is a TimeUnit enum value 4814 TimeUnitMilliseconds = "MILLISECONDS" 4815 4816 // TimeUnitSeconds is a TimeUnit enum value 4817 TimeUnitSeconds = "SECONDS" 4818 4819 // TimeUnitMicroseconds is a TimeUnit enum value 4820 TimeUnitMicroseconds = "MICROSECONDS" 4821 4822 // TimeUnitNanoseconds is a TimeUnit enum value 4823 TimeUnitNanoseconds = "NANOSECONDS" 4824 ) 4825 4826 // TimeUnit_Values returns all elements of the TimeUnit enum 4827 func TimeUnit_Values() []string { 4828 return []string{ 4829 TimeUnitMilliseconds, 4830 TimeUnitSeconds, 4831 TimeUnitMicroseconds, 4832 TimeUnitNanoseconds, 4833 } 4834 }