github.com/aavshr/aws-sdk-go@v1.41.3/service/redshiftdataapiservice/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package redshiftdataapiservice 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 ) 14 15 const opBatchExecuteStatement = "BatchExecuteStatement" 16 17 // BatchExecuteStatementRequest generates a "aws/request.Request" representing the 18 // client's request for the BatchExecuteStatement operation. The "output" return 19 // value will be populated with the request's response once the request completes 20 // successfully. 21 // 22 // Use "Send" method on the returned Request to send the API call to the service. 23 // the "output" return value is not valid until after Send returns without error. 24 // 25 // See BatchExecuteStatement for more information on using the BatchExecuteStatement 26 // API call, and error handling. 27 // 28 // This method is useful when you want to inject custom logic or configuration 29 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 30 // 31 // 32 // // Example sending a request using the BatchExecuteStatementRequest method. 33 // req, resp := client.BatchExecuteStatementRequest(params) 34 // 35 // err := req.Send() 36 // if err == nil { // resp is now filled 37 // fmt.Println(resp) 38 // } 39 // 40 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/BatchExecuteStatement 41 func (c *RedshiftDataAPIService) BatchExecuteStatementRequest(input *BatchExecuteStatementInput) (req *request.Request, output *BatchExecuteStatementOutput) { 42 op := &request.Operation{ 43 Name: opBatchExecuteStatement, 44 HTTPMethod: "POST", 45 HTTPPath: "/", 46 } 47 48 if input == nil { 49 input = &BatchExecuteStatementInput{} 50 } 51 52 output = &BatchExecuteStatementOutput{} 53 req = c.newRequest(op, input, output) 54 return 55 } 56 57 // BatchExecuteStatement API operation for Redshift Data API Service. 58 // 59 // Runs one or more SQL statements, which can be data manipulation language 60 // (DML) or data definition language (DDL). Depending on the authorization method, 61 // use one of the following combinations of request parameters: 62 // 63 // * Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, 64 // the database name, and the cluster identifier that matches the cluster 65 // in the secret. 66 // 67 // * Temporary credentials - specify the cluster identifier, the database 68 // name, and the database user name. Permission to call the redshift:GetClusterCredentials 69 // operation is required to use this method. 70 // 71 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 72 // with awserr.Error's Code and Message methods to get detailed information about 73 // the error. 74 // 75 // See the AWS API reference guide for Redshift Data API Service's 76 // API operation BatchExecuteStatement for usage and error information. 77 // 78 // Returned Error Types: 79 // * ValidationException 80 // The Amazon Redshift Data API operation failed due to invalid input. 81 // 82 // * ActiveStatementsExceededException 83 // The number of active statements exceeds the limit. 84 // 85 // * BatchExecuteStatementException 86 // An SQL statement encountered an environmental error while running. 87 // 88 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/BatchExecuteStatement 89 func (c *RedshiftDataAPIService) BatchExecuteStatement(input *BatchExecuteStatementInput) (*BatchExecuteStatementOutput, error) { 90 req, out := c.BatchExecuteStatementRequest(input) 91 return out, req.Send() 92 } 93 94 // BatchExecuteStatementWithContext is the same as BatchExecuteStatement with the addition of 95 // the ability to pass a context and additional request options. 96 // 97 // See BatchExecuteStatement for details on how to use this API operation. 98 // 99 // The context must be non-nil and will be used for request cancellation. If 100 // the context is nil a panic will occur. In the future the SDK may create 101 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 102 // for more information on using Contexts. 103 func (c *RedshiftDataAPIService) BatchExecuteStatementWithContext(ctx aws.Context, input *BatchExecuteStatementInput, opts ...request.Option) (*BatchExecuteStatementOutput, error) { 104 req, out := c.BatchExecuteStatementRequest(input) 105 req.SetContext(ctx) 106 req.ApplyOptions(opts...) 107 return out, req.Send() 108 } 109 110 const opCancelStatement = "CancelStatement" 111 112 // CancelStatementRequest generates a "aws/request.Request" representing the 113 // client's request for the CancelStatement operation. The "output" return 114 // value will be populated with the request's response once the request completes 115 // successfully. 116 // 117 // Use "Send" method on the returned Request to send the API call to the service. 118 // the "output" return value is not valid until after Send returns without error. 119 // 120 // See CancelStatement for more information on using the CancelStatement 121 // API call, and error handling. 122 // 123 // This method is useful when you want to inject custom logic or configuration 124 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 125 // 126 // 127 // // Example sending a request using the CancelStatementRequest method. 128 // req, resp := client.CancelStatementRequest(params) 129 // 130 // err := req.Send() 131 // if err == nil { // resp is now filled 132 // fmt.Println(resp) 133 // } 134 // 135 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/CancelStatement 136 func (c *RedshiftDataAPIService) CancelStatementRequest(input *CancelStatementInput) (req *request.Request, output *CancelStatementOutput) { 137 op := &request.Operation{ 138 Name: opCancelStatement, 139 HTTPMethod: "POST", 140 HTTPPath: "/", 141 } 142 143 if input == nil { 144 input = &CancelStatementInput{} 145 } 146 147 output = &CancelStatementOutput{} 148 req = c.newRequest(op, input, output) 149 return 150 } 151 152 // CancelStatement API operation for Redshift Data API Service. 153 // 154 // Cancels a running query. To be canceled, a query must be running. 155 // 156 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 157 // with awserr.Error's Code and Message methods to get detailed information about 158 // the error. 159 // 160 // See the AWS API reference guide for Redshift Data API Service's 161 // API operation CancelStatement for usage and error information. 162 // 163 // Returned Error Types: 164 // * ValidationException 165 // The Amazon Redshift Data API operation failed due to invalid input. 166 // 167 // * ResourceNotFoundException 168 // The Amazon Redshift Data API operation failed due to a missing resource. 169 // 170 // * InternalServerException 171 // The Amazon Redshift Data API operation failed due to invalid input. 172 // 173 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/CancelStatement 174 func (c *RedshiftDataAPIService) CancelStatement(input *CancelStatementInput) (*CancelStatementOutput, error) { 175 req, out := c.CancelStatementRequest(input) 176 return out, req.Send() 177 } 178 179 // CancelStatementWithContext is the same as CancelStatement with the addition of 180 // the ability to pass a context and additional request options. 181 // 182 // See CancelStatement for details on how to use this API operation. 183 // 184 // The context must be non-nil and will be used for request cancellation. If 185 // the context is nil a panic will occur. In the future the SDK may create 186 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 187 // for more information on using Contexts. 188 func (c *RedshiftDataAPIService) CancelStatementWithContext(ctx aws.Context, input *CancelStatementInput, opts ...request.Option) (*CancelStatementOutput, error) { 189 req, out := c.CancelStatementRequest(input) 190 req.SetContext(ctx) 191 req.ApplyOptions(opts...) 192 return out, req.Send() 193 } 194 195 const opDescribeStatement = "DescribeStatement" 196 197 // DescribeStatementRequest generates a "aws/request.Request" representing the 198 // client's request for the DescribeStatement operation. The "output" return 199 // value will be populated with the request's response once the request completes 200 // successfully. 201 // 202 // Use "Send" method on the returned Request to send the API call to the service. 203 // the "output" return value is not valid until after Send returns without error. 204 // 205 // See DescribeStatement for more information on using the DescribeStatement 206 // API call, and error handling. 207 // 208 // This method is useful when you want to inject custom logic or configuration 209 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 210 // 211 // 212 // // Example sending a request using the DescribeStatementRequest method. 213 // req, resp := client.DescribeStatementRequest(params) 214 // 215 // err := req.Send() 216 // if err == nil { // resp is now filled 217 // fmt.Println(resp) 218 // } 219 // 220 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeStatement 221 func (c *RedshiftDataAPIService) DescribeStatementRequest(input *DescribeStatementInput) (req *request.Request, output *DescribeStatementOutput) { 222 op := &request.Operation{ 223 Name: opDescribeStatement, 224 HTTPMethod: "POST", 225 HTTPPath: "/", 226 } 227 228 if input == nil { 229 input = &DescribeStatementInput{} 230 } 231 232 output = &DescribeStatementOutput{} 233 req = c.newRequest(op, input, output) 234 return 235 } 236 237 // DescribeStatement API operation for Redshift Data API Service. 238 // 239 // Describes the details about a specific instance when a query was run by the 240 // Amazon Redshift Data API. The information includes when the query started, 241 // when it finished, the query status, the number of rows returned, and the 242 // SQL statement. 243 // 244 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 245 // with awserr.Error's Code and Message methods to get detailed information about 246 // the error. 247 // 248 // See the AWS API reference guide for Redshift Data API Service's 249 // API operation DescribeStatement for usage and error information. 250 // 251 // Returned Error Types: 252 // * ValidationException 253 // The Amazon Redshift Data API operation failed due to invalid input. 254 // 255 // * ResourceNotFoundException 256 // The Amazon Redshift Data API operation failed due to a missing resource. 257 // 258 // * InternalServerException 259 // The Amazon Redshift Data API operation failed due to invalid input. 260 // 261 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeStatement 262 func (c *RedshiftDataAPIService) DescribeStatement(input *DescribeStatementInput) (*DescribeStatementOutput, error) { 263 req, out := c.DescribeStatementRequest(input) 264 return out, req.Send() 265 } 266 267 // DescribeStatementWithContext is the same as DescribeStatement with the addition of 268 // the ability to pass a context and additional request options. 269 // 270 // See DescribeStatement for details on how to use this API operation. 271 // 272 // The context must be non-nil and will be used for request cancellation. If 273 // the context is nil a panic will occur. In the future the SDK may create 274 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 275 // for more information on using Contexts. 276 func (c *RedshiftDataAPIService) DescribeStatementWithContext(ctx aws.Context, input *DescribeStatementInput, opts ...request.Option) (*DescribeStatementOutput, error) { 277 req, out := c.DescribeStatementRequest(input) 278 req.SetContext(ctx) 279 req.ApplyOptions(opts...) 280 return out, req.Send() 281 } 282 283 const opDescribeTable = "DescribeTable" 284 285 // DescribeTableRequest generates a "aws/request.Request" representing the 286 // client's request for the DescribeTable operation. The "output" return 287 // value will be populated with the request's response once the request completes 288 // successfully. 289 // 290 // Use "Send" method on the returned Request to send the API call to the service. 291 // the "output" return value is not valid until after Send returns without error. 292 // 293 // See DescribeTable for more information on using the DescribeTable 294 // API call, and error handling. 295 // 296 // This method is useful when you want to inject custom logic or configuration 297 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 298 // 299 // 300 // // Example sending a request using the DescribeTableRequest method. 301 // req, resp := client.DescribeTableRequest(params) 302 // 303 // err := req.Send() 304 // if err == nil { // resp is now filled 305 // fmt.Println(resp) 306 // } 307 // 308 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeTable 309 func (c *RedshiftDataAPIService) DescribeTableRequest(input *DescribeTableInput) (req *request.Request, output *DescribeTableOutput) { 310 op := &request.Operation{ 311 Name: opDescribeTable, 312 HTTPMethod: "POST", 313 HTTPPath: "/", 314 Paginator: &request.Paginator{ 315 InputTokens: []string{"NextToken"}, 316 OutputTokens: []string{"NextToken"}, 317 LimitToken: "MaxResults", 318 TruncationToken: "", 319 }, 320 } 321 322 if input == nil { 323 input = &DescribeTableInput{} 324 } 325 326 output = &DescribeTableOutput{} 327 req = c.newRequest(op, input, output) 328 return 329 } 330 331 // DescribeTable API operation for Redshift Data API Service. 332 // 333 // Describes the detailed information about a table from metadata in the cluster. 334 // The information includes its columns. A token is returned to page through 335 // the column list. Depending on the authorization method, use one of the following 336 // combinations of request parameters: 337 // 338 // * Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, 339 // the database name, and the cluster identifier that matches the cluster 340 // in the secret. 341 // 342 // * Temporary credentials - specify the cluster identifier, the database 343 // name, and the database user name. Permission to call the redshift:GetClusterCredentials 344 // operation is required to use this method. 345 // 346 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 347 // with awserr.Error's Code and Message methods to get detailed information about 348 // the error. 349 // 350 // See the AWS API reference guide for Redshift Data API Service's 351 // API operation DescribeTable for usage and error information. 352 // 353 // Returned Error Types: 354 // * ValidationException 355 // The Amazon Redshift Data API operation failed due to invalid input. 356 // 357 // * InternalServerException 358 // The Amazon Redshift Data API operation failed due to invalid input. 359 // 360 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeTable 361 func (c *RedshiftDataAPIService) DescribeTable(input *DescribeTableInput) (*DescribeTableOutput, error) { 362 req, out := c.DescribeTableRequest(input) 363 return out, req.Send() 364 } 365 366 // DescribeTableWithContext is the same as DescribeTable with the addition of 367 // the ability to pass a context and additional request options. 368 // 369 // See DescribeTable for details on how to use this API operation. 370 // 371 // The context must be non-nil and will be used for request cancellation. If 372 // the context is nil a panic will occur. In the future the SDK may create 373 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 374 // for more information on using Contexts. 375 func (c *RedshiftDataAPIService) DescribeTableWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.Option) (*DescribeTableOutput, error) { 376 req, out := c.DescribeTableRequest(input) 377 req.SetContext(ctx) 378 req.ApplyOptions(opts...) 379 return out, req.Send() 380 } 381 382 // DescribeTablePages iterates over the pages of a DescribeTable operation, 383 // calling the "fn" function with the response data for each page. To stop 384 // iterating, return false from the fn function. 385 // 386 // See DescribeTable method for more information on how to use this operation. 387 // 388 // Note: This operation can generate multiple requests to a service. 389 // 390 // // Example iterating over at most 3 pages of a DescribeTable operation. 391 // pageNum := 0 392 // err := client.DescribeTablePages(params, 393 // func(page *redshiftdataapiservice.DescribeTableOutput, lastPage bool) bool { 394 // pageNum++ 395 // fmt.Println(page) 396 // return pageNum <= 3 397 // }) 398 // 399 func (c *RedshiftDataAPIService) DescribeTablePages(input *DescribeTableInput, fn func(*DescribeTableOutput, bool) bool) error { 400 return c.DescribeTablePagesWithContext(aws.BackgroundContext(), input, fn) 401 } 402 403 // DescribeTablePagesWithContext same as DescribeTablePages except 404 // it takes a Context and allows setting request options on the pages. 405 // 406 // The context must be non-nil and will be used for request cancellation. If 407 // the context is nil a panic will occur. In the future the SDK may create 408 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 409 // for more information on using Contexts. 410 func (c *RedshiftDataAPIService) DescribeTablePagesWithContext(ctx aws.Context, input *DescribeTableInput, fn func(*DescribeTableOutput, bool) bool, opts ...request.Option) error { 411 p := request.Pagination{ 412 NewRequest: func() (*request.Request, error) { 413 var inCpy *DescribeTableInput 414 if input != nil { 415 tmp := *input 416 inCpy = &tmp 417 } 418 req, _ := c.DescribeTableRequest(inCpy) 419 req.SetContext(ctx) 420 req.ApplyOptions(opts...) 421 return req, nil 422 }, 423 } 424 425 for p.Next() { 426 if !fn(p.Page().(*DescribeTableOutput), !p.HasNextPage()) { 427 break 428 } 429 } 430 431 return p.Err() 432 } 433 434 const opExecuteStatement = "ExecuteStatement" 435 436 // ExecuteStatementRequest generates a "aws/request.Request" representing the 437 // client's request for the ExecuteStatement operation. The "output" return 438 // value will be populated with the request's response once the request completes 439 // successfully. 440 // 441 // Use "Send" method on the returned Request to send the API call to the service. 442 // the "output" return value is not valid until after Send returns without error. 443 // 444 // See ExecuteStatement for more information on using the ExecuteStatement 445 // API call, and error handling. 446 // 447 // This method is useful when you want to inject custom logic or configuration 448 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 449 // 450 // 451 // // Example sending a request using the ExecuteStatementRequest method. 452 // req, resp := client.ExecuteStatementRequest(params) 453 // 454 // err := req.Send() 455 // if err == nil { // resp is now filled 456 // fmt.Println(resp) 457 // } 458 // 459 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ExecuteStatement 460 func (c *RedshiftDataAPIService) ExecuteStatementRequest(input *ExecuteStatementInput) (req *request.Request, output *ExecuteStatementOutput) { 461 op := &request.Operation{ 462 Name: opExecuteStatement, 463 HTTPMethod: "POST", 464 HTTPPath: "/", 465 } 466 467 if input == nil { 468 input = &ExecuteStatementInput{} 469 } 470 471 output = &ExecuteStatementOutput{} 472 req = c.newRequest(op, input, output) 473 return 474 } 475 476 // ExecuteStatement API operation for Redshift Data API Service. 477 // 478 // Runs an SQL statement, which can be data manipulation language (DML) or data 479 // definition language (DDL). This statement must be a single SQL statement. 480 // Depending on the authorization method, use one of the following combinations 481 // of request parameters: 482 // 483 // * Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, 484 // the database name, and the cluster identifier that matches the cluster 485 // in the secret. 486 // 487 // * Temporary credentials - specify the cluster identifier, the database 488 // name, and the database user name. Permission to call the redshift:GetClusterCredentials 489 // operation is required to use this method. 490 // 491 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 492 // with awserr.Error's Code and Message methods to get detailed information about 493 // the error. 494 // 495 // See the AWS API reference guide for Redshift Data API Service's 496 // API operation ExecuteStatement for usage and error information. 497 // 498 // Returned Error Types: 499 // * ValidationException 500 // The Amazon Redshift Data API operation failed due to invalid input. 501 // 502 // * ExecuteStatementException 503 // The SQL statement encountered an environmental error while running. 504 // 505 // * ActiveStatementsExceededException 506 // The number of active statements exceeds the limit. 507 // 508 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ExecuteStatement 509 func (c *RedshiftDataAPIService) ExecuteStatement(input *ExecuteStatementInput) (*ExecuteStatementOutput, error) { 510 req, out := c.ExecuteStatementRequest(input) 511 return out, req.Send() 512 } 513 514 // ExecuteStatementWithContext is the same as ExecuteStatement with the addition of 515 // the ability to pass a context and additional request options. 516 // 517 // See ExecuteStatement for details on how to use this API operation. 518 // 519 // The context must be non-nil and will be used for request cancellation. If 520 // the context is nil a panic will occur. In the future the SDK may create 521 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 522 // for more information on using Contexts. 523 func (c *RedshiftDataAPIService) ExecuteStatementWithContext(ctx aws.Context, input *ExecuteStatementInput, opts ...request.Option) (*ExecuteStatementOutput, error) { 524 req, out := c.ExecuteStatementRequest(input) 525 req.SetContext(ctx) 526 req.ApplyOptions(opts...) 527 return out, req.Send() 528 } 529 530 const opGetStatementResult = "GetStatementResult" 531 532 // GetStatementResultRequest generates a "aws/request.Request" representing the 533 // client's request for the GetStatementResult operation. The "output" return 534 // value will be populated with the request's response once the request completes 535 // successfully. 536 // 537 // Use "Send" method on the returned Request to send the API call to the service. 538 // the "output" return value is not valid until after Send returns without error. 539 // 540 // See GetStatementResult for more information on using the GetStatementResult 541 // API call, and error handling. 542 // 543 // This method is useful when you want to inject custom logic or configuration 544 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 545 // 546 // 547 // // Example sending a request using the GetStatementResultRequest method. 548 // req, resp := client.GetStatementResultRequest(params) 549 // 550 // err := req.Send() 551 // if err == nil { // resp is now filled 552 // fmt.Println(resp) 553 // } 554 // 555 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/GetStatementResult 556 func (c *RedshiftDataAPIService) GetStatementResultRequest(input *GetStatementResultInput) (req *request.Request, output *GetStatementResultOutput) { 557 op := &request.Operation{ 558 Name: opGetStatementResult, 559 HTTPMethod: "POST", 560 HTTPPath: "/", 561 Paginator: &request.Paginator{ 562 InputTokens: []string{"NextToken"}, 563 OutputTokens: []string{"NextToken"}, 564 LimitToken: "", 565 TruncationToken: "", 566 }, 567 } 568 569 if input == nil { 570 input = &GetStatementResultInput{} 571 } 572 573 output = &GetStatementResultOutput{} 574 req = c.newRequest(op, input, output) 575 return 576 } 577 578 // GetStatementResult API operation for Redshift Data API Service. 579 // 580 // Fetches the temporarily cached result of an SQL statement. A token is returned 581 // to page through the statement results. 582 // 583 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 584 // with awserr.Error's Code and Message methods to get detailed information about 585 // the error. 586 // 587 // See the AWS API reference guide for Redshift Data API Service's 588 // API operation GetStatementResult for usage and error information. 589 // 590 // Returned Error Types: 591 // * ValidationException 592 // The Amazon Redshift Data API operation failed due to invalid input. 593 // 594 // * ResourceNotFoundException 595 // The Amazon Redshift Data API operation failed due to a missing resource. 596 // 597 // * InternalServerException 598 // The Amazon Redshift Data API operation failed due to invalid input. 599 // 600 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/GetStatementResult 601 func (c *RedshiftDataAPIService) GetStatementResult(input *GetStatementResultInput) (*GetStatementResultOutput, error) { 602 req, out := c.GetStatementResultRequest(input) 603 return out, req.Send() 604 } 605 606 // GetStatementResultWithContext is the same as GetStatementResult with the addition of 607 // the ability to pass a context and additional request options. 608 // 609 // See GetStatementResult for details on how to use this API operation. 610 // 611 // The context must be non-nil and will be used for request cancellation. If 612 // the context is nil a panic will occur. In the future the SDK may create 613 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 614 // for more information on using Contexts. 615 func (c *RedshiftDataAPIService) GetStatementResultWithContext(ctx aws.Context, input *GetStatementResultInput, opts ...request.Option) (*GetStatementResultOutput, error) { 616 req, out := c.GetStatementResultRequest(input) 617 req.SetContext(ctx) 618 req.ApplyOptions(opts...) 619 return out, req.Send() 620 } 621 622 // GetStatementResultPages iterates over the pages of a GetStatementResult operation, 623 // calling the "fn" function with the response data for each page. To stop 624 // iterating, return false from the fn function. 625 // 626 // See GetStatementResult method for more information on how to use this operation. 627 // 628 // Note: This operation can generate multiple requests to a service. 629 // 630 // // Example iterating over at most 3 pages of a GetStatementResult operation. 631 // pageNum := 0 632 // err := client.GetStatementResultPages(params, 633 // func(page *redshiftdataapiservice.GetStatementResultOutput, lastPage bool) bool { 634 // pageNum++ 635 // fmt.Println(page) 636 // return pageNum <= 3 637 // }) 638 // 639 func (c *RedshiftDataAPIService) GetStatementResultPages(input *GetStatementResultInput, fn func(*GetStatementResultOutput, bool) bool) error { 640 return c.GetStatementResultPagesWithContext(aws.BackgroundContext(), input, fn) 641 } 642 643 // GetStatementResultPagesWithContext same as GetStatementResultPages except 644 // it takes a Context and allows setting request options on the pages. 645 // 646 // The context must be non-nil and will be used for request cancellation. If 647 // the context is nil a panic will occur. In the future the SDK may create 648 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 649 // for more information on using Contexts. 650 func (c *RedshiftDataAPIService) GetStatementResultPagesWithContext(ctx aws.Context, input *GetStatementResultInput, fn func(*GetStatementResultOutput, bool) bool, opts ...request.Option) error { 651 p := request.Pagination{ 652 NewRequest: func() (*request.Request, error) { 653 var inCpy *GetStatementResultInput 654 if input != nil { 655 tmp := *input 656 inCpy = &tmp 657 } 658 req, _ := c.GetStatementResultRequest(inCpy) 659 req.SetContext(ctx) 660 req.ApplyOptions(opts...) 661 return req, nil 662 }, 663 } 664 665 for p.Next() { 666 if !fn(p.Page().(*GetStatementResultOutput), !p.HasNextPage()) { 667 break 668 } 669 } 670 671 return p.Err() 672 } 673 674 const opListDatabases = "ListDatabases" 675 676 // ListDatabasesRequest generates a "aws/request.Request" representing the 677 // client's request for the ListDatabases operation. The "output" return 678 // value will be populated with the request's response once the request completes 679 // successfully. 680 // 681 // Use "Send" method on the returned Request to send the API call to the service. 682 // the "output" return value is not valid until after Send returns without error. 683 // 684 // See ListDatabases for more information on using the ListDatabases 685 // API call, and error handling. 686 // 687 // This method is useful when you want to inject custom logic or configuration 688 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 689 // 690 // 691 // // Example sending a request using the ListDatabasesRequest method. 692 // req, resp := client.ListDatabasesRequest(params) 693 // 694 // err := req.Send() 695 // if err == nil { // resp is now filled 696 // fmt.Println(resp) 697 // } 698 // 699 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListDatabases 700 func (c *RedshiftDataAPIService) ListDatabasesRequest(input *ListDatabasesInput) (req *request.Request, output *ListDatabasesOutput) { 701 op := &request.Operation{ 702 Name: opListDatabases, 703 HTTPMethod: "POST", 704 HTTPPath: "/", 705 Paginator: &request.Paginator{ 706 InputTokens: []string{"NextToken"}, 707 OutputTokens: []string{"NextToken"}, 708 LimitToken: "MaxResults", 709 TruncationToken: "", 710 }, 711 } 712 713 if input == nil { 714 input = &ListDatabasesInput{} 715 } 716 717 output = &ListDatabasesOutput{} 718 req = c.newRequest(op, input, output) 719 return 720 } 721 722 // ListDatabases API operation for Redshift Data API Service. 723 // 724 // List the databases in a cluster. A token is returned to page through the 725 // database list. Depending on the authorization method, use one of the following 726 // combinations of request parameters: 727 // 728 // * Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, 729 // the database name, and the cluster identifier that matches the cluster 730 // in the secret. 731 // 732 // * Temporary credentials - specify the cluster identifier, the database 733 // name, and the database user name. Permission to call the redshift:GetClusterCredentials 734 // operation is required to use this method. 735 // 736 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 737 // with awserr.Error's Code and Message methods to get detailed information about 738 // the error. 739 // 740 // See the AWS API reference guide for Redshift Data API Service's 741 // API operation ListDatabases for usage and error information. 742 // 743 // Returned Error Types: 744 // * ValidationException 745 // The Amazon Redshift Data API operation failed due to invalid input. 746 // 747 // * InternalServerException 748 // The Amazon Redshift Data API operation failed due to invalid input. 749 // 750 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListDatabases 751 func (c *RedshiftDataAPIService) ListDatabases(input *ListDatabasesInput) (*ListDatabasesOutput, error) { 752 req, out := c.ListDatabasesRequest(input) 753 return out, req.Send() 754 } 755 756 // ListDatabasesWithContext is the same as ListDatabases with the addition of 757 // the ability to pass a context and additional request options. 758 // 759 // See ListDatabases for details on how to use this API operation. 760 // 761 // The context must be non-nil and will be used for request cancellation. If 762 // the context is nil a panic will occur. In the future the SDK may create 763 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 764 // for more information on using Contexts. 765 func (c *RedshiftDataAPIService) ListDatabasesWithContext(ctx aws.Context, input *ListDatabasesInput, opts ...request.Option) (*ListDatabasesOutput, error) { 766 req, out := c.ListDatabasesRequest(input) 767 req.SetContext(ctx) 768 req.ApplyOptions(opts...) 769 return out, req.Send() 770 } 771 772 // ListDatabasesPages iterates over the pages of a ListDatabases operation, 773 // calling the "fn" function with the response data for each page. To stop 774 // iterating, return false from the fn function. 775 // 776 // See ListDatabases method for more information on how to use this operation. 777 // 778 // Note: This operation can generate multiple requests to a service. 779 // 780 // // Example iterating over at most 3 pages of a ListDatabases operation. 781 // pageNum := 0 782 // err := client.ListDatabasesPages(params, 783 // func(page *redshiftdataapiservice.ListDatabasesOutput, lastPage bool) bool { 784 // pageNum++ 785 // fmt.Println(page) 786 // return pageNum <= 3 787 // }) 788 // 789 func (c *RedshiftDataAPIService) ListDatabasesPages(input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool) error { 790 return c.ListDatabasesPagesWithContext(aws.BackgroundContext(), input, fn) 791 } 792 793 // ListDatabasesPagesWithContext same as ListDatabasesPages except 794 // it takes a Context and allows setting request options on the pages. 795 // 796 // The context must be non-nil and will be used for request cancellation. If 797 // the context is nil a panic will occur. In the future the SDK may create 798 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 799 // for more information on using Contexts. 800 func (c *RedshiftDataAPIService) ListDatabasesPagesWithContext(ctx aws.Context, input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool, opts ...request.Option) error { 801 p := request.Pagination{ 802 NewRequest: func() (*request.Request, error) { 803 var inCpy *ListDatabasesInput 804 if input != nil { 805 tmp := *input 806 inCpy = &tmp 807 } 808 req, _ := c.ListDatabasesRequest(inCpy) 809 req.SetContext(ctx) 810 req.ApplyOptions(opts...) 811 return req, nil 812 }, 813 } 814 815 for p.Next() { 816 if !fn(p.Page().(*ListDatabasesOutput), !p.HasNextPage()) { 817 break 818 } 819 } 820 821 return p.Err() 822 } 823 824 const opListSchemas = "ListSchemas" 825 826 // ListSchemasRequest generates a "aws/request.Request" representing the 827 // client's request for the ListSchemas operation. The "output" return 828 // value will be populated with the request's response once the request completes 829 // successfully. 830 // 831 // Use "Send" method on the returned Request to send the API call to the service. 832 // the "output" return value is not valid until after Send returns without error. 833 // 834 // See ListSchemas for more information on using the ListSchemas 835 // API call, and error handling. 836 // 837 // This method is useful when you want to inject custom logic or configuration 838 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 839 // 840 // 841 // // Example sending a request using the ListSchemasRequest method. 842 // req, resp := client.ListSchemasRequest(params) 843 // 844 // err := req.Send() 845 // if err == nil { // resp is now filled 846 // fmt.Println(resp) 847 // } 848 // 849 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListSchemas 850 func (c *RedshiftDataAPIService) ListSchemasRequest(input *ListSchemasInput) (req *request.Request, output *ListSchemasOutput) { 851 op := &request.Operation{ 852 Name: opListSchemas, 853 HTTPMethod: "POST", 854 HTTPPath: "/", 855 Paginator: &request.Paginator{ 856 InputTokens: []string{"NextToken"}, 857 OutputTokens: []string{"NextToken"}, 858 LimitToken: "MaxResults", 859 TruncationToken: "", 860 }, 861 } 862 863 if input == nil { 864 input = &ListSchemasInput{} 865 } 866 867 output = &ListSchemasOutput{} 868 req = c.newRequest(op, input, output) 869 return 870 } 871 872 // ListSchemas API operation for Redshift Data API Service. 873 // 874 // Lists the schemas in a database. A token is returned to page through the 875 // schema list. Depending on the authorization method, use one of the following 876 // combinations of request parameters: 877 // 878 // * Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, 879 // the database name, and the cluster identifier that matches the cluster 880 // in the secret. 881 // 882 // * Temporary credentials - specify the cluster identifier, the database 883 // name, and the database user name. Permission to call the redshift:GetClusterCredentials 884 // operation is required to use this method. 885 // 886 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 887 // with awserr.Error's Code and Message methods to get detailed information about 888 // the error. 889 // 890 // See the AWS API reference guide for Redshift Data API Service's 891 // API operation ListSchemas for usage and error information. 892 // 893 // Returned Error Types: 894 // * ValidationException 895 // The Amazon Redshift Data API operation failed due to invalid input. 896 // 897 // * InternalServerException 898 // The Amazon Redshift Data API operation failed due to invalid input. 899 // 900 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListSchemas 901 func (c *RedshiftDataAPIService) ListSchemas(input *ListSchemasInput) (*ListSchemasOutput, error) { 902 req, out := c.ListSchemasRequest(input) 903 return out, req.Send() 904 } 905 906 // ListSchemasWithContext is the same as ListSchemas with the addition of 907 // the ability to pass a context and additional request options. 908 // 909 // See ListSchemas for details on how to use this API operation. 910 // 911 // The context must be non-nil and will be used for request cancellation. If 912 // the context is nil a panic will occur. In the future the SDK may create 913 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 914 // for more information on using Contexts. 915 func (c *RedshiftDataAPIService) ListSchemasWithContext(ctx aws.Context, input *ListSchemasInput, opts ...request.Option) (*ListSchemasOutput, error) { 916 req, out := c.ListSchemasRequest(input) 917 req.SetContext(ctx) 918 req.ApplyOptions(opts...) 919 return out, req.Send() 920 } 921 922 // ListSchemasPages iterates over the pages of a ListSchemas operation, 923 // calling the "fn" function with the response data for each page. To stop 924 // iterating, return false from the fn function. 925 // 926 // See ListSchemas method for more information on how to use this operation. 927 // 928 // Note: This operation can generate multiple requests to a service. 929 // 930 // // Example iterating over at most 3 pages of a ListSchemas operation. 931 // pageNum := 0 932 // err := client.ListSchemasPages(params, 933 // func(page *redshiftdataapiservice.ListSchemasOutput, lastPage bool) bool { 934 // pageNum++ 935 // fmt.Println(page) 936 // return pageNum <= 3 937 // }) 938 // 939 func (c *RedshiftDataAPIService) ListSchemasPages(input *ListSchemasInput, fn func(*ListSchemasOutput, bool) bool) error { 940 return c.ListSchemasPagesWithContext(aws.BackgroundContext(), input, fn) 941 } 942 943 // ListSchemasPagesWithContext same as ListSchemasPages except 944 // it takes a Context and allows setting request options on the pages. 945 // 946 // The context must be non-nil and will be used for request cancellation. If 947 // the context is nil a panic will occur. In the future the SDK may create 948 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 949 // for more information on using Contexts. 950 func (c *RedshiftDataAPIService) ListSchemasPagesWithContext(ctx aws.Context, input *ListSchemasInput, fn func(*ListSchemasOutput, bool) bool, opts ...request.Option) error { 951 p := request.Pagination{ 952 NewRequest: func() (*request.Request, error) { 953 var inCpy *ListSchemasInput 954 if input != nil { 955 tmp := *input 956 inCpy = &tmp 957 } 958 req, _ := c.ListSchemasRequest(inCpy) 959 req.SetContext(ctx) 960 req.ApplyOptions(opts...) 961 return req, nil 962 }, 963 } 964 965 for p.Next() { 966 if !fn(p.Page().(*ListSchemasOutput), !p.HasNextPage()) { 967 break 968 } 969 } 970 971 return p.Err() 972 } 973 974 const opListStatements = "ListStatements" 975 976 // ListStatementsRequest generates a "aws/request.Request" representing the 977 // client's request for the ListStatements operation. The "output" return 978 // value will be populated with the request's response once the request completes 979 // successfully. 980 // 981 // Use "Send" method on the returned Request to send the API call to the service. 982 // the "output" return value is not valid until after Send returns without error. 983 // 984 // See ListStatements for more information on using the ListStatements 985 // API call, and error handling. 986 // 987 // This method is useful when you want to inject custom logic or configuration 988 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 989 // 990 // 991 // // Example sending a request using the ListStatementsRequest method. 992 // req, resp := client.ListStatementsRequest(params) 993 // 994 // err := req.Send() 995 // if err == nil { // resp is now filled 996 // fmt.Println(resp) 997 // } 998 // 999 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListStatements 1000 func (c *RedshiftDataAPIService) ListStatementsRequest(input *ListStatementsInput) (req *request.Request, output *ListStatementsOutput) { 1001 op := &request.Operation{ 1002 Name: opListStatements, 1003 HTTPMethod: "POST", 1004 HTTPPath: "/", 1005 Paginator: &request.Paginator{ 1006 InputTokens: []string{"NextToken"}, 1007 OutputTokens: []string{"NextToken"}, 1008 LimitToken: "MaxResults", 1009 TruncationToken: "", 1010 }, 1011 } 1012 1013 if input == nil { 1014 input = &ListStatementsInput{} 1015 } 1016 1017 output = &ListStatementsOutput{} 1018 req = c.newRequest(op, input, output) 1019 return 1020 } 1021 1022 // ListStatements API operation for Redshift Data API Service. 1023 // 1024 // List of SQL statements. By default, only finished statements are shown. A 1025 // token is returned to page through the statement list. 1026 // 1027 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1028 // with awserr.Error's Code and Message methods to get detailed information about 1029 // the error. 1030 // 1031 // See the AWS API reference guide for Redshift Data API Service's 1032 // API operation ListStatements for usage and error information. 1033 // 1034 // Returned Error Types: 1035 // * ValidationException 1036 // The Amazon Redshift Data API operation failed due to invalid input. 1037 // 1038 // * InternalServerException 1039 // The Amazon Redshift Data API operation failed due to invalid input. 1040 // 1041 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListStatements 1042 func (c *RedshiftDataAPIService) ListStatements(input *ListStatementsInput) (*ListStatementsOutput, error) { 1043 req, out := c.ListStatementsRequest(input) 1044 return out, req.Send() 1045 } 1046 1047 // ListStatementsWithContext is the same as ListStatements with the addition of 1048 // the ability to pass a context and additional request options. 1049 // 1050 // See ListStatements for details on how to use this API operation. 1051 // 1052 // The context must be non-nil and will be used for request cancellation. If 1053 // the context is nil a panic will occur. In the future the SDK may create 1054 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1055 // for more information on using Contexts. 1056 func (c *RedshiftDataAPIService) ListStatementsWithContext(ctx aws.Context, input *ListStatementsInput, opts ...request.Option) (*ListStatementsOutput, error) { 1057 req, out := c.ListStatementsRequest(input) 1058 req.SetContext(ctx) 1059 req.ApplyOptions(opts...) 1060 return out, req.Send() 1061 } 1062 1063 // ListStatementsPages iterates over the pages of a ListStatements operation, 1064 // calling the "fn" function with the response data for each page. To stop 1065 // iterating, return false from the fn function. 1066 // 1067 // See ListStatements method for more information on how to use this operation. 1068 // 1069 // Note: This operation can generate multiple requests to a service. 1070 // 1071 // // Example iterating over at most 3 pages of a ListStatements operation. 1072 // pageNum := 0 1073 // err := client.ListStatementsPages(params, 1074 // func(page *redshiftdataapiservice.ListStatementsOutput, lastPage bool) bool { 1075 // pageNum++ 1076 // fmt.Println(page) 1077 // return pageNum <= 3 1078 // }) 1079 // 1080 func (c *RedshiftDataAPIService) ListStatementsPages(input *ListStatementsInput, fn func(*ListStatementsOutput, bool) bool) error { 1081 return c.ListStatementsPagesWithContext(aws.BackgroundContext(), input, fn) 1082 } 1083 1084 // ListStatementsPagesWithContext same as ListStatementsPages except 1085 // it takes a Context and allows setting request options on the pages. 1086 // 1087 // The context must be non-nil and will be used for request cancellation. If 1088 // the context is nil a panic will occur. In the future the SDK may create 1089 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1090 // for more information on using Contexts. 1091 func (c *RedshiftDataAPIService) ListStatementsPagesWithContext(ctx aws.Context, input *ListStatementsInput, fn func(*ListStatementsOutput, bool) bool, opts ...request.Option) error { 1092 p := request.Pagination{ 1093 NewRequest: func() (*request.Request, error) { 1094 var inCpy *ListStatementsInput 1095 if input != nil { 1096 tmp := *input 1097 inCpy = &tmp 1098 } 1099 req, _ := c.ListStatementsRequest(inCpy) 1100 req.SetContext(ctx) 1101 req.ApplyOptions(opts...) 1102 return req, nil 1103 }, 1104 } 1105 1106 for p.Next() { 1107 if !fn(p.Page().(*ListStatementsOutput), !p.HasNextPage()) { 1108 break 1109 } 1110 } 1111 1112 return p.Err() 1113 } 1114 1115 const opListTables = "ListTables" 1116 1117 // ListTablesRequest generates a "aws/request.Request" representing the 1118 // client's request for the ListTables operation. The "output" return 1119 // value will be populated with the request's response once the request completes 1120 // successfully. 1121 // 1122 // Use "Send" method on the returned Request to send the API call to the service. 1123 // the "output" return value is not valid until after Send returns without error. 1124 // 1125 // See ListTables for more information on using the ListTables 1126 // API call, and error handling. 1127 // 1128 // This method is useful when you want to inject custom logic or configuration 1129 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1130 // 1131 // 1132 // // Example sending a request using the ListTablesRequest method. 1133 // req, resp := client.ListTablesRequest(params) 1134 // 1135 // err := req.Send() 1136 // if err == nil { // resp is now filled 1137 // fmt.Println(resp) 1138 // } 1139 // 1140 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListTables 1141 func (c *RedshiftDataAPIService) ListTablesRequest(input *ListTablesInput) (req *request.Request, output *ListTablesOutput) { 1142 op := &request.Operation{ 1143 Name: opListTables, 1144 HTTPMethod: "POST", 1145 HTTPPath: "/", 1146 Paginator: &request.Paginator{ 1147 InputTokens: []string{"NextToken"}, 1148 OutputTokens: []string{"NextToken"}, 1149 LimitToken: "MaxResults", 1150 TruncationToken: "", 1151 }, 1152 } 1153 1154 if input == nil { 1155 input = &ListTablesInput{} 1156 } 1157 1158 output = &ListTablesOutput{} 1159 req = c.newRequest(op, input, output) 1160 return 1161 } 1162 1163 // ListTables API operation for Redshift Data API Service. 1164 // 1165 // List the tables in a database. If neither SchemaPattern nor TablePattern 1166 // are specified, then all tables in the database are returned. A token is returned 1167 // to page through the table list. Depending on the authorization method, use 1168 // one of the following combinations of request parameters: 1169 // 1170 // * Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, 1171 // the database name, and the cluster identifier that matches the cluster 1172 // in the secret. 1173 // 1174 // * Temporary credentials - specify the cluster identifier, the database 1175 // name, and the database user name. Permission to call the redshift:GetClusterCredentials 1176 // operation is required to use this method. 1177 // 1178 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1179 // with awserr.Error's Code and Message methods to get detailed information about 1180 // the error. 1181 // 1182 // See the AWS API reference guide for Redshift Data API Service's 1183 // API operation ListTables for usage and error information. 1184 // 1185 // Returned Error Types: 1186 // * ValidationException 1187 // The Amazon Redshift Data API operation failed due to invalid input. 1188 // 1189 // * InternalServerException 1190 // The Amazon Redshift Data API operation failed due to invalid input. 1191 // 1192 // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListTables 1193 func (c *RedshiftDataAPIService) ListTables(input *ListTablesInput) (*ListTablesOutput, error) { 1194 req, out := c.ListTablesRequest(input) 1195 return out, req.Send() 1196 } 1197 1198 // ListTablesWithContext is the same as ListTables with the addition of 1199 // the ability to pass a context and additional request options. 1200 // 1201 // See ListTables for details on how to use this API operation. 1202 // 1203 // The context must be non-nil and will be used for request cancellation. If 1204 // the context is nil a panic will occur. In the future the SDK may create 1205 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1206 // for more information on using Contexts. 1207 func (c *RedshiftDataAPIService) ListTablesWithContext(ctx aws.Context, input *ListTablesInput, opts ...request.Option) (*ListTablesOutput, error) { 1208 req, out := c.ListTablesRequest(input) 1209 req.SetContext(ctx) 1210 req.ApplyOptions(opts...) 1211 return out, req.Send() 1212 } 1213 1214 // ListTablesPages iterates over the pages of a ListTables operation, 1215 // calling the "fn" function with the response data for each page. To stop 1216 // iterating, return false from the fn function. 1217 // 1218 // See ListTables method for more information on how to use this operation. 1219 // 1220 // Note: This operation can generate multiple requests to a service. 1221 // 1222 // // Example iterating over at most 3 pages of a ListTables operation. 1223 // pageNum := 0 1224 // err := client.ListTablesPages(params, 1225 // func(page *redshiftdataapiservice.ListTablesOutput, lastPage bool) bool { 1226 // pageNum++ 1227 // fmt.Println(page) 1228 // return pageNum <= 3 1229 // }) 1230 // 1231 func (c *RedshiftDataAPIService) ListTablesPages(input *ListTablesInput, fn func(*ListTablesOutput, bool) bool) error { 1232 return c.ListTablesPagesWithContext(aws.BackgroundContext(), input, fn) 1233 } 1234 1235 // ListTablesPagesWithContext same as ListTablesPages except 1236 // it takes a Context and allows setting request options on the pages. 1237 // 1238 // The context must be non-nil and will be used for request cancellation. If 1239 // the context is nil a panic will occur. In the future the SDK may create 1240 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1241 // for more information on using Contexts. 1242 func (c *RedshiftDataAPIService) ListTablesPagesWithContext(ctx aws.Context, input *ListTablesInput, fn func(*ListTablesOutput, bool) bool, opts ...request.Option) error { 1243 p := request.Pagination{ 1244 NewRequest: func() (*request.Request, error) { 1245 var inCpy *ListTablesInput 1246 if input != nil { 1247 tmp := *input 1248 inCpy = &tmp 1249 } 1250 req, _ := c.ListTablesRequest(inCpy) 1251 req.SetContext(ctx) 1252 req.ApplyOptions(opts...) 1253 return req, nil 1254 }, 1255 } 1256 1257 for p.Next() { 1258 if !fn(p.Page().(*ListTablesOutput), !p.HasNextPage()) { 1259 break 1260 } 1261 } 1262 1263 return p.Err() 1264 } 1265 1266 // The number of active statements exceeds the limit. 1267 type ActiveStatementsExceededException struct { 1268 _ struct{} `type:"structure"` 1269 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1270 1271 Message_ *string `locationName:"Message" type:"string"` 1272 } 1273 1274 // String returns the string representation. 1275 // 1276 // API parameter values that are decorated as "sensitive" in the API will not 1277 // be included in the string output. The member name will be present, but the 1278 // value will be replaced with "sensitive". 1279 func (s ActiveStatementsExceededException) String() string { 1280 return awsutil.Prettify(s) 1281 } 1282 1283 // GoString returns the string representation. 1284 // 1285 // API parameter values that are decorated as "sensitive" in the API will not 1286 // be included in the string output. The member name will be present, but the 1287 // value will be replaced with "sensitive". 1288 func (s ActiveStatementsExceededException) GoString() string { 1289 return s.String() 1290 } 1291 1292 func newErrorActiveStatementsExceededException(v protocol.ResponseMetadata) error { 1293 return &ActiveStatementsExceededException{ 1294 RespMetadata: v, 1295 } 1296 } 1297 1298 // Code returns the exception type name. 1299 func (s *ActiveStatementsExceededException) Code() string { 1300 return "ActiveStatementsExceededException" 1301 } 1302 1303 // Message returns the exception's message. 1304 func (s *ActiveStatementsExceededException) Message() string { 1305 if s.Message_ != nil { 1306 return *s.Message_ 1307 } 1308 return "" 1309 } 1310 1311 // OrigErr always returns nil, satisfies awserr.Error interface. 1312 func (s *ActiveStatementsExceededException) OrigErr() error { 1313 return nil 1314 } 1315 1316 func (s *ActiveStatementsExceededException) Error() string { 1317 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1318 } 1319 1320 // Status code returns the HTTP status code for the request's response error. 1321 func (s *ActiveStatementsExceededException) StatusCode() int { 1322 return s.RespMetadata.StatusCode 1323 } 1324 1325 // RequestID returns the service's response RequestID for request. 1326 func (s *ActiveStatementsExceededException) RequestID() string { 1327 return s.RespMetadata.RequestID 1328 } 1329 1330 // An SQL statement encountered an environmental error while running. 1331 type BatchExecuteStatementException struct { 1332 _ struct{} `type:"structure"` 1333 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1334 1335 Message_ *string `locationName:"Message" type:"string"` 1336 1337 // Statement identifier of the exception. 1338 // 1339 // StatementId is a required field 1340 StatementId *string `type:"string" required:"true"` 1341 } 1342 1343 // String returns the string representation. 1344 // 1345 // API parameter values that are decorated as "sensitive" in the API will not 1346 // be included in the string output. The member name will be present, but the 1347 // value will be replaced with "sensitive". 1348 func (s BatchExecuteStatementException) String() string { 1349 return awsutil.Prettify(s) 1350 } 1351 1352 // GoString returns the string representation. 1353 // 1354 // API parameter values that are decorated as "sensitive" in the API will not 1355 // be included in the string output. The member name will be present, but the 1356 // value will be replaced with "sensitive". 1357 func (s BatchExecuteStatementException) GoString() string { 1358 return s.String() 1359 } 1360 1361 func newErrorBatchExecuteStatementException(v protocol.ResponseMetadata) error { 1362 return &BatchExecuteStatementException{ 1363 RespMetadata: v, 1364 } 1365 } 1366 1367 // Code returns the exception type name. 1368 func (s *BatchExecuteStatementException) Code() string { 1369 return "BatchExecuteStatementException" 1370 } 1371 1372 // Message returns the exception's message. 1373 func (s *BatchExecuteStatementException) Message() string { 1374 if s.Message_ != nil { 1375 return *s.Message_ 1376 } 1377 return "" 1378 } 1379 1380 // OrigErr always returns nil, satisfies awserr.Error interface. 1381 func (s *BatchExecuteStatementException) OrigErr() error { 1382 return nil 1383 } 1384 1385 func (s *BatchExecuteStatementException) Error() string { 1386 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 1387 } 1388 1389 // Status code returns the HTTP status code for the request's response error. 1390 func (s *BatchExecuteStatementException) StatusCode() int { 1391 return s.RespMetadata.StatusCode 1392 } 1393 1394 // RequestID returns the service's response RequestID for request. 1395 func (s *BatchExecuteStatementException) RequestID() string { 1396 return s.RespMetadata.RequestID 1397 } 1398 1399 type BatchExecuteStatementInput struct { 1400 _ struct{} `type:"structure"` 1401 1402 // The cluster identifier. This parameter is required when authenticating using 1403 // either Secrets Manager or temporary credentials. 1404 // 1405 // ClusterIdentifier is a required field 1406 ClusterIdentifier *string `type:"string" required:"true"` 1407 1408 // The name of the database. This parameter is required when authenticating 1409 // using either Secrets Manager or temporary credentials. 1410 // 1411 // Database is a required field 1412 Database *string `type:"string" required:"true"` 1413 1414 // The database user name. This parameter is required when authenticating using 1415 // temporary credentials. 1416 DbUser *string `type:"string"` 1417 1418 // The name or ARN of the secret that enables access to the database. This parameter 1419 // is required when authenticating using Secrets Manager. 1420 SecretArn *string `type:"string"` 1421 1422 // One or more SQL statements to run. 1423 // 1424 // Sqls is a required field 1425 Sqls []*string `min:"1" type:"list" required:"true"` 1426 1427 // The name of the SQL statements. You can name the SQL statements when you 1428 // create them to identify the query. 1429 StatementName *string `type:"string"` 1430 1431 // A value that indicates whether to send an event to the Amazon EventBridge 1432 // event bus after the SQL statements run. 1433 WithEvent *bool `type:"boolean"` 1434 } 1435 1436 // String returns the string representation. 1437 // 1438 // API parameter values that are decorated as "sensitive" in the API will not 1439 // be included in the string output. The member name will be present, but the 1440 // value will be replaced with "sensitive". 1441 func (s BatchExecuteStatementInput) String() string { 1442 return awsutil.Prettify(s) 1443 } 1444 1445 // GoString returns the string representation. 1446 // 1447 // API parameter values that are decorated as "sensitive" in the API will not 1448 // be included in the string output. The member name will be present, but the 1449 // value will be replaced with "sensitive". 1450 func (s BatchExecuteStatementInput) GoString() string { 1451 return s.String() 1452 } 1453 1454 // Validate inspects the fields of the type to determine if they are valid. 1455 func (s *BatchExecuteStatementInput) Validate() error { 1456 invalidParams := request.ErrInvalidParams{Context: "BatchExecuteStatementInput"} 1457 if s.ClusterIdentifier == nil { 1458 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 1459 } 1460 if s.Database == nil { 1461 invalidParams.Add(request.NewErrParamRequired("Database")) 1462 } 1463 if s.Sqls == nil { 1464 invalidParams.Add(request.NewErrParamRequired("Sqls")) 1465 } 1466 if s.Sqls != nil && len(s.Sqls) < 1 { 1467 invalidParams.Add(request.NewErrParamMinLen("Sqls", 1)) 1468 } 1469 1470 if invalidParams.Len() > 0 { 1471 return invalidParams 1472 } 1473 return nil 1474 } 1475 1476 // SetClusterIdentifier sets the ClusterIdentifier field's value. 1477 func (s *BatchExecuteStatementInput) SetClusterIdentifier(v string) *BatchExecuteStatementInput { 1478 s.ClusterIdentifier = &v 1479 return s 1480 } 1481 1482 // SetDatabase sets the Database field's value. 1483 func (s *BatchExecuteStatementInput) SetDatabase(v string) *BatchExecuteStatementInput { 1484 s.Database = &v 1485 return s 1486 } 1487 1488 // SetDbUser sets the DbUser field's value. 1489 func (s *BatchExecuteStatementInput) SetDbUser(v string) *BatchExecuteStatementInput { 1490 s.DbUser = &v 1491 return s 1492 } 1493 1494 // SetSecretArn sets the SecretArn field's value. 1495 func (s *BatchExecuteStatementInput) SetSecretArn(v string) *BatchExecuteStatementInput { 1496 s.SecretArn = &v 1497 return s 1498 } 1499 1500 // SetSqls sets the Sqls field's value. 1501 func (s *BatchExecuteStatementInput) SetSqls(v []*string) *BatchExecuteStatementInput { 1502 s.Sqls = v 1503 return s 1504 } 1505 1506 // SetStatementName sets the StatementName field's value. 1507 func (s *BatchExecuteStatementInput) SetStatementName(v string) *BatchExecuteStatementInput { 1508 s.StatementName = &v 1509 return s 1510 } 1511 1512 // SetWithEvent sets the WithEvent field's value. 1513 func (s *BatchExecuteStatementInput) SetWithEvent(v bool) *BatchExecuteStatementInput { 1514 s.WithEvent = &v 1515 return s 1516 } 1517 1518 type BatchExecuteStatementOutput struct { 1519 _ struct{} `type:"structure"` 1520 1521 // The cluster identifier. 1522 ClusterIdentifier *string `type:"string"` 1523 1524 // The date and time (UTC) the statement was created. 1525 CreatedAt *time.Time `type:"timestamp"` 1526 1527 // The name of the database. 1528 Database *string `type:"string"` 1529 1530 // The database user name. 1531 DbUser *string `type:"string"` 1532 1533 // The identifier of the SQL statement whose results are to be fetched. This 1534 // value is a universally unique identifier (UUID) generated by Amazon Redshift 1535 // Data API. This identifier is returned by BatchExecuteStatment. 1536 Id *string `type:"string"` 1537 1538 // The name or ARN of the secret that enables access to the database. 1539 SecretArn *string `type:"string"` 1540 } 1541 1542 // String returns the string representation. 1543 // 1544 // API parameter values that are decorated as "sensitive" in the API will not 1545 // be included in the string output. The member name will be present, but the 1546 // value will be replaced with "sensitive". 1547 func (s BatchExecuteStatementOutput) String() string { 1548 return awsutil.Prettify(s) 1549 } 1550 1551 // GoString returns the string representation. 1552 // 1553 // API parameter values that are decorated as "sensitive" in the API will not 1554 // be included in the string output. The member name will be present, but the 1555 // value will be replaced with "sensitive". 1556 func (s BatchExecuteStatementOutput) GoString() string { 1557 return s.String() 1558 } 1559 1560 // SetClusterIdentifier sets the ClusterIdentifier field's value. 1561 func (s *BatchExecuteStatementOutput) SetClusterIdentifier(v string) *BatchExecuteStatementOutput { 1562 s.ClusterIdentifier = &v 1563 return s 1564 } 1565 1566 // SetCreatedAt sets the CreatedAt field's value. 1567 func (s *BatchExecuteStatementOutput) SetCreatedAt(v time.Time) *BatchExecuteStatementOutput { 1568 s.CreatedAt = &v 1569 return s 1570 } 1571 1572 // SetDatabase sets the Database field's value. 1573 func (s *BatchExecuteStatementOutput) SetDatabase(v string) *BatchExecuteStatementOutput { 1574 s.Database = &v 1575 return s 1576 } 1577 1578 // SetDbUser sets the DbUser field's value. 1579 func (s *BatchExecuteStatementOutput) SetDbUser(v string) *BatchExecuteStatementOutput { 1580 s.DbUser = &v 1581 return s 1582 } 1583 1584 // SetId sets the Id field's value. 1585 func (s *BatchExecuteStatementOutput) SetId(v string) *BatchExecuteStatementOutput { 1586 s.Id = &v 1587 return s 1588 } 1589 1590 // SetSecretArn sets the SecretArn field's value. 1591 func (s *BatchExecuteStatementOutput) SetSecretArn(v string) *BatchExecuteStatementOutput { 1592 s.SecretArn = &v 1593 return s 1594 } 1595 1596 type CancelStatementInput struct { 1597 _ struct{} `type:"structure"` 1598 1599 // The identifier of the SQL statement to cancel. This value is a universally 1600 // unique identifier (UUID) generated by Amazon Redshift Data API. This identifier 1601 // is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements. 1602 // 1603 // Id is a required field 1604 Id *string `type:"string" required:"true"` 1605 } 1606 1607 // String returns the string representation. 1608 // 1609 // API parameter values that are decorated as "sensitive" in the API will not 1610 // be included in the string output. The member name will be present, but the 1611 // value will be replaced with "sensitive". 1612 func (s CancelStatementInput) String() string { 1613 return awsutil.Prettify(s) 1614 } 1615 1616 // GoString returns the string representation. 1617 // 1618 // API parameter values that are decorated as "sensitive" in the API will not 1619 // be included in the string output. The member name will be present, but the 1620 // value will be replaced with "sensitive". 1621 func (s CancelStatementInput) GoString() string { 1622 return s.String() 1623 } 1624 1625 // Validate inspects the fields of the type to determine if they are valid. 1626 func (s *CancelStatementInput) Validate() error { 1627 invalidParams := request.ErrInvalidParams{Context: "CancelStatementInput"} 1628 if s.Id == nil { 1629 invalidParams.Add(request.NewErrParamRequired("Id")) 1630 } 1631 1632 if invalidParams.Len() > 0 { 1633 return invalidParams 1634 } 1635 return nil 1636 } 1637 1638 // SetId sets the Id field's value. 1639 func (s *CancelStatementInput) SetId(v string) *CancelStatementInput { 1640 s.Id = &v 1641 return s 1642 } 1643 1644 type CancelStatementOutput struct { 1645 _ struct{} `type:"structure"` 1646 1647 // A value that indicates whether the cancel statement succeeded (true). 1648 Status *bool `type:"boolean"` 1649 } 1650 1651 // String returns the string representation. 1652 // 1653 // API parameter values that are decorated as "sensitive" in the API will not 1654 // be included in the string output. The member name will be present, but the 1655 // value will be replaced with "sensitive". 1656 func (s CancelStatementOutput) String() string { 1657 return awsutil.Prettify(s) 1658 } 1659 1660 // GoString returns the string representation. 1661 // 1662 // API parameter values that are decorated as "sensitive" in the API will not 1663 // be included in the string output. The member name will be present, but the 1664 // value will be replaced with "sensitive". 1665 func (s CancelStatementOutput) GoString() string { 1666 return s.String() 1667 } 1668 1669 // SetStatus sets the Status field's value. 1670 func (s *CancelStatementOutput) SetStatus(v bool) *CancelStatementOutput { 1671 s.Status = &v 1672 return s 1673 } 1674 1675 // The properties (metadata) of a column. 1676 type ColumnMetadata struct { 1677 _ struct{} `type:"structure"` 1678 1679 // The default value of the column. 1680 ColumnDefault *string `locationName:"columnDefault" type:"string"` 1681 1682 // A value that indicates whether the column is case-sensitive. 1683 IsCaseSensitive *bool `locationName:"isCaseSensitive" type:"boolean"` 1684 1685 // A value that indicates whether the column contains currency values. 1686 IsCurrency *bool `locationName:"isCurrency" type:"boolean"` 1687 1688 // A value that indicates whether an integer column is signed. 1689 IsSigned *bool `locationName:"isSigned" type:"boolean"` 1690 1691 // The label for the column. 1692 Label *string `locationName:"label" type:"string"` 1693 1694 // The length of the column. 1695 Length *int64 `locationName:"length" type:"integer"` 1696 1697 // The name of the column. 1698 Name *string `locationName:"name" type:"string"` 1699 1700 // A value that indicates whether the column is nullable. 1701 Nullable *int64 `locationName:"nullable" type:"integer"` 1702 1703 // The precision value of a decimal number column. 1704 Precision *int64 `locationName:"precision" type:"integer"` 1705 1706 // The scale value of a decimal number column. 1707 Scale *int64 `locationName:"scale" type:"integer"` 1708 1709 // The name of the schema that contains the table that includes the column. 1710 SchemaName *string `locationName:"schemaName" type:"string"` 1711 1712 // The name of the table that includes the column. 1713 TableName *string `locationName:"tableName" type:"string"` 1714 1715 // The database-specific data type of the column. 1716 TypeName *string `locationName:"typeName" type:"string"` 1717 } 1718 1719 // String returns the string representation. 1720 // 1721 // API parameter values that are decorated as "sensitive" in the API will not 1722 // be included in the string output. The member name will be present, but the 1723 // value will be replaced with "sensitive". 1724 func (s ColumnMetadata) String() string { 1725 return awsutil.Prettify(s) 1726 } 1727 1728 // GoString returns the string representation. 1729 // 1730 // API parameter values that are decorated as "sensitive" in the API will not 1731 // be included in the string output. The member name will be present, but the 1732 // value will be replaced with "sensitive". 1733 func (s ColumnMetadata) GoString() string { 1734 return s.String() 1735 } 1736 1737 // SetColumnDefault sets the ColumnDefault field's value. 1738 func (s *ColumnMetadata) SetColumnDefault(v string) *ColumnMetadata { 1739 s.ColumnDefault = &v 1740 return s 1741 } 1742 1743 // SetIsCaseSensitive sets the IsCaseSensitive field's value. 1744 func (s *ColumnMetadata) SetIsCaseSensitive(v bool) *ColumnMetadata { 1745 s.IsCaseSensitive = &v 1746 return s 1747 } 1748 1749 // SetIsCurrency sets the IsCurrency field's value. 1750 func (s *ColumnMetadata) SetIsCurrency(v bool) *ColumnMetadata { 1751 s.IsCurrency = &v 1752 return s 1753 } 1754 1755 // SetIsSigned sets the IsSigned field's value. 1756 func (s *ColumnMetadata) SetIsSigned(v bool) *ColumnMetadata { 1757 s.IsSigned = &v 1758 return s 1759 } 1760 1761 // SetLabel sets the Label field's value. 1762 func (s *ColumnMetadata) SetLabel(v string) *ColumnMetadata { 1763 s.Label = &v 1764 return s 1765 } 1766 1767 // SetLength sets the Length field's value. 1768 func (s *ColumnMetadata) SetLength(v int64) *ColumnMetadata { 1769 s.Length = &v 1770 return s 1771 } 1772 1773 // SetName sets the Name field's value. 1774 func (s *ColumnMetadata) SetName(v string) *ColumnMetadata { 1775 s.Name = &v 1776 return s 1777 } 1778 1779 // SetNullable sets the Nullable field's value. 1780 func (s *ColumnMetadata) SetNullable(v int64) *ColumnMetadata { 1781 s.Nullable = &v 1782 return s 1783 } 1784 1785 // SetPrecision sets the Precision field's value. 1786 func (s *ColumnMetadata) SetPrecision(v int64) *ColumnMetadata { 1787 s.Precision = &v 1788 return s 1789 } 1790 1791 // SetScale sets the Scale field's value. 1792 func (s *ColumnMetadata) SetScale(v int64) *ColumnMetadata { 1793 s.Scale = &v 1794 return s 1795 } 1796 1797 // SetSchemaName sets the SchemaName field's value. 1798 func (s *ColumnMetadata) SetSchemaName(v string) *ColumnMetadata { 1799 s.SchemaName = &v 1800 return s 1801 } 1802 1803 // SetTableName sets the TableName field's value. 1804 func (s *ColumnMetadata) SetTableName(v string) *ColumnMetadata { 1805 s.TableName = &v 1806 return s 1807 } 1808 1809 // SetTypeName sets the TypeName field's value. 1810 func (s *ColumnMetadata) SetTypeName(v string) *ColumnMetadata { 1811 s.TypeName = &v 1812 return s 1813 } 1814 1815 type DescribeStatementInput struct { 1816 _ struct{} `type:"structure"` 1817 1818 // The identifier of the SQL statement to describe. This value is a universally 1819 // unique identifier (UUID) generated by Amazon Redshift Data API. A suffix 1820 // indicates the number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 1821 // has a suffix of :2 that indicates the second SQL statement of a batch query. 1822 // This identifier is returned by BatchExecuteStatment, ExecuteStatement, and 1823 // ListStatements. 1824 // 1825 // Id is a required field 1826 Id *string `type:"string" required:"true"` 1827 } 1828 1829 // String returns the string representation. 1830 // 1831 // API parameter values that are decorated as "sensitive" in the API will not 1832 // be included in the string output. The member name will be present, but the 1833 // value will be replaced with "sensitive". 1834 func (s DescribeStatementInput) String() string { 1835 return awsutil.Prettify(s) 1836 } 1837 1838 // GoString returns the string representation. 1839 // 1840 // API parameter values that are decorated as "sensitive" in the API will not 1841 // be included in the string output. The member name will be present, but the 1842 // value will be replaced with "sensitive". 1843 func (s DescribeStatementInput) GoString() string { 1844 return s.String() 1845 } 1846 1847 // Validate inspects the fields of the type to determine if they are valid. 1848 func (s *DescribeStatementInput) Validate() error { 1849 invalidParams := request.ErrInvalidParams{Context: "DescribeStatementInput"} 1850 if s.Id == nil { 1851 invalidParams.Add(request.NewErrParamRequired("Id")) 1852 } 1853 1854 if invalidParams.Len() > 0 { 1855 return invalidParams 1856 } 1857 return nil 1858 } 1859 1860 // SetId sets the Id field's value. 1861 func (s *DescribeStatementInput) SetId(v string) *DescribeStatementInput { 1862 s.Id = &v 1863 return s 1864 } 1865 1866 type DescribeStatementOutput struct { 1867 _ struct{} `type:"structure"` 1868 1869 // The cluster identifier. 1870 ClusterIdentifier *string `type:"string"` 1871 1872 // The date and time (UTC) when the SQL statement was submitted to run. 1873 CreatedAt *time.Time `type:"timestamp"` 1874 1875 // The name of the database. 1876 Database *string `type:"string"` 1877 1878 // The database user name. 1879 DbUser *string `type:"string"` 1880 1881 // The amount of time in nanoseconds that the statement ran. 1882 Duration *int64 `type:"long"` 1883 1884 // The error message from the cluster if the SQL statement encountered an error 1885 // while running. 1886 Error *string `type:"string"` 1887 1888 // A value that indicates whether the statement has a result set. The result 1889 // set can be empty. 1890 HasResultSet *bool `type:"boolean"` 1891 1892 // The identifier of the SQL statement described. This value is a universally 1893 // unique identifier (UUID) generated by Amazon Redshift Data API. 1894 // 1895 // Id is a required field 1896 Id *string `type:"string" required:"true"` 1897 1898 // The parameters for the SQL statement. 1899 QueryParameters []*SqlParameter `min:"1" type:"list"` 1900 1901 // The SQL statement text. 1902 QueryString *string `type:"string"` 1903 1904 // The process identifier from Amazon Redshift. 1905 RedshiftPid *int64 `type:"long"` 1906 1907 // The identifier of the query generated by Amazon Redshift. These identifiers 1908 // are also available in the query column of the STL_QUERY system view. 1909 RedshiftQueryId *int64 `type:"long"` 1910 1911 // Either the number of rows returned from the SQL statement or the number of 1912 // rows affected. If result size is greater than zero, the result rows can be 1913 // the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, 1914 // COPY, and others. A -1 indicates the value is null. 1915 ResultRows *int64 `type:"long"` 1916 1917 // The size in bytes of the returned results. A -1 indicates the value is null. 1918 ResultSize *int64 `type:"long"` 1919 1920 // The name or Amazon Resource Name (ARN) of the secret that enables access 1921 // to the database. 1922 SecretArn *string `type:"string"` 1923 1924 // The status of the SQL statement being described. Status values are defined 1925 // as follows: 1926 // 1927 // * ABORTED - The query run was stopped by the user. 1928 // 1929 // * ALL - A status value that includes all query statuses. This value can 1930 // be used to filter results. 1931 // 1932 // * FAILED - The query run failed. 1933 // 1934 // * FINISHED - The query has finished running. 1935 // 1936 // * PICKED - The query has been chosen to be run. 1937 // 1938 // * STARTED - The query run has started. 1939 // 1940 // * SUBMITTED - The query was submitted, but not yet processed. 1941 Status *string `type:"string" enum:"StatusString"` 1942 1943 // The SQL statements from a multiple statement run. 1944 SubStatements []*SubStatementData `type:"list"` 1945 1946 // The date and time (UTC) that the metadata for the SQL statement was last 1947 // updated. An example is the time the status last changed. 1948 UpdatedAt *time.Time `type:"timestamp"` 1949 } 1950 1951 // String returns the string representation. 1952 // 1953 // API parameter values that are decorated as "sensitive" in the API will not 1954 // be included in the string output. The member name will be present, but the 1955 // value will be replaced with "sensitive". 1956 func (s DescribeStatementOutput) String() string { 1957 return awsutil.Prettify(s) 1958 } 1959 1960 // GoString returns the string representation. 1961 // 1962 // API parameter values that are decorated as "sensitive" in the API will not 1963 // be included in the string output. The member name will be present, but the 1964 // value will be replaced with "sensitive". 1965 func (s DescribeStatementOutput) GoString() string { 1966 return s.String() 1967 } 1968 1969 // SetClusterIdentifier sets the ClusterIdentifier field's value. 1970 func (s *DescribeStatementOutput) SetClusterIdentifier(v string) *DescribeStatementOutput { 1971 s.ClusterIdentifier = &v 1972 return s 1973 } 1974 1975 // SetCreatedAt sets the CreatedAt field's value. 1976 func (s *DescribeStatementOutput) SetCreatedAt(v time.Time) *DescribeStatementOutput { 1977 s.CreatedAt = &v 1978 return s 1979 } 1980 1981 // SetDatabase sets the Database field's value. 1982 func (s *DescribeStatementOutput) SetDatabase(v string) *DescribeStatementOutput { 1983 s.Database = &v 1984 return s 1985 } 1986 1987 // SetDbUser sets the DbUser field's value. 1988 func (s *DescribeStatementOutput) SetDbUser(v string) *DescribeStatementOutput { 1989 s.DbUser = &v 1990 return s 1991 } 1992 1993 // SetDuration sets the Duration field's value. 1994 func (s *DescribeStatementOutput) SetDuration(v int64) *DescribeStatementOutput { 1995 s.Duration = &v 1996 return s 1997 } 1998 1999 // SetError sets the Error field's value. 2000 func (s *DescribeStatementOutput) SetError(v string) *DescribeStatementOutput { 2001 s.Error = &v 2002 return s 2003 } 2004 2005 // SetHasResultSet sets the HasResultSet field's value. 2006 func (s *DescribeStatementOutput) SetHasResultSet(v bool) *DescribeStatementOutput { 2007 s.HasResultSet = &v 2008 return s 2009 } 2010 2011 // SetId sets the Id field's value. 2012 func (s *DescribeStatementOutput) SetId(v string) *DescribeStatementOutput { 2013 s.Id = &v 2014 return s 2015 } 2016 2017 // SetQueryParameters sets the QueryParameters field's value. 2018 func (s *DescribeStatementOutput) SetQueryParameters(v []*SqlParameter) *DescribeStatementOutput { 2019 s.QueryParameters = v 2020 return s 2021 } 2022 2023 // SetQueryString sets the QueryString field's value. 2024 func (s *DescribeStatementOutput) SetQueryString(v string) *DescribeStatementOutput { 2025 s.QueryString = &v 2026 return s 2027 } 2028 2029 // SetRedshiftPid sets the RedshiftPid field's value. 2030 func (s *DescribeStatementOutput) SetRedshiftPid(v int64) *DescribeStatementOutput { 2031 s.RedshiftPid = &v 2032 return s 2033 } 2034 2035 // SetRedshiftQueryId sets the RedshiftQueryId field's value. 2036 func (s *DescribeStatementOutput) SetRedshiftQueryId(v int64) *DescribeStatementOutput { 2037 s.RedshiftQueryId = &v 2038 return s 2039 } 2040 2041 // SetResultRows sets the ResultRows field's value. 2042 func (s *DescribeStatementOutput) SetResultRows(v int64) *DescribeStatementOutput { 2043 s.ResultRows = &v 2044 return s 2045 } 2046 2047 // SetResultSize sets the ResultSize field's value. 2048 func (s *DescribeStatementOutput) SetResultSize(v int64) *DescribeStatementOutput { 2049 s.ResultSize = &v 2050 return s 2051 } 2052 2053 // SetSecretArn sets the SecretArn field's value. 2054 func (s *DescribeStatementOutput) SetSecretArn(v string) *DescribeStatementOutput { 2055 s.SecretArn = &v 2056 return s 2057 } 2058 2059 // SetStatus sets the Status field's value. 2060 func (s *DescribeStatementOutput) SetStatus(v string) *DescribeStatementOutput { 2061 s.Status = &v 2062 return s 2063 } 2064 2065 // SetSubStatements sets the SubStatements field's value. 2066 func (s *DescribeStatementOutput) SetSubStatements(v []*SubStatementData) *DescribeStatementOutput { 2067 s.SubStatements = v 2068 return s 2069 } 2070 2071 // SetUpdatedAt sets the UpdatedAt field's value. 2072 func (s *DescribeStatementOutput) SetUpdatedAt(v time.Time) *DescribeStatementOutput { 2073 s.UpdatedAt = &v 2074 return s 2075 } 2076 2077 type DescribeTableInput struct { 2078 _ struct{} `type:"structure"` 2079 2080 // The cluster identifier. This parameter is required when authenticating using 2081 // either Secrets Manager or temporary credentials. 2082 // 2083 // ClusterIdentifier is a required field 2084 ClusterIdentifier *string `type:"string" required:"true"` 2085 2086 // A database name. The connected database is specified when you connect with 2087 // your authentication credentials. 2088 ConnectedDatabase *string `type:"string"` 2089 2090 // The name of the database that contains the tables to be described. If ConnectedDatabase 2091 // is not specified, this is also the database to connect to with your authentication 2092 // credentials. 2093 // 2094 // Database is a required field 2095 Database *string `type:"string" required:"true"` 2096 2097 // The database user name. This parameter is required when authenticating using 2098 // temporary credentials. 2099 DbUser *string `type:"string"` 2100 2101 // The maximum number of tables to return in the response. If more tables exist 2102 // than fit in one response, then NextToken is returned to page through the 2103 // results. 2104 MaxResults *int64 `type:"integer"` 2105 2106 // A value that indicates the starting point for the next set of response records 2107 // in a subsequent request. If a value is returned in a response, you can retrieve 2108 // the next set of records by providing this returned NextToken value in the 2109 // next NextToken parameter and retrying the command. If the NextToken field 2110 // is empty, all response records have been retrieved for the request. 2111 NextToken *string `type:"string"` 2112 2113 // The schema that contains the table. If no schema is specified, then matching 2114 // tables for all schemas are returned. 2115 Schema *string `type:"string"` 2116 2117 // The name or ARN of the secret that enables access to the database. This parameter 2118 // is required when authenticating using Secrets Manager. 2119 SecretArn *string `type:"string"` 2120 2121 // The table name. If no table is specified, then all tables for all matching 2122 // schemas are returned. If no table and no schema is specified, then all tables 2123 // for all schemas in the database are returned 2124 Table *string `type:"string"` 2125 } 2126 2127 // String returns the string representation. 2128 // 2129 // API parameter values that are decorated as "sensitive" in the API will not 2130 // be included in the string output. The member name will be present, but the 2131 // value will be replaced with "sensitive". 2132 func (s DescribeTableInput) String() string { 2133 return awsutil.Prettify(s) 2134 } 2135 2136 // GoString returns the string representation. 2137 // 2138 // API parameter values that are decorated as "sensitive" in the API will not 2139 // be included in the string output. The member name will be present, but the 2140 // value will be replaced with "sensitive". 2141 func (s DescribeTableInput) GoString() string { 2142 return s.String() 2143 } 2144 2145 // Validate inspects the fields of the type to determine if they are valid. 2146 func (s *DescribeTableInput) Validate() error { 2147 invalidParams := request.ErrInvalidParams{Context: "DescribeTableInput"} 2148 if s.ClusterIdentifier == nil { 2149 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 2150 } 2151 if s.Database == nil { 2152 invalidParams.Add(request.NewErrParamRequired("Database")) 2153 } 2154 2155 if invalidParams.Len() > 0 { 2156 return invalidParams 2157 } 2158 return nil 2159 } 2160 2161 // SetClusterIdentifier sets the ClusterIdentifier field's value. 2162 func (s *DescribeTableInput) SetClusterIdentifier(v string) *DescribeTableInput { 2163 s.ClusterIdentifier = &v 2164 return s 2165 } 2166 2167 // SetConnectedDatabase sets the ConnectedDatabase field's value. 2168 func (s *DescribeTableInput) SetConnectedDatabase(v string) *DescribeTableInput { 2169 s.ConnectedDatabase = &v 2170 return s 2171 } 2172 2173 // SetDatabase sets the Database field's value. 2174 func (s *DescribeTableInput) SetDatabase(v string) *DescribeTableInput { 2175 s.Database = &v 2176 return s 2177 } 2178 2179 // SetDbUser sets the DbUser field's value. 2180 func (s *DescribeTableInput) SetDbUser(v string) *DescribeTableInput { 2181 s.DbUser = &v 2182 return s 2183 } 2184 2185 // SetMaxResults sets the MaxResults field's value. 2186 func (s *DescribeTableInput) SetMaxResults(v int64) *DescribeTableInput { 2187 s.MaxResults = &v 2188 return s 2189 } 2190 2191 // SetNextToken sets the NextToken field's value. 2192 func (s *DescribeTableInput) SetNextToken(v string) *DescribeTableInput { 2193 s.NextToken = &v 2194 return s 2195 } 2196 2197 // SetSchema sets the Schema field's value. 2198 func (s *DescribeTableInput) SetSchema(v string) *DescribeTableInput { 2199 s.Schema = &v 2200 return s 2201 } 2202 2203 // SetSecretArn sets the SecretArn field's value. 2204 func (s *DescribeTableInput) SetSecretArn(v string) *DescribeTableInput { 2205 s.SecretArn = &v 2206 return s 2207 } 2208 2209 // SetTable sets the Table field's value. 2210 func (s *DescribeTableInput) SetTable(v string) *DescribeTableInput { 2211 s.Table = &v 2212 return s 2213 } 2214 2215 type DescribeTableOutput struct { 2216 _ struct{} `type:"structure"` 2217 2218 // A list of columns in the table. 2219 ColumnList []*ColumnMetadata `type:"list"` 2220 2221 // A value that indicates the starting point for the next set of response records 2222 // in a subsequent request. If a value is returned in a response, you can retrieve 2223 // the next set of records by providing this returned NextToken value in the 2224 // next NextToken parameter and retrying the command. If the NextToken field 2225 // is empty, all response records have been retrieved for the request. 2226 NextToken *string `type:"string"` 2227 2228 // The table name. 2229 TableName *string `type:"string"` 2230 } 2231 2232 // String returns the string representation. 2233 // 2234 // API parameter values that are decorated as "sensitive" in the API will not 2235 // be included in the string output. The member name will be present, but the 2236 // value will be replaced with "sensitive". 2237 func (s DescribeTableOutput) String() string { 2238 return awsutil.Prettify(s) 2239 } 2240 2241 // GoString returns the string representation. 2242 // 2243 // API parameter values that are decorated as "sensitive" in the API will not 2244 // be included in the string output. The member name will be present, but the 2245 // value will be replaced with "sensitive". 2246 func (s DescribeTableOutput) GoString() string { 2247 return s.String() 2248 } 2249 2250 // SetColumnList sets the ColumnList field's value. 2251 func (s *DescribeTableOutput) SetColumnList(v []*ColumnMetadata) *DescribeTableOutput { 2252 s.ColumnList = v 2253 return s 2254 } 2255 2256 // SetNextToken sets the NextToken field's value. 2257 func (s *DescribeTableOutput) SetNextToken(v string) *DescribeTableOutput { 2258 s.NextToken = &v 2259 return s 2260 } 2261 2262 // SetTableName sets the TableName field's value. 2263 func (s *DescribeTableOutput) SetTableName(v string) *DescribeTableOutput { 2264 s.TableName = &v 2265 return s 2266 } 2267 2268 // The SQL statement encountered an environmental error while running. 2269 type ExecuteStatementException struct { 2270 _ struct{} `type:"structure"` 2271 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2272 2273 // The exception message. 2274 Message_ *string `locationName:"Message" type:"string"` 2275 2276 // Statement identifier of the exception. 2277 // 2278 // StatementId is a required field 2279 StatementId *string `type:"string" required:"true"` 2280 } 2281 2282 // String returns the string representation. 2283 // 2284 // API parameter values that are decorated as "sensitive" in the API will not 2285 // be included in the string output. The member name will be present, but the 2286 // value will be replaced with "sensitive". 2287 func (s ExecuteStatementException) String() string { 2288 return awsutil.Prettify(s) 2289 } 2290 2291 // GoString returns the string representation. 2292 // 2293 // API parameter values that are decorated as "sensitive" in the API will not 2294 // be included in the string output. The member name will be present, but the 2295 // value will be replaced with "sensitive". 2296 func (s ExecuteStatementException) GoString() string { 2297 return s.String() 2298 } 2299 2300 func newErrorExecuteStatementException(v protocol.ResponseMetadata) error { 2301 return &ExecuteStatementException{ 2302 RespMetadata: v, 2303 } 2304 } 2305 2306 // Code returns the exception type name. 2307 func (s *ExecuteStatementException) Code() string { 2308 return "ExecuteStatementException" 2309 } 2310 2311 // Message returns the exception's message. 2312 func (s *ExecuteStatementException) Message() string { 2313 if s.Message_ != nil { 2314 return *s.Message_ 2315 } 2316 return "" 2317 } 2318 2319 // OrigErr always returns nil, satisfies awserr.Error interface. 2320 func (s *ExecuteStatementException) OrigErr() error { 2321 return nil 2322 } 2323 2324 func (s *ExecuteStatementException) Error() string { 2325 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2326 } 2327 2328 // Status code returns the HTTP status code for the request's response error. 2329 func (s *ExecuteStatementException) StatusCode() int { 2330 return s.RespMetadata.StatusCode 2331 } 2332 2333 // RequestID returns the service's response RequestID for request. 2334 func (s *ExecuteStatementException) RequestID() string { 2335 return s.RespMetadata.RequestID 2336 } 2337 2338 type ExecuteStatementInput struct { 2339 _ struct{} `type:"structure"` 2340 2341 // The cluster identifier. This parameter is required when authenticating using 2342 // either Secrets Manager or temporary credentials. 2343 // 2344 // ClusterIdentifier is a required field 2345 ClusterIdentifier *string `type:"string" required:"true"` 2346 2347 // The name of the database. This parameter is required when authenticating 2348 // using either Secrets Manager or temporary credentials. 2349 // 2350 // Database is a required field 2351 Database *string `type:"string" required:"true"` 2352 2353 // The database user name. This parameter is required when authenticating using 2354 // temporary credentials. 2355 DbUser *string `type:"string"` 2356 2357 // The parameters for the SQL statement. 2358 Parameters []*SqlParameter `min:"1" type:"list"` 2359 2360 // The name or ARN of the secret that enables access to the database. This parameter 2361 // is required when authenticating using Secrets Manager. 2362 SecretArn *string `type:"string"` 2363 2364 // The SQL statement text to run. 2365 // 2366 // Sql is a required field 2367 Sql *string `type:"string" required:"true"` 2368 2369 // The name of the SQL statement. You can name the SQL statement when you create 2370 // it to identify the query. 2371 StatementName *string `type:"string"` 2372 2373 // A value that indicates whether to send an event to the Amazon EventBridge 2374 // event bus after the SQL statement runs. 2375 WithEvent *bool `type:"boolean"` 2376 } 2377 2378 // String returns the string representation. 2379 // 2380 // API parameter values that are decorated as "sensitive" in the API will not 2381 // be included in the string output. The member name will be present, but the 2382 // value will be replaced with "sensitive". 2383 func (s ExecuteStatementInput) String() string { 2384 return awsutil.Prettify(s) 2385 } 2386 2387 // GoString returns the string representation. 2388 // 2389 // API parameter values that are decorated as "sensitive" in the API will not 2390 // be included in the string output. The member name will be present, but the 2391 // value will be replaced with "sensitive". 2392 func (s ExecuteStatementInput) GoString() string { 2393 return s.String() 2394 } 2395 2396 // Validate inspects the fields of the type to determine if they are valid. 2397 func (s *ExecuteStatementInput) Validate() error { 2398 invalidParams := request.ErrInvalidParams{Context: "ExecuteStatementInput"} 2399 if s.ClusterIdentifier == nil { 2400 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 2401 } 2402 if s.Database == nil { 2403 invalidParams.Add(request.NewErrParamRequired("Database")) 2404 } 2405 if s.Parameters != nil && len(s.Parameters) < 1 { 2406 invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) 2407 } 2408 if s.Sql == nil { 2409 invalidParams.Add(request.NewErrParamRequired("Sql")) 2410 } 2411 if s.Parameters != nil { 2412 for i, v := range s.Parameters { 2413 if v == nil { 2414 continue 2415 } 2416 if err := v.Validate(); err != nil { 2417 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Parameters", i), err.(request.ErrInvalidParams)) 2418 } 2419 } 2420 } 2421 2422 if invalidParams.Len() > 0 { 2423 return invalidParams 2424 } 2425 return nil 2426 } 2427 2428 // SetClusterIdentifier sets the ClusterIdentifier field's value. 2429 func (s *ExecuteStatementInput) SetClusterIdentifier(v string) *ExecuteStatementInput { 2430 s.ClusterIdentifier = &v 2431 return s 2432 } 2433 2434 // SetDatabase sets the Database field's value. 2435 func (s *ExecuteStatementInput) SetDatabase(v string) *ExecuteStatementInput { 2436 s.Database = &v 2437 return s 2438 } 2439 2440 // SetDbUser sets the DbUser field's value. 2441 func (s *ExecuteStatementInput) SetDbUser(v string) *ExecuteStatementInput { 2442 s.DbUser = &v 2443 return s 2444 } 2445 2446 // SetParameters sets the Parameters field's value. 2447 func (s *ExecuteStatementInput) SetParameters(v []*SqlParameter) *ExecuteStatementInput { 2448 s.Parameters = v 2449 return s 2450 } 2451 2452 // SetSecretArn sets the SecretArn field's value. 2453 func (s *ExecuteStatementInput) SetSecretArn(v string) *ExecuteStatementInput { 2454 s.SecretArn = &v 2455 return s 2456 } 2457 2458 // SetSql sets the Sql field's value. 2459 func (s *ExecuteStatementInput) SetSql(v string) *ExecuteStatementInput { 2460 s.Sql = &v 2461 return s 2462 } 2463 2464 // SetStatementName sets the StatementName field's value. 2465 func (s *ExecuteStatementInput) SetStatementName(v string) *ExecuteStatementInput { 2466 s.StatementName = &v 2467 return s 2468 } 2469 2470 // SetWithEvent sets the WithEvent field's value. 2471 func (s *ExecuteStatementInput) SetWithEvent(v bool) *ExecuteStatementInput { 2472 s.WithEvent = &v 2473 return s 2474 } 2475 2476 type ExecuteStatementOutput struct { 2477 _ struct{} `type:"structure"` 2478 2479 // The cluster identifier. 2480 ClusterIdentifier *string `type:"string"` 2481 2482 // The date and time (UTC) the statement was created. 2483 CreatedAt *time.Time `type:"timestamp"` 2484 2485 // The name of the database. 2486 Database *string `type:"string"` 2487 2488 // The database user name. 2489 DbUser *string `type:"string"` 2490 2491 // The identifier of the SQL statement whose results are to be fetched. This 2492 // value is a universally unique identifier (UUID) generated by Amazon Redshift 2493 // Data API. 2494 Id *string `type:"string"` 2495 2496 // The name or ARN of the secret that enables access to the database. 2497 SecretArn *string `type:"string"` 2498 } 2499 2500 // String returns the string representation. 2501 // 2502 // API parameter values that are decorated as "sensitive" in the API will not 2503 // be included in the string output. The member name will be present, but the 2504 // value will be replaced with "sensitive". 2505 func (s ExecuteStatementOutput) String() string { 2506 return awsutil.Prettify(s) 2507 } 2508 2509 // GoString returns the string representation. 2510 // 2511 // API parameter values that are decorated as "sensitive" in the API will not 2512 // be included in the string output. The member name will be present, but the 2513 // value will be replaced with "sensitive". 2514 func (s ExecuteStatementOutput) GoString() string { 2515 return s.String() 2516 } 2517 2518 // SetClusterIdentifier sets the ClusterIdentifier field's value. 2519 func (s *ExecuteStatementOutput) SetClusterIdentifier(v string) *ExecuteStatementOutput { 2520 s.ClusterIdentifier = &v 2521 return s 2522 } 2523 2524 // SetCreatedAt sets the CreatedAt field's value. 2525 func (s *ExecuteStatementOutput) SetCreatedAt(v time.Time) *ExecuteStatementOutput { 2526 s.CreatedAt = &v 2527 return s 2528 } 2529 2530 // SetDatabase sets the Database field's value. 2531 func (s *ExecuteStatementOutput) SetDatabase(v string) *ExecuteStatementOutput { 2532 s.Database = &v 2533 return s 2534 } 2535 2536 // SetDbUser sets the DbUser field's value. 2537 func (s *ExecuteStatementOutput) SetDbUser(v string) *ExecuteStatementOutput { 2538 s.DbUser = &v 2539 return s 2540 } 2541 2542 // SetId sets the Id field's value. 2543 func (s *ExecuteStatementOutput) SetId(v string) *ExecuteStatementOutput { 2544 s.Id = &v 2545 return s 2546 } 2547 2548 // SetSecretArn sets the SecretArn field's value. 2549 func (s *ExecuteStatementOutput) SetSecretArn(v string) *ExecuteStatementOutput { 2550 s.SecretArn = &v 2551 return s 2552 } 2553 2554 // A data value in a column. 2555 type Field struct { 2556 _ struct{} `type:"structure"` 2557 2558 // A value of the BLOB data type. 2559 // BlobValue is automatically base64 encoded/decoded by the SDK. 2560 BlobValue []byte `locationName:"blobValue" type:"blob"` 2561 2562 // A value of the Boolean data type. 2563 BooleanValue *bool `locationName:"booleanValue" type:"boolean"` 2564 2565 // A value of the double data type. 2566 DoubleValue *float64 `locationName:"doubleValue" type:"double"` 2567 2568 // A value that indicates whether the data is NULL. 2569 IsNull *bool `locationName:"isNull" type:"boolean"` 2570 2571 // A value of the long data type. 2572 LongValue *int64 `locationName:"longValue" type:"long"` 2573 2574 // A value of the string data type. 2575 StringValue *string `locationName:"stringValue" type:"string"` 2576 } 2577 2578 // String returns the string representation. 2579 // 2580 // API parameter values that are decorated as "sensitive" in the API will not 2581 // be included in the string output. The member name will be present, but the 2582 // value will be replaced with "sensitive". 2583 func (s Field) String() string { 2584 return awsutil.Prettify(s) 2585 } 2586 2587 // GoString returns the string representation. 2588 // 2589 // API parameter values that are decorated as "sensitive" in the API will not 2590 // be included in the string output. The member name will be present, but the 2591 // value will be replaced with "sensitive". 2592 func (s Field) GoString() string { 2593 return s.String() 2594 } 2595 2596 // SetBlobValue sets the BlobValue field's value. 2597 func (s *Field) SetBlobValue(v []byte) *Field { 2598 s.BlobValue = v 2599 return s 2600 } 2601 2602 // SetBooleanValue sets the BooleanValue field's value. 2603 func (s *Field) SetBooleanValue(v bool) *Field { 2604 s.BooleanValue = &v 2605 return s 2606 } 2607 2608 // SetDoubleValue sets the DoubleValue field's value. 2609 func (s *Field) SetDoubleValue(v float64) *Field { 2610 s.DoubleValue = &v 2611 return s 2612 } 2613 2614 // SetIsNull sets the IsNull field's value. 2615 func (s *Field) SetIsNull(v bool) *Field { 2616 s.IsNull = &v 2617 return s 2618 } 2619 2620 // SetLongValue sets the LongValue field's value. 2621 func (s *Field) SetLongValue(v int64) *Field { 2622 s.LongValue = &v 2623 return s 2624 } 2625 2626 // SetStringValue sets the StringValue field's value. 2627 func (s *Field) SetStringValue(v string) *Field { 2628 s.StringValue = &v 2629 return s 2630 } 2631 2632 type GetStatementResultInput struct { 2633 _ struct{} `type:"structure"` 2634 2635 // The identifier of the SQL statement whose results are to be fetched. This 2636 // value is a universally unique identifier (UUID) generated by Amazon Redshift 2637 // Data API. A suffix indicates then number of the SQL statement. For example, 2638 // d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates 2639 // the second SQL statement of a batch query. This identifier is returned by 2640 // BatchExecuteStatment, ExecuteStatment, and ListStatements. 2641 // 2642 // Id is a required field 2643 Id *string `type:"string" required:"true"` 2644 2645 // A value that indicates the starting point for the next set of response records 2646 // in a subsequent request. If a value is returned in a response, you can retrieve 2647 // the next set of records by providing this returned NextToken value in the 2648 // next NextToken parameter and retrying the command. If the NextToken field 2649 // is empty, all response records have been retrieved for the request. 2650 NextToken *string `type:"string"` 2651 } 2652 2653 // String returns the string representation. 2654 // 2655 // API parameter values that are decorated as "sensitive" in the API will not 2656 // be included in the string output. The member name will be present, but the 2657 // value will be replaced with "sensitive". 2658 func (s GetStatementResultInput) String() string { 2659 return awsutil.Prettify(s) 2660 } 2661 2662 // GoString returns the string representation. 2663 // 2664 // API parameter values that are decorated as "sensitive" in the API will not 2665 // be included in the string output. The member name will be present, but the 2666 // value will be replaced with "sensitive". 2667 func (s GetStatementResultInput) GoString() string { 2668 return s.String() 2669 } 2670 2671 // Validate inspects the fields of the type to determine if they are valid. 2672 func (s *GetStatementResultInput) Validate() error { 2673 invalidParams := request.ErrInvalidParams{Context: "GetStatementResultInput"} 2674 if s.Id == nil { 2675 invalidParams.Add(request.NewErrParamRequired("Id")) 2676 } 2677 2678 if invalidParams.Len() > 0 { 2679 return invalidParams 2680 } 2681 return nil 2682 } 2683 2684 // SetId sets the Id field's value. 2685 func (s *GetStatementResultInput) SetId(v string) *GetStatementResultInput { 2686 s.Id = &v 2687 return s 2688 } 2689 2690 // SetNextToken sets the NextToken field's value. 2691 func (s *GetStatementResultInput) SetNextToken(v string) *GetStatementResultInput { 2692 s.NextToken = &v 2693 return s 2694 } 2695 2696 type GetStatementResultOutput struct { 2697 _ struct{} `type:"structure"` 2698 2699 // The properties (metadata) of a column. 2700 ColumnMetadata []*ColumnMetadata `type:"list"` 2701 2702 // A value that indicates the starting point for the next set of response records 2703 // in a subsequent request. If a value is returned in a response, you can retrieve 2704 // the next set of records by providing this returned NextToken value in the 2705 // next NextToken parameter and retrying the command. If the NextToken field 2706 // is empty, all response records have been retrieved for the request. 2707 NextToken *string `type:"string"` 2708 2709 // The results of the SQL statement. 2710 // 2711 // Records is a required field 2712 Records [][]*Field `type:"list" required:"true"` 2713 2714 // The total number of rows in the result set returned from a query. You can 2715 // use this number to estimate the number of calls to the GetStatementResult 2716 // operation needed to page through the results. 2717 TotalNumRows *int64 `type:"long"` 2718 } 2719 2720 // String returns the string representation. 2721 // 2722 // API parameter values that are decorated as "sensitive" in the API will not 2723 // be included in the string output. The member name will be present, but the 2724 // value will be replaced with "sensitive". 2725 func (s GetStatementResultOutput) String() string { 2726 return awsutil.Prettify(s) 2727 } 2728 2729 // GoString 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 GetStatementResultOutput) GoString() string { 2735 return s.String() 2736 } 2737 2738 // SetColumnMetadata sets the ColumnMetadata field's value. 2739 func (s *GetStatementResultOutput) SetColumnMetadata(v []*ColumnMetadata) *GetStatementResultOutput { 2740 s.ColumnMetadata = v 2741 return s 2742 } 2743 2744 // SetNextToken sets the NextToken field's value. 2745 func (s *GetStatementResultOutput) SetNextToken(v string) *GetStatementResultOutput { 2746 s.NextToken = &v 2747 return s 2748 } 2749 2750 // SetRecords sets the Records field's value. 2751 func (s *GetStatementResultOutput) SetRecords(v [][]*Field) *GetStatementResultOutput { 2752 s.Records = v 2753 return s 2754 } 2755 2756 // SetTotalNumRows sets the TotalNumRows field's value. 2757 func (s *GetStatementResultOutput) SetTotalNumRows(v int64) *GetStatementResultOutput { 2758 s.TotalNumRows = &v 2759 return s 2760 } 2761 2762 // The Amazon Redshift Data API operation failed due to invalid input. 2763 type InternalServerException struct { 2764 _ struct{} `type:"structure"` 2765 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2766 2767 // The exception message. 2768 Message_ *string `locationName:"Message" type:"string"` 2769 } 2770 2771 // String returns the string representation. 2772 // 2773 // API parameter values that are decorated as "sensitive" in the API will not 2774 // be included in the string output. The member name will be present, but the 2775 // value will be replaced with "sensitive". 2776 func (s InternalServerException) String() string { 2777 return awsutil.Prettify(s) 2778 } 2779 2780 // GoString returns the string representation. 2781 // 2782 // API parameter values that are decorated as "sensitive" in the API will not 2783 // be included in the string output. The member name will be present, but the 2784 // value will be replaced with "sensitive". 2785 func (s InternalServerException) GoString() string { 2786 return s.String() 2787 } 2788 2789 func newErrorInternalServerException(v protocol.ResponseMetadata) error { 2790 return &InternalServerException{ 2791 RespMetadata: v, 2792 } 2793 } 2794 2795 // Code returns the exception type name. 2796 func (s *InternalServerException) Code() string { 2797 return "InternalServerException" 2798 } 2799 2800 // Message returns the exception's message. 2801 func (s *InternalServerException) Message() string { 2802 if s.Message_ != nil { 2803 return *s.Message_ 2804 } 2805 return "" 2806 } 2807 2808 // OrigErr always returns nil, satisfies awserr.Error interface. 2809 func (s *InternalServerException) OrigErr() error { 2810 return nil 2811 } 2812 2813 func (s *InternalServerException) Error() string { 2814 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2815 } 2816 2817 // Status code returns the HTTP status code for the request's response error. 2818 func (s *InternalServerException) StatusCode() int { 2819 return s.RespMetadata.StatusCode 2820 } 2821 2822 // RequestID returns the service's response RequestID for request. 2823 func (s *InternalServerException) RequestID() string { 2824 return s.RespMetadata.RequestID 2825 } 2826 2827 type ListDatabasesInput struct { 2828 _ struct{} `type:"structure"` 2829 2830 // The cluster identifier. This parameter is required when authenticating using 2831 // either Secrets Manager or temporary credentials. 2832 // 2833 // ClusterIdentifier is a required field 2834 ClusterIdentifier *string `type:"string" required:"true"` 2835 2836 // The name of the database. This parameter is required when authenticating 2837 // using either Secrets Manager or temporary credentials. 2838 // 2839 // Database is a required field 2840 Database *string `type:"string" required:"true"` 2841 2842 // The database user name. This parameter is required when authenticating using 2843 // temporary credentials. 2844 DbUser *string `type:"string"` 2845 2846 // The maximum number of databases to return in the response. If more databases 2847 // exist than fit in one response, then NextToken is returned to page through 2848 // the results. 2849 MaxResults *int64 `type:"integer"` 2850 2851 // A value that indicates the starting point for the next set of response records 2852 // in a subsequent request. If a value is returned in a response, you can retrieve 2853 // the next set of records by providing this returned NextToken value in the 2854 // next NextToken parameter and retrying the command. If the NextToken field 2855 // is empty, all response records have been retrieved for the request. 2856 NextToken *string `type:"string"` 2857 2858 // The name or ARN of the secret that enables access to the database. This parameter 2859 // is required when authenticating using Secrets Manager. 2860 SecretArn *string `type:"string"` 2861 } 2862 2863 // String returns the string representation. 2864 // 2865 // API parameter values that are decorated as "sensitive" in the API will not 2866 // be included in the string output. The member name will be present, but the 2867 // value will be replaced with "sensitive". 2868 func (s ListDatabasesInput) String() string { 2869 return awsutil.Prettify(s) 2870 } 2871 2872 // GoString returns the string representation. 2873 // 2874 // API parameter values that are decorated as "sensitive" in the API will not 2875 // be included in the string output. The member name will be present, but the 2876 // value will be replaced with "sensitive". 2877 func (s ListDatabasesInput) GoString() string { 2878 return s.String() 2879 } 2880 2881 // Validate inspects the fields of the type to determine if they are valid. 2882 func (s *ListDatabasesInput) Validate() error { 2883 invalidParams := request.ErrInvalidParams{Context: "ListDatabasesInput"} 2884 if s.ClusterIdentifier == nil { 2885 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 2886 } 2887 if s.Database == nil { 2888 invalidParams.Add(request.NewErrParamRequired("Database")) 2889 } 2890 2891 if invalidParams.Len() > 0 { 2892 return invalidParams 2893 } 2894 return nil 2895 } 2896 2897 // SetClusterIdentifier sets the ClusterIdentifier field's value. 2898 func (s *ListDatabasesInput) SetClusterIdentifier(v string) *ListDatabasesInput { 2899 s.ClusterIdentifier = &v 2900 return s 2901 } 2902 2903 // SetDatabase sets the Database field's value. 2904 func (s *ListDatabasesInput) SetDatabase(v string) *ListDatabasesInput { 2905 s.Database = &v 2906 return s 2907 } 2908 2909 // SetDbUser sets the DbUser field's value. 2910 func (s *ListDatabasesInput) SetDbUser(v string) *ListDatabasesInput { 2911 s.DbUser = &v 2912 return s 2913 } 2914 2915 // SetMaxResults sets the MaxResults field's value. 2916 func (s *ListDatabasesInput) SetMaxResults(v int64) *ListDatabasesInput { 2917 s.MaxResults = &v 2918 return s 2919 } 2920 2921 // SetNextToken sets the NextToken field's value. 2922 func (s *ListDatabasesInput) SetNextToken(v string) *ListDatabasesInput { 2923 s.NextToken = &v 2924 return s 2925 } 2926 2927 // SetSecretArn sets the SecretArn field's value. 2928 func (s *ListDatabasesInput) SetSecretArn(v string) *ListDatabasesInput { 2929 s.SecretArn = &v 2930 return s 2931 } 2932 2933 type ListDatabasesOutput struct { 2934 _ struct{} `type:"structure"` 2935 2936 // The names of databases. 2937 Databases []*string `type:"list"` 2938 2939 // A value that indicates the starting point for the next set of response records 2940 // in a subsequent request. If a value is returned in a response, you can retrieve 2941 // the next set of records by providing this returned NextToken value in the 2942 // next NextToken parameter and retrying the command. If the NextToken field 2943 // is empty, all response records have been retrieved for the request. 2944 NextToken *string `type:"string"` 2945 } 2946 2947 // String returns the string representation. 2948 // 2949 // API parameter values that are decorated as "sensitive" in the API will not 2950 // be included in the string output. The member name will be present, but the 2951 // value will be replaced with "sensitive". 2952 func (s ListDatabasesOutput) String() string { 2953 return awsutil.Prettify(s) 2954 } 2955 2956 // GoString returns the string representation. 2957 // 2958 // API parameter values that are decorated as "sensitive" in the API will not 2959 // be included in the string output. The member name will be present, but the 2960 // value will be replaced with "sensitive". 2961 func (s ListDatabasesOutput) GoString() string { 2962 return s.String() 2963 } 2964 2965 // SetDatabases sets the Databases field's value. 2966 func (s *ListDatabasesOutput) SetDatabases(v []*string) *ListDatabasesOutput { 2967 s.Databases = v 2968 return s 2969 } 2970 2971 // SetNextToken sets the NextToken field's value. 2972 func (s *ListDatabasesOutput) SetNextToken(v string) *ListDatabasesOutput { 2973 s.NextToken = &v 2974 return s 2975 } 2976 2977 type ListSchemasInput struct { 2978 _ struct{} `type:"structure"` 2979 2980 // The cluster identifier. This parameter is required when authenticating using 2981 // either Secrets Manager or temporary credentials. 2982 // 2983 // ClusterIdentifier is a required field 2984 ClusterIdentifier *string `type:"string" required:"true"` 2985 2986 // A database name. The connected database is specified when you connect with 2987 // your authentication credentials. 2988 ConnectedDatabase *string `type:"string"` 2989 2990 // The name of the database that contains the schemas to list. If ConnectedDatabase 2991 // is not specified, this is also the database to connect to with your authentication 2992 // credentials. 2993 // 2994 // Database is a required field 2995 Database *string `type:"string" required:"true"` 2996 2997 // The database user name. This parameter is required when authenticating using 2998 // temporary credentials. 2999 DbUser *string `type:"string"` 3000 3001 // The maximum number of schemas to return in the response. If more schemas 3002 // exist than fit in one response, then NextToken is returned to page through 3003 // the results. 3004 MaxResults *int64 `type:"integer"` 3005 3006 // A value that indicates the starting point for the next set of response records 3007 // in a subsequent request. If a value is returned in a response, you can retrieve 3008 // the next set of records by providing this returned NextToken value in the 3009 // next NextToken parameter and retrying the command. If the NextToken field 3010 // is empty, all response records have been retrieved for the request. 3011 NextToken *string `type:"string"` 3012 3013 // A pattern to filter results by schema name. Within a schema pattern, "%" 3014 // means match any substring of 0 or more characters and "_" means match any 3015 // one character. Only schema name entries matching the search pattern are returned. 3016 SchemaPattern *string `type:"string"` 3017 3018 // The name or ARN of the secret that enables access to the database. This parameter 3019 // is required when authenticating using Secrets Manager. 3020 SecretArn *string `type:"string"` 3021 } 3022 3023 // String returns the string representation. 3024 // 3025 // API parameter values that are decorated as "sensitive" in the API will not 3026 // be included in the string output. The member name will be present, but the 3027 // value will be replaced with "sensitive". 3028 func (s ListSchemasInput) String() string { 3029 return awsutil.Prettify(s) 3030 } 3031 3032 // GoString returns the string representation. 3033 // 3034 // API parameter values that are decorated as "sensitive" in the API will not 3035 // be included in the string output. The member name will be present, but the 3036 // value will be replaced with "sensitive". 3037 func (s ListSchemasInput) GoString() string { 3038 return s.String() 3039 } 3040 3041 // Validate inspects the fields of the type to determine if they are valid. 3042 func (s *ListSchemasInput) Validate() error { 3043 invalidParams := request.ErrInvalidParams{Context: "ListSchemasInput"} 3044 if s.ClusterIdentifier == nil { 3045 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 3046 } 3047 if s.Database == nil { 3048 invalidParams.Add(request.NewErrParamRequired("Database")) 3049 } 3050 3051 if invalidParams.Len() > 0 { 3052 return invalidParams 3053 } 3054 return nil 3055 } 3056 3057 // SetClusterIdentifier sets the ClusterIdentifier field's value. 3058 func (s *ListSchemasInput) SetClusterIdentifier(v string) *ListSchemasInput { 3059 s.ClusterIdentifier = &v 3060 return s 3061 } 3062 3063 // SetConnectedDatabase sets the ConnectedDatabase field's value. 3064 func (s *ListSchemasInput) SetConnectedDatabase(v string) *ListSchemasInput { 3065 s.ConnectedDatabase = &v 3066 return s 3067 } 3068 3069 // SetDatabase sets the Database field's value. 3070 func (s *ListSchemasInput) SetDatabase(v string) *ListSchemasInput { 3071 s.Database = &v 3072 return s 3073 } 3074 3075 // SetDbUser sets the DbUser field's value. 3076 func (s *ListSchemasInput) SetDbUser(v string) *ListSchemasInput { 3077 s.DbUser = &v 3078 return s 3079 } 3080 3081 // SetMaxResults sets the MaxResults field's value. 3082 func (s *ListSchemasInput) SetMaxResults(v int64) *ListSchemasInput { 3083 s.MaxResults = &v 3084 return s 3085 } 3086 3087 // SetNextToken sets the NextToken field's value. 3088 func (s *ListSchemasInput) SetNextToken(v string) *ListSchemasInput { 3089 s.NextToken = &v 3090 return s 3091 } 3092 3093 // SetSchemaPattern sets the SchemaPattern field's value. 3094 func (s *ListSchemasInput) SetSchemaPattern(v string) *ListSchemasInput { 3095 s.SchemaPattern = &v 3096 return s 3097 } 3098 3099 // SetSecretArn sets the SecretArn field's value. 3100 func (s *ListSchemasInput) SetSecretArn(v string) *ListSchemasInput { 3101 s.SecretArn = &v 3102 return s 3103 } 3104 3105 type ListSchemasOutput struct { 3106 _ struct{} `type:"structure"` 3107 3108 // A value that indicates the starting point for the next set of response records 3109 // in a subsequent request. If a value is returned in a response, you can retrieve 3110 // the next set of records by providing this returned NextToken value in the 3111 // next NextToken parameter and retrying the command. If the NextToken field 3112 // is empty, all response records have been retrieved for the request. 3113 NextToken *string `type:"string"` 3114 3115 // The schemas that match the request pattern. 3116 Schemas []*string `type:"list"` 3117 } 3118 3119 // String returns the string representation. 3120 // 3121 // API parameter values that are decorated as "sensitive" in the API will not 3122 // be included in the string output. The member name will be present, but the 3123 // value will be replaced with "sensitive". 3124 func (s ListSchemasOutput) String() string { 3125 return awsutil.Prettify(s) 3126 } 3127 3128 // GoString returns the string representation. 3129 // 3130 // API parameter values that are decorated as "sensitive" in the API will not 3131 // be included in the string output. The member name will be present, but the 3132 // value will be replaced with "sensitive". 3133 func (s ListSchemasOutput) GoString() string { 3134 return s.String() 3135 } 3136 3137 // SetNextToken sets the NextToken field's value. 3138 func (s *ListSchemasOutput) SetNextToken(v string) *ListSchemasOutput { 3139 s.NextToken = &v 3140 return s 3141 } 3142 3143 // SetSchemas sets the Schemas field's value. 3144 func (s *ListSchemasOutput) SetSchemas(v []*string) *ListSchemasOutput { 3145 s.Schemas = v 3146 return s 3147 } 3148 3149 type ListStatementsInput struct { 3150 _ struct{} `type:"structure"` 3151 3152 // The maximum number of SQL statements to return in the response. If more SQL 3153 // statements exist than fit in one response, then NextToken is returned to 3154 // page through the results. 3155 MaxResults *int64 `type:"integer"` 3156 3157 // A value that indicates the starting point for the next set of response records 3158 // in a subsequent request. If a value is returned in a response, you can retrieve 3159 // the next set of records by providing this returned NextToken value in the 3160 // next NextToken parameter and retrying the command. If the NextToken field 3161 // is empty, all response records have been retrieved for the request. 3162 NextToken *string `type:"string"` 3163 3164 // A value that filters which statements to return in the response. If true, 3165 // all statements run by the caller's IAM role are returned. If false, only 3166 // statements run by the caller's IAM role in the current IAM session are returned. 3167 // The default is true. 3168 RoleLevel *bool `type:"boolean"` 3169 3170 // The name of the SQL statement specified as input to BatchExecuteStatement 3171 // or ExecuteStatement to identify the query. You can list multiple statements 3172 // by providing a prefix that matches the beginning of the statement name. For 3173 // example, to list myStatement1, myStatement2, myStatement3, and so on, then 3174 // provide the a value of myStatement. Data API does a case-sensitive match 3175 // of SQL statement names to the prefix value you provide. 3176 StatementName *string `type:"string"` 3177 3178 // The status of the SQL statement to list. Status values are defined as follows: 3179 // 3180 // * ABORTED - The query run was stopped by the user. 3181 // 3182 // * ALL - A status value that includes all query statuses. This value can 3183 // be used to filter results. 3184 // 3185 // * FAILED - The query run failed. 3186 // 3187 // * FINISHED - The query has finished running. 3188 // 3189 // * PICKED - The query has been chosen to be run. 3190 // 3191 // * STARTED - The query run has started. 3192 // 3193 // * SUBMITTED - The query was submitted, but not yet processed. 3194 Status *string `type:"string" enum:"StatusString"` 3195 } 3196 3197 // String returns the string representation. 3198 // 3199 // API parameter values that are decorated as "sensitive" in the API will not 3200 // be included in the string output. The member name will be present, but the 3201 // value will be replaced with "sensitive". 3202 func (s ListStatementsInput) String() string { 3203 return awsutil.Prettify(s) 3204 } 3205 3206 // GoString returns the string representation. 3207 // 3208 // API parameter values that are decorated as "sensitive" in the API will not 3209 // be included in the string output. The member name will be present, but the 3210 // value will be replaced with "sensitive". 3211 func (s ListStatementsInput) GoString() string { 3212 return s.String() 3213 } 3214 3215 // SetMaxResults sets the MaxResults field's value. 3216 func (s *ListStatementsInput) SetMaxResults(v int64) *ListStatementsInput { 3217 s.MaxResults = &v 3218 return s 3219 } 3220 3221 // SetNextToken sets the NextToken field's value. 3222 func (s *ListStatementsInput) SetNextToken(v string) *ListStatementsInput { 3223 s.NextToken = &v 3224 return s 3225 } 3226 3227 // SetRoleLevel sets the RoleLevel field's value. 3228 func (s *ListStatementsInput) SetRoleLevel(v bool) *ListStatementsInput { 3229 s.RoleLevel = &v 3230 return s 3231 } 3232 3233 // SetStatementName sets the StatementName field's value. 3234 func (s *ListStatementsInput) SetStatementName(v string) *ListStatementsInput { 3235 s.StatementName = &v 3236 return s 3237 } 3238 3239 // SetStatus sets the Status field's value. 3240 func (s *ListStatementsInput) SetStatus(v string) *ListStatementsInput { 3241 s.Status = &v 3242 return s 3243 } 3244 3245 type ListStatementsOutput struct { 3246 _ struct{} `type:"structure"` 3247 3248 // A value that indicates the starting point for the next set of response records 3249 // in a subsequent request. If a value is returned in a response, you can retrieve 3250 // the next set of records by providing this returned NextToken value in the 3251 // next NextToken parameter and retrying the command. If the NextToken field 3252 // is empty, all response records have been retrieved for the request. 3253 NextToken *string `type:"string"` 3254 3255 // The SQL statements. 3256 // 3257 // Statements is a required field 3258 Statements []*StatementData `type:"list" required:"true"` 3259 } 3260 3261 // String returns the string representation. 3262 // 3263 // API parameter values that are decorated as "sensitive" in the API will not 3264 // be included in the string output. The member name will be present, but the 3265 // value will be replaced with "sensitive". 3266 func (s ListStatementsOutput) String() string { 3267 return awsutil.Prettify(s) 3268 } 3269 3270 // GoString returns the string representation. 3271 // 3272 // API parameter values that are decorated as "sensitive" in the API will not 3273 // be included in the string output. The member name will be present, but the 3274 // value will be replaced with "sensitive". 3275 func (s ListStatementsOutput) GoString() string { 3276 return s.String() 3277 } 3278 3279 // SetNextToken sets the NextToken field's value. 3280 func (s *ListStatementsOutput) SetNextToken(v string) *ListStatementsOutput { 3281 s.NextToken = &v 3282 return s 3283 } 3284 3285 // SetStatements sets the Statements field's value. 3286 func (s *ListStatementsOutput) SetStatements(v []*StatementData) *ListStatementsOutput { 3287 s.Statements = v 3288 return s 3289 } 3290 3291 type ListTablesInput struct { 3292 _ struct{} `type:"structure"` 3293 3294 // The cluster identifier. This parameter is required when authenticating using 3295 // either Secrets Manager or temporary credentials. 3296 // 3297 // ClusterIdentifier is a required field 3298 ClusterIdentifier *string `type:"string" required:"true"` 3299 3300 // A database name. The connected database is specified when you connect with 3301 // your authentication credentials. 3302 ConnectedDatabase *string `type:"string"` 3303 3304 // The name of the database that contains the tables to list. If ConnectedDatabase 3305 // is not specified, this is also the database to connect to with your authentication 3306 // credentials. 3307 // 3308 // Database is a required field 3309 Database *string `type:"string" required:"true"` 3310 3311 // The database user name. This parameter is required when authenticating using 3312 // temporary credentials. 3313 DbUser *string `type:"string"` 3314 3315 // The maximum number of tables to return in the response. If more tables exist 3316 // than fit in one response, then NextToken is returned to page through the 3317 // results. 3318 MaxResults *int64 `type:"integer"` 3319 3320 // A value that indicates the starting point for the next set of response records 3321 // in a subsequent request. If a value is returned in a response, you can retrieve 3322 // the next set of records by providing this returned NextToken value in the 3323 // next NextToken parameter and retrying the command. If the NextToken field 3324 // is empty, all response records have been retrieved for the request. 3325 NextToken *string `type:"string"` 3326 3327 // A pattern to filter results by schema name. Within a schema pattern, "%" 3328 // means match any substring of 0 or more characters and "_" means match any 3329 // one character. Only schema name entries matching the search pattern are returned. 3330 // If SchemaPattern is not specified, then all tables that match TablePattern 3331 // are returned. If neither SchemaPattern or TablePattern are specified, then 3332 // all tables are returned. 3333 SchemaPattern *string `type:"string"` 3334 3335 // The name or ARN of the secret that enables access to the database. This parameter 3336 // is required when authenticating using Secrets Manager. 3337 SecretArn *string `type:"string"` 3338 3339 // A pattern to filter results by table name. Within a table pattern, "%" means 3340 // match any substring of 0 or more characters and "_" means match any one character. 3341 // Only table name entries matching the search pattern are returned. If TablePattern 3342 // is not specified, then all tables that match SchemaPatternare returned. If 3343 // neither SchemaPattern or TablePattern are specified, then all tables are 3344 // returned. 3345 TablePattern *string `type:"string"` 3346 } 3347 3348 // String 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 ListTablesInput) String() string { 3354 return awsutil.Prettify(s) 3355 } 3356 3357 // GoString returns the string representation. 3358 // 3359 // API parameter values that are decorated as "sensitive" in the API will not 3360 // be included in the string output. The member name will be present, but the 3361 // value will be replaced with "sensitive". 3362 func (s ListTablesInput) GoString() string { 3363 return s.String() 3364 } 3365 3366 // Validate inspects the fields of the type to determine if they are valid. 3367 func (s *ListTablesInput) Validate() error { 3368 invalidParams := request.ErrInvalidParams{Context: "ListTablesInput"} 3369 if s.ClusterIdentifier == nil { 3370 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 3371 } 3372 if s.Database == nil { 3373 invalidParams.Add(request.NewErrParamRequired("Database")) 3374 } 3375 3376 if invalidParams.Len() > 0 { 3377 return invalidParams 3378 } 3379 return nil 3380 } 3381 3382 // SetClusterIdentifier sets the ClusterIdentifier field's value. 3383 func (s *ListTablesInput) SetClusterIdentifier(v string) *ListTablesInput { 3384 s.ClusterIdentifier = &v 3385 return s 3386 } 3387 3388 // SetConnectedDatabase sets the ConnectedDatabase field's value. 3389 func (s *ListTablesInput) SetConnectedDatabase(v string) *ListTablesInput { 3390 s.ConnectedDatabase = &v 3391 return s 3392 } 3393 3394 // SetDatabase sets the Database field's value. 3395 func (s *ListTablesInput) SetDatabase(v string) *ListTablesInput { 3396 s.Database = &v 3397 return s 3398 } 3399 3400 // SetDbUser sets the DbUser field's value. 3401 func (s *ListTablesInput) SetDbUser(v string) *ListTablesInput { 3402 s.DbUser = &v 3403 return s 3404 } 3405 3406 // SetMaxResults sets the MaxResults field's value. 3407 func (s *ListTablesInput) SetMaxResults(v int64) *ListTablesInput { 3408 s.MaxResults = &v 3409 return s 3410 } 3411 3412 // SetNextToken sets the NextToken field's value. 3413 func (s *ListTablesInput) SetNextToken(v string) *ListTablesInput { 3414 s.NextToken = &v 3415 return s 3416 } 3417 3418 // SetSchemaPattern sets the SchemaPattern field's value. 3419 func (s *ListTablesInput) SetSchemaPattern(v string) *ListTablesInput { 3420 s.SchemaPattern = &v 3421 return s 3422 } 3423 3424 // SetSecretArn sets the SecretArn field's value. 3425 func (s *ListTablesInput) SetSecretArn(v string) *ListTablesInput { 3426 s.SecretArn = &v 3427 return s 3428 } 3429 3430 // SetTablePattern sets the TablePattern field's value. 3431 func (s *ListTablesInput) SetTablePattern(v string) *ListTablesInput { 3432 s.TablePattern = &v 3433 return s 3434 } 3435 3436 type ListTablesOutput struct { 3437 _ struct{} `type:"structure"` 3438 3439 // A value that indicates the starting point for the next set of response records 3440 // in a subsequent request. If a value is returned in a response, you can retrieve 3441 // the next set of records by providing this returned NextToken value in the 3442 // next NextToken parameter and retrying the command. If the NextToken field 3443 // is empty, all response records have been retrieved for the request. 3444 NextToken *string `type:"string"` 3445 3446 // The tables that match the request pattern. 3447 Tables []*TableMember `type:"list"` 3448 } 3449 3450 // String returns the string representation. 3451 // 3452 // API parameter values that are decorated as "sensitive" in the API will not 3453 // be included in the string output. The member name will be present, but the 3454 // value will be replaced with "sensitive". 3455 func (s ListTablesOutput) String() string { 3456 return awsutil.Prettify(s) 3457 } 3458 3459 // GoString returns the string representation. 3460 // 3461 // API parameter values that are decorated as "sensitive" in the API will not 3462 // be included in the string output. The member name will be present, but the 3463 // value will be replaced with "sensitive". 3464 func (s ListTablesOutput) GoString() string { 3465 return s.String() 3466 } 3467 3468 // SetNextToken sets the NextToken field's value. 3469 func (s *ListTablesOutput) SetNextToken(v string) *ListTablesOutput { 3470 s.NextToken = &v 3471 return s 3472 } 3473 3474 // SetTables sets the Tables field's value. 3475 func (s *ListTablesOutput) SetTables(v []*TableMember) *ListTablesOutput { 3476 s.Tables = v 3477 return s 3478 } 3479 3480 // The Amazon Redshift Data API operation failed due to a missing resource. 3481 type ResourceNotFoundException struct { 3482 _ struct{} `type:"structure"` 3483 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3484 3485 // The exception message. 3486 Message_ *string `locationName:"Message" type:"string"` 3487 3488 // Resource identifier associated with the exception. 3489 // 3490 // ResourceId is a required field 3491 ResourceId *string `type:"string" required:"true"` 3492 } 3493 3494 // String returns the string representation. 3495 // 3496 // API parameter values that are decorated as "sensitive" in the API will not 3497 // be included in the string output. The member name will be present, but the 3498 // value will be replaced with "sensitive". 3499 func (s ResourceNotFoundException) String() string { 3500 return awsutil.Prettify(s) 3501 } 3502 3503 // GoString returns the string representation. 3504 // 3505 // API parameter values that are decorated as "sensitive" in the API will not 3506 // be included in the string output. The member name will be present, but the 3507 // value will be replaced with "sensitive". 3508 func (s ResourceNotFoundException) GoString() string { 3509 return s.String() 3510 } 3511 3512 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 3513 return &ResourceNotFoundException{ 3514 RespMetadata: v, 3515 } 3516 } 3517 3518 // Code returns the exception type name. 3519 func (s *ResourceNotFoundException) Code() string { 3520 return "ResourceNotFoundException" 3521 } 3522 3523 // Message returns the exception's message. 3524 func (s *ResourceNotFoundException) Message() string { 3525 if s.Message_ != nil { 3526 return *s.Message_ 3527 } 3528 return "" 3529 } 3530 3531 // OrigErr always returns nil, satisfies awserr.Error interface. 3532 func (s *ResourceNotFoundException) OrigErr() error { 3533 return nil 3534 } 3535 3536 func (s *ResourceNotFoundException) Error() string { 3537 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 3538 } 3539 3540 // Status code returns the HTTP status code for the request's response error. 3541 func (s *ResourceNotFoundException) StatusCode() int { 3542 return s.RespMetadata.StatusCode 3543 } 3544 3545 // RequestID returns the service's response RequestID for request. 3546 func (s *ResourceNotFoundException) RequestID() string { 3547 return s.RespMetadata.RequestID 3548 } 3549 3550 // A parameter used in a SQL statement. 3551 type SqlParameter struct { 3552 _ struct{} `type:"structure"` 3553 3554 // The name of the parameter. 3555 // 3556 // Name is a required field 3557 Name *string `locationName:"name" type:"string" required:"true"` 3558 3559 // The value of the parameter. Amazon Redshift implicitly converts to the proper 3560 // data type. For more inforation, see Data types (https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html) 3561 // in the Amazon Redshift Database Developer Guide. 3562 // 3563 // Value is a required field 3564 Value *string `locationName:"value" min:"1" type:"string" required:"true"` 3565 } 3566 3567 // String returns the string representation. 3568 // 3569 // API parameter values that are decorated as "sensitive" in the API will not 3570 // be included in the string output. The member name will be present, but the 3571 // value will be replaced with "sensitive". 3572 func (s SqlParameter) String() string { 3573 return awsutil.Prettify(s) 3574 } 3575 3576 // GoString returns the string representation. 3577 // 3578 // API parameter values that are decorated as "sensitive" in the API will not 3579 // be included in the string output. The member name will be present, but the 3580 // value will be replaced with "sensitive". 3581 func (s SqlParameter) GoString() string { 3582 return s.String() 3583 } 3584 3585 // Validate inspects the fields of the type to determine if they are valid. 3586 func (s *SqlParameter) Validate() error { 3587 invalidParams := request.ErrInvalidParams{Context: "SqlParameter"} 3588 if s.Name == nil { 3589 invalidParams.Add(request.NewErrParamRequired("Name")) 3590 } 3591 if s.Value == nil { 3592 invalidParams.Add(request.NewErrParamRequired("Value")) 3593 } 3594 if s.Value != nil && len(*s.Value) < 1 { 3595 invalidParams.Add(request.NewErrParamMinLen("Value", 1)) 3596 } 3597 3598 if invalidParams.Len() > 0 { 3599 return invalidParams 3600 } 3601 return nil 3602 } 3603 3604 // SetName sets the Name field's value. 3605 func (s *SqlParameter) SetName(v string) *SqlParameter { 3606 s.Name = &v 3607 return s 3608 } 3609 3610 // SetValue sets the Value field's value. 3611 func (s *SqlParameter) SetValue(v string) *SqlParameter { 3612 s.Value = &v 3613 return s 3614 } 3615 3616 // The SQL statement to run. 3617 type StatementData struct { 3618 _ struct{} `type:"structure"` 3619 3620 // The date and time (UTC) the statement was created. 3621 CreatedAt *time.Time `type:"timestamp"` 3622 3623 // The SQL statement identifier. This value is a universally unique identifier 3624 // (UUID) generated by Amazon Redshift Data API. 3625 // 3626 // Id is a required field 3627 Id *string `type:"string" required:"true"` 3628 3629 // A value that indicates whether the statement is a batch query request. 3630 IsBatchStatement *bool `type:"boolean"` 3631 3632 // The parameters used in a SQL statement. 3633 QueryParameters []*SqlParameter `min:"1" type:"list"` 3634 3635 // The SQL statement. 3636 QueryString *string `type:"string"` 3637 3638 // One or more SQL statements. Each query string in the array corresponds to 3639 // one of the queries in a batch query request. 3640 QueryStrings []*string `type:"list"` 3641 3642 // The name or Amazon Resource Name (ARN) of the secret that enables access 3643 // to the database. 3644 SecretArn *string `type:"string"` 3645 3646 // The name of the SQL statement. 3647 StatementName *string `type:"string"` 3648 3649 // The status of the SQL statement. An example is the that the SQL statement 3650 // finished. 3651 Status *string `type:"string" enum:"StatusString"` 3652 3653 // The date and time (UTC) that the statement metadata was last updated. 3654 UpdatedAt *time.Time `type:"timestamp"` 3655 } 3656 3657 // String returns the string representation. 3658 // 3659 // API parameter values that are decorated as "sensitive" in the API will not 3660 // be included in the string output. The member name will be present, but the 3661 // value will be replaced with "sensitive". 3662 func (s StatementData) String() string { 3663 return awsutil.Prettify(s) 3664 } 3665 3666 // GoString returns the string representation. 3667 // 3668 // API parameter values that are decorated as "sensitive" in the API will not 3669 // be included in the string output. The member name will be present, but the 3670 // value will be replaced with "sensitive". 3671 func (s StatementData) GoString() string { 3672 return s.String() 3673 } 3674 3675 // SetCreatedAt sets the CreatedAt field's value. 3676 func (s *StatementData) SetCreatedAt(v time.Time) *StatementData { 3677 s.CreatedAt = &v 3678 return s 3679 } 3680 3681 // SetId sets the Id field's value. 3682 func (s *StatementData) SetId(v string) *StatementData { 3683 s.Id = &v 3684 return s 3685 } 3686 3687 // SetIsBatchStatement sets the IsBatchStatement field's value. 3688 func (s *StatementData) SetIsBatchStatement(v bool) *StatementData { 3689 s.IsBatchStatement = &v 3690 return s 3691 } 3692 3693 // SetQueryParameters sets the QueryParameters field's value. 3694 func (s *StatementData) SetQueryParameters(v []*SqlParameter) *StatementData { 3695 s.QueryParameters = v 3696 return s 3697 } 3698 3699 // SetQueryString sets the QueryString field's value. 3700 func (s *StatementData) SetQueryString(v string) *StatementData { 3701 s.QueryString = &v 3702 return s 3703 } 3704 3705 // SetQueryStrings sets the QueryStrings field's value. 3706 func (s *StatementData) SetQueryStrings(v []*string) *StatementData { 3707 s.QueryStrings = v 3708 return s 3709 } 3710 3711 // SetSecretArn sets the SecretArn field's value. 3712 func (s *StatementData) SetSecretArn(v string) *StatementData { 3713 s.SecretArn = &v 3714 return s 3715 } 3716 3717 // SetStatementName sets the StatementName field's value. 3718 func (s *StatementData) SetStatementName(v string) *StatementData { 3719 s.StatementName = &v 3720 return s 3721 } 3722 3723 // SetStatus sets the Status field's value. 3724 func (s *StatementData) SetStatus(v string) *StatementData { 3725 s.Status = &v 3726 return s 3727 } 3728 3729 // SetUpdatedAt sets the UpdatedAt field's value. 3730 func (s *StatementData) SetUpdatedAt(v time.Time) *StatementData { 3731 s.UpdatedAt = &v 3732 return s 3733 } 3734 3735 // Information about an SQL statement. 3736 type SubStatementData struct { 3737 _ struct{} `type:"structure"` 3738 3739 // The date and time (UTC) the statement was created. 3740 CreatedAt *time.Time `type:"timestamp"` 3741 3742 // The amount of time in nanoseconds that the statement ran. 3743 Duration *int64 `type:"long"` 3744 3745 // The error message from the cluster if the SQL statement encountered an error 3746 // while running. 3747 Error *string `type:"string"` 3748 3749 // A value that indicates whether the statement has a result set. The result 3750 // set can be empty. 3751 HasResultSet *bool `type:"boolean"` 3752 3753 // The identifier of the SQL statement. This value is a universally unique identifier 3754 // (UUID) generated by Amazon Redshift Data API. A suffix indicates the number 3755 // of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 3756 // has a suffix of :2 that indicates the second SQL statement of a batch query. 3757 // 3758 // Id is a required field 3759 Id *string `type:"string" required:"true"` 3760 3761 // The SQL statement text. 3762 QueryString *string `type:"string"` 3763 3764 // The SQL statement identifier. This value is a universally unique identifier 3765 // (UUID) generated by Amazon Redshift Data API. 3766 RedshiftQueryId *int64 `type:"long"` 3767 3768 // Either the number of rows returned from the SQL statement or the number of 3769 // rows affected. If result size is greater than zero, the result rows can be 3770 // the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, 3771 // COPY, and others. A -1 indicates the value is null. 3772 ResultRows *int64 `type:"long"` 3773 3774 // The size in bytes of the returned results. A -1 indicates the value is null. 3775 ResultSize *int64 `type:"long"` 3776 3777 // The status of the SQL statement. An example is the that the SQL statement 3778 // finished. 3779 Status *string `type:"string" enum:"StatementStatusString"` 3780 3781 // The date and time (UTC) that the statement metadata was last updated. 3782 UpdatedAt *time.Time `type:"timestamp"` 3783 } 3784 3785 // String returns the string representation. 3786 // 3787 // API parameter values that are decorated as "sensitive" in the API will not 3788 // be included in the string output. The member name will be present, but the 3789 // value will be replaced with "sensitive". 3790 func (s SubStatementData) String() string { 3791 return awsutil.Prettify(s) 3792 } 3793 3794 // GoString returns the string representation. 3795 // 3796 // API parameter values that are decorated as "sensitive" in the API will not 3797 // be included in the string output. The member name will be present, but the 3798 // value will be replaced with "sensitive". 3799 func (s SubStatementData) GoString() string { 3800 return s.String() 3801 } 3802 3803 // SetCreatedAt sets the CreatedAt field's value. 3804 func (s *SubStatementData) SetCreatedAt(v time.Time) *SubStatementData { 3805 s.CreatedAt = &v 3806 return s 3807 } 3808 3809 // SetDuration sets the Duration field's value. 3810 func (s *SubStatementData) SetDuration(v int64) *SubStatementData { 3811 s.Duration = &v 3812 return s 3813 } 3814 3815 // SetError sets the Error field's value. 3816 func (s *SubStatementData) SetError(v string) *SubStatementData { 3817 s.Error = &v 3818 return s 3819 } 3820 3821 // SetHasResultSet sets the HasResultSet field's value. 3822 func (s *SubStatementData) SetHasResultSet(v bool) *SubStatementData { 3823 s.HasResultSet = &v 3824 return s 3825 } 3826 3827 // SetId sets the Id field's value. 3828 func (s *SubStatementData) SetId(v string) *SubStatementData { 3829 s.Id = &v 3830 return s 3831 } 3832 3833 // SetQueryString sets the QueryString field's value. 3834 func (s *SubStatementData) SetQueryString(v string) *SubStatementData { 3835 s.QueryString = &v 3836 return s 3837 } 3838 3839 // SetRedshiftQueryId sets the RedshiftQueryId field's value. 3840 func (s *SubStatementData) SetRedshiftQueryId(v int64) *SubStatementData { 3841 s.RedshiftQueryId = &v 3842 return s 3843 } 3844 3845 // SetResultRows sets the ResultRows field's value. 3846 func (s *SubStatementData) SetResultRows(v int64) *SubStatementData { 3847 s.ResultRows = &v 3848 return s 3849 } 3850 3851 // SetResultSize sets the ResultSize field's value. 3852 func (s *SubStatementData) SetResultSize(v int64) *SubStatementData { 3853 s.ResultSize = &v 3854 return s 3855 } 3856 3857 // SetStatus sets the Status field's value. 3858 func (s *SubStatementData) SetStatus(v string) *SubStatementData { 3859 s.Status = &v 3860 return s 3861 } 3862 3863 // SetUpdatedAt sets the UpdatedAt field's value. 3864 func (s *SubStatementData) SetUpdatedAt(v time.Time) *SubStatementData { 3865 s.UpdatedAt = &v 3866 return s 3867 } 3868 3869 // The properties of a table. 3870 type TableMember struct { 3871 _ struct{} `type:"structure"` 3872 3873 // The name of the table. 3874 Name *string `locationName:"name" type:"string"` 3875 3876 // The schema containing the table. 3877 Schema *string `locationName:"schema" type:"string"` 3878 3879 // The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, 3880 // GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM. 3881 Type *string `locationName:"type" type:"string"` 3882 } 3883 3884 // String returns the string representation. 3885 // 3886 // API parameter values that are decorated as "sensitive" in the API will not 3887 // be included in the string output. The member name will be present, but the 3888 // value will be replaced with "sensitive". 3889 func (s TableMember) String() string { 3890 return awsutil.Prettify(s) 3891 } 3892 3893 // GoString returns the string representation. 3894 // 3895 // API parameter values that are decorated as "sensitive" in the API will not 3896 // be included in the string output. The member name will be present, but the 3897 // value will be replaced with "sensitive". 3898 func (s TableMember) GoString() string { 3899 return s.String() 3900 } 3901 3902 // SetName sets the Name field's value. 3903 func (s *TableMember) SetName(v string) *TableMember { 3904 s.Name = &v 3905 return s 3906 } 3907 3908 // SetSchema sets the Schema field's value. 3909 func (s *TableMember) SetSchema(v string) *TableMember { 3910 s.Schema = &v 3911 return s 3912 } 3913 3914 // SetType sets the Type field's value. 3915 func (s *TableMember) SetType(v string) *TableMember { 3916 s.Type = &v 3917 return s 3918 } 3919 3920 // The Amazon Redshift Data API operation failed due to invalid input. 3921 type ValidationException struct { 3922 _ struct{} `type:"structure"` 3923 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3924 3925 // The exception message. 3926 Message_ *string `locationName:"Message" type:"string"` 3927 } 3928 3929 // String returns the string representation. 3930 // 3931 // API parameter values that are decorated as "sensitive" in the API will not 3932 // be included in the string output. The member name will be present, but the 3933 // value will be replaced with "sensitive". 3934 func (s ValidationException) String() string { 3935 return awsutil.Prettify(s) 3936 } 3937 3938 // GoString returns the string representation. 3939 // 3940 // API parameter values that are decorated as "sensitive" in the API will not 3941 // be included in the string output. The member name will be present, but the 3942 // value will be replaced with "sensitive". 3943 func (s ValidationException) GoString() string { 3944 return s.String() 3945 } 3946 3947 func newErrorValidationException(v protocol.ResponseMetadata) error { 3948 return &ValidationException{ 3949 RespMetadata: v, 3950 } 3951 } 3952 3953 // Code returns the exception type name. 3954 func (s *ValidationException) Code() string { 3955 return "ValidationException" 3956 } 3957 3958 // Message returns the exception's message. 3959 func (s *ValidationException) Message() string { 3960 if s.Message_ != nil { 3961 return *s.Message_ 3962 } 3963 return "" 3964 } 3965 3966 // OrigErr always returns nil, satisfies awserr.Error interface. 3967 func (s *ValidationException) OrigErr() error { 3968 return nil 3969 } 3970 3971 func (s *ValidationException) Error() string { 3972 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3973 } 3974 3975 // Status code returns the HTTP status code for the request's response error. 3976 func (s *ValidationException) StatusCode() int { 3977 return s.RespMetadata.StatusCode 3978 } 3979 3980 // RequestID returns the service's response RequestID for request. 3981 func (s *ValidationException) RequestID() string { 3982 return s.RespMetadata.RequestID 3983 } 3984 3985 const ( 3986 // StatementStatusStringSubmitted is a StatementStatusString enum value 3987 StatementStatusStringSubmitted = "SUBMITTED" 3988 3989 // StatementStatusStringPicked is a StatementStatusString enum value 3990 StatementStatusStringPicked = "PICKED" 3991 3992 // StatementStatusStringStarted is a StatementStatusString enum value 3993 StatementStatusStringStarted = "STARTED" 3994 3995 // StatementStatusStringFinished is a StatementStatusString enum value 3996 StatementStatusStringFinished = "FINISHED" 3997 3998 // StatementStatusStringAborted is a StatementStatusString enum value 3999 StatementStatusStringAborted = "ABORTED" 4000 4001 // StatementStatusStringFailed is a StatementStatusString enum value 4002 StatementStatusStringFailed = "FAILED" 4003 ) 4004 4005 // StatementStatusString_Values returns all elements of the StatementStatusString enum 4006 func StatementStatusString_Values() []string { 4007 return []string{ 4008 StatementStatusStringSubmitted, 4009 StatementStatusStringPicked, 4010 StatementStatusStringStarted, 4011 StatementStatusStringFinished, 4012 StatementStatusStringAborted, 4013 StatementStatusStringFailed, 4014 } 4015 } 4016 4017 const ( 4018 // StatusStringSubmitted is a StatusString enum value 4019 StatusStringSubmitted = "SUBMITTED" 4020 4021 // StatusStringPicked is a StatusString enum value 4022 StatusStringPicked = "PICKED" 4023 4024 // StatusStringStarted is a StatusString enum value 4025 StatusStringStarted = "STARTED" 4026 4027 // StatusStringFinished is a StatusString enum value 4028 StatusStringFinished = "FINISHED" 4029 4030 // StatusStringAborted is a StatusString enum value 4031 StatusStringAborted = "ABORTED" 4032 4033 // StatusStringFailed is a StatusString enum value 4034 StatusStringFailed = "FAILED" 4035 4036 // StatusStringAll is a StatusString enum value 4037 StatusStringAll = "ALL" 4038 ) 4039 4040 // StatusString_Values returns all elements of the StatusString enum 4041 func StatusString_Values() []string { 4042 return []string{ 4043 StatusStringSubmitted, 4044 StatusStringPicked, 4045 StatusStringStarted, 4046 StatusStringFinished, 4047 StatusStringAborted, 4048 StatusStringFailed, 4049 StatusStringAll, 4050 } 4051 }