1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package redshiftdataapiservice 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13) 14 15const opCancelStatement = "CancelStatement" 16 17// CancelStatementRequest generates a "aws/request.Request" representing the 18// client's request for the CancelStatement 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 CancelStatement for more information on using the CancelStatement 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 CancelStatementRequest method. 33// req, resp := client.CancelStatementRequest(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/CancelStatement 41func (c *RedshiftDataAPIService) CancelStatementRequest(input *CancelStatementInput) (req *request.Request, output *CancelStatementOutput) { 42 op := &request.Operation{ 43 Name: opCancelStatement, 44 HTTPMethod: "POST", 45 HTTPPath: "/", 46 } 47 48 if input == nil { 49 input = &CancelStatementInput{} 50 } 51 52 output = &CancelStatementOutput{} 53 req = c.newRequest(op, input, output) 54 return 55} 56 57// CancelStatement API operation for Redshift Data API Service. 58// 59// Cancels a running query. To be canceled, a query must be running. 60// 61// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 62// with awserr.Error's Code and Message methods to get detailed information about 63// the error. 64// 65// See the AWS API reference guide for Redshift Data API Service's 66// API operation CancelStatement for usage and error information. 67// 68// Returned Error Types: 69// * ResourceNotFoundException 70// The Amazon Redshift Data API operation failed due to a missing resource. 71// 72// * InternalServerException 73// The Amazon Redshift Data API operation failed due to invalid input. 74// 75// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/CancelStatement 76func (c *RedshiftDataAPIService) CancelStatement(input *CancelStatementInput) (*CancelStatementOutput, error) { 77 req, out := c.CancelStatementRequest(input) 78 return out, req.Send() 79} 80 81// CancelStatementWithContext is the same as CancelStatement with the addition of 82// the ability to pass a context and additional request options. 83// 84// See CancelStatement for details on how to use this API operation. 85// 86// The context must be non-nil and will be used for request cancellation. If 87// the context is nil a panic will occur. In the future the SDK may create 88// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 89// for more information on using Contexts. 90func (c *RedshiftDataAPIService) CancelStatementWithContext(ctx aws.Context, input *CancelStatementInput, opts ...request.Option) (*CancelStatementOutput, error) { 91 req, out := c.CancelStatementRequest(input) 92 req.SetContext(ctx) 93 req.ApplyOptions(opts...) 94 return out, req.Send() 95} 96 97const opDescribeStatement = "DescribeStatement" 98 99// DescribeStatementRequest generates a "aws/request.Request" representing the 100// client's request for the DescribeStatement operation. The "output" return 101// value will be populated with the request's response once the request completes 102// successfully. 103// 104// Use "Send" method on the returned Request to send the API call to the service. 105// the "output" return value is not valid until after Send returns without error. 106// 107// See DescribeStatement for more information on using the DescribeStatement 108// API call, and error handling. 109// 110// This method is useful when you want to inject custom logic or configuration 111// into the SDK's request lifecycle. Such as custom headers, or retry logic. 112// 113// 114// // Example sending a request using the DescribeStatementRequest method. 115// req, resp := client.DescribeStatementRequest(params) 116// 117// err := req.Send() 118// if err == nil { // resp is now filled 119// fmt.Println(resp) 120// } 121// 122// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeStatement 123func (c *RedshiftDataAPIService) DescribeStatementRequest(input *DescribeStatementInput) (req *request.Request, output *DescribeStatementOutput) { 124 op := &request.Operation{ 125 Name: opDescribeStatement, 126 HTTPMethod: "POST", 127 HTTPPath: "/", 128 } 129 130 if input == nil { 131 input = &DescribeStatementInput{} 132 } 133 134 output = &DescribeStatementOutput{} 135 req = c.newRequest(op, input, output) 136 return 137} 138 139// DescribeStatement API operation for Redshift Data API Service. 140// 141// Describes the details about a specific instance when a query was run by the 142// Amazon Redshift Data API. The information includes when the query started, 143// when it finished, the query status, the number of rows returned, and the 144// SQL statement. 145// 146// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 147// with awserr.Error's Code and Message methods to get detailed information about 148// the error. 149// 150// See the AWS API reference guide for Redshift Data API Service's 151// API operation DescribeStatement for usage and error information. 152// 153// Returned Error Types: 154// * ValidationException 155// The Amazon Redshift Data API operation failed due to invalid input. 156// 157// * ResourceNotFoundException 158// The Amazon Redshift Data API operation failed due to a missing resource. 159// 160// * InternalServerException 161// The Amazon Redshift Data API operation failed due to invalid input. 162// 163// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeStatement 164func (c *RedshiftDataAPIService) DescribeStatement(input *DescribeStatementInput) (*DescribeStatementOutput, error) { 165 req, out := c.DescribeStatementRequest(input) 166 return out, req.Send() 167} 168 169// DescribeStatementWithContext is the same as DescribeStatement with the addition of 170// the ability to pass a context and additional request options. 171// 172// See DescribeStatement for details on how to use this API operation. 173// 174// The context must be non-nil and will be used for request cancellation. If 175// the context is nil a panic will occur. In the future the SDK may create 176// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 177// for more information on using Contexts. 178func (c *RedshiftDataAPIService) DescribeStatementWithContext(ctx aws.Context, input *DescribeStatementInput, opts ...request.Option) (*DescribeStatementOutput, error) { 179 req, out := c.DescribeStatementRequest(input) 180 req.SetContext(ctx) 181 req.ApplyOptions(opts...) 182 return out, req.Send() 183} 184 185const opDescribeTable = "DescribeTable" 186 187// DescribeTableRequest generates a "aws/request.Request" representing the 188// client's request for the DescribeTable operation. The "output" return 189// value will be populated with the request's response once the request completes 190// successfully. 191// 192// Use "Send" method on the returned Request to send the API call to the service. 193// the "output" return value is not valid until after Send returns without error. 194// 195// See DescribeTable for more information on using the DescribeTable 196// API call, and error handling. 197// 198// This method is useful when you want to inject custom logic or configuration 199// into the SDK's request lifecycle. Such as custom headers, or retry logic. 200// 201// 202// // Example sending a request using the DescribeTableRequest method. 203// req, resp := client.DescribeTableRequest(params) 204// 205// err := req.Send() 206// if err == nil { // resp is now filled 207// fmt.Println(resp) 208// } 209// 210// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeTable 211func (c *RedshiftDataAPIService) DescribeTableRequest(input *DescribeTableInput) (req *request.Request, output *DescribeTableOutput) { 212 op := &request.Operation{ 213 Name: opDescribeTable, 214 HTTPMethod: "POST", 215 HTTPPath: "/", 216 Paginator: &request.Paginator{ 217 InputTokens: []string{"NextToken"}, 218 OutputTokens: []string{"NextToken"}, 219 LimitToken: "MaxResults", 220 TruncationToken: "", 221 }, 222 } 223 224 if input == nil { 225 input = &DescribeTableInput{} 226 } 227 228 output = &DescribeTableOutput{} 229 req = c.newRequest(op, input, output) 230 return 231} 232 233// DescribeTable API operation for Redshift Data API Service. 234// 235// Describes the detailed information about a table from metadata in the cluster. 236// The information includes its columns. A token is returned to page through 237// the column list. Depending on the authorization method, use one of the following 238// combinations of request parameters: 239// 240// * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the 241// secret and the cluster identifier that matches the cluster in the secret. 242// 243// * Temporary credentials - specify the cluster identifier, the database 244// name, and the database user name. Permission to call the redshift:GetClusterCredentials 245// operation is required to use this method. 246// 247// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 248// with awserr.Error's Code and Message methods to get detailed information about 249// the error. 250// 251// See the AWS API reference guide for Redshift Data API Service's 252// API operation DescribeTable for usage and error information. 253// 254// Returned Error Types: 255// * ValidationException 256// The Amazon Redshift Data API operation failed due to invalid input. 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/DescribeTable 262func (c *RedshiftDataAPIService) DescribeTable(input *DescribeTableInput) (*DescribeTableOutput, error) { 263 req, out := c.DescribeTableRequest(input) 264 return out, req.Send() 265} 266 267// DescribeTableWithContext is the same as DescribeTable with the addition of 268// the ability to pass a context and additional request options. 269// 270// See DescribeTable 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. 276func (c *RedshiftDataAPIService) DescribeTableWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.Option) (*DescribeTableOutput, error) { 277 req, out := c.DescribeTableRequest(input) 278 req.SetContext(ctx) 279 req.ApplyOptions(opts...) 280 return out, req.Send() 281} 282 283// DescribeTablePages iterates over the pages of a DescribeTable operation, 284// calling the "fn" function with the response data for each page. To stop 285// iterating, return false from the fn function. 286// 287// See DescribeTable method for more information on how to use this operation. 288// 289// Note: This operation can generate multiple requests to a service. 290// 291// // Example iterating over at most 3 pages of a DescribeTable operation. 292// pageNum := 0 293// err := client.DescribeTablePages(params, 294// func(page *redshiftdataapiservice.DescribeTableOutput, lastPage bool) bool { 295// pageNum++ 296// fmt.Println(page) 297// return pageNum <= 3 298// }) 299// 300func (c *RedshiftDataAPIService) DescribeTablePages(input *DescribeTableInput, fn func(*DescribeTableOutput, bool) bool) error { 301 return c.DescribeTablePagesWithContext(aws.BackgroundContext(), input, fn) 302} 303 304// DescribeTablePagesWithContext same as DescribeTablePages except 305// it takes a Context and allows setting request options on the pages. 306// 307// The context must be non-nil and will be used for request cancellation. If 308// the context is nil a panic will occur. In the future the SDK may create 309// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 310// for more information on using Contexts. 311func (c *RedshiftDataAPIService) DescribeTablePagesWithContext(ctx aws.Context, input *DescribeTableInput, fn func(*DescribeTableOutput, bool) bool, opts ...request.Option) error { 312 p := request.Pagination{ 313 NewRequest: func() (*request.Request, error) { 314 var inCpy *DescribeTableInput 315 if input != nil { 316 tmp := *input 317 inCpy = &tmp 318 } 319 req, _ := c.DescribeTableRequest(inCpy) 320 req.SetContext(ctx) 321 req.ApplyOptions(opts...) 322 return req, nil 323 }, 324 } 325 326 for p.Next() { 327 if !fn(p.Page().(*DescribeTableOutput), !p.HasNextPage()) { 328 break 329 } 330 } 331 332 return p.Err() 333} 334 335const opExecuteStatement = "ExecuteStatement" 336 337// ExecuteStatementRequest generates a "aws/request.Request" representing the 338// client's request for the ExecuteStatement operation. The "output" return 339// value will be populated with the request's response once the request completes 340// successfully. 341// 342// Use "Send" method on the returned Request to send the API call to the service. 343// the "output" return value is not valid until after Send returns without error. 344// 345// See ExecuteStatement for more information on using the ExecuteStatement 346// API call, and error handling. 347// 348// This method is useful when you want to inject custom logic or configuration 349// into the SDK's request lifecycle. Such as custom headers, or retry logic. 350// 351// 352// // Example sending a request using the ExecuteStatementRequest method. 353// req, resp := client.ExecuteStatementRequest(params) 354// 355// err := req.Send() 356// if err == nil { // resp is now filled 357// fmt.Println(resp) 358// } 359// 360// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ExecuteStatement 361func (c *RedshiftDataAPIService) ExecuteStatementRequest(input *ExecuteStatementInput) (req *request.Request, output *ExecuteStatementOutput) { 362 op := &request.Operation{ 363 Name: opExecuteStatement, 364 HTTPMethod: "POST", 365 HTTPPath: "/", 366 } 367 368 if input == nil { 369 input = &ExecuteStatementInput{} 370 } 371 372 output = &ExecuteStatementOutput{} 373 req = c.newRequest(op, input, output) 374 return 375} 376 377// ExecuteStatement API operation for Redshift Data API Service. 378// 379// Runs an SQL statement, which can be data manipulation language (DML) or data 380// definition language (DDL). This statement must be a single SQL statement. 381// Depending on the authorization method, use one of the following combinations 382// of request parameters: 383// 384// * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the 385// secret and the cluster identifier that matches the cluster in the secret. 386// 387// * Temporary credentials - specify the cluster identifier, the database 388// name, and the database user name. Permission to call the redshift:GetClusterCredentials 389// operation is required to use this method. 390// 391// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 392// with awserr.Error's Code and Message methods to get detailed information about 393// the error. 394// 395// See the AWS API reference guide for Redshift Data API Service's 396// API operation ExecuteStatement for usage and error information. 397// 398// Returned Error Types: 399// * ValidationException 400// The Amazon Redshift Data API operation failed due to invalid input. 401// 402// * ExecuteStatementException 403// The SQL statement encountered an environmental error while running. 404// 405// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ExecuteStatement 406func (c *RedshiftDataAPIService) ExecuteStatement(input *ExecuteStatementInput) (*ExecuteStatementOutput, error) { 407 req, out := c.ExecuteStatementRequest(input) 408 return out, req.Send() 409} 410 411// ExecuteStatementWithContext is the same as ExecuteStatement with the addition of 412// the ability to pass a context and additional request options. 413// 414// See ExecuteStatement for details on how to use this API operation. 415// 416// The context must be non-nil and will be used for request cancellation. If 417// the context is nil a panic will occur. In the future the SDK may create 418// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 419// for more information on using Contexts. 420func (c *RedshiftDataAPIService) ExecuteStatementWithContext(ctx aws.Context, input *ExecuteStatementInput, opts ...request.Option) (*ExecuteStatementOutput, error) { 421 req, out := c.ExecuteStatementRequest(input) 422 req.SetContext(ctx) 423 req.ApplyOptions(opts...) 424 return out, req.Send() 425} 426 427const opGetStatementResult = "GetStatementResult" 428 429// GetStatementResultRequest generates a "aws/request.Request" representing the 430// client's request for the GetStatementResult operation. The "output" return 431// value will be populated with the request's response once the request completes 432// successfully. 433// 434// Use "Send" method on the returned Request to send the API call to the service. 435// the "output" return value is not valid until after Send returns without error. 436// 437// See GetStatementResult for more information on using the GetStatementResult 438// API call, and error handling. 439// 440// This method is useful when you want to inject custom logic or configuration 441// into the SDK's request lifecycle. Such as custom headers, or retry logic. 442// 443// 444// // Example sending a request using the GetStatementResultRequest method. 445// req, resp := client.GetStatementResultRequest(params) 446// 447// err := req.Send() 448// if err == nil { // resp is now filled 449// fmt.Println(resp) 450// } 451// 452// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/GetStatementResult 453func (c *RedshiftDataAPIService) GetStatementResultRequest(input *GetStatementResultInput) (req *request.Request, output *GetStatementResultOutput) { 454 op := &request.Operation{ 455 Name: opGetStatementResult, 456 HTTPMethod: "POST", 457 HTTPPath: "/", 458 Paginator: &request.Paginator{ 459 InputTokens: []string{"NextToken"}, 460 OutputTokens: []string{"NextToken"}, 461 LimitToken: "", 462 TruncationToken: "", 463 }, 464 } 465 466 if input == nil { 467 input = &GetStatementResultInput{} 468 } 469 470 output = &GetStatementResultOutput{} 471 req = c.newRequest(op, input, output) 472 return 473} 474 475// GetStatementResult API operation for Redshift Data API Service. 476// 477// Fetches the temporarily cached result of an SQL statement. A token is returned 478// to page through the statement results. 479// 480// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 481// with awserr.Error's Code and Message methods to get detailed information about 482// the error. 483// 484// See the AWS API reference guide for Redshift Data API Service's 485// API operation GetStatementResult for usage and error information. 486// 487// Returned Error Types: 488// * ValidationException 489// The Amazon Redshift Data API operation failed due to invalid input. 490// 491// * ResourceNotFoundException 492// The Amazon Redshift Data API operation failed due to a missing resource. 493// 494// * InternalServerException 495// The Amazon Redshift Data API operation failed due to invalid input. 496// 497// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/GetStatementResult 498func (c *RedshiftDataAPIService) GetStatementResult(input *GetStatementResultInput) (*GetStatementResultOutput, error) { 499 req, out := c.GetStatementResultRequest(input) 500 return out, req.Send() 501} 502 503// GetStatementResultWithContext is the same as GetStatementResult with the addition of 504// the ability to pass a context and additional request options. 505// 506// See GetStatementResult for details on how to use this API operation. 507// 508// The context must be non-nil and will be used for request cancellation. If 509// the context is nil a panic will occur. In the future the SDK may create 510// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 511// for more information on using Contexts. 512func (c *RedshiftDataAPIService) GetStatementResultWithContext(ctx aws.Context, input *GetStatementResultInput, opts ...request.Option) (*GetStatementResultOutput, error) { 513 req, out := c.GetStatementResultRequest(input) 514 req.SetContext(ctx) 515 req.ApplyOptions(opts...) 516 return out, req.Send() 517} 518 519// GetStatementResultPages iterates over the pages of a GetStatementResult operation, 520// calling the "fn" function with the response data for each page. To stop 521// iterating, return false from the fn function. 522// 523// See GetStatementResult method for more information on how to use this operation. 524// 525// Note: This operation can generate multiple requests to a service. 526// 527// // Example iterating over at most 3 pages of a GetStatementResult operation. 528// pageNum := 0 529// err := client.GetStatementResultPages(params, 530// func(page *redshiftdataapiservice.GetStatementResultOutput, lastPage bool) bool { 531// pageNum++ 532// fmt.Println(page) 533// return pageNum <= 3 534// }) 535// 536func (c *RedshiftDataAPIService) GetStatementResultPages(input *GetStatementResultInput, fn func(*GetStatementResultOutput, bool) bool) error { 537 return c.GetStatementResultPagesWithContext(aws.BackgroundContext(), input, fn) 538} 539 540// GetStatementResultPagesWithContext same as GetStatementResultPages except 541// it takes a Context and allows setting request options on the pages. 542// 543// The context must be non-nil and will be used for request cancellation. If 544// the context is nil a panic will occur. In the future the SDK may create 545// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 546// for more information on using Contexts. 547func (c *RedshiftDataAPIService) GetStatementResultPagesWithContext(ctx aws.Context, input *GetStatementResultInput, fn func(*GetStatementResultOutput, bool) bool, opts ...request.Option) error { 548 p := request.Pagination{ 549 NewRequest: func() (*request.Request, error) { 550 var inCpy *GetStatementResultInput 551 if input != nil { 552 tmp := *input 553 inCpy = &tmp 554 } 555 req, _ := c.GetStatementResultRequest(inCpy) 556 req.SetContext(ctx) 557 req.ApplyOptions(opts...) 558 return req, nil 559 }, 560 } 561 562 for p.Next() { 563 if !fn(p.Page().(*GetStatementResultOutput), !p.HasNextPage()) { 564 break 565 } 566 } 567 568 return p.Err() 569} 570 571const opListDatabases = "ListDatabases" 572 573// ListDatabasesRequest generates a "aws/request.Request" representing the 574// client's request for the ListDatabases operation. The "output" return 575// value will be populated with the request's response once the request completes 576// successfully. 577// 578// Use "Send" method on the returned Request to send the API call to the service. 579// the "output" return value is not valid until after Send returns without error. 580// 581// See ListDatabases for more information on using the ListDatabases 582// API call, and error handling. 583// 584// This method is useful when you want to inject custom logic or configuration 585// into the SDK's request lifecycle. Such as custom headers, or retry logic. 586// 587// 588// // Example sending a request using the ListDatabasesRequest method. 589// req, resp := client.ListDatabasesRequest(params) 590// 591// err := req.Send() 592// if err == nil { // resp is now filled 593// fmt.Println(resp) 594// } 595// 596// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListDatabases 597func (c *RedshiftDataAPIService) ListDatabasesRequest(input *ListDatabasesInput) (req *request.Request, output *ListDatabasesOutput) { 598 op := &request.Operation{ 599 Name: opListDatabases, 600 HTTPMethod: "POST", 601 HTTPPath: "/", 602 Paginator: &request.Paginator{ 603 InputTokens: []string{"NextToken"}, 604 OutputTokens: []string{"NextToken"}, 605 LimitToken: "MaxResults", 606 TruncationToken: "", 607 }, 608 } 609 610 if input == nil { 611 input = &ListDatabasesInput{} 612 } 613 614 output = &ListDatabasesOutput{} 615 req = c.newRequest(op, input, output) 616 return 617} 618 619// ListDatabases API operation for Redshift Data API Service. 620// 621// List the databases in a cluster. A token is returned to page through the 622// database list. Depending on the authorization method, use one of the following 623// combinations of request parameters: 624// 625// * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the 626// secret and the cluster identifier that matches the cluster in the secret. 627// 628// * Temporary credentials - specify the cluster identifier, the database 629// name, and the database user name. Permission to call the redshift:GetClusterCredentials 630// operation is required to use this method. 631// 632// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 633// with awserr.Error's Code and Message methods to get detailed information about 634// the error. 635// 636// See the AWS API reference guide for Redshift Data API Service's 637// API operation ListDatabases for usage and error information. 638// 639// Returned Error Types: 640// * ValidationException 641// The Amazon Redshift Data API operation failed due to invalid input. 642// 643// * InternalServerException 644// The Amazon Redshift Data API operation failed due to invalid input. 645// 646// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListDatabases 647func (c *RedshiftDataAPIService) ListDatabases(input *ListDatabasesInput) (*ListDatabasesOutput, error) { 648 req, out := c.ListDatabasesRequest(input) 649 return out, req.Send() 650} 651 652// ListDatabasesWithContext is the same as ListDatabases with the addition of 653// the ability to pass a context and additional request options. 654// 655// See ListDatabases for details on how to use this API operation. 656// 657// The context must be non-nil and will be used for request cancellation. If 658// the context is nil a panic will occur. In the future the SDK may create 659// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 660// for more information on using Contexts. 661func (c *RedshiftDataAPIService) ListDatabasesWithContext(ctx aws.Context, input *ListDatabasesInput, opts ...request.Option) (*ListDatabasesOutput, error) { 662 req, out := c.ListDatabasesRequest(input) 663 req.SetContext(ctx) 664 req.ApplyOptions(opts...) 665 return out, req.Send() 666} 667 668// ListDatabasesPages iterates over the pages of a ListDatabases operation, 669// calling the "fn" function with the response data for each page. To stop 670// iterating, return false from the fn function. 671// 672// See ListDatabases method for more information on how to use this operation. 673// 674// Note: This operation can generate multiple requests to a service. 675// 676// // Example iterating over at most 3 pages of a ListDatabases operation. 677// pageNum := 0 678// err := client.ListDatabasesPages(params, 679// func(page *redshiftdataapiservice.ListDatabasesOutput, lastPage bool) bool { 680// pageNum++ 681// fmt.Println(page) 682// return pageNum <= 3 683// }) 684// 685func (c *RedshiftDataAPIService) ListDatabasesPages(input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool) error { 686 return c.ListDatabasesPagesWithContext(aws.BackgroundContext(), input, fn) 687} 688 689// ListDatabasesPagesWithContext same as ListDatabasesPages except 690// it takes a Context and allows setting request options on the pages. 691// 692// The context must be non-nil and will be used for request cancellation. If 693// the context is nil a panic will occur. In the future the SDK may create 694// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 695// for more information on using Contexts. 696func (c *RedshiftDataAPIService) ListDatabasesPagesWithContext(ctx aws.Context, input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool, opts ...request.Option) error { 697 p := request.Pagination{ 698 NewRequest: func() (*request.Request, error) { 699 var inCpy *ListDatabasesInput 700 if input != nil { 701 tmp := *input 702 inCpy = &tmp 703 } 704 req, _ := c.ListDatabasesRequest(inCpy) 705 req.SetContext(ctx) 706 req.ApplyOptions(opts...) 707 return req, nil 708 }, 709 } 710 711 for p.Next() { 712 if !fn(p.Page().(*ListDatabasesOutput), !p.HasNextPage()) { 713 break 714 } 715 } 716 717 return p.Err() 718} 719 720const opListSchemas = "ListSchemas" 721 722// ListSchemasRequest generates a "aws/request.Request" representing the 723// client's request for the ListSchemas operation. The "output" return 724// value will be populated with the request's response once the request completes 725// successfully. 726// 727// Use "Send" method on the returned Request to send the API call to the service. 728// the "output" return value is not valid until after Send returns without error. 729// 730// See ListSchemas for more information on using the ListSchemas 731// API call, and error handling. 732// 733// This method is useful when you want to inject custom logic or configuration 734// into the SDK's request lifecycle. Such as custom headers, or retry logic. 735// 736// 737// // Example sending a request using the ListSchemasRequest method. 738// req, resp := client.ListSchemasRequest(params) 739// 740// err := req.Send() 741// if err == nil { // resp is now filled 742// fmt.Println(resp) 743// } 744// 745// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListSchemas 746func (c *RedshiftDataAPIService) ListSchemasRequest(input *ListSchemasInput) (req *request.Request, output *ListSchemasOutput) { 747 op := &request.Operation{ 748 Name: opListSchemas, 749 HTTPMethod: "POST", 750 HTTPPath: "/", 751 Paginator: &request.Paginator{ 752 InputTokens: []string{"NextToken"}, 753 OutputTokens: []string{"NextToken"}, 754 LimitToken: "MaxResults", 755 TruncationToken: "", 756 }, 757 } 758 759 if input == nil { 760 input = &ListSchemasInput{} 761 } 762 763 output = &ListSchemasOutput{} 764 req = c.newRequest(op, input, output) 765 return 766} 767 768// ListSchemas API operation for Redshift Data API Service. 769// 770// Lists the schemas in a database. A token is returned to page through the 771// schema list. Depending on the authorization method, use one of the following 772// combinations of request parameters: 773// 774// * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the 775// secret and the cluster identifier that matches the cluster in the secret. 776// 777// * Temporary credentials - specify the cluster identifier, the database 778// name, and the database user name. Permission to call the redshift:GetClusterCredentials 779// operation is required to use this method. 780// 781// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 782// with awserr.Error's Code and Message methods to get detailed information about 783// the error. 784// 785// See the AWS API reference guide for Redshift Data API Service's 786// API operation ListSchemas for usage and error information. 787// 788// Returned Error Types: 789// * ValidationException 790// The Amazon Redshift Data API operation failed due to invalid input. 791// 792// * InternalServerException 793// The Amazon Redshift Data API operation failed due to invalid input. 794// 795// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListSchemas 796func (c *RedshiftDataAPIService) ListSchemas(input *ListSchemasInput) (*ListSchemasOutput, error) { 797 req, out := c.ListSchemasRequest(input) 798 return out, req.Send() 799} 800 801// ListSchemasWithContext is the same as ListSchemas with the addition of 802// the ability to pass a context and additional request options. 803// 804// See ListSchemas for details on how to use this API operation. 805// 806// The context must be non-nil and will be used for request cancellation. If 807// the context is nil a panic will occur. In the future the SDK may create 808// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 809// for more information on using Contexts. 810func (c *RedshiftDataAPIService) ListSchemasWithContext(ctx aws.Context, input *ListSchemasInput, opts ...request.Option) (*ListSchemasOutput, error) { 811 req, out := c.ListSchemasRequest(input) 812 req.SetContext(ctx) 813 req.ApplyOptions(opts...) 814 return out, req.Send() 815} 816 817// ListSchemasPages iterates over the pages of a ListSchemas operation, 818// calling the "fn" function with the response data for each page. To stop 819// iterating, return false from the fn function. 820// 821// See ListSchemas method for more information on how to use this operation. 822// 823// Note: This operation can generate multiple requests to a service. 824// 825// // Example iterating over at most 3 pages of a ListSchemas operation. 826// pageNum := 0 827// err := client.ListSchemasPages(params, 828// func(page *redshiftdataapiservice.ListSchemasOutput, lastPage bool) bool { 829// pageNum++ 830// fmt.Println(page) 831// return pageNum <= 3 832// }) 833// 834func (c *RedshiftDataAPIService) ListSchemasPages(input *ListSchemasInput, fn func(*ListSchemasOutput, bool) bool) error { 835 return c.ListSchemasPagesWithContext(aws.BackgroundContext(), input, fn) 836} 837 838// ListSchemasPagesWithContext same as ListSchemasPages except 839// it takes a Context and allows setting request options on the pages. 840// 841// The context must be non-nil and will be used for request cancellation. If 842// the context is nil a panic will occur. In the future the SDK may create 843// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 844// for more information on using Contexts. 845func (c *RedshiftDataAPIService) ListSchemasPagesWithContext(ctx aws.Context, input *ListSchemasInput, fn func(*ListSchemasOutput, bool) bool, opts ...request.Option) error { 846 p := request.Pagination{ 847 NewRequest: func() (*request.Request, error) { 848 var inCpy *ListSchemasInput 849 if input != nil { 850 tmp := *input 851 inCpy = &tmp 852 } 853 req, _ := c.ListSchemasRequest(inCpy) 854 req.SetContext(ctx) 855 req.ApplyOptions(opts...) 856 return req, nil 857 }, 858 } 859 860 for p.Next() { 861 if !fn(p.Page().(*ListSchemasOutput), !p.HasNextPage()) { 862 break 863 } 864 } 865 866 return p.Err() 867} 868 869const opListStatements = "ListStatements" 870 871// ListStatementsRequest generates a "aws/request.Request" representing the 872// client's request for the ListStatements operation. The "output" return 873// value will be populated with the request's response once the request completes 874// successfully. 875// 876// Use "Send" method on the returned Request to send the API call to the service. 877// the "output" return value is not valid until after Send returns without error. 878// 879// See ListStatements for more information on using the ListStatements 880// API call, and error handling. 881// 882// This method is useful when you want to inject custom logic or configuration 883// into the SDK's request lifecycle. Such as custom headers, or retry logic. 884// 885// 886// // Example sending a request using the ListStatementsRequest method. 887// req, resp := client.ListStatementsRequest(params) 888// 889// err := req.Send() 890// if err == nil { // resp is now filled 891// fmt.Println(resp) 892// } 893// 894// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListStatements 895func (c *RedshiftDataAPIService) ListStatementsRequest(input *ListStatementsInput) (req *request.Request, output *ListStatementsOutput) { 896 op := &request.Operation{ 897 Name: opListStatements, 898 HTTPMethod: "POST", 899 HTTPPath: "/", 900 Paginator: &request.Paginator{ 901 InputTokens: []string{"NextToken"}, 902 OutputTokens: []string{"NextToken"}, 903 LimitToken: "MaxResults", 904 TruncationToken: "", 905 }, 906 } 907 908 if input == nil { 909 input = &ListStatementsInput{} 910 } 911 912 output = &ListStatementsOutput{} 913 req = c.newRequest(op, input, output) 914 return 915} 916 917// ListStatements API operation for Redshift Data API Service. 918// 919// List of SQL statements. By default, only finished statements are shown. A 920// token is returned to page through the statement list. 921// 922// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 923// with awserr.Error's Code and Message methods to get detailed information about 924// the error. 925// 926// See the AWS API reference guide for Redshift Data API Service's 927// API operation ListStatements for usage and error information. 928// 929// Returned Error Types: 930// * ValidationException 931// The Amazon Redshift Data API operation failed due to invalid input. 932// 933// * InternalServerException 934// The Amazon Redshift Data API operation failed due to invalid input. 935// 936// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListStatements 937func (c *RedshiftDataAPIService) ListStatements(input *ListStatementsInput) (*ListStatementsOutput, error) { 938 req, out := c.ListStatementsRequest(input) 939 return out, req.Send() 940} 941 942// ListStatementsWithContext is the same as ListStatements with the addition of 943// the ability to pass a context and additional request options. 944// 945// See ListStatements for details on how to use this API operation. 946// 947// The context must be non-nil and will be used for request cancellation. If 948// the context is nil a panic will occur. In the future the SDK may create 949// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 950// for more information on using Contexts. 951func (c *RedshiftDataAPIService) ListStatementsWithContext(ctx aws.Context, input *ListStatementsInput, opts ...request.Option) (*ListStatementsOutput, error) { 952 req, out := c.ListStatementsRequest(input) 953 req.SetContext(ctx) 954 req.ApplyOptions(opts...) 955 return out, req.Send() 956} 957 958// ListStatementsPages iterates over the pages of a ListStatements operation, 959// calling the "fn" function with the response data for each page. To stop 960// iterating, return false from the fn function. 961// 962// See ListStatements method for more information on how to use this operation. 963// 964// Note: This operation can generate multiple requests to a service. 965// 966// // Example iterating over at most 3 pages of a ListStatements operation. 967// pageNum := 0 968// err := client.ListStatementsPages(params, 969// func(page *redshiftdataapiservice.ListStatementsOutput, lastPage bool) bool { 970// pageNum++ 971// fmt.Println(page) 972// return pageNum <= 3 973// }) 974// 975func (c *RedshiftDataAPIService) ListStatementsPages(input *ListStatementsInput, fn func(*ListStatementsOutput, bool) bool) error { 976 return c.ListStatementsPagesWithContext(aws.BackgroundContext(), input, fn) 977} 978 979// ListStatementsPagesWithContext same as ListStatementsPages except 980// it takes a Context and allows setting request options on the pages. 981// 982// The context must be non-nil and will be used for request cancellation. If 983// the context is nil a panic will occur. In the future the SDK may create 984// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 985// for more information on using Contexts. 986func (c *RedshiftDataAPIService) ListStatementsPagesWithContext(ctx aws.Context, input *ListStatementsInput, fn func(*ListStatementsOutput, bool) bool, opts ...request.Option) error { 987 p := request.Pagination{ 988 NewRequest: func() (*request.Request, error) { 989 var inCpy *ListStatementsInput 990 if input != nil { 991 tmp := *input 992 inCpy = &tmp 993 } 994 req, _ := c.ListStatementsRequest(inCpy) 995 req.SetContext(ctx) 996 req.ApplyOptions(opts...) 997 return req, nil 998 }, 999 } 1000 1001 for p.Next() { 1002 if !fn(p.Page().(*ListStatementsOutput), !p.HasNextPage()) { 1003 break 1004 } 1005 } 1006 1007 return p.Err() 1008} 1009 1010const opListTables = "ListTables" 1011 1012// ListTablesRequest generates a "aws/request.Request" representing the 1013// client's request for the ListTables operation. The "output" return 1014// value will be populated with the request's response once the request completes 1015// successfully. 1016// 1017// Use "Send" method on the returned Request to send the API call to the service. 1018// the "output" return value is not valid until after Send returns without error. 1019// 1020// See ListTables for more information on using the ListTables 1021// API call, and error handling. 1022// 1023// This method is useful when you want to inject custom logic or configuration 1024// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1025// 1026// 1027// // Example sending a request using the ListTablesRequest method. 1028// req, resp := client.ListTablesRequest(params) 1029// 1030// err := req.Send() 1031// if err == nil { // resp is now filled 1032// fmt.Println(resp) 1033// } 1034// 1035// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListTables 1036func (c *RedshiftDataAPIService) ListTablesRequest(input *ListTablesInput) (req *request.Request, output *ListTablesOutput) { 1037 op := &request.Operation{ 1038 Name: opListTables, 1039 HTTPMethod: "POST", 1040 HTTPPath: "/", 1041 Paginator: &request.Paginator{ 1042 InputTokens: []string{"NextToken"}, 1043 OutputTokens: []string{"NextToken"}, 1044 LimitToken: "MaxResults", 1045 TruncationToken: "", 1046 }, 1047 } 1048 1049 if input == nil { 1050 input = &ListTablesInput{} 1051 } 1052 1053 output = &ListTablesOutput{} 1054 req = c.newRequest(op, input, output) 1055 return 1056} 1057 1058// ListTables API operation for Redshift Data API Service. 1059// 1060// List the tables in a database. If neither SchemaPattern nor TablePattern 1061// are specified, then all tables in the database are returned. A token is returned 1062// to page through the table list. Depending on the authorization method, use 1063// one of the following combinations of request parameters: 1064// 1065// * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the 1066// secret and the cluster identifier that matches the cluster in the secret. 1067// 1068// * Temporary credentials - specify the cluster identifier, the database 1069// name, and the database user name. Permission to call the redshift:GetClusterCredentials 1070// operation is required to use this method. 1071// 1072// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1073// with awserr.Error's Code and Message methods to get detailed information about 1074// the error. 1075// 1076// See the AWS API reference guide for Redshift Data API Service's 1077// API operation ListTables for usage and error information. 1078// 1079// Returned Error Types: 1080// * ValidationException 1081// The Amazon Redshift Data API operation failed due to invalid input. 1082// 1083// * InternalServerException 1084// The Amazon Redshift Data API operation failed due to invalid input. 1085// 1086// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListTables 1087func (c *RedshiftDataAPIService) ListTables(input *ListTablesInput) (*ListTablesOutput, error) { 1088 req, out := c.ListTablesRequest(input) 1089 return out, req.Send() 1090} 1091 1092// ListTablesWithContext is the same as ListTables with the addition of 1093// the ability to pass a context and additional request options. 1094// 1095// See ListTables for details on how to use this API operation. 1096// 1097// The context must be non-nil and will be used for request cancellation. If 1098// the context is nil a panic will occur. In the future the SDK may create 1099// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1100// for more information on using Contexts. 1101func (c *RedshiftDataAPIService) ListTablesWithContext(ctx aws.Context, input *ListTablesInput, opts ...request.Option) (*ListTablesOutput, error) { 1102 req, out := c.ListTablesRequest(input) 1103 req.SetContext(ctx) 1104 req.ApplyOptions(opts...) 1105 return out, req.Send() 1106} 1107 1108// ListTablesPages iterates over the pages of a ListTables operation, 1109// calling the "fn" function with the response data for each page. To stop 1110// iterating, return false from the fn function. 1111// 1112// See ListTables method for more information on how to use this operation. 1113// 1114// Note: This operation can generate multiple requests to a service. 1115// 1116// // Example iterating over at most 3 pages of a ListTables operation. 1117// pageNum := 0 1118// err := client.ListTablesPages(params, 1119// func(page *redshiftdataapiservice.ListTablesOutput, lastPage bool) bool { 1120// pageNum++ 1121// fmt.Println(page) 1122// return pageNum <= 3 1123// }) 1124// 1125func (c *RedshiftDataAPIService) ListTablesPages(input *ListTablesInput, fn func(*ListTablesOutput, bool) bool) error { 1126 return c.ListTablesPagesWithContext(aws.BackgroundContext(), input, fn) 1127} 1128 1129// ListTablesPagesWithContext same as ListTablesPages except 1130// it takes a Context and allows setting request options on the pages. 1131// 1132// The context must be non-nil and will be used for request cancellation. If 1133// the context is nil a panic will occur. In the future the SDK may create 1134// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1135// for more information on using Contexts. 1136func (c *RedshiftDataAPIService) ListTablesPagesWithContext(ctx aws.Context, input *ListTablesInput, fn func(*ListTablesOutput, bool) bool, opts ...request.Option) error { 1137 p := request.Pagination{ 1138 NewRequest: func() (*request.Request, error) { 1139 var inCpy *ListTablesInput 1140 if input != nil { 1141 tmp := *input 1142 inCpy = &tmp 1143 } 1144 req, _ := c.ListTablesRequest(inCpy) 1145 req.SetContext(ctx) 1146 req.ApplyOptions(opts...) 1147 return req, nil 1148 }, 1149 } 1150 1151 for p.Next() { 1152 if !fn(p.Page().(*ListTablesOutput), !p.HasNextPage()) { 1153 break 1154 } 1155 } 1156 1157 return p.Err() 1158} 1159 1160type CancelStatementInput struct { 1161 _ struct{} `type:"structure"` 1162 1163 // The identifier of the SQL statement to cancel. This value is a universally 1164 // unique identifier (UUID) generated by Amazon Redshift Data API. This identifier 1165 // is returned by ExecuteStatment and ListStatements. 1166 // 1167 // Id is a required field 1168 Id *string `type:"string" required:"true"` 1169} 1170 1171// String returns the string representation 1172func (s CancelStatementInput) String() string { 1173 return awsutil.Prettify(s) 1174} 1175 1176// GoString returns the string representation 1177func (s CancelStatementInput) GoString() string { 1178 return s.String() 1179} 1180 1181// Validate inspects the fields of the type to determine if they are valid. 1182func (s *CancelStatementInput) Validate() error { 1183 invalidParams := request.ErrInvalidParams{Context: "CancelStatementInput"} 1184 if s.Id == nil { 1185 invalidParams.Add(request.NewErrParamRequired("Id")) 1186 } 1187 1188 if invalidParams.Len() > 0 { 1189 return invalidParams 1190 } 1191 return nil 1192} 1193 1194// SetId sets the Id field's value. 1195func (s *CancelStatementInput) SetId(v string) *CancelStatementInput { 1196 s.Id = &v 1197 return s 1198} 1199 1200type CancelStatementOutput struct { 1201 _ struct{} `type:"structure"` 1202 1203 // A value that indicates whether the cancel statement succeeded (true). 1204 Status *bool `type:"boolean"` 1205} 1206 1207// String returns the string representation 1208func (s CancelStatementOutput) String() string { 1209 return awsutil.Prettify(s) 1210} 1211 1212// GoString returns the string representation 1213func (s CancelStatementOutput) GoString() string { 1214 return s.String() 1215} 1216 1217// SetStatus sets the Status field's value. 1218func (s *CancelStatementOutput) SetStatus(v bool) *CancelStatementOutput { 1219 s.Status = &v 1220 return s 1221} 1222 1223// The properties (metadata) of a column. 1224type ColumnMetadata struct { 1225 _ struct{} `type:"structure"` 1226 1227 // The default value of the column. 1228 ColumnDefault *string `locationName:"columnDefault" type:"string"` 1229 1230 // A value that indicates whether the column is case-sensitive. 1231 IsCaseSensitive *bool `locationName:"isCaseSensitive" type:"boolean"` 1232 1233 // A value that indicates whether the column contains currency values. 1234 IsCurrency *bool `locationName:"isCurrency" type:"boolean"` 1235 1236 // A value that indicates whether an integer column is signed. 1237 IsSigned *bool `locationName:"isSigned" type:"boolean"` 1238 1239 // The label for the column. 1240 Label *string `locationName:"label" type:"string"` 1241 1242 // The length of the column. 1243 Length *int64 `locationName:"length" type:"integer"` 1244 1245 // The name of the column. 1246 Name *string `locationName:"name" type:"string"` 1247 1248 // A value that indicates whether the column is nullable. 1249 Nullable *int64 `locationName:"nullable" type:"integer"` 1250 1251 // The precision value of a decimal number column. 1252 Precision *int64 `locationName:"precision" type:"integer"` 1253 1254 // The scale value of a decimal number column. 1255 Scale *int64 `locationName:"scale" type:"integer"` 1256 1257 // The name of the schema that contains the table that includes the column. 1258 SchemaName *string `locationName:"schemaName" type:"string"` 1259 1260 // The name of the table that includes the column. 1261 TableName *string `locationName:"tableName" type:"string"` 1262 1263 // The database-specific data type of the column. 1264 TypeName *string `locationName:"typeName" type:"string"` 1265} 1266 1267// String returns the string representation 1268func (s ColumnMetadata) String() string { 1269 return awsutil.Prettify(s) 1270} 1271 1272// GoString returns the string representation 1273func (s ColumnMetadata) GoString() string { 1274 return s.String() 1275} 1276 1277// SetColumnDefault sets the ColumnDefault field's value. 1278func (s *ColumnMetadata) SetColumnDefault(v string) *ColumnMetadata { 1279 s.ColumnDefault = &v 1280 return s 1281} 1282 1283// SetIsCaseSensitive sets the IsCaseSensitive field's value. 1284func (s *ColumnMetadata) SetIsCaseSensitive(v bool) *ColumnMetadata { 1285 s.IsCaseSensitive = &v 1286 return s 1287} 1288 1289// SetIsCurrency sets the IsCurrency field's value. 1290func (s *ColumnMetadata) SetIsCurrency(v bool) *ColumnMetadata { 1291 s.IsCurrency = &v 1292 return s 1293} 1294 1295// SetIsSigned sets the IsSigned field's value. 1296func (s *ColumnMetadata) SetIsSigned(v bool) *ColumnMetadata { 1297 s.IsSigned = &v 1298 return s 1299} 1300 1301// SetLabel sets the Label field's value. 1302func (s *ColumnMetadata) SetLabel(v string) *ColumnMetadata { 1303 s.Label = &v 1304 return s 1305} 1306 1307// SetLength sets the Length field's value. 1308func (s *ColumnMetadata) SetLength(v int64) *ColumnMetadata { 1309 s.Length = &v 1310 return s 1311} 1312 1313// SetName sets the Name field's value. 1314func (s *ColumnMetadata) SetName(v string) *ColumnMetadata { 1315 s.Name = &v 1316 return s 1317} 1318 1319// SetNullable sets the Nullable field's value. 1320func (s *ColumnMetadata) SetNullable(v int64) *ColumnMetadata { 1321 s.Nullable = &v 1322 return s 1323} 1324 1325// SetPrecision sets the Precision field's value. 1326func (s *ColumnMetadata) SetPrecision(v int64) *ColumnMetadata { 1327 s.Precision = &v 1328 return s 1329} 1330 1331// SetScale sets the Scale field's value. 1332func (s *ColumnMetadata) SetScale(v int64) *ColumnMetadata { 1333 s.Scale = &v 1334 return s 1335} 1336 1337// SetSchemaName sets the SchemaName field's value. 1338func (s *ColumnMetadata) SetSchemaName(v string) *ColumnMetadata { 1339 s.SchemaName = &v 1340 return s 1341} 1342 1343// SetTableName sets the TableName field's value. 1344func (s *ColumnMetadata) SetTableName(v string) *ColumnMetadata { 1345 s.TableName = &v 1346 return s 1347} 1348 1349// SetTypeName sets the TypeName field's value. 1350func (s *ColumnMetadata) SetTypeName(v string) *ColumnMetadata { 1351 s.TypeName = &v 1352 return s 1353} 1354 1355type DescribeStatementInput struct { 1356 _ struct{} `type:"structure"` 1357 1358 // The identifier of the SQL statement to describe. This value is a universally 1359 // unique identifier (UUID) generated by Amazon Redshift Data API. This identifier 1360 // is returned by ExecuteStatment and ListStatements. 1361 // 1362 // Id is a required field 1363 Id *string `type:"string" required:"true"` 1364} 1365 1366// String returns the string representation 1367func (s DescribeStatementInput) String() string { 1368 return awsutil.Prettify(s) 1369} 1370 1371// GoString returns the string representation 1372func (s DescribeStatementInput) GoString() string { 1373 return s.String() 1374} 1375 1376// Validate inspects the fields of the type to determine if they are valid. 1377func (s *DescribeStatementInput) Validate() error { 1378 invalidParams := request.ErrInvalidParams{Context: "DescribeStatementInput"} 1379 if s.Id == nil { 1380 invalidParams.Add(request.NewErrParamRequired("Id")) 1381 } 1382 1383 if invalidParams.Len() > 0 { 1384 return invalidParams 1385 } 1386 return nil 1387} 1388 1389// SetId sets the Id field's value. 1390func (s *DescribeStatementInput) SetId(v string) *DescribeStatementInput { 1391 s.Id = &v 1392 return s 1393} 1394 1395type DescribeStatementOutput struct { 1396 _ struct{} `type:"structure"` 1397 1398 // The cluster identifier. 1399 ClusterIdentifier *string `type:"string"` 1400 1401 // The date and time (UTC) when the SQL statement was submitted to run. 1402 CreatedAt *time.Time `type:"timestamp"` 1403 1404 // The name of the database. 1405 Database *string `type:"string"` 1406 1407 // The database user name. 1408 DbUser *string `type:"string"` 1409 1410 // The amount of time in nanoseconds that the statement ran. 1411 Duration *int64 `type:"long"` 1412 1413 // The error message from the cluster if the SQL statement encountered an error 1414 // while running. 1415 Error *string `type:"string"` 1416 1417 // The identifier of the SQL statement described. This value is a universally 1418 // unique identifier (UUID) generated by Amazon Redshift Data API. 1419 // 1420 // Id is a required field 1421 Id *string `type:"string" required:"true"` 1422 1423 // The SQL statement text. 1424 QueryString *string `type:"string"` 1425 1426 // The process identifier from Amazon Redshift. 1427 RedshiftPid *int64 `type:"long"` 1428 1429 // The identifier of the query generated by Amazon Redshift. These identifiers 1430 // are also available in the query column of the STL_QUERY system view. 1431 RedshiftQueryId *int64 `type:"long"` 1432 1433 // Either the number of rows returned from the SQL statement or the number of 1434 // rows affected. If result size is greater than zero, the result rows can be 1435 // the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, 1436 // COPY, and others. 1437 ResultRows *int64 `type:"long"` 1438 1439 // The size in bytes of the returned results. 1440 ResultSize *int64 `type:"long"` 1441 1442 // The name or Amazon Resource Name (ARN) of the secret that enables access 1443 // to the database. 1444 SecretArn *string `type:"string"` 1445 1446 // The status of the SQL statement being described. Status values are defined 1447 // as follows: 1448 // 1449 // * ABORTED - The query run was stopped by the user. 1450 // 1451 // * ALL - A status value that includes all query statuses. This value can 1452 // be used to filter results. 1453 // 1454 // * FAILED - The query run failed. 1455 // 1456 // * FINISHED - The query has finished running. 1457 // 1458 // * PICKED - The query has been chosen to be run. 1459 // 1460 // * STARTED - The query run has started. 1461 // 1462 // * SUBMITTED - The query was submitted, but not yet processed. 1463 Status *string `type:"string" enum:"StatusString"` 1464 1465 // The date and time (UTC) that the metadata for the SQL statement was last 1466 // updated. An example is the time the status last changed. 1467 UpdatedAt *time.Time `type:"timestamp"` 1468} 1469 1470// String returns the string representation 1471func (s DescribeStatementOutput) String() string { 1472 return awsutil.Prettify(s) 1473} 1474 1475// GoString returns the string representation 1476func (s DescribeStatementOutput) GoString() string { 1477 return s.String() 1478} 1479 1480// SetClusterIdentifier sets the ClusterIdentifier field's value. 1481func (s *DescribeStatementOutput) SetClusterIdentifier(v string) *DescribeStatementOutput { 1482 s.ClusterIdentifier = &v 1483 return s 1484} 1485 1486// SetCreatedAt sets the CreatedAt field's value. 1487func (s *DescribeStatementOutput) SetCreatedAt(v time.Time) *DescribeStatementOutput { 1488 s.CreatedAt = &v 1489 return s 1490} 1491 1492// SetDatabase sets the Database field's value. 1493func (s *DescribeStatementOutput) SetDatabase(v string) *DescribeStatementOutput { 1494 s.Database = &v 1495 return s 1496} 1497 1498// SetDbUser sets the DbUser field's value. 1499func (s *DescribeStatementOutput) SetDbUser(v string) *DescribeStatementOutput { 1500 s.DbUser = &v 1501 return s 1502} 1503 1504// SetDuration sets the Duration field's value. 1505func (s *DescribeStatementOutput) SetDuration(v int64) *DescribeStatementOutput { 1506 s.Duration = &v 1507 return s 1508} 1509 1510// SetError sets the Error field's value. 1511func (s *DescribeStatementOutput) SetError(v string) *DescribeStatementOutput { 1512 s.Error = &v 1513 return s 1514} 1515 1516// SetId sets the Id field's value. 1517func (s *DescribeStatementOutput) SetId(v string) *DescribeStatementOutput { 1518 s.Id = &v 1519 return s 1520} 1521 1522// SetQueryString sets the QueryString field's value. 1523func (s *DescribeStatementOutput) SetQueryString(v string) *DescribeStatementOutput { 1524 s.QueryString = &v 1525 return s 1526} 1527 1528// SetRedshiftPid sets the RedshiftPid field's value. 1529func (s *DescribeStatementOutput) SetRedshiftPid(v int64) *DescribeStatementOutput { 1530 s.RedshiftPid = &v 1531 return s 1532} 1533 1534// SetRedshiftQueryId sets the RedshiftQueryId field's value. 1535func (s *DescribeStatementOutput) SetRedshiftQueryId(v int64) *DescribeStatementOutput { 1536 s.RedshiftQueryId = &v 1537 return s 1538} 1539 1540// SetResultRows sets the ResultRows field's value. 1541func (s *DescribeStatementOutput) SetResultRows(v int64) *DescribeStatementOutput { 1542 s.ResultRows = &v 1543 return s 1544} 1545 1546// SetResultSize sets the ResultSize field's value. 1547func (s *DescribeStatementOutput) SetResultSize(v int64) *DescribeStatementOutput { 1548 s.ResultSize = &v 1549 return s 1550} 1551 1552// SetSecretArn sets the SecretArn field's value. 1553func (s *DescribeStatementOutput) SetSecretArn(v string) *DescribeStatementOutput { 1554 s.SecretArn = &v 1555 return s 1556} 1557 1558// SetStatus sets the Status field's value. 1559func (s *DescribeStatementOutput) SetStatus(v string) *DescribeStatementOutput { 1560 s.Status = &v 1561 return s 1562} 1563 1564// SetUpdatedAt sets the UpdatedAt field's value. 1565func (s *DescribeStatementOutput) SetUpdatedAt(v time.Time) *DescribeStatementOutput { 1566 s.UpdatedAt = &v 1567 return s 1568} 1569 1570type DescribeTableInput struct { 1571 _ struct{} `type:"structure"` 1572 1573 // The cluster identifier. This parameter is required when authenticating using 1574 // either AWS Secrets Manager or temporary credentials. 1575 // 1576 // ClusterIdentifier is a required field 1577 ClusterIdentifier *string `type:"string" required:"true"` 1578 1579 // The name of the database. This parameter is required when authenticating 1580 // using temporary credentials. 1581 Database *string `type:"string"` 1582 1583 // The database user name. This parameter is required when authenticating using 1584 // temporary credentials. 1585 DbUser *string `type:"string"` 1586 1587 // The maximum number of tables to return in the response. If more tables exist 1588 // than fit in one response, then NextToken is returned to page through the 1589 // results. 1590 MaxResults *int64 `type:"integer"` 1591 1592 // A value that indicates the starting point for the next set of response records 1593 // in a subsequent request. If a value is returned in a response, you can retrieve 1594 // the next set of records by providing this returned NextToken value in the 1595 // next NextToken parameter and retrying the command. If the NextToken field 1596 // is empty, all response records have been retrieved for the request. 1597 NextToken *string `type:"string"` 1598 1599 // The schema that contains the table. If no schema is specified, then matching 1600 // tables for all schemas are returned. 1601 Schema *string `type:"string"` 1602 1603 // The name or ARN of the secret that enables access to the database. This parameter 1604 // is required when authenticating using AWS Secrets Manager. 1605 SecretArn *string `type:"string"` 1606 1607 // The table name. If no table is specified, then all tables for all matching 1608 // schemas are returned. If no table and no schema is specified, then all tables 1609 // for all schemas in the database are returned 1610 Table *string `type:"string"` 1611} 1612 1613// String returns the string representation 1614func (s DescribeTableInput) String() string { 1615 return awsutil.Prettify(s) 1616} 1617 1618// GoString returns the string representation 1619func (s DescribeTableInput) GoString() string { 1620 return s.String() 1621} 1622 1623// Validate inspects the fields of the type to determine if they are valid. 1624func (s *DescribeTableInput) Validate() error { 1625 invalidParams := request.ErrInvalidParams{Context: "DescribeTableInput"} 1626 if s.ClusterIdentifier == nil { 1627 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 1628 } 1629 1630 if invalidParams.Len() > 0 { 1631 return invalidParams 1632 } 1633 return nil 1634} 1635 1636// SetClusterIdentifier sets the ClusterIdentifier field's value. 1637func (s *DescribeTableInput) SetClusterIdentifier(v string) *DescribeTableInput { 1638 s.ClusterIdentifier = &v 1639 return s 1640} 1641 1642// SetDatabase sets the Database field's value. 1643func (s *DescribeTableInput) SetDatabase(v string) *DescribeTableInput { 1644 s.Database = &v 1645 return s 1646} 1647 1648// SetDbUser sets the DbUser field's value. 1649func (s *DescribeTableInput) SetDbUser(v string) *DescribeTableInput { 1650 s.DbUser = &v 1651 return s 1652} 1653 1654// SetMaxResults sets the MaxResults field's value. 1655func (s *DescribeTableInput) SetMaxResults(v int64) *DescribeTableInput { 1656 s.MaxResults = &v 1657 return s 1658} 1659 1660// SetNextToken sets the NextToken field's value. 1661func (s *DescribeTableInput) SetNextToken(v string) *DescribeTableInput { 1662 s.NextToken = &v 1663 return s 1664} 1665 1666// SetSchema sets the Schema field's value. 1667func (s *DescribeTableInput) SetSchema(v string) *DescribeTableInput { 1668 s.Schema = &v 1669 return s 1670} 1671 1672// SetSecretArn sets the SecretArn field's value. 1673func (s *DescribeTableInput) SetSecretArn(v string) *DescribeTableInput { 1674 s.SecretArn = &v 1675 return s 1676} 1677 1678// SetTable sets the Table field's value. 1679func (s *DescribeTableInput) SetTable(v string) *DescribeTableInput { 1680 s.Table = &v 1681 return s 1682} 1683 1684type DescribeTableOutput struct { 1685 _ struct{} `type:"structure"` 1686 1687 // A list of columns in the table. 1688 ColumnList []*ColumnMetadata `type:"list"` 1689 1690 // A value that indicates the starting point for the next set of response records 1691 // in a subsequent request. If a value is returned in a response, you can retrieve 1692 // the next set of records by providing this returned NextToken value in the 1693 // next NextToken parameter and retrying the command. If the NextToken field 1694 // is empty, all response records have been retrieved for the request. 1695 NextToken *string `type:"string"` 1696 1697 // The table name. 1698 TableName *string `type:"string"` 1699} 1700 1701// String returns the string representation 1702func (s DescribeTableOutput) String() string { 1703 return awsutil.Prettify(s) 1704} 1705 1706// GoString returns the string representation 1707func (s DescribeTableOutput) GoString() string { 1708 return s.String() 1709} 1710 1711// SetColumnList sets the ColumnList field's value. 1712func (s *DescribeTableOutput) SetColumnList(v []*ColumnMetadata) *DescribeTableOutput { 1713 s.ColumnList = v 1714 return s 1715} 1716 1717// SetNextToken sets the NextToken field's value. 1718func (s *DescribeTableOutput) SetNextToken(v string) *DescribeTableOutput { 1719 s.NextToken = &v 1720 return s 1721} 1722 1723// SetTableName sets the TableName field's value. 1724func (s *DescribeTableOutput) SetTableName(v string) *DescribeTableOutput { 1725 s.TableName = &v 1726 return s 1727} 1728 1729// The SQL statement encountered an environmental error while running. 1730type ExecuteStatementException struct { 1731 _ struct{} `type:"structure"` 1732 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1733 1734 // The exception message. 1735 Message_ *string `locationName:"Message" type:"string"` 1736 1737 // Statement identifier of the exception. 1738 // 1739 // StatementId is a required field 1740 StatementId *string `type:"string" required:"true"` 1741} 1742 1743// String returns the string representation 1744func (s ExecuteStatementException) String() string { 1745 return awsutil.Prettify(s) 1746} 1747 1748// GoString returns the string representation 1749func (s ExecuteStatementException) GoString() string { 1750 return s.String() 1751} 1752 1753func newErrorExecuteStatementException(v protocol.ResponseMetadata) error { 1754 return &ExecuteStatementException{ 1755 RespMetadata: v, 1756 } 1757} 1758 1759// Code returns the exception type name. 1760func (s *ExecuteStatementException) Code() string { 1761 return "ExecuteStatementException" 1762} 1763 1764// Message returns the exception's message. 1765func (s *ExecuteStatementException) Message() string { 1766 if s.Message_ != nil { 1767 return *s.Message_ 1768 } 1769 return "" 1770} 1771 1772// OrigErr always returns nil, satisfies awserr.Error interface. 1773func (s *ExecuteStatementException) OrigErr() error { 1774 return nil 1775} 1776 1777func (s *ExecuteStatementException) Error() string { 1778 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 1779} 1780 1781// Status code returns the HTTP status code for the request's response error. 1782func (s *ExecuteStatementException) StatusCode() int { 1783 return s.RespMetadata.StatusCode 1784} 1785 1786// RequestID returns the service's response RequestID for request. 1787func (s *ExecuteStatementException) RequestID() string { 1788 return s.RespMetadata.RequestID 1789} 1790 1791type ExecuteStatementInput struct { 1792 _ struct{} `type:"structure"` 1793 1794 // The cluster identifier. This parameter is required when authenticating using 1795 // either AWS Secrets Manager or temporary credentials. 1796 // 1797 // ClusterIdentifier is a required field 1798 ClusterIdentifier *string `type:"string" required:"true"` 1799 1800 // The name of the database. This parameter is required when authenticating 1801 // using temporary credentials. 1802 Database *string `type:"string"` 1803 1804 // The database user name. This parameter is required when authenticating using 1805 // temporary credentials. 1806 DbUser *string `type:"string"` 1807 1808 // The name or ARN of the secret that enables access to the database. This parameter 1809 // is required when authenticating using AWS Secrets Manager. 1810 SecretArn *string `type:"string"` 1811 1812 // The SQL statement text to run. 1813 // 1814 // Sql is a required field 1815 Sql *string `type:"string" required:"true"` 1816 1817 // The name of the SQL statement. You can name the SQL statement when you create 1818 // it to identify the query. 1819 StatementName *string `type:"string"` 1820 1821 // A value that indicates whether to send an event to the Amazon EventBridge 1822 // event bus after the SQL statement runs. 1823 WithEvent *bool `type:"boolean"` 1824} 1825 1826// String returns the string representation 1827func (s ExecuteStatementInput) String() string { 1828 return awsutil.Prettify(s) 1829} 1830 1831// GoString returns the string representation 1832func (s ExecuteStatementInput) GoString() string { 1833 return s.String() 1834} 1835 1836// Validate inspects the fields of the type to determine if they are valid. 1837func (s *ExecuteStatementInput) Validate() error { 1838 invalidParams := request.ErrInvalidParams{Context: "ExecuteStatementInput"} 1839 if s.ClusterIdentifier == nil { 1840 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 1841 } 1842 if s.Sql == nil { 1843 invalidParams.Add(request.NewErrParamRequired("Sql")) 1844 } 1845 1846 if invalidParams.Len() > 0 { 1847 return invalidParams 1848 } 1849 return nil 1850} 1851 1852// SetClusterIdentifier sets the ClusterIdentifier field's value. 1853func (s *ExecuteStatementInput) SetClusterIdentifier(v string) *ExecuteStatementInput { 1854 s.ClusterIdentifier = &v 1855 return s 1856} 1857 1858// SetDatabase sets the Database field's value. 1859func (s *ExecuteStatementInput) SetDatabase(v string) *ExecuteStatementInput { 1860 s.Database = &v 1861 return s 1862} 1863 1864// SetDbUser sets the DbUser field's value. 1865func (s *ExecuteStatementInput) SetDbUser(v string) *ExecuteStatementInput { 1866 s.DbUser = &v 1867 return s 1868} 1869 1870// SetSecretArn sets the SecretArn field's value. 1871func (s *ExecuteStatementInput) SetSecretArn(v string) *ExecuteStatementInput { 1872 s.SecretArn = &v 1873 return s 1874} 1875 1876// SetSql sets the Sql field's value. 1877func (s *ExecuteStatementInput) SetSql(v string) *ExecuteStatementInput { 1878 s.Sql = &v 1879 return s 1880} 1881 1882// SetStatementName sets the StatementName field's value. 1883func (s *ExecuteStatementInput) SetStatementName(v string) *ExecuteStatementInput { 1884 s.StatementName = &v 1885 return s 1886} 1887 1888// SetWithEvent sets the WithEvent field's value. 1889func (s *ExecuteStatementInput) SetWithEvent(v bool) *ExecuteStatementInput { 1890 s.WithEvent = &v 1891 return s 1892} 1893 1894type ExecuteStatementOutput struct { 1895 _ struct{} `type:"structure"` 1896 1897 // The cluster identifier. 1898 ClusterIdentifier *string `type:"string"` 1899 1900 // The date and time (UTC) the statement was created. 1901 CreatedAt *time.Time `type:"timestamp"` 1902 1903 // The name of the database. 1904 Database *string `type:"string"` 1905 1906 // The database user name. 1907 DbUser *string `type:"string"` 1908 1909 // The identifier of the statement to be run. This value is a universally unique 1910 // identifier (UUID) generated by Amazon Redshift Data API. 1911 Id *string `type:"string"` 1912 1913 // The name or ARN of the secret that enables access to the database. 1914 SecretArn *string `type:"string"` 1915} 1916 1917// String returns the string representation 1918func (s ExecuteStatementOutput) String() string { 1919 return awsutil.Prettify(s) 1920} 1921 1922// GoString returns the string representation 1923func (s ExecuteStatementOutput) GoString() string { 1924 return s.String() 1925} 1926 1927// SetClusterIdentifier sets the ClusterIdentifier field's value. 1928func (s *ExecuteStatementOutput) SetClusterIdentifier(v string) *ExecuteStatementOutput { 1929 s.ClusterIdentifier = &v 1930 return s 1931} 1932 1933// SetCreatedAt sets the CreatedAt field's value. 1934func (s *ExecuteStatementOutput) SetCreatedAt(v time.Time) *ExecuteStatementOutput { 1935 s.CreatedAt = &v 1936 return s 1937} 1938 1939// SetDatabase sets the Database field's value. 1940func (s *ExecuteStatementOutput) SetDatabase(v string) *ExecuteStatementOutput { 1941 s.Database = &v 1942 return s 1943} 1944 1945// SetDbUser sets the DbUser field's value. 1946func (s *ExecuteStatementOutput) SetDbUser(v string) *ExecuteStatementOutput { 1947 s.DbUser = &v 1948 return s 1949} 1950 1951// SetId sets the Id field's value. 1952func (s *ExecuteStatementOutput) SetId(v string) *ExecuteStatementOutput { 1953 s.Id = &v 1954 return s 1955} 1956 1957// SetSecretArn sets the SecretArn field's value. 1958func (s *ExecuteStatementOutput) SetSecretArn(v string) *ExecuteStatementOutput { 1959 s.SecretArn = &v 1960 return s 1961} 1962 1963// A data value in a column. 1964type Field struct { 1965 _ struct{} `type:"structure"` 1966 1967 // A value of the BLOB data type. 1968 // 1969 // BlobValue is automatically base64 encoded/decoded by the SDK. 1970 BlobValue []byte `locationName:"blobValue" type:"blob"` 1971 1972 // A value of the Boolean data type. 1973 BooleanValue *bool `locationName:"booleanValue" type:"boolean"` 1974 1975 // A value of the double data type. 1976 DoubleValue *float64 `locationName:"doubleValue" type:"double"` 1977 1978 // A value that indicates whether the data is NULL. 1979 IsNull *bool `locationName:"isNull" type:"boolean"` 1980 1981 // A value of the long data type. 1982 LongValue *int64 `locationName:"longValue" type:"long"` 1983 1984 // A value of the string data type. 1985 StringValue *string `locationName:"stringValue" type:"string"` 1986} 1987 1988// String returns the string representation 1989func (s Field) String() string { 1990 return awsutil.Prettify(s) 1991} 1992 1993// GoString returns the string representation 1994func (s Field) GoString() string { 1995 return s.String() 1996} 1997 1998// SetBlobValue sets the BlobValue field's value. 1999func (s *Field) SetBlobValue(v []byte) *Field { 2000 s.BlobValue = v 2001 return s 2002} 2003 2004// SetBooleanValue sets the BooleanValue field's value. 2005func (s *Field) SetBooleanValue(v bool) *Field { 2006 s.BooleanValue = &v 2007 return s 2008} 2009 2010// SetDoubleValue sets the DoubleValue field's value. 2011func (s *Field) SetDoubleValue(v float64) *Field { 2012 s.DoubleValue = &v 2013 return s 2014} 2015 2016// SetIsNull sets the IsNull field's value. 2017func (s *Field) SetIsNull(v bool) *Field { 2018 s.IsNull = &v 2019 return s 2020} 2021 2022// SetLongValue sets the LongValue field's value. 2023func (s *Field) SetLongValue(v int64) *Field { 2024 s.LongValue = &v 2025 return s 2026} 2027 2028// SetStringValue sets the StringValue field's value. 2029func (s *Field) SetStringValue(v string) *Field { 2030 s.StringValue = &v 2031 return s 2032} 2033 2034type GetStatementResultInput struct { 2035 _ struct{} `type:"structure"` 2036 2037 // The identifier of the SQL statement whose results are to be fetched. This 2038 // value is a universally unique identifier (UUID) generated by Amazon Redshift 2039 // Data API. This identifier is returned by ExecuteStatment and ListStatements. 2040 // 2041 // Id is a required field 2042 Id *string `type:"string" required:"true"` 2043 2044 // A value that indicates the starting point for the next set of response records 2045 // in a subsequent request. If a value is returned in a response, you can retrieve 2046 // the next set of records by providing this returned NextToken value in the 2047 // next NextToken parameter and retrying the command. If the NextToken field 2048 // is empty, all response records have been retrieved for the request. 2049 NextToken *string `type:"string"` 2050} 2051 2052// String returns the string representation 2053func (s GetStatementResultInput) String() string { 2054 return awsutil.Prettify(s) 2055} 2056 2057// GoString returns the string representation 2058func (s GetStatementResultInput) GoString() string { 2059 return s.String() 2060} 2061 2062// Validate inspects the fields of the type to determine if they are valid. 2063func (s *GetStatementResultInput) Validate() error { 2064 invalidParams := request.ErrInvalidParams{Context: "GetStatementResultInput"} 2065 if s.Id == nil { 2066 invalidParams.Add(request.NewErrParamRequired("Id")) 2067 } 2068 2069 if invalidParams.Len() > 0 { 2070 return invalidParams 2071 } 2072 return nil 2073} 2074 2075// SetId sets the Id field's value. 2076func (s *GetStatementResultInput) SetId(v string) *GetStatementResultInput { 2077 s.Id = &v 2078 return s 2079} 2080 2081// SetNextToken sets the NextToken field's value. 2082func (s *GetStatementResultInput) SetNextToken(v string) *GetStatementResultInput { 2083 s.NextToken = &v 2084 return s 2085} 2086 2087type GetStatementResultOutput struct { 2088 _ struct{} `type:"structure"` 2089 2090 // The properties (metadata) of a column. 2091 ColumnMetadata []*ColumnMetadata `type:"list"` 2092 2093 // A value that indicates the starting point for the next set of response records 2094 // in a subsequent request. If a value is returned in a response, you can retrieve 2095 // the next set of records by providing this returned NextToken value in the 2096 // next NextToken parameter and retrying the command. If the NextToken field 2097 // is empty, all response records have been retrieved for the request. 2098 NextToken *string `type:"string"` 2099 2100 // The results of the SQL statement. 2101 // 2102 // Records is a required field 2103 Records [][]*Field `type:"list" required:"true"` 2104 2105 // The total number of rows in the result set returned from a query. You can 2106 // use this number to estimate the number of calls to the GetStatementResult 2107 // operation needed to page through the results. 2108 TotalNumRows *int64 `type:"long"` 2109} 2110 2111// String returns the string representation 2112func (s GetStatementResultOutput) String() string { 2113 return awsutil.Prettify(s) 2114} 2115 2116// GoString returns the string representation 2117func (s GetStatementResultOutput) GoString() string { 2118 return s.String() 2119} 2120 2121// SetColumnMetadata sets the ColumnMetadata field's value. 2122func (s *GetStatementResultOutput) SetColumnMetadata(v []*ColumnMetadata) *GetStatementResultOutput { 2123 s.ColumnMetadata = v 2124 return s 2125} 2126 2127// SetNextToken sets the NextToken field's value. 2128func (s *GetStatementResultOutput) SetNextToken(v string) *GetStatementResultOutput { 2129 s.NextToken = &v 2130 return s 2131} 2132 2133// SetRecords sets the Records field's value. 2134func (s *GetStatementResultOutput) SetRecords(v [][]*Field) *GetStatementResultOutput { 2135 s.Records = v 2136 return s 2137} 2138 2139// SetTotalNumRows sets the TotalNumRows field's value. 2140func (s *GetStatementResultOutput) SetTotalNumRows(v int64) *GetStatementResultOutput { 2141 s.TotalNumRows = &v 2142 return s 2143} 2144 2145// The Amazon Redshift Data API operation failed due to invalid input. 2146type InternalServerException struct { 2147 _ struct{} `type:"structure"` 2148 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2149 2150 // The exception message. 2151 Message_ *string `locationName:"Message" type:"string"` 2152} 2153 2154// String returns the string representation 2155func (s InternalServerException) String() string { 2156 return awsutil.Prettify(s) 2157} 2158 2159// GoString returns the string representation 2160func (s InternalServerException) GoString() string { 2161 return s.String() 2162} 2163 2164func newErrorInternalServerException(v protocol.ResponseMetadata) error { 2165 return &InternalServerException{ 2166 RespMetadata: v, 2167 } 2168} 2169 2170// Code returns the exception type name. 2171func (s *InternalServerException) Code() string { 2172 return "InternalServerException" 2173} 2174 2175// Message returns the exception's message. 2176func (s *InternalServerException) Message() string { 2177 if s.Message_ != nil { 2178 return *s.Message_ 2179 } 2180 return "" 2181} 2182 2183// OrigErr always returns nil, satisfies awserr.Error interface. 2184func (s *InternalServerException) OrigErr() error { 2185 return nil 2186} 2187 2188func (s *InternalServerException) Error() string { 2189 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2190} 2191 2192// Status code returns the HTTP status code for the request's response error. 2193func (s *InternalServerException) StatusCode() int { 2194 return s.RespMetadata.StatusCode 2195} 2196 2197// RequestID returns the service's response RequestID for request. 2198func (s *InternalServerException) RequestID() string { 2199 return s.RespMetadata.RequestID 2200} 2201 2202type ListDatabasesInput struct { 2203 _ struct{} `type:"structure"` 2204 2205 // The cluster identifier. This parameter is required when authenticating using 2206 // either AWS Secrets Manager or temporary credentials. 2207 // 2208 // ClusterIdentifier is a required field 2209 ClusterIdentifier *string `type:"string" required:"true"` 2210 2211 // The name of the database. This parameter is required when authenticating 2212 // using temporary credentials. 2213 Database *string `type:"string"` 2214 2215 // The database user name. This parameter is required when authenticating using 2216 // temporary credentials. 2217 DbUser *string `type:"string"` 2218 2219 // The maximum number of databases to return in the response. If more databases 2220 // exist than fit in one response, then NextToken is returned to page through 2221 // the results. 2222 MaxResults *int64 `type:"integer"` 2223 2224 // A value that indicates the starting point for the next set of response records 2225 // in a subsequent request. If a value is returned in a response, you can retrieve 2226 // the next set of records by providing this returned NextToken value in the 2227 // next NextToken parameter and retrying the command. If the NextToken field 2228 // is empty, all response records have been retrieved for the request. 2229 NextToken *string `type:"string"` 2230 2231 // The name or ARN of the secret that enables access to the database. This parameter 2232 // is required when authenticating using AWS Secrets Manager. 2233 SecretArn *string `type:"string"` 2234} 2235 2236// String returns the string representation 2237func (s ListDatabasesInput) String() string { 2238 return awsutil.Prettify(s) 2239} 2240 2241// GoString returns the string representation 2242func (s ListDatabasesInput) GoString() string { 2243 return s.String() 2244} 2245 2246// Validate inspects the fields of the type to determine if they are valid. 2247func (s *ListDatabasesInput) Validate() error { 2248 invalidParams := request.ErrInvalidParams{Context: "ListDatabasesInput"} 2249 if s.ClusterIdentifier == nil { 2250 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 2251 } 2252 2253 if invalidParams.Len() > 0 { 2254 return invalidParams 2255 } 2256 return nil 2257} 2258 2259// SetClusterIdentifier sets the ClusterIdentifier field's value. 2260func (s *ListDatabasesInput) SetClusterIdentifier(v string) *ListDatabasesInput { 2261 s.ClusterIdentifier = &v 2262 return s 2263} 2264 2265// SetDatabase sets the Database field's value. 2266func (s *ListDatabasesInput) SetDatabase(v string) *ListDatabasesInput { 2267 s.Database = &v 2268 return s 2269} 2270 2271// SetDbUser sets the DbUser field's value. 2272func (s *ListDatabasesInput) SetDbUser(v string) *ListDatabasesInput { 2273 s.DbUser = &v 2274 return s 2275} 2276 2277// SetMaxResults sets the MaxResults field's value. 2278func (s *ListDatabasesInput) SetMaxResults(v int64) *ListDatabasesInput { 2279 s.MaxResults = &v 2280 return s 2281} 2282 2283// SetNextToken sets the NextToken field's value. 2284func (s *ListDatabasesInput) SetNextToken(v string) *ListDatabasesInput { 2285 s.NextToken = &v 2286 return s 2287} 2288 2289// SetSecretArn sets the SecretArn field's value. 2290func (s *ListDatabasesInput) SetSecretArn(v string) *ListDatabasesInput { 2291 s.SecretArn = &v 2292 return s 2293} 2294 2295type ListDatabasesOutput struct { 2296 _ struct{} `type:"structure"` 2297 2298 // The names of databases. 2299 Databases []*string `type:"list"` 2300 2301 // A value that indicates the starting point for the next set of response records 2302 // in a subsequent request. If a value is returned in a response, you can retrieve 2303 // the next set of records by providing this returned NextToken value in the 2304 // next NextToken parameter and retrying the command. If the NextToken field 2305 // is empty, all response records have been retrieved for the request. 2306 NextToken *string `type:"string"` 2307} 2308 2309// String returns the string representation 2310func (s ListDatabasesOutput) String() string { 2311 return awsutil.Prettify(s) 2312} 2313 2314// GoString returns the string representation 2315func (s ListDatabasesOutput) GoString() string { 2316 return s.String() 2317} 2318 2319// SetDatabases sets the Databases field's value. 2320func (s *ListDatabasesOutput) SetDatabases(v []*string) *ListDatabasesOutput { 2321 s.Databases = v 2322 return s 2323} 2324 2325// SetNextToken sets the NextToken field's value. 2326func (s *ListDatabasesOutput) SetNextToken(v string) *ListDatabasesOutput { 2327 s.NextToken = &v 2328 return s 2329} 2330 2331type ListSchemasInput struct { 2332 _ struct{} `type:"structure"` 2333 2334 // The cluster identifier. This parameter is required when authenticating using 2335 // either AWS Secrets Manager or temporary credentials. 2336 // 2337 // ClusterIdentifier is a required field 2338 ClusterIdentifier *string `type:"string" required:"true"` 2339 2340 // The name of the database. This parameter is required when authenticating 2341 // using temporary credentials. 2342 // 2343 // Database is a required field 2344 Database *string `type:"string" required:"true"` 2345 2346 // The database user name. This parameter is required when authenticating using 2347 // temporary credentials. 2348 DbUser *string `type:"string"` 2349 2350 // The maximum number of schemas to return in the response. If more schemas 2351 // exist than fit in one response, then NextToken is returned to page through 2352 // the results. 2353 MaxResults *int64 `type:"integer"` 2354 2355 // A value that indicates the starting point for the next set of response records 2356 // in a subsequent request. If a value is returned in a response, you can retrieve 2357 // the next set of records by providing this returned NextToken value in the 2358 // next NextToken parameter and retrying the command. If the NextToken field 2359 // is empty, all response records have been retrieved for the request. 2360 NextToken *string `type:"string"` 2361 2362 // A pattern to filter results by schema name. Within a schema pattern, "%" 2363 // means match any substring of 0 or more characters and "_" means match any 2364 // one character. Only schema name entries matching the search pattern are returned. 2365 SchemaPattern *string `type:"string"` 2366 2367 // The name or ARN of the secret that enables access to the database. This parameter 2368 // is required when authenticating using AWS Secrets Manager. 2369 SecretArn *string `type:"string"` 2370} 2371 2372// String returns the string representation 2373func (s ListSchemasInput) String() string { 2374 return awsutil.Prettify(s) 2375} 2376 2377// GoString returns the string representation 2378func (s ListSchemasInput) GoString() string { 2379 return s.String() 2380} 2381 2382// Validate inspects the fields of the type to determine if they are valid. 2383func (s *ListSchemasInput) Validate() error { 2384 invalidParams := request.ErrInvalidParams{Context: "ListSchemasInput"} 2385 if s.ClusterIdentifier == nil { 2386 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 2387 } 2388 if s.Database == nil { 2389 invalidParams.Add(request.NewErrParamRequired("Database")) 2390 } 2391 2392 if invalidParams.Len() > 0 { 2393 return invalidParams 2394 } 2395 return nil 2396} 2397 2398// SetClusterIdentifier sets the ClusterIdentifier field's value. 2399func (s *ListSchemasInput) SetClusterIdentifier(v string) *ListSchemasInput { 2400 s.ClusterIdentifier = &v 2401 return s 2402} 2403 2404// SetDatabase sets the Database field's value. 2405func (s *ListSchemasInput) SetDatabase(v string) *ListSchemasInput { 2406 s.Database = &v 2407 return s 2408} 2409 2410// SetDbUser sets the DbUser field's value. 2411func (s *ListSchemasInput) SetDbUser(v string) *ListSchemasInput { 2412 s.DbUser = &v 2413 return s 2414} 2415 2416// SetMaxResults sets the MaxResults field's value. 2417func (s *ListSchemasInput) SetMaxResults(v int64) *ListSchemasInput { 2418 s.MaxResults = &v 2419 return s 2420} 2421 2422// SetNextToken sets the NextToken field's value. 2423func (s *ListSchemasInput) SetNextToken(v string) *ListSchemasInput { 2424 s.NextToken = &v 2425 return s 2426} 2427 2428// SetSchemaPattern sets the SchemaPattern field's value. 2429func (s *ListSchemasInput) SetSchemaPattern(v string) *ListSchemasInput { 2430 s.SchemaPattern = &v 2431 return s 2432} 2433 2434// SetSecretArn sets the SecretArn field's value. 2435func (s *ListSchemasInput) SetSecretArn(v string) *ListSchemasInput { 2436 s.SecretArn = &v 2437 return s 2438} 2439 2440type ListSchemasOutput struct { 2441 _ struct{} `type:"structure"` 2442 2443 // A value that indicates the starting point for the next set of response records 2444 // in a subsequent request. If a value is returned in a response, you can retrieve 2445 // the next set of records by providing this returned NextToken value in the 2446 // next NextToken parameter and retrying the command. If the NextToken field 2447 // is empty, all response records have been retrieved for the request. 2448 NextToken *string `type:"string"` 2449 2450 // The schemas that match the request pattern. 2451 Schemas []*string `type:"list"` 2452} 2453 2454// String returns the string representation 2455func (s ListSchemasOutput) String() string { 2456 return awsutil.Prettify(s) 2457} 2458 2459// GoString returns the string representation 2460func (s ListSchemasOutput) GoString() string { 2461 return s.String() 2462} 2463 2464// SetNextToken sets the NextToken field's value. 2465func (s *ListSchemasOutput) SetNextToken(v string) *ListSchemasOutput { 2466 s.NextToken = &v 2467 return s 2468} 2469 2470// SetSchemas sets the Schemas field's value. 2471func (s *ListSchemasOutput) SetSchemas(v []*string) *ListSchemasOutput { 2472 s.Schemas = v 2473 return s 2474} 2475 2476type ListStatementsInput struct { 2477 _ struct{} `type:"structure"` 2478 2479 // The maximum number of SQL statements to return in the response. If more SQL 2480 // statements exist than fit in one response, then NextToken is returned to 2481 // page through the results. 2482 MaxResults *int64 `type:"integer"` 2483 2484 // A value that indicates the starting point for the next set of response records 2485 // in a subsequent request. If a value is returned in a response, you can retrieve 2486 // the next set of records by providing this returned NextToken value in the 2487 // next NextToken parameter and retrying the command. If the NextToken field 2488 // is empty, all response records have been retrieved for the request. 2489 NextToken *string `type:"string"` 2490 2491 // The name of the SQL statement specified as input to ExecuteStatement to identify 2492 // the query. You can list multiple statements by providing a prefix that matches 2493 // the beginning of the statement name. For example, to list myStatement1, myStatement2, 2494 // myStatement3, and so on, then provide the a value of myStatement. Data API 2495 // does a case-sensitive match of SQL statement names to the prefix value you 2496 // provide. 2497 StatementName *string `type:"string"` 2498 2499 // The status of the SQL statement to list. Status values are defined as follows: 2500 // 2501 // * ABORTED - The query run was stopped by the user. 2502 // 2503 // * ALL - A status value that includes all query statuses. This value can 2504 // be used to filter results. 2505 // 2506 // * FAILED - The query run failed. 2507 // 2508 // * FINISHED - The query has finished running. 2509 // 2510 // * PICKED - The query has been chosen to be run. 2511 // 2512 // * STARTED - The query run has started. 2513 // 2514 // * SUBMITTED - The query was submitted, but not yet processed. 2515 Status *string `type:"string" enum:"StatusString"` 2516} 2517 2518// String returns the string representation 2519func (s ListStatementsInput) String() string { 2520 return awsutil.Prettify(s) 2521} 2522 2523// GoString returns the string representation 2524func (s ListStatementsInput) GoString() string { 2525 return s.String() 2526} 2527 2528// SetMaxResults sets the MaxResults field's value. 2529func (s *ListStatementsInput) SetMaxResults(v int64) *ListStatementsInput { 2530 s.MaxResults = &v 2531 return s 2532} 2533 2534// SetNextToken sets the NextToken field's value. 2535func (s *ListStatementsInput) SetNextToken(v string) *ListStatementsInput { 2536 s.NextToken = &v 2537 return s 2538} 2539 2540// SetStatementName sets the StatementName field's value. 2541func (s *ListStatementsInput) SetStatementName(v string) *ListStatementsInput { 2542 s.StatementName = &v 2543 return s 2544} 2545 2546// SetStatus sets the Status field's value. 2547func (s *ListStatementsInput) SetStatus(v string) *ListStatementsInput { 2548 s.Status = &v 2549 return s 2550} 2551 2552type ListStatementsOutput struct { 2553 _ struct{} `type:"structure"` 2554 2555 // A value that indicates the starting point for the next set of response records 2556 // in a subsequent request. If a value is returned in a response, you can retrieve 2557 // the next set of records by providing this returned NextToken value in the 2558 // next NextToken parameter and retrying the command. If the NextToken field 2559 // is empty, all response records have been retrieved for the request. 2560 NextToken *string `type:"string"` 2561 2562 // The SQL statements. 2563 // 2564 // Statements is a required field 2565 Statements []*StatementData `type:"list" required:"true"` 2566} 2567 2568// String returns the string representation 2569func (s ListStatementsOutput) String() string { 2570 return awsutil.Prettify(s) 2571} 2572 2573// GoString returns the string representation 2574func (s ListStatementsOutput) GoString() string { 2575 return s.String() 2576} 2577 2578// SetNextToken sets the NextToken field's value. 2579func (s *ListStatementsOutput) SetNextToken(v string) *ListStatementsOutput { 2580 s.NextToken = &v 2581 return s 2582} 2583 2584// SetStatements sets the Statements field's value. 2585func (s *ListStatementsOutput) SetStatements(v []*StatementData) *ListStatementsOutput { 2586 s.Statements = v 2587 return s 2588} 2589 2590type ListTablesInput struct { 2591 _ struct{} `type:"structure"` 2592 2593 // The cluster identifier. This parameter is required when authenticating using 2594 // either AWS Secrets Manager or temporary credentials. 2595 // 2596 // ClusterIdentifier is a required field 2597 ClusterIdentifier *string `type:"string" required:"true"` 2598 2599 // The name of the database. This parameter is required when authenticating 2600 // using temporary credentials. 2601 // 2602 // Database is a required field 2603 Database *string `type:"string" required:"true"` 2604 2605 // The database user name. This parameter is required when authenticating using 2606 // temporary credentials. 2607 DbUser *string `type:"string"` 2608 2609 // The maximum number of tables to return in the response. If more tables exist 2610 // than fit in one response, then NextToken is returned to page through the 2611 // results. 2612 MaxResults *int64 `type:"integer"` 2613 2614 // A value that indicates the starting point for the next set of response records 2615 // in a subsequent request. If a value is returned in a response, you can retrieve 2616 // the next set of records by providing this returned NextToken value in the 2617 // next NextToken parameter and retrying the command. If the NextToken field 2618 // is empty, all response records have been retrieved for the request. 2619 NextToken *string `type:"string"` 2620 2621 // A pattern to filter results by schema name. Within a schema pattern, "%" 2622 // means match any substring of 0 or more characters and "_" means match any 2623 // one character. Only schema name entries matching the search pattern are returned. 2624 // If SchemaPattern is not specified, then all tables that match TablePattern 2625 // are returned. If neither SchemaPattern or TablePattern are specified, then 2626 // all tables are returned. 2627 SchemaPattern *string `type:"string"` 2628 2629 // The name or ARN of the secret that enables access to the database. This parameter 2630 // is required when authenticating using AWS Secrets Manager. 2631 SecretArn *string `type:"string"` 2632 2633 // A pattern to filter results by table name. Within a table pattern, "%" means 2634 // match any substring of 0 or more characters and "_" means match any one character. 2635 // Only table name entries matching the search pattern are returned. If TablePattern 2636 // is not specified, then all tables that match SchemaPatternare returned. If 2637 // neither SchemaPattern or TablePattern are specified, then all tables are 2638 // returned. 2639 TablePattern *string `type:"string"` 2640} 2641 2642// String returns the string representation 2643func (s ListTablesInput) String() string { 2644 return awsutil.Prettify(s) 2645} 2646 2647// GoString returns the string representation 2648func (s ListTablesInput) GoString() string { 2649 return s.String() 2650} 2651 2652// Validate inspects the fields of the type to determine if they are valid. 2653func (s *ListTablesInput) Validate() error { 2654 invalidParams := request.ErrInvalidParams{Context: "ListTablesInput"} 2655 if s.ClusterIdentifier == nil { 2656 invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) 2657 } 2658 if s.Database == nil { 2659 invalidParams.Add(request.NewErrParamRequired("Database")) 2660 } 2661 2662 if invalidParams.Len() > 0 { 2663 return invalidParams 2664 } 2665 return nil 2666} 2667 2668// SetClusterIdentifier sets the ClusterIdentifier field's value. 2669func (s *ListTablesInput) SetClusterIdentifier(v string) *ListTablesInput { 2670 s.ClusterIdentifier = &v 2671 return s 2672} 2673 2674// SetDatabase sets the Database field's value. 2675func (s *ListTablesInput) SetDatabase(v string) *ListTablesInput { 2676 s.Database = &v 2677 return s 2678} 2679 2680// SetDbUser sets the DbUser field's value. 2681func (s *ListTablesInput) SetDbUser(v string) *ListTablesInput { 2682 s.DbUser = &v 2683 return s 2684} 2685 2686// SetMaxResults sets the MaxResults field's value. 2687func (s *ListTablesInput) SetMaxResults(v int64) *ListTablesInput { 2688 s.MaxResults = &v 2689 return s 2690} 2691 2692// SetNextToken sets the NextToken field's value. 2693func (s *ListTablesInput) SetNextToken(v string) *ListTablesInput { 2694 s.NextToken = &v 2695 return s 2696} 2697 2698// SetSchemaPattern sets the SchemaPattern field's value. 2699func (s *ListTablesInput) SetSchemaPattern(v string) *ListTablesInput { 2700 s.SchemaPattern = &v 2701 return s 2702} 2703 2704// SetSecretArn sets the SecretArn field's value. 2705func (s *ListTablesInput) SetSecretArn(v string) *ListTablesInput { 2706 s.SecretArn = &v 2707 return s 2708} 2709 2710// SetTablePattern sets the TablePattern field's value. 2711func (s *ListTablesInput) SetTablePattern(v string) *ListTablesInput { 2712 s.TablePattern = &v 2713 return s 2714} 2715 2716type ListTablesOutput struct { 2717 _ struct{} `type:"structure"` 2718 2719 // A value that indicates the starting point for the next set of response records 2720 // in a subsequent request. If a value is returned in a response, you can retrieve 2721 // the next set of records by providing this returned NextToken value in the 2722 // next NextToken parameter and retrying the command. If the NextToken field 2723 // is empty, all response records have been retrieved for the request. 2724 NextToken *string `type:"string"` 2725 2726 // The tables that match the request pattern. 2727 Tables []*TableMember `type:"list"` 2728} 2729 2730// String returns the string representation 2731func (s ListTablesOutput) String() string { 2732 return awsutil.Prettify(s) 2733} 2734 2735// GoString returns the string representation 2736func (s ListTablesOutput) GoString() string { 2737 return s.String() 2738} 2739 2740// SetNextToken sets the NextToken field's value. 2741func (s *ListTablesOutput) SetNextToken(v string) *ListTablesOutput { 2742 s.NextToken = &v 2743 return s 2744} 2745 2746// SetTables sets the Tables field's value. 2747func (s *ListTablesOutput) SetTables(v []*TableMember) *ListTablesOutput { 2748 s.Tables = v 2749 return s 2750} 2751 2752// The Amazon Redshift Data API operation failed due to a missing resource. 2753type ResourceNotFoundException struct { 2754 _ struct{} `type:"structure"` 2755 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2756 2757 // The exception message. 2758 Message_ *string `locationName:"Message" type:"string"` 2759 2760 // Resource identifier associated with the exception. 2761 // 2762 // ResourceId is a required field 2763 ResourceId *string `type:"string" required:"true"` 2764} 2765 2766// String returns the string representation 2767func (s ResourceNotFoundException) String() string { 2768 return awsutil.Prettify(s) 2769} 2770 2771// GoString returns the string representation 2772func (s ResourceNotFoundException) GoString() string { 2773 return s.String() 2774} 2775 2776func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 2777 return &ResourceNotFoundException{ 2778 RespMetadata: v, 2779 } 2780} 2781 2782// Code returns the exception type name. 2783func (s *ResourceNotFoundException) Code() string { 2784 return "ResourceNotFoundException" 2785} 2786 2787// Message returns the exception's message. 2788func (s *ResourceNotFoundException) Message() string { 2789 if s.Message_ != nil { 2790 return *s.Message_ 2791 } 2792 return "" 2793} 2794 2795// OrigErr always returns nil, satisfies awserr.Error interface. 2796func (s *ResourceNotFoundException) OrigErr() error { 2797 return nil 2798} 2799 2800func (s *ResourceNotFoundException) Error() string { 2801 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2802} 2803 2804// Status code returns the HTTP status code for the request's response error. 2805func (s *ResourceNotFoundException) StatusCode() int { 2806 return s.RespMetadata.StatusCode 2807} 2808 2809// RequestID returns the service's response RequestID for request. 2810func (s *ResourceNotFoundException) RequestID() string { 2811 return s.RespMetadata.RequestID 2812} 2813 2814// The SQL statement to run. 2815type StatementData struct { 2816 _ struct{} `type:"structure"` 2817 2818 // The date and time (UTC) the statement was created. 2819 CreatedAt *time.Time `type:"timestamp"` 2820 2821 // The SQL statement identifier. This value is a universally unique identifier 2822 // (UUID) generated by Amazon Redshift Data API. 2823 // 2824 // Id is a required field 2825 Id *string `type:"string" required:"true"` 2826 2827 // The SQL statement. 2828 QueryString *string `type:"string"` 2829 2830 // The name or Amazon Resource Name (ARN) of the secret that enables access 2831 // to the database. 2832 SecretArn *string `type:"string"` 2833 2834 // The name of the SQL statement. 2835 StatementName *string `type:"string"` 2836 2837 // The status of the SQL statement. An example is the that the SQL statement 2838 // finished. 2839 Status *string `type:"string" enum:"StatusString"` 2840 2841 // The date and time (UTC) that the statement metadata was last updated. 2842 UpdatedAt *time.Time `type:"timestamp"` 2843} 2844 2845// String returns the string representation 2846func (s StatementData) String() string { 2847 return awsutil.Prettify(s) 2848} 2849 2850// GoString returns the string representation 2851func (s StatementData) GoString() string { 2852 return s.String() 2853} 2854 2855// SetCreatedAt sets the CreatedAt field's value. 2856func (s *StatementData) SetCreatedAt(v time.Time) *StatementData { 2857 s.CreatedAt = &v 2858 return s 2859} 2860 2861// SetId sets the Id field's value. 2862func (s *StatementData) SetId(v string) *StatementData { 2863 s.Id = &v 2864 return s 2865} 2866 2867// SetQueryString sets the QueryString field's value. 2868func (s *StatementData) SetQueryString(v string) *StatementData { 2869 s.QueryString = &v 2870 return s 2871} 2872 2873// SetSecretArn sets the SecretArn field's value. 2874func (s *StatementData) SetSecretArn(v string) *StatementData { 2875 s.SecretArn = &v 2876 return s 2877} 2878 2879// SetStatementName sets the StatementName field's value. 2880func (s *StatementData) SetStatementName(v string) *StatementData { 2881 s.StatementName = &v 2882 return s 2883} 2884 2885// SetStatus sets the Status field's value. 2886func (s *StatementData) SetStatus(v string) *StatementData { 2887 s.Status = &v 2888 return s 2889} 2890 2891// SetUpdatedAt sets the UpdatedAt field's value. 2892func (s *StatementData) SetUpdatedAt(v time.Time) *StatementData { 2893 s.UpdatedAt = &v 2894 return s 2895} 2896 2897// The properties of a table. 2898type TableMember struct { 2899 _ struct{} `type:"structure"` 2900 2901 // The name of the table. 2902 Name *string `locationName:"name" type:"string"` 2903 2904 // The schema containing the table. 2905 Schema *string `locationName:"schema" type:"string"` 2906 2907 // The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, 2908 // GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM. 2909 Type *string `locationName:"type" type:"string"` 2910} 2911 2912// String returns the string representation 2913func (s TableMember) String() string { 2914 return awsutil.Prettify(s) 2915} 2916 2917// GoString returns the string representation 2918func (s TableMember) GoString() string { 2919 return s.String() 2920} 2921 2922// SetName sets the Name field's value. 2923func (s *TableMember) SetName(v string) *TableMember { 2924 s.Name = &v 2925 return s 2926} 2927 2928// SetSchema sets the Schema field's value. 2929func (s *TableMember) SetSchema(v string) *TableMember { 2930 s.Schema = &v 2931 return s 2932} 2933 2934// SetType sets the Type field's value. 2935func (s *TableMember) SetType(v string) *TableMember { 2936 s.Type = &v 2937 return s 2938} 2939 2940// The Amazon Redshift Data API operation failed due to invalid input. 2941type ValidationException struct { 2942 _ struct{} `type:"structure"` 2943 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2944 2945 // The exception message. 2946 Message_ *string `locationName:"Message" type:"string"` 2947} 2948 2949// String returns the string representation 2950func (s ValidationException) String() string { 2951 return awsutil.Prettify(s) 2952} 2953 2954// GoString returns the string representation 2955func (s ValidationException) GoString() string { 2956 return s.String() 2957} 2958 2959func newErrorValidationException(v protocol.ResponseMetadata) error { 2960 return &ValidationException{ 2961 RespMetadata: v, 2962 } 2963} 2964 2965// Code returns the exception type name. 2966func (s *ValidationException) Code() string { 2967 return "ValidationException" 2968} 2969 2970// Message returns the exception's message. 2971func (s *ValidationException) Message() string { 2972 if s.Message_ != nil { 2973 return *s.Message_ 2974 } 2975 return "" 2976} 2977 2978// OrigErr always returns nil, satisfies awserr.Error interface. 2979func (s *ValidationException) OrigErr() error { 2980 return nil 2981} 2982 2983func (s *ValidationException) Error() string { 2984 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2985} 2986 2987// Status code returns the HTTP status code for the request's response error. 2988func (s *ValidationException) StatusCode() int { 2989 return s.RespMetadata.StatusCode 2990} 2991 2992// RequestID returns the service's response RequestID for request. 2993func (s *ValidationException) RequestID() string { 2994 return s.RespMetadata.RequestID 2995} 2996 2997const ( 2998 // StatusStringAborted is a StatusString enum value 2999 StatusStringAborted = "ABORTED" 3000 3001 // StatusStringAll is a StatusString enum value 3002 StatusStringAll = "ALL" 3003 3004 // StatusStringFailed is a StatusString enum value 3005 StatusStringFailed = "FAILED" 3006 3007 // StatusStringFinished is a StatusString enum value 3008 StatusStringFinished = "FINISHED" 3009 3010 // StatusStringPicked is a StatusString enum value 3011 StatusStringPicked = "PICKED" 3012 3013 // StatusStringStarted is a StatusString enum value 3014 StatusStringStarted = "STARTED" 3015 3016 // StatusStringSubmitted is a StatusString enum value 3017 StatusStringSubmitted = "SUBMITTED" 3018) 3019 3020// StatusString_Values returns all elements of the StatusString enum 3021func StatusString_Values() []string { 3022 return []string{ 3023 StatusStringAborted, 3024 StatusStringAll, 3025 StatusStringFailed, 3026 StatusStringFinished, 3027 StatusStringPicked, 3028 StatusStringStarted, 3029 StatusStringSubmitted, 3030 } 3031} 3032