1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package athena 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 "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" 14) 15 16const opBatchGetNamedQuery = "BatchGetNamedQuery" 17 18// BatchGetNamedQueryRequest generates a "aws/request.Request" representing the 19// client's request for the BatchGetNamedQuery operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See BatchGetNamedQuery for more information on using the BatchGetNamedQuery 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the BatchGetNamedQueryRequest method. 34// req, resp := client.BatchGetNamedQueryRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery 42func (c *Athena) BatchGetNamedQueryRequest(input *BatchGetNamedQueryInput) (req *request.Request, output *BatchGetNamedQueryOutput) { 43 op := &request.Operation{ 44 Name: opBatchGetNamedQuery, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &BatchGetNamedQueryInput{} 51 } 52 53 output = &BatchGetNamedQueryOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// BatchGetNamedQuery API operation for Amazon Athena. 59// 60// Returns the details of a single named query or a list of up to 50 queries, 61// which you provide as an array of query ID strings. Requires you to have access 62// to the workgroup in which the queries were saved. Use ListNamedQueriesInput 63// to get the list of named query IDs in the specified workgroup. If information 64// could not be retrieved for a submitted query ID, information about the query 65// ID submitted is listed under UnprocessedNamedQueryId. Named queries differ 66// from executed queries. Use BatchGetQueryExecutionInput to get details about 67// each unique query execution, and ListQueryExecutionsInput to get a list of 68// query execution IDs. 69// 70// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 71// with awserr.Error's Code and Message methods to get detailed information about 72// the error. 73// 74// See the AWS API reference guide for Amazon Athena's 75// API operation BatchGetNamedQuery for usage and error information. 76// 77// Returned Error Types: 78// * InternalServerException 79// Indicates a platform issue, which may be due to a transient condition or 80// outage. 81// 82// * InvalidRequestException 83// Indicates that something is wrong with the input to the request. For example, 84// a required parameter may be missing or out of range. 85// 86// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery 87func (c *Athena) BatchGetNamedQuery(input *BatchGetNamedQueryInput) (*BatchGetNamedQueryOutput, error) { 88 req, out := c.BatchGetNamedQueryRequest(input) 89 return out, req.Send() 90} 91 92// BatchGetNamedQueryWithContext is the same as BatchGetNamedQuery with the addition of 93// the ability to pass a context and additional request options. 94// 95// See BatchGetNamedQuery for details on how to use this API operation. 96// 97// The context must be non-nil and will be used for request cancellation. If 98// the context is nil a panic will occur. In the future the SDK may create 99// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 100// for more information on using Contexts. 101func (c *Athena) BatchGetNamedQueryWithContext(ctx aws.Context, input *BatchGetNamedQueryInput, opts ...request.Option) (*BatchGetNamedQueryOutput, error) { 102 req, out := c.BatchGetNamedQueryRequest(input) 103 req.SetContext(ctx) 104 req.ApplyOptions(opts...) 105 return out, req.Send() 106} 107 108const opBatchGetQueryExecution = "BatchGetQueryExecution" 109 110// BatchGetQueryExecutionRequest generates a "aws/request.Request" representing the 111// client's request for the BatchGetQueryExecution operation. The "output" return 112// value will be populated with the request's response once the request completes 113// successfully. 114// 115// Use "Send" method on the returned Request to send the API call to the service. 116// the "output" return value is not valid until after Send returns without error. 117// 118// See BatchGetQueryExecution for more information on using the BatchGetQueryExecution 119// API call, and error handling. 120// 121// This method is useful when you want to inject custom logic or configuration 122// into the SDK's request lifecycle. Such as custom headers, or retry logic. 123// 124// 125// // Example sending a request using the BatchGetQueryExecutionRequest method. 126// req, resp := client.BatchGetQueryExecutionRequest(params) 127// 128// err := req.Send() 129// if err == nil { // resp is now filled 130// fmt.Println(resp) 131// } 132// 133// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution 134func (c *Athena) BatchGetQueryExecutionRequest(input *BatchGetQueryExecutionInput) (req *request.Request, output *BatchGetQueryExecutionOutput) { 135 op := &request.Operation{ 136 Name: opBatchGetQueryExecution, 137 HTTPMethod: "POST", 138 HTTPPath: "/", 139 } 140 141 if input == nil { 142 input = &BatchGetQueryExecutionInput{} 143 } 144 145 output = &BatchGetQueryExecutionOutput{} 146 req = c.newRequest(op, input, output) 147 return 148} 149 150// BatchGetQueryExecution API operation for Amazon Athena. 151// 152// Returns the details of a single query execution or a list of up to 50 query 153// executions, which you provide as an array of query execution ID strings. 154// Requires you to have access to the workgroup in which the queries ran. To 155// get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup. 156// Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput 157// to get details about named queries. 158// 159// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 160// with awserr.Error's Code and Message methods to get detailed information about 161// the error. 162// 163// See the AWS API reference guide for Amazon Athena's 164// API operation BatchGetQueryExecution for usage and error information. 165// 166// Returned Error Types: 167// * InternalServerException 168// Indicates a platform issue, which may be due to a transient condition or 169// outage. 170// 171// * InvalidRequestException 172// Indicates that something is wrong with the input to the request. For example, 173// a required parameter may be missing or out of range. 174// 175// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution 176func (c *Athena) BatchGetQueryExecution(input *BatchGetQueryExecutionInput) (*BatchGetQueryExecutionOutput, error) { 177 req, out := c.BatchGetQueryExecutionRequest(input) 178 return out, req.Send() 179} 180 181// BatchGetQueryExecutionWithContext is the same as BatchGetQueryExecution with the addition of 182// the ability to pass a context and additional request options. 183// 184// See BatchGetQueryExecution for details on how to use this API operation. 185// 186// The context must be non-nil and will be used for request cancellation. If 187// the context is nil a panic will occur. In the future the SDK may create 188// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 189// for more information on using Contexts. 190func (c *Athena) BatchGetQueryExecutionWithContext(ctx aws.Context, input *BatchGetQueryExecutionInput, opts ...request.Option) (*BatchGetQueryExecutionOutput, error) { 191 req, out := c.BatchGetQueryExecutionRequest(input) 192 req.SetContext(ctx) 193 req.ApplyOptions(opts...) 194 return out, req.Send() 195} 196 197const opCreateDataCatalog = "CreateDataCatalog" 198 199// CreateDataCatalogRequest generates a "aws/request.Request" representing the 200// client's request for the CreateDataCatalog operation. The "output" return 201// value will be populated with the request's response once the request completes 202// successfully. 203// 204// Use "Send" method on the returned Request to send the API call to the service. 205// the "output" return value is not valid until after Send returns without error. 206// 207// See CreateDataCatalog for more information on using the CreateDataCatalog 208// API call, and error handling. 209// 210// This method is useful when you want to inject custom logic or configuration 211// into the SDK's request lifecycle. Such as custom headers, or retry logic. 212// 213// 214// // Example sending a request using the CreateDataCatalogRequest method. 215// req, resp := client.CreateDataCatalogRequest(params) 216// 217// err := req.Send() 218// if err == nil { // resp is now filled 219// fmt.Println(resp) 220// } 221// 222// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateDataCatalog 223func (c *Athena) CreateDataCatalogRequest(input *CreateDataCatalogInput) (req *request.Request, output *CreateDataCatalogOutput) { 224 op := &request.Operation{ 225 Name: opCreateDataCatalog, 226 HTTPMethod: "POST", 227 HTTPPath: "/", 228 } 229 230 if input == nil { 231 input = &CreateDataCatalogInput{} 232 } 233 234 output = &CreateDataCatalogOutput{} 235 req = c.newRequest(op, input, output) 236 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 237 return 238} 239 240// CreateDataCatalog API operation for Amazon Athena. 241// 242// Creates (registers) a data catalog with the specified name and properties. 243// Catalogs created are visible to all users of the same AWS account. 244// 245// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 246// with awserr.Error's Code and Message methods to get detailed information about 247// the error. 248// 249// See the AWS API reference guide for Amazon Athena's 250// API operation CreateDataCatalog for usage and error information. 251// 252// Returned Error Types: 253// * InternalServerException 254// Indicates a platform issue, which may be due to a transient condition or 255// outage. 256// 257// * InvalidRequestException 258// Indicates that something is wrong with the input to the request. For example, 259// a required parameter may be missing or out of range. 260// 261// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateDataCatalog 262func (c *Athena) CreateDataCatalog(input *CreateDataCatalogInput) (*CreateDataCatalogOutput, error) { 263 req, out := c.CreateDataCatalogRequest(input) 264 return out, req.Send() 265} 266 267// CreateDataCatalogWithContext is the same as CreateDataCatalog with the addition of 268// the ability to pass a context and additional request options. 269// 270// See CreateDataCatalog 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 *Athena) CreateDataCatalogWithContext(ctx aws.Context, input *CreateDataCatalogInput, opts ...request.Option) (*CreateDataCatalogOutput, error) { 277 req, out := c.CreateDataCatalogRequest(input) 278 req.SetContext(ctx) 279 req.ApplyOptions(opts...) 280 return out, req.Send() 281} 282 283const opCreateNamedQuery = "CreateNamedQuery" 284 285// CreateNamedQueryRequest generates a "aws/request.Request" representing the 286// client's request for the CreateNamedQuery operation. The "output" return 287// value will be populated with the request's response once the request completes 288// successfully. 289// 290// Use "Send" method on the returned Request to send the API call to the service. 291// the "output" return value is not valid until after Send returns without error. 292// 293// See CreateNamedQuery for more information on using the CreateNamedQuery 294// API call, and error handling. 295// 296// This method is useful when you want to inject custom logic or configuration 297// into the SDK's request lifecycle. Such as custom headers, or retry logic. 298// 299// 300// // Example sending a request using the CreateNamedQueryRequest method. 301// req, resp := client.CreateNamedQueryRequest(params) 302// 303// err := req.Send() 304// if err == nil { // resp is now filled 305// fmt.Println(resp) 306// } 307// 308// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery 309func (c *Athena) CreateNamedQueryRequest(input *CreateNamedQueryInput) (req *request.Request, output *CreateNamedQueryOutput) { 310 op := &request.Operation{ 311 Name: opCreateNamedQuery, 312 HTTPMethod: "POST", 313 HTTPPath: "/", 314 } 315 316 if input == nil { 317 input = &CreateNamedQueryInput{} 318 } 319 320 output = &CreateNamedQueryOutput{} 321 req = c.newRequest(op, input, output) 322 return 323} 324 325// CreateNamedQuery API operation for Amazon Athena. 326// 327// Creates a named query in the specified workgroup. Requires that you have 328// access to the workgroup. 329// 330// For code samples using the AWS SDK for Java, see Examples and Code Samples 331// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon 332// Athena User Guide. 333// 334// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 335// with awserr.Error's Code and Message methods to get detailed information about 336// the error. 337// 338// See the AWS API reference guide for Amazon Athena's 339// API operation CreateNamedQuery for usage and error information. 340// 341// Returned Error Types: 342// * InternalServerException 343// Indicates a platform issue, which may be due to a transient condition or 344// outage. 345// 346// * InvalidRequestException 347// Indicates that something is wrong with the input to the request. For example, 348// a required parameter may be missing or out of range. 349// 350// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery 351func (c *Athena) CreateNamedQuery(input *CreateNamedQueryInput) (*CreateNamedQueryOutput, error) { 352 req, out := c.CreateNamedQueryRequest(input) 353 return out, req.Send() 354} 355 356// CreateNamedQueryWithContext is the same as CreateNamedQuery with the addition of 357// the ability to pass a context and additional request options. 358// 359// See CreateNamedQuery for details on how to use this API operation. 360// 361// The context must be non-nil and will be used for request cancellation. If 362// the context is nil a panic will occur. In the future the SDK may create 363// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 364// for more information on using Contexts. 365func (c *Athena) CreateNamedQueryWithContext(ctx aws.Context, input *CreateNamedQueryInput, opts ...request.Option) (*CreateNamedQueryOutput, error) { 366 req, out := c.CreateNamedQueryRequest(input) 367 req.SetContext(ctx) 368 req.ApplyOptions(opts...) 369 return out, req.Send() 370} 371 372const opCreateWorkGroup = "CreateWorkGroup" 373 374// CreateWorkGroupRequest generates a "aws/request.Request" representing the 375// client's request for the CreateWorkGroup operation. The "output" return 376// value will be populated with the request's response once the request completes 377// successfully. 378// 379// Use "Send" method on the returned Request to send the API call to the service. 380// the "output" return value is not valid until after Send returns without error. 381// 382// See CreateWorkGroup for more information on using the CreateWorkGroup 383// API call, and error handling. 384// 385// This method is useful when you want to inject custom logic or configuration 386// into the SDK's request lifecycle. Such as custom headers, or retry logic. 387// 388// 389// // Example sending a request using the CreateWorkGroupRequest method. 390// req, resp := client.CreateWorkGroupRequest(params) 391// 392// err := req.Send() 393// if err == nil { // resp is now filled 394// fmt.Println(resp) 395// } 396// 397// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateWorkGroup 398func (c *Athena) CreateWorkGroupRequest(input *CreateWorkGroupInput) (req *request.Request, output *CreateWorkGroupOutput) { 399 op := &request.Operation{ 400 Name: opCreateWorkGroup, 401 HTTPMethod: "POST", 402 HTTPPath: "/", 403 } 404 405 if input == nil { 406 input = &CreateWorkGroupInput{} 407 } 408 409 output = &CreateWorkGroupOutput{} 410 req = c.newRequest(op, input, output) 411 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 412 return 413} 414 415// CreateWorkGroup API operation for Amazon Athena. 416// 417// Creates a workgroup with the specified name. 418// 419// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 420// with awserr.Error's Code and Message methods to get detailed information about 421// the error. 422// 423// See the AWS API reference guide for Amazon Athena's 424// API operation CreateWorkGroup for usage and error information. 425// 426// Returned Error Types: 427// * InternalServerException 428// Indicates a platform issue, which may be due to a transient condition or 429// outage. 430// 431// * InvalidRequestException 432// Indicates that something is wrong with the input to the request. For example, 433// a required parameter may be missing or out of range. 434// 435// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateWorkGroup 436func (c *Athena) CreateWorkGroup(input *CreateWorkGroupInput) (*CreateWorkGroupOutput, error) { 437 req, out := c.CreateWorkGroupRequest(input) 438 return out, req.Send() 439} 440 441// CreateWorkGroupWithContext is the same as CreateWorkGroup with the addition of 442// the ability to pass a context and additional request options. 443// 444// See CreateWorkGroup for details on how to use this API operation. 445// 446// The context must be non-nil and will be used for request cancellation. If 447// the context is nil a panic will occur. In the future the SDK may create 448// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 449// for more information on using Contexts. 450func (c *Athena) CreateWorkGroupWithContext(ctx aws.Context, input *CreateWorkGroupInput, opts ...request.Option) (*CreateWorkGroupOutput, error) { 451 req, out := c.CreateWorkGroupRequest(input) 452 req.SetContext(ctx) 453 req.ApplyOptions(opts...) 454 return out, req.Send() 455} 456 457const opDeleteDataCatalog = "DeleteDataCatalog" 458 459// DeleteDataCatalogRequest generates a "aws/request.Request" representing the 460// client's request for the DeleteDataCatalog operation. The "output" return 461// value will be populated with the request's response once the request completes 462// successfully. 463// 464// Use "Send" method on the returned Request to send the API call to the service. 465// the "output" return value is not valid until after Send returns without error. 466// 467// See DeleteDataCatalog for more information on using the DeleteDataCatalog 468// API call, and error handling. 469// 470// This method is useful when you want to inject custom logic or configuration 471// into the SDK's request lifecycle. Such as custom headers, or retry logic. 472// 473// 474// // Example sending a request using the DeleteDataCatalogRequest method. 475// req, resp := client.DeleteDataCatalogRequest(params) 476// 477// err := req.Send() 478// if err == nil { // resp is now filled 479// fmt.Println(resp) 480// } 481// 482// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteDataCatalog 483func (c *Athena) DeleteDataCatalogRequest(input *DeleteDataCatalogInput) (req *request.Request, output *DeleteDataCatalogOutput) { 484 op := &request.Operation{ 485 Name: opDeleteDataCatalog, 486 HTTPMethod: "POST", 487 HTTPPath: "/", 488 } 489 490 if input == nil { 491 input = &DeleteDataCatalogInput{} 492 } 493 494 output = &DeleteDataCatalogOutput{} 495 req = c.newRequest(op, input, output) 496 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 497 return 498} 499 500// DeleteDataCatalog API operation for Amazon Athena. 501// 502// Deletes a data catalog. 503// 504// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 505// with awserr.Error's Code and Message methods to get detailed information about 506// the error. 507// 508// See the AWS API reference guide for Amazon Athena's 509// API operation DeleteDataCatalog for usage and error information. 510// 511// Returned Error Types: 512// * InternalServerException 513// Indicates a platform issue, which may be due to a transient condition or 514// outage. 515// 516// * InvalidRequestException 517// Indicates that something is wrong with the input to the request. For example, 518// a required parameter may be missing or out of range. 519// 520// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteDataCatalog 521func (c *Athena) DeleteDataCatalog(input *DeleteDataCatalogInput) (*DeleteDataCatalogOutput, error) { 522 req, out := c.DeleteDataCatalogRequest(input) 523 return out, req.Send() 524} 525 526// DeleteDataCatalogWithContext is the same as DeleteDataCatalog with the addition of 527// the ability to pass a context and additional request options. 528// 529// See DeleteDataCatalog for details on how to use this API operation. 530// 531// The context must be non-nil and will be used for request cancellation. If 532// the context is nil a panic will occur. In the future the SDK may create 533// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 534// for more information on using Contexts. 535func (c *Athena) DeleteDataCatalogWithContext(ctx aws.Context, input *DeleteDataCatalogInput, opts ...request.Option) (*DeleteDataCatalogOutput, error) { 536 req, out := c.DeleteDataCatalogRequest(input) 537 req.SetContext(ctx) 538 req.ApplyOptions(opts...) 539 return out, req.Send() 540} 541 542const opDeleteNamedQuery = "DeleteNamedQuery" 543 544// DeleteNamedQueryRequest generates a "aws/request.Request" representing the 545// client's request for the DeleteNamedQuery operation. The "output" return 546// value will be populated with the request's response once the request completes 547// successfully. 548// 549// Use "Send" method on the returned Request to send the API call to the service. 550// the "output" return value is not valid until after Send returns without error. 551// 552// See DeleteNamedQuery for more information on using the DeleteNamedQuery 553// API call, and error handling. 554// 555// This method is useful when you want to inject custom logic or configuration 556// into the SDK's request lifecycle. Such as custom headers, or retry logic. 557// 558// 559// // Example sending a request using the DeleteNamedQueryRequest method. 560// req, resp := client.DeleteNamedQueryRequest(params) 561// 562// err := req.Send() 563// if err == nil { // resp is now filled 564// fmt.Println(resp) 565// } 566// 567// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery 568func (c *Athena) DeleteNamedQueryRequest(input *DeleteNamedQueryInput) (req *request.Request, output *DeleteNamedQueryOutput) { 569 op := &request.Operation{ 570 Name: opDeleteNamedQuery, 571 HTTPMethod: "POST", 572 HTTPPath: "/", 573 } 574 575 if input == nil { 576 input = &DeleteNamedQueryInput{} 577 } 578 579 output = &DeleteNamedQueryOutput{} 580 req = c.newRequest(op, input, output) 581 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 582 return 583} 584 585// DeleteNamedQuery API operation for Amazon Athena. 586// 587// Deletes the named query if you have access to the workgroup in which the 588// query was saved. 589// 590// For code samples using the AWS SDK for Java, see Examples and Code Samples 591// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon 592// Athena User Guide. 593// 594// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 595// with awserr.Error's Code and Message methods to get detailed information about 596// the error. 597// 598// See the AWS API reference guide for Amazon Athena's 599// API operation DeleteNamedQuery for usage and error information. 600// 601// Returned Error Types: 602// * InternalServerException 603// Indicates a platform issue, which may be due to a transient condition or 604// outage. 605// 606// * InvalidRequestException 607// Indicates that something is wrong with the input to the request. For example, 608// a required parameter may be missing or out of range. 609// 610// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery 611func (c *Athena) DeleteNamedQuery(input *DeleteNamedQueryInput) (*DeleteNamedQueryOutput, error) { 612 req, out := c.DeleteNamedQueryRequest(input) 613 return out, req.Send() 614} 615 616// DeleteNamedQueryWithContext is the same as DeleteNamedQuery with the addition of 617// the ability to pass a context and additional request options. 618// 619// See DeleteNamedQuery for details on how to use this API operation. 620// 621// The context must be non-nil and will be used for request cancellation. If 622// the context is nil a panic will occur. In the future the SDK may create 623// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 624// for more information on using Contexts. 625func (c *Athena) DeleteNamedQueryWithContext(ctx aws.Context, input *DeleteNamedQueryInput, opts ...request.Option) (*DeleteNamedQueryOutput, error) { 626 req, out := c.DeleteNamedQueryRequest(input) 627 req.SetContext(ctx) 628 req.ApplyOptions(opts...) 629 return out, req.Send() 630} 631 632const opDeleteWorkGroup = "DeleteWorkGroup" 633 634// DeleteWorkGroupRequest generates a "aws/request.Request" representing the 635// client's request for the DeleteWorkGroup operation. The "output" return 636// value will be populated with the request's response once the request completes 637// successfully. 638// 639// Use "Send" method on the returned Request to send the API call to the service. 640// the "output" return value is not valid until after Send returns without error. 641// 642// See DeleteWorkGroup for more information on using the DeleteWorkGroup 643// API call, and error handling. 644// 645// This method is useful when you want to inject custom logic or configuration 646// into the SDK's request lifecycle. Such as custom headers, or retry logic. 647// 648// 649// // Example sending a request using the DeleteWorkGroupRequest method. 650// req, resp := client.DeleteWorkGroupRequest(params) 651// 652// err := req.Send() 653// if err == nil { // resp is now filled 654// fmt.Println(resp) 655// } 656// 657// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteWorkGroup 658func (c *Athena) DeleteWorkGroupRequest(input *DeleteWorkGroupInput) (req *request.Request, output *DeleteWorkGroupOutput) { 659 op := &request.Operation{ 660 Name: opDeleteWorkGroup, 661 HTTPMethod: "POST", 662 HTTPPath: "/", 663 } 664 665 if input == nil { 666 input = &DeleteWorkGroupInput{} 667 } 668 669 output = &DeleteWorkGroupOutput{} 670 req = c.newRequest(op, input, output) 671 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 672 return 673} 674 675// DeleteWorkGroup API operation for Amazon Athena. 676// 677// Deletes the workgroup with the specified name. The primary workgroup cannot 678// be deleted. 679// 680// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 681// with awserr.Error's Code and Message methods to get detailed information about 682// the error. 683// 684// See the AWS API reference guide for Amazon Athena's 685// API operation DeleteWorkGroup for usage and error information. 686// 687// Returned Error Types: 688// * InternalServerException 689// Indicates a platform issue, which may be due to a transient condition or 690// outage. 691// 692// * InvalidRequestException 693// Indicates that something is wrong with the input to the request. For example, 694// a required parameter may be missing or out of range. 695// 696// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteWorkGroup 697func (c *Athena) DeleteWorkGroup(input *DeleteWorkGroupInput) (*DeleteWorkGroupOutput, error) { 698 req, out := c.DeleteWorkGroupRequest(input) 699 return out, req.Send() 700} 701 702// DeleteWorkGroupWithContext is the same as DeleteWorkGroup with the addition of 703// the ability to pass a context and additional request options. 704// 705// See DeleteWorkGroup for details on how to use this API operation. 706// 707// The context must be non-nil and will be used for request cancellation. If 708// the context is nil a panic will occur. In the future the SDK may create 709// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 710// for more information on using Contexts. 711func (c *Athena) DeleteWorkGroupWithContext(ctx aws.Context, input *DeleteWorkGroupInput, opts ...request.Option) (*DeleteWorkGroupOutput, error) { 712 req, out := c.DeleteWorkGroupRequest(input) 713 req.SetContext(ctx) 714 req.ApplyOptions(opts...) 715 return out, req.Send() 716} 717 718const opGetDataCatalog = "GetDataCatalog" 719 720// GetDataCatalogRequest generates a "aws/request.Request" representing the 721// client's request for the GetDataCatalog operation. The "output" return 722// value will be populated with the request's response once the request completes 723// successfully. 724// 725// Use "Send" method on the returned Request to send the API call to the service. 726// the "output" return value is not valid until after Send returns without error. 727// 728// See GetDataCatalog for more information on using the GetDataCatalog 729// API call, and error handling. 730// 731// This method is useful when you want to inject custom logic or configuration 732// into the SDK's request lifecycle. Such as custom headers, or retry logic. 733// 734// 735// // Example sending a request using the GetDataCatalogRequest method. 736// req, resp := client.GetDataCatalogRequest(params) 737// 738// err := req.Send() 739// if err == nil { // resp is now filled 740// fmt.Println(resp) 741// } 742// 743// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDataCatalog 744func (c *Athena) GetDataCatalogRequest(input *GetDataCatalogInput) (req *request.Request, output *GetDataCatalogOutput) { 745 op := &request.Operation{ 746 Name: opGetDataCatalog, 747 HTTPMethod: "POST", 748 HTTPPath: "/", 749 } 750 751 if input == nil { 752 input = &GetDataCatalogInput{} 753 } 754 755 output = &GetDataCatalogOutput{} 756 req = c.newRequest(op, input, output) 757 return 758} 759 760// GetDataCatalog API operation for Amazon Athena. 761// 762// Returns the specified data catalog. 763// 764// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 765// with awserr.Error's Code and Message methods to get detailed information about 766// the error. 767// 768// See the AWS API reference guide for Amazon Athena's 769// API operation GetDataCatalog for usage and error information. 770// 771// Returned Error Types: 772// * InternalServerException 773// Indicates a platform issue, which may be due to a transient condition or 774// outage. 775// 776// * InvalidRequestException 777// Indicates that something is wrong with the input to the request. For example, 778// a required parameter may be missing or out of range. 779// 780// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDataCatalog 781func (c *Athena) GetDataCatalog(input *GetDataCatalogInput) (*GetDataCatalogOutput, error) { 782 req, out := c.GetDataCatalogRequest(input) 783 return out, req.Send() 784} 785 786// GetDataCatalogWithContext is the same as GetDataCatalog with the addition of 787// the ability to pass a context and additional request options. 788// 789// See GetDataCatalog for details on how to use this API operation. 790// 791// The context must be non-nil and will be used for request cancellation. If 792// the context is nil a panic will occur. In the future the SDK may create 793// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 794// for more information on using Contexts. 795func (c *Athena) GetDataCatalogWithContext(ctx aws.Context, input *GetDataCatalogInput, opts ...request.Option) (*GetDataCatalogOutput, error) { 796 req, out := c.GetDataCatalogRequest(input) 797 req.SetContext(ctx) 798 req.ApplyOptions(opts...) 799 return out, req.Send() 800} 801 802const opGetDatabase = "GetDatabase" 803 804// GetDatabaseRequest generates a "aws/request.Request" representing the 805// client's request for the GetDatabase operation. The "output" return 806// value will be populated with the request's response once the request completes 807// successfully. 808// 809// Use "Send" method on the returned Request to send the API call to the service. 810// the "output" return value is not valid until after Send returns without error. 811// 812// See GetDatabase for more information on using the GetDatabase 813// API call, and error handling. 814// 815// This method is useful when you want to inject custom logic or configuration 816// into the SDK's request lifecycle. Such as custom headers, or retry logic. 817// 818// 819// // Example sending a request using the GetDatabaseRequest method. 820// req, resp := client.GetDatabaseRequest(params) 821// 822// err := req.Send() 823// if err == nil { // resp is now filled 824// fmt.Println(resp) 825// } 826// 827// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDatabase 828func (c *Athena) GetDatabaseRequest(input *GetDatabaseInput) (req *request.Request, output *GetDatabaseOutput) { 829 op := &request.Operation{ 830 Name: opGetDatabase, 831 HTTPMethod: "POST", 832 HTTPPath: "/", 833 } 834 835 if input == nil { 836 input = &GetDatabaseInput{} 837 } 838 839 output = &GetDatabaseOutput{} 840 req = c.newRequest(op, input, output) 841 return 842} 843 844// GetDatabase API operation for Amazon Athena. 845// 846// Returns a database object for the specfied database and data catalog. 847// 848// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 849// with awserr.Error's Code and Message methods to get detailed information about 850// the error. 851// 852// See the AWS API reference guide for Amazon Athena's 853// API operation GetDatabase for usage and error information. 854// 855// Returned Error Types: 856// * InternalServerException 857// Indicates a platform issue, which may be due to a transient condition or 858// outage. 859// 860// * InvalidRequestException 861// Indicates that something is wrong with the input to the request. For example, 862// a required parameter may be missing or out of range. 863// 864// * MetadataException 865// An exception that Athena received when it called a custom metastore. Occurs 866// if the error is not caused by user input (InvalidRequestException) or from 867// the Athena platform (InternalServerException). For example, if a user-created 868// Lambda function is missing permissions, the Lambda 4XX exception is returned 869// in a MetadataException. 870// 871// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDatabase 872func (c *Athena) GetDatabase(input *GetDatabaseInput) (*GetDatabaseOutput, error) { 873 req, out := c.GetDatabaseRequest(input) 874 return out, req.Send() 875} 876 877// GetDatabaseWithContext is the same as GetDatabase with the addition of 878// the ability to pass a context and additional request options. 879// 880// See GetDatabase for details on how to use this API operation. 881// 882// The context must be non-nil and will be used for request cancellation. If 883// the context is nil a panic will occur. In the future the SDK may create 884// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 885// for more information on using Contexts. 886func (c *Athena) GetDatabaseWithContext(ctx aws.Context, input *GetDatabaseInput, opts ...request.Option) (*GetDatabaseOutput, error) { 887 req, out := c.GetDatabaseRequest(input) 888 req.SetContext(ctx) 889 req.ApplyOptions(opts...) 890 return out, req.Send() 891} 892 893const opGetNamedQuery = "GetNamedQuery" 894 895// GetNamedQueryRequest generates a "aws/request.Request" representing the 896// client's request for the GetNamedQuery operation. The "output" return 897// value will be populated with the request's response once the request completes 898// successfully. 899// 900// Use "Send" method on the returned Request to send the API call to the service. 901// the "output" return value is not valid until after Send returns without error. 902// 903// See GetNamedQuery for more information on using the GetNamedQuery 904// API call, and error handling. 905// 906// This method is useful when you want to inject custom logic or configuration 907// into the SDK's request lifecycle. Such as custom headers, or retry logic. 908// 909// 910// // Example sending a request using the GetNamedQueryRequest method. 911// req, resp := client.GetNamedQueryRequest(params) 912// 913// err := req.Send() 914// if err == nil { // resp is now filled 915// fmt.Println(resp) 916// } 917// 918// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery 919func (c *Athena) GetNamedQueryRequest(input *GetNamedQueryInput) (req *request.Request, output *GetNamedQueryOutput) { 920 op := &request.Operation{ 921 Name: opGetNamedQuery, 922 HTTPMethod: "POST", 923 HTTPPath: "/", 924 } 925 926 if input == nil { 927 input = &GetNamedQueryInput{} 928 } 929 930 output = &GetNamedQueryOutput{} 931 req = c.newRequest(op, input, output) 932 return 933} 934 935// GetNamedQuery API operation for Amazon Athena. 936// 937// Returns information about a single query. Requires that you have access to 938// the workgroup in which the query was saved. 939// 940// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 941// with awserr.Error's Code and Message methods to get detailed information about 942// the error. 943// 944// See the AWS API reference guide for Amazon Athena's 945// API operation GetNamedQuery for usage and error information. 946// 947// Returned Error Types: 948// * InternalServerException 949// Indicates a platform issue, which may be due to a transient condition or 950// outage. 951// 952// * InvalidRequestException 953// Indicates that something is wrong with the input to the request. For example, 954// a required parameter may be missing or out of range. 955// 956// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery 957func (c *Athena) GetNamedQuery(input *GetNamedQueryInput) (*GetNamedQueryOutput, error) { 958 req, out := c.GetNamedQueryRequest(input) 959 return out, req.Send() 960} 961 962// GetNamedQueryWithContext is the same as GetNamedQuery with the addition of 963// the ability to pass a context and additional request options. 964// 965// See GetNamedQuery for details on how to use this API operation. 966// 967// The context must be non-nil and will be used for request cancellation. If 968// the context is nil a panic will occur. In the future the SDK may create 969// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 970// for more information on using Contexts. 971func (c *Athena) GetNamedQueryWithContext(ctx aws.Context, input *GetNamedQueryInput, opts ...request.Option) (*GetNamedQueryOutput, error) { 972 req, out := c.GetNamedQueryRequest(input) 973 req.SetContext(ctx) 974 req.ApplyOptions(opts...) 975 return out, req.Send() 976} 977 978const opGetQueryExecution = "GetQueryExecution" 979 980// GetQueryExecutionRequest generates a "aws/request.Request" representing the 981// client's request for the GetQueryExecution operation. The "output" return 982// value will be populated with the request's response once the request completes 983// successfully. 984// 985// Use "Send" method on the returned Request to send the API call to the service. 986// the "output" return value is not valid until after Send returns without error. 987// 988// See GetQueryExecution for more information on using the GetQueryExecution 989// API call, and error handling. 990// 991// This method is useful when you want to inject custom logic or configuration 992// into the SDK's request lifecycle. Such as custom headers, or retry logic. 993// 994// 995// // Example sending a request using the GetQueryExecutionRequest method. 996// req, resp := client.GetQueryExecutionRequest(params) 997// 998// err := req.Send() 999// if err == nil { // resp is now filled 1000// fmt.Println(resp) 1001// } 1002// 1003// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution 1004func (c *Athena) GetQueryExecutionRequest(input *GetQueryExecutionInput) (req *request.Request, output *GetQueryExecutionOutput) { 1005 op := &request.Operation{ 1006 Name: opGetQueryExecution, 1007 HTTPMethod: "POST", 1008 HTTPPath: "/", 1009 } 1010 1011 if input == nil { 1012 input = &GetQueryExecutionInput{} 1013 } 1014 1015 output = &GetQueryExecutionOutput{} 1016 req = c.newRequest(op, input, output) 1017 return 1018} 1019 1020// GetQueryExecution API operation for Amazon Athena. 1021// 1022// Returns information about a single execution of a query if you have access 1023// to the workgroup in which the query ran. Each time a query executes, information 1024// about the query execution is saved with a unique ID. 1025// 1026// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1027// with awserr.Error's Code and Message methods to get detailed information about 1028// the error. 1029// 1030// See the AWS API reference guide for Amazon Athena's 1031// API operation GetQueryExecution for usage and error information. 1032// 1033// Returned Error Types: 1034// * InternalServerException 1035// Indicates a platform issue, which may be due to a transient condition or 1036// outage. 1037// 1038// * InvalidRequestException 1039// Indicates that something is wrong with the input to the request. For example, 1040// a required parameter may be missing or out of range. 1041// 1042// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution 1043func (c *Athena) GetQueryExecution(input *GetQueryExecutionInput) (*GetQueryExecutionOutput, error) { 1044 req, out := c.GetQueryExecutionRequest(input) 1045 return out, req.Send() 1046} 1047 1048// GetQueryExecutionWithContext is the same as GetQueryExecution with the addition of 1049// the ability to pass a context and additional request options. 1050// 1051// See GetQueryExecution for details on how to use this API operation. 1052// 1053// The context must be non-nil and will be used for request cancellation. If 1054// the context is nil a panic will occur. In the future the SDK may create 1055// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1056// for more information on using Contexts. 1057func (c *Athena) GetQueryExecutionWithContext(ctx aws.Context, input *GetQueryExecutionInput, opts ...request.Option) (*GetQueryExecutionOutput, error) { 1058 req, out := c.GetQueryExecutionRequest(input) 1059 req.SetContext(ctx) 1060 req.ApplyOptions(opts...) 1061 return out, req.Send() 1062} 1063 1064const opGetQueryResults = "GetQueryResults" 1065 1066// GetQueryResultsRequest generates a "aws/request.Request" representing the 1067// client's request for the GetQueryResults operation. The "output" return 1068// value will be populated with the request's response once the request completes 1069// successfully. 1070// 1071// Use "Send" method on the returned Request to send the API call to the service. 1072// the "output" return value is not valid until after Send returns without error. 1073// 1074// See GetQueryResults for more information on using the GetQueryResults 1075// API call, and error handling. 1076// 1077// This method is useful when you want to inject custom logic or configuration 1078// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1079// 1080// 1081// // Example sending a request using the GetQueryResultsRequest method. 1082// req, resp := client.GetQueryResultsRequest(params) 1083// 1084// err := req.Send() 1085// if err == nil { // resp is now filled 1086// fmt.Println(resp) 1087// } 1088// 1089// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults 1090func (c *Athena) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { 1091 op := &request.Operation{ 1092 Name: opGetQueryResults, 1093 HTTPMethod: "POST", 1094 HTTPPath: "/", 1095 Paginator: &request.Paginator{ 1096 InputTokens: []string{"NextToken"}, 1097 OutputTokens: []string{"NextToken"}, 1098 LimitToken: "MaxResults", 1099 TruncationToken: "", 1100 }, 1101 } 1102 1103 if input == nil { 1104 input = &GetQueryResultsInput{} 1105 } 1106 1107 output = &GetQueryResultsOutput{} 1108 req = c.newRequest(op, input, output) 1109 return 1110} 1111 1112// GetQueryResults API operation for Amazon Athena. 1113// 1114// Streams the results of a single query execution specified by QueryExecutionId 1115// from the Athena query results location in Amazon S3. For more information, 1116// see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html) 1117// in the Amazon Athena User Guide. This request does not execute the query 1118// but returns results. Use StartQueryExecution to run a query. 1119// 1120// To stream query results successfully, the IAM principal with permission to 1121// call GetQueryResults also must have permissions to the Amazon S3 GetObject 1122// action for the Athena query results location. 1123// 1124// IAM principals with permission to the Amazon S3 GetObject action for the 1125// query results location are able to retrieve query results from Amazon S3 1126// even if permission to the GetQueryResults action is denied. To restrict user 1127// or role access, ensure that Amazon S3 permissions to the Athena query location 1128// are denied. 1129// 1130// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1131// with awserr.Error's Code and Message methods to get detailed information about 1132// the error. 1133// 1134// See the AWS API reference guide for Amazon Athena's 1135// API operation GetQueryResults for usage and error information. 1136// 1137// Returned Error Types: 1138// * InternalServerException 1139// Indicates a platform issue, which may be due to a transient condition or 1140// outage. 1141// 1142// * InvalidRequestException 1143// Indicates that something is wrong with the input to the request. For example, 1144// a required parameter may be missing or out of range. 1145// 1146// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults 1147func (c *Athena) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { 1148 req, out := c.GetQueryResultsRequest(input) 1149 return out, req.Send() 1150} 1151 1152// GetQueryResultsWithContext is the same as GetQueryResults with the addition of 1153// the ability to pass a context and additional request options. 1154// 1155// See GetQueryResults for details on how to use this API operation. 1156// 1157// The context must be non-nil and will be used for request cancellation. If 1158// the context is nil a panic will occur. In the future the SDK may create 1159// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1160// for more information on using Contexts. 1161func (c *Athena) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { 1162 req, out := c.GetQueryResultsRequest(input) 1163 req.SetContext(ctx) 1164 req.ApplyOptions(opts...) 1165 return out, req.Send() 1166} 1167 1168// GetQueryResultsPages iterates over the pages of a GetQueryResults operation, 1169// calling the "fn" function with the response data for each page. To stop 1170// iterating, return false from the fn function. 1171// 1172// See GetQueryResults method for more information on how to use this operation. 1173// 1174// Note: This operation can generate multiple requests to a service. 1175// 1176// // Example iterating over at most 3 pages of a GetQueryResults operation. 1177// pageNum := 0 1178// err := client.GetQueryResultsPages(params, 1179// func(page *athena.GetQueryResultsOutput, lastPage bool) bool { 1180// pageNum++ 1181// fmt.Println(page) 1182// return pageNum <= 3 1183// }) 1184// 1185func (c *Athena) GetQueryResultsPages(input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool) error { 1186 return c.GetQueryResultsPagesWithContext(aws.BackgroundContext(), input, fn) 1187} 1188 1189// GetQueryResultsPagesWithContext same as GetQueryResultsPages except 1190// it takes a Context and allows setting request options on the pages. 1191// 1192// The context must be non-nil and will be used for request cancellation. If 1193// the context is nil a panic will occur. In the future the SDK may create 1194// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1195// for more information on using Contexts. 1196func (c *Athena) GetQueryResultsPagesWithContext(ctx aws.Context, input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool, opts ...request.Option) error { 1197 p := request.Pagination{ 1198 NewRequest: func() (*request.Request, error) { 1199 var inCpy *GetQueryResultsInput 1200 if input != nil { 1201 tmp := *input 1202 inCpy = &tmp 1203 } 1204 req, _ := c.GetQueryResultsRequest(inCpy) 1205 req.SetContext(ctx) 1206 req.ApplyOptions(opts...) 1207 return req, nil 1208 }, 1209 } 1210 1211 for p.Next() { 1212 if !fn(p.Page().(*GetQueryResultsOutput), !p.HasNextPage()) { 1213 break 1214 } 1215 } 1216 1217 return p.Err() 1218} 1219 1220const opGetTableMetadata = "GetTableMetadata" 1221 1222// GetTableMetadataRequest generates a "aws/request.Request" representing the 1223// client's request for the GetTableMetadata operation. The "output" return 1224// value will be populated with the request's response once the request completes 1225// successfully. 1226// 1227// Use "Send" method on the returned Request to send the API call to the service. 1228// the "output" return value is not valid until after Send returns without error. 1229// 1230// See GetTableMetadata for more information on using the GetTableMetadata 1231// API call, and error handling. 1232// 1233// This method is useful when you want to inject custom logic or configuration 1234// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1235// 1236// 1237// // Example sending a request using the GetTableMetadataRequest method. 1238// req, resp := client.GetTableMetadataRequest(params) 1239// 1240// err := req.Send() 1241// if err == nil { // resp is now filled 1242// fmt.Println(resp) 1243// } 1244// 1245// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetTableMetadata 1246func (c *Athena) GetTableMetadataRequest(input *GetTableMetadataInput) (req *request.Request, output *GetTableMetadataOutput) { 1247 op := &request.Operation{ 1248 Name: opGetTableMetadata, 1249 HTTPMethod: "POST", 1250 HTTPPath: "/", 1251 } 1252 1253 if input == nil { 1254 input = &GetTableMetadataInput{} 1255 } 1256 1257 output = &GetTableMetadataOutput{} 1258 req = c.newRequest(op, input, output) 1259 return 1260} 1261 1262// GetTableMetadata API operation for Amazon Athena. 1263// 1264// Returns table metadata for the specified catalog, database, and table. 1265// 1266// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1267// with awserr.Error's Code and Message methods to get detailed information about 1268// the error. 1269// 1270// See the AWS API reference guide for Amazon Athena's 1271// API operation GetTableMetadata for usage and error information. 1272// 1273// Returned Error Types: 1274// * InternalServerException 1275// Indicates a platform issue, which may be due to a transient condition or 1276// outage. 1277// 1278// * InvalidRequestException 1279// Indicates that something is wrong with the input to the request. For example, 1280// a required parameter may be missing or out of range. 1281// 1282// * MetadataException 1283// An exception that Athena received when it called a custom metastore. Occurs 1284// if the error is not caused by user input (InvalidRequestException) or from 1285// the Athena platform (InternalServerException). For example, if a user-created 1286// Lambda function is missing permissions, the Lambda 4XX exception is returned 1287// in a MetadataException. 1288// 1289// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetTableMetadata 1290func (c *Athena) GetTableMetadata(input *GetTableMetadataInput) (*GetTableMetadataOutput, error) { 1291 req, out := c.GetTableMetadataRequest(input) 1292 return out, req.Send() 1293} 1294 1295// GetTableMetadataWithContext is the same as GetTableMetadata with the addition of 1296// the ability to pass a context and additional request options. 1297// 1298// See GetTableMetadata for details on how to use this API operation. 1299// 1300// The context must be non-nil and will be used for request cancellation. If 1301// the context is nil a panic will occur. In the future the SDK may create 1302// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1303// for more information on using Contexts. 1304func (c *Athena) GetTableMetadataWithContext(ctx aws.Context, input *GetTableMetadataInput, opts ...request.Option) (*GetTableMetadataOutput, error) { 1305 req, out := c.GetTableMetadataRequest(input) 1306 req.SetContext(ctx) 1307 req.ApplyOptions(opts...) 1308 return out, req.Send() 1309} 1310 1311const opGetWorkGroup = "GetWorkGroup" 1312 1313// GetWorkGroupRequest generates a "aws/request.Request" representing the 1314// client's request for the GetWorkGroup operation. The "output" return 1315// value will be populated with the request's response once the request completes 1316// successfully. 1317// 1318// Use "Send" method on the returned Request to send the API call to the service. 1319// the "output" return value is not valid until after Send returns without error. 1320// 1321// See GetWorkGroup for more information on using the GetWorkGroup 1322// API call, and error handling. 1323// 1324// This method is useful when you want to inject custom logic or configuration 1325// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1326// 1327// 1328// // Example sending a request using the GetWorkGroupRequest method. 1329// req, resp := client.GetWorkGroupRequest(params) 1330// 1331// err := req.Send() 1332// if err == nil { // resp is now filled 1333// fmt.Println(resp) 1334// } 1335// 1336// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetWorkGroup 1337func (c *Athena) GetWorkGroupRequest(input *GetWorkGroupInput) (req *request.Request, output *GetWorkGroupOutput) { 1338 op := &request.Operation{ 1339 Name: opGetWorkGroup, 1340 HTTPMethod: "POST", 1341 HTTPPath: "/", 1342 } 1343 1344 if input == nil { 1345 input = &GetWorkGroupInput{} 1346 } 1347 1348 output = &GetWorkGroupOutput{} 1349 req = c.newRequest(op, input, output) 1350 return 1351} 1352 1353// GetWorkGroup API operation for Amazon Athena. 1354// 1355// Returns information about the workgroup with the specified name. 1356// 1357// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1358// with awserr.Error's Code and Message methods to get detailed information about 1359// the error. 1360// 1361// See the AWS API reference guide for Amazon Athena's 1362// API operation GetWorkGroup for usage and error information. 1363// 1364// Returned Error Types: 1365// * InternalServerException 1366// Indicates a platform issue, which may be due to a transient condition or 1367// outage. 1368// 1369// * InvalidRequestException 1370// Indicates that something is wrong with the input to the request. For example, 1371// a required parameter may be missing or out of range. 1372// 1373// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetWorkGroup 1374func (c *Athena) GetWorkGroup(input *GetWorkGroupInput) (*GetWorkGroupOutput, error) { 1375 req, out := c.GetWorkGroupRequest(input) 1376 return out, req.Send() 1377} 1378 1379// GetWorkGroupWithContext is the same as GetWorkGroup with the addition of 1380// the ability to pass a context and additional request options. 1381// 1382// See GetWorkGroup for details on how to use this API operation. 1383// 1384// The context must be non-nil and will be used for request cancellation. If 1385// the context is nil a panic will occur. In the future the SDK may create 1386// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1387// for more information on using Contexts. 1388func (c *Athena) GetWorkGroupWithContext(ctx aws.Context, input *GetWorkGroupInput, opts ...request.Option) (*GetWorkGroupOutput, error) { 1389 req, out := c.GetWorkGroupRequest(input) 1390 req.SetContext(ctx) 1391 req.ApplyOptions(opts...) 1392 return out, req.Send() 1393} 1394 1395const opListDataCatalogs = "ListDataCatalogs" 1396 1397// ListDataCatalogsRequest generates a "aws/request.Request" representing the 1398// client's request for the ListDataCatalogs operation. The "output" return 1399// value will be populated with the request's response once the request completes 1400// successfully. 1401// 1402// Use "Send" method on the returned Request to send the API call to the service. 1403// the "output" return value is not valid until after Send returns without error. 1404// 1405// See ListDataCatalogs for more information on using the ListDataCatalogs 1406// API call, and error handling. 1407// 1408// This method is useful when you want to inject custom logic or configuration 1409// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1410// 1411// 1412// // Example sending a request using the ListDataCatalogsRequest method. 1413// req, resp := client.ListDataCatalogsRequest(params) 1414// 1415// err := req.Send() 1416// if err == nil { // resp is now filled 1417// fmt.Println(resp) 1418// } 1419// 1420// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDataCatalogs 1421func (c *Athena) ListDataCatalogsRequest(input *ListDataCatalogsInput) (req *request.Request, output *ListDataCatalogsOutput) { 1422 op := &request.Operation{ 1423 Name: opListDataCatalogs, 1424 HTTPMethod: "POST", 1425 HTTPPath: "/", 1426 Paginator: &request.Paginator{ 1427 InputTokens: []string{"NextToken"}, 1428 OutputTokens: []string{"NextToken"}, 1429 LimitToken: "MaxResults", 1430 TruncationToken: "", 1431 }, 1432 } 1433 1434 if input == nil { 1435 input = &ListDataCatalogsInput{} 1436 } 1437 1438 output = &ListDataCatalogsOutput{} 1439 req = c.newRequest(op, input, output) 1440 return 1441} 1442 1443// ListDataCatalogs API operation for Amazon Athena. 1444// 1445// Lists the data catalogs in the current AWS account. 1446// 1447// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1448// with awserr.Error's Code and Message methods to get detailed information about 1449// the error. 1450// 1451// See the AWS API reference guide for Amazon Athena's 1452// API operation ListDataCatalogs for usage and error information. 1453// 1454// Returned Error Types: 1455// * InternalServerException 1456// Indicates a platform issue, which may be due to a transient condition or 1457// outage. 1458// 1459// * InvalidRequestException 1460// Indicates that something is wrong with the input to the request. For example, 1461// a required parameter may be missing or out of range. 1462// 1463// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDataCatalogs 1464func (c *Athena) ListDataCatalogs(input *ListDataCatalogsInput) (*ListDataCatalogsOutput, error) { 1465 req, out := c.ListDataCatalogsRequest(input) 1466 return out, req.Send() 1467} 1468 1469// ListDataCatalogsWithContext is the same as ListDataCatalogs with the addition of 1470// the ability to pass a context and additional request options. 1471// 1472// See ListDataCatalogs for details on how to use this API operation. 1473// 1474// The context must be non-nil and will be used for request cancellation. If 1475// the context is nil a panic will occur. In the future the SDK may create 1476// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1477// for more information on using Contexts. 1478func (c *Athena) ListDataCatalogsWithContext(ctx aws.Context, input *ListDataCatalogsInput, opts ...request.Option) (*ListDataCatalogsOutput, error) { 1479 req, out := c.ListDataCatalogsRequest(input) 1480 req.SetContext(ctx) 1481 req.ApplyOptions(opts...) 1482 return out, req.Send() 1483} 1484 1485// ListDataCatalogsPages iterates over the pages of a ListDataCatalogs operation, 1486// calling the "fn" function with the response data for each page. To stop 1487// iterating, return false from the fn function. 1488// 1489// See ListDataCatalogs method for more information on how to use this operation. 1490// 1491// Note: This operation can generate multiple requests to a service. 1492// 1493// // Example iterating over at most 3 pages of a ListDataCatalogs operation. 1494// pageNum := 0 1495// err := client.ListDataCatalogsPages(params, 1496// func(page *athena.ListDataCatalogsOutput, lastPage bool) bool { 1497// pageNum++ 1498// fmt.Println(page) 1499// return pageNum <= 3 1500// }) 1501// 1502func (c *Athena) ListDataCatalogsPages(input *ListDataCatalogsInput, fn func(*ListDataCatalogsOutput, bool) bool) error { 1503 return c.ListDataCatalogsPagesWithContext(aws.BackgroundContext(), input, fn) 1504} 1505 1506// ListDataCatalogsPagesWithContext same as ListDataCatalogsPages except 1507// it takes a Context and allows setting request options on the pages. 1508// 1509// The context must be non-nil and will be used for request cancellation. If 1510// the context is nil a panic will occur. In the future the SDK may create 1511// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1512// for more information on using Contexts. 1513func (c *Athena) ListDataCatalogsPagesWithContext(ctx aws.Context, input *ListDataCatalogsInput, fn func(*ListDataCatalogsOutput, bool) bool, opts ...request.Option) error { 1514 p := request.Pagination{ 1515 NewRequest: func() (*request.Request, error) { 1516 var inCpy *ListDataCatalogsInput 1517 if input != nil { 1518 tmp := *input 1519 inCpy = &tmp 1520 } 1521 req, _ := c.ListDataCatalogsRequest(inCpy) 1522 req.SetContext(ctx) 1523 req.ApplyOptions(opts...) 1524 return req, nil 1525 }, 1526 } 1527 1528 for p.Next() { 1529 if !fn(p.Page().(*ListDataCatalogsOutput), !p.HasNextPage()) { 1530 break 1531 } 1532 } 1533 1534 return p.Err() 1535} 1536 1537const opListDatabases = "ListDatabases" 1538 1539// ListDatabasesRequest generates a "aws/request.Request" representing the 1540// client's request for the ListDatabases operation. The "output" return 1541// value will be populated with the request's response once the request completes 1542// successfully. 1543// 1544// Use "Send" method on the returned Request to send the API call to the service. 1545// the "output" return value is not valid until after Send returns without error. 1546// 1547// See ListDatabases for more information on using the ListDatabases 1548// API call, and error handling. 1549// 1550// This method is useful when you want to inject custom logic or configuration 1551// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1552// 1553// 1554// // Example sending a request using the ListDatabasesRequest method. 1555// req, resp := client.ListDatabasesRequest(params) 1556// 1557// err := req.Send() 1558// if err == nil { // resp is now filled 1559// fmt.Println(resp) 1560// } 1561// 1562// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDatabases 1563func (c *Athena) ListDatabasesRequest(input *ListDatabasesInput) (req *request.Request, output *ListDatabasesOutput) { 1564 op := &request.Operation{ 1565 Name: opListDatabases, 1566 HTTPMethod: "POST", 1567 HTTPPath: "/", 1568 Paginator: &request.Paginator{ 1569 InputTokens: []string{"NextToken"}, 1570 OutputTokens: []string{"NextToken"}, 1571 LimitToken: "MaxResults", 1572 TruncationToken: "", 1573 }, 1574 } 1575 1576 if input == nil { 1577 input = &ListDatabasesInput{} 1578 } 1579 1580 output = &ListDatabasesOutput{} 1581 req = c.newRequest(op, input, output) 1582 return 1583} 1584 1585// ListDatabases API operation for Amazon Athena. 1586// 1587// Lists the databases in the specified data catalog. 1588// 1589// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1590// with awserr.Error's Code and Message methods to get detailed information about 1591// the error. 1592// 1593// See the AWS API reference guide for Amazon Athena's 1594// API operation ListDatabases for usage and error information. 1595// 1596// Returned Error Types: 1597// * InternalServerException 1598// Indicates a platform issue, which may be due to a transient condition or 1599// outage. 1600// 1601// * InvalidRequestException 1602// Indicates that something is wrong with the input to the request. For example, 1603// a required parameter may be missing or out of range. 1604// 1605// * MetadataException 1606// An exception that Athena received when it called a custom metastore. Occurs 1607// if the error is not caused by user input (InvalidRequestException) or from 1608// the Athena platform (InternalServerException). For example, if a user-created 1609// Lambda function is missing permissions, the Lambda 4XX exception is returned 1610// in a MetadataException. 1611// 1612// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDatabases 1613func (c *Athena) ListDatabases(input *ListDatabasesInput) (*ListDatabasesOutput, error) { 1614 req, out := c.ListDatabasesRequest(input) 1615 return out, req.Send() 1616} 1617 1618// ListDatabasesWithContext is the same as ListDatabases with the addition of 1619// the ability to pass a context and additional request options. 1620// 1621// See ListDatabases for details on how to use this API operation. 1622// 1623// The context must be non-nil and will be used for request cancellation. If 1624// the context is nil a panic will occur. In the future the SDK may create 1625// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1626// for more information on using Contexts. 1627func (c *Athena) ListDatabasesWithContext(ctx aws.Context, input *ListDatabasesInput, opts ...request.Option) (*ListDatabasesOutput, error) { 1628 req, out := c.ListDatabasesRequest(input) 1629 req.SetContext(ctx) 1630 req.ApplyOptions(opts...) 1631 return out, req.Send() 1632} 1633 1634// ListDatabasesPages iterates over the pages of a ListDatabases operation, 1635// calling the "fn" function with the response data for each page. To stop 1636// iterating, return false from the fn function. 1637// 1638// See ListDatabases method for more information on how to use this operation. 1639// 1640// Note: This operation can generate multiple requests to a service. 1641// 1642// // Example iterating over at most 3 pages of a ListDatabases operation. 1643// pageNum := 0 1644// err := client.ListDatabasesPages(params, 1645// func(page *athena.ListDatabasesOutput, lastPage bool) bool { 1646// pageNum++ 1647// fmt.Println(page) 1648// return pageNum <= 3 1649// }) 1650// 1651func (c *Athena) ListDatabasesPages(input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool) error { 1652 return c.ListDatabasesPagesWithContext(aws.BackgroundContext(), input, fn) 1653} 1654 1655// ListDatabasesPagesWithContext same as ListDatabasesPages except 1656// it takes a Context and allows setting request options on the pages. 1657// 1658// The context must be non-nil and will be used for request cancellation. If 1659// the context is nil a panic will occur. In the future the SDK may create 1660// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1661// for more information on using Contexts. 1662func (c *Athena) ListDatabasesPagesWithContext(ctx aws.Context, input *ListDatabasesInput, fn func(*ListDatabasesOutput, bool) bool, opts ...request.Option) error { 1663 p := request.Pagination{ 1664 NewRequest: func() (*request.Request, error) { 1665 var inCpy *ListDatabasesInput 1666 if input != nil { 1667 tmp := *input 1668 inCpy = &tmp 1669 } 1670 req, _ := c.ListDatabasesRequest(inCpy) 1671 req.SetContext(ctx) 1672 req.ApplyOptions(opts...) 1673 return req, nil 1674 }, 1675 } 1676 1677 for p.Next() { 1678 if !fn(p.Page().(*ListDatabasesOutput), !p.HasNextPage()) { 1679 break 1680 } 1681 } 1682 1683 return p.Err() 1684} 1685 1686const opListNamedQueries = "ListNamedQueries" 1687 1688// ListNamedQueriesRequest generates a "aws/request.Request" representing the 1689// client's request for the ListNamedQueries operation. The "output" return 1690// value will be populated with the request's response once the request completes 1691// successfully. 1692// 1693// Use "Send" method on the returned Request to send the API call to the service. 1694// the "output" return value is not valid until after Send returns without error. 1695// 1696// See ListNamedQueries for more information on using the ListNamedQueries 1697// API call, and error handling. 1698// 1699// This method is useful when you want to inject custom logic or configuration 1700// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1701// 1702// 1703// // Example sending a request using the ListNamedQueriesRequest method. 1704// req, resp := client.ListNamedQueriesRequest(params) 1705// 1706// err := req.Send() 1707// if err == nil { // resp is now filled 1708// fmt.Println(resp) 1709// } 1710// 1711// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries 1712func (c *Athena) ListNamedQueriesRequest(input *ListNamedQueriesInput) (req *request.Request, output *ListNamedQueriesOutput) { 1713 op := &request.Operation{ 1714 Name: opListNamedQueries, 1715 HTTPMethod: "POST", 1716 HTTPPath: "/", 1717 Paginator: &request.Paginator{ 1718 InputTokens: []string{"NextToken"}, 1719 OutputTokens: []string{"NextToken"}, 1720 LimitToken: "MaxResults", 1721 TruncationToken: "", 1722 }, 1723 } 1724 1725 if input == nil { 1726 input = &ListNamedQueriesInput{} 1727 } 1728 1729 output = &ListNamedQueriesOutput{} 1730 req = c.newRequest(op, input, output) 1731 return 1732} 1733 1734// ListNamedQueries API operation for Amazon Athena. 1735// 1736// Provides a list of available query IDs only for queries saved in the specified 1737// workgroup. Requires that you have access to the specified workgroup. If a 1738// workgroup is not specified, lists the saved queries for the primary workgroup. 1739// 1740// For code samples using the AWS SDK for Java, see Examples and Code Samples 1741// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon 1742// Athena User Guide. 1743// 1744// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1745// with awserr.Error's Code and Message methods to get detailed information about 1746// the error. 1747// 1748// See the AWS API reference guide for Amazon Athena's 1749// API operation ListNamedQueries for usage and error information. 1750// 1751// Returned Error Types: 1752// * InternalServerException 1753// Indicates a platform issue, which may be due to a transient condition or 1754// outage. 1755// 1756// * InvalidRequestException 1757// Indicates that something is wrong with the input to the request. For example, 1758// a required parameter may be missing or out of range. 1759// 1760// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries 1761func (c *Athena) ListNamedQueries(input *ListNamedQueriesInput) (*ListNamedQueriesOutput, error) { 1762 req, out := c.ListNamedQueriesRequest(input) 1763 return out, req.Send() 1764} 1765 1766// ListNamedQueriesWithContext is the same as ListNamedQueries with the addition of 1767// the ability to pass a context and additional request options. 1768// 1769// See ListNamedQueries for details on how to use this API operation. 1770// 1771// The context must be non-nil and will be used for request cancellation. If 1772// the context is nil a panic will occur. In the future the SDK may create 1773// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1774// for more information on using Contexts. 1775func (c *Athena) ListNamedQueriesWithContext(ctx aws.Context, input *ListNamedQueriesInput, opts ...request.Option) (*ListNamedQueriesOutput, error) { 1776 req, out := c.ListNamedQueriesRequest(input) 1777 req.SetContext(ctx) 1778 req.ApplyOptions(opts...) 1779 return out, req.Send() 1780} 1781 1782// ListNamedQueriesPages iterates over the pages of a ListNamedQueries operation, 1783// calling the "fn" function with the response data for each page. To stop 1784// iterating, return false from the fn function. 1785// 1786// See ListNamedQueries method for more information on how to use this operation. 1787// 1788// Note: This operation can generate multiple requests to a service. 1789// 1790// // Example iterating over at most 3 pages of a ListNamedQueries operation. 1791// pageNum := 0 1792// err := client.ListNamedQueriesPages(params, 1793// func(page *athena.ListNamedQueriesOutput, lastPage bool) bool { 1794// pageNum++ 1795// fmt.Println(page) 1796// return pageNum <= 3 1797// }) 1798// 1799func (c *Athena) ListNamedQueriesPages(input *ListNamedQueriesInput, fn func(*ListNamedQueriesOutput, bool) bool) error { 1800 return c.ListNamedQueriesPagesWithContext(aws.BackgroundContext(), input, fn) 1801} 1802 1803// ListNamedQueriesPagesWithContext same as ListNamedQueriesPages except 1804// it takes a Context and allows setting request options on the pages. 1805// 1806// The context must be non-nil and will be used for request cancellation. If 1807// the context is nil a panic will occur. In the future the SDK may create 1808// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1809// for more information on using Contexts. 1810func (c *Athena) ListNamedQueriesPagesWithContext(ctx aws.Context, input *ListNamedQueriesInput, fn func(*ListNamedQueriesOutput, bool) bool, opts ...request.Option) error { 1811 p := request.Pagination{ 1812 NewRequest: func() (*request.Request, error) { 1813 var inCpy *ListNamedQueriesInput 1814 if input != nil { 1815 tmp := *input 1816 inCpy = &tmp 1817 } 1818 req, _ := c.ListNamedQueriesRequest(inCpy) 1819 req.SetContext(ctx) 1820 req.ApplyOptions(opts...) 1821 return req, nil 1822 }, 1823 } 1824 1825 for p.Next() { 1826 if !fn(p.Page().(*ListNamedQueriesOutput), !p.HasNextPage()) { 1827 break 1828 } 1829 } 1830 1831 return p.Err() 1832} 1833 1834const opListQueryExecutions = "ListQueryExecutions" 1835 1836// ListQueryExecutionsRequest generates a "aws/request.Request" representing the 1837// client's request for the ListQueryExecutions operation. The "output" return 1838// value will be populated with the request's response once the request completes 1839// successfully. 1840// 1841// Use "Send" method on the returned Request to send the API call to the service. 1842// the "output" return value is not valid until after Send returns without error. 1843// 1844// See ListQueryExecutions for more information on using the ListQueryExecutions 1845// API call, and error handling. 1846// 1847// This method is useful when you want to inject custom logic or configuration 1848// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1849// 1850// 1851// // Example sending a request using the ListQueryExecutionsRequest method. 1852// req, resp := client.ListQueryExecutionsRequest(params) 1853// 1854// err := req.Send() 1855// if err == nil { // resp is now filled 1856// fmt.Println(resp) 1857// } 1858// 1859// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutions 1860func (c *Athena) ListQueryExecutionsRequest(input *ListQueryExecutionsInput) (req *request.Request, output *ListQueryExecutionsOutput) { 1861 op := &request.Operation{ 1862 Name: opListQueryExecutions, 1863 HTTPMethod: "POST", 1864 HTTPPath: "/", 1865 Paginator: &request.Paginator{ 1866 InputTokens: []string{"NextToken"}, 1867 OutputTokens: []string{"NextToken"}, 1868 LimitToken: "MaxResults", 1869 TruncationToken: "", 1870 }, 1871 } 1872 1873 if input == nil { 1874 input = &ListQueryExecutionsInput{} 1875 } 1876 1877 output = &ListQueryExecutionsOutput{} 1878 req = c.newRequest(op, input, output) 1879 return 1880} 1881 1882// ListQueryExecutions API operation for Amazon Athena. 1883// 1884// Provides a list of available query execution IDs for the queries in the specified 1885// workgroup. If a workgroup is not specified, returns a list of query execution 1886// IDs for the primary workgroup. Requires you to have access to the workgroup 1887// in which the queries ran. 1888// 1889// For code samples using the AWS SDK for Java, see Examples and Code Samples 1890// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon 1891// Athena User Guide. 1892// 1893// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1894// with awserr.Error's Code and Message methods to get detailed information about 1895// the error. 1896// 1897// See the AWS API reference guide for Amazon Athena's 1898// API operation ListQueryExecutions for usage and error information. 1899// 1900// Returned Error Types: 1901// * InternalServerException 1902// Indicates a platform issue, which may be due to a transient condition or 1903// outage. 1904// 1905// * InvalidRequestException 1906// Indicates that something is wrong with the input to the request. For example, 1907// a required parameter may be missing or out of range. 1908// 1909// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutions 1910func (c *Athena) ListQueryExecutions(input *ListQueryExecutionsInput) (*ListQueryExecutionsOutput, error) { 1911 req, out := c.ListQueryExecutionsRequest(input) 1912 return out, req.Send() 1913} 1914 1915// ListQueryExecutionsWithContext is the same as ListQueryExecutions with the addition of 1916// the ability to pass a context and additional request options. 1917// 1918// See ListQueryExecutions for details on how to use this API operation. 1919// 1920// The context must be non-nil and will be used for request cancellation. If 1921// the context is nil a panic will occur. In the future the SDK may create 1922// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1923// for more information on using Contexts. 1924func (c *Athena) ListQueryExecutionsWithContext(ctx aws.Context, input *ListQueryExecutionsInput, opts ...request.Option) (*ListQueryExecutionsOutput, error) { 1925 req, out := c.ListQueryExecutionsRequest(input) 1926 req.SetContext(ctx) 1927 req.ApplyOptions(opts...) 1928 return out, req.Send() 1929} 1930 1931// ListQueryExecutionsPages iterates over the pages of a ListQueryExecutions operation, 1932// calling the "fn" function with the response data for each page. To stop 1933// iterating, return false from the fn function. 1934// 1935// See ListQueryExecutions method for more information on how to use this operation. 1936// 1937// Note: This operation can generate multiple requests to a service. 1938// 1939// // Example iterating over at most 3 pages of a ListQueryExecutions operation. 1940// pageNum := 0 1941// err := client.ListQueryExecutionsPages(params, 1942// func(page *athena.ListQueryExecutionsOutput, lastPage bool) bool { 1943// pageNum++ 1944// fmt.Println(page) 1945// return pageNum <= 3 1946// }) 1947// 1948func (c *Athena) ListQueryExecutionsPages(input *ListQueryExecutionsInput, fn func(*ListQueryExecutionsOutput, bool) bool) error { 1949 return c.ListQueryExecutionsPagesWithContext(aws.BackgroundContext(), input, fn) 1950} 1951 1952// ListQueryExecutionsPagesWithContext same as ListQueryExecutionsPages except 1953// it takes a Context and allows setting request options on the pages. 1954// 1955// The context must be non-nil and will be used for request cancellation. If 1956// the context is nil a panic will occur. In the future the SDK may create 1957// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1958// for more information on using Contexts. 1959func (c *Athena) ListQueryExecutionsPagesWithContext(ctx aws.Context, input *ListQueryExecutionsInput, fn func(*ListQueryExecutionsOutput, bool) bool, opts ...request.Option) error { 1960 p := request.Pagination{ 1961 NewRequest: func() (*request.Request, error) { 1962 var inCpy *ListQueryExecutionsInput 1963 if input != nil { 1964 tmp := *input 1965 inCpy = &tmp 1966 } 1967 req, _ := c.ListQueryExecutionsRequest(inCpy) 1968 req.SetContext(ctx) 1969 req.ApplyOptions(opts...) 1970 return req, nil 1971 }, 1972 } 1973 1974 for p.Next() { 1975 if !fn(p.Page().(*ListQueryExecutionsOutput), !p.HasNextPage()) { 1976 break 1977 } 1978 } 1979 1980 return p.Err() 1981} 1982 1983const opListTableMetadata = "ListTableMetadata" 1984 1985// ListTableMetadataRequest generates a "aws/request.Request" representing the 1986// client's request for the ListTableMetadata operation. The "output" return 1987// value will be populated with the request's response once the request completes 1988// successfully. 1989// 1990// Use "Send" method on the returned Request to send the API call to the service. 1991// the "output" return value is not valid until after Send returns without error. 1992// 1993// See ListTableMetadata for more information on using the ListTableMetadata 1994// API call, and error handling. 1995// 1996// This method is useful when you want to inject custom logic or configuration 1997// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1998// 1999// 2000// // Example sending a request using the ListTableMetadataRequest method. 2001// req, resp := client.ListTableMetadataRequest(params) 2002// 2003// err := req.Send() 2004// if err == nil { // resp is now filled 2005// fmt.Println(resp) 2006// } 2007// 2008// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTableMetadata 2009func (c *Athena) ListTableMetadataRequest(input *ListTableMetadataInput) (req *request.Request, output *ListTableMetadataOutput) { 2010 op := &request.Operation{ 2011 Name: opListTableMetadata, 2012 HTTPMethod: "POST", 2013 HTTPPath: "/", 2014 Paginator: &request.Paginator{ 2015 InputTokens: []string{"NextToken"}, 2016 OutputTokens: []string{"NextToken"}, 2017 LimitToken: "MaxResults", 2018 TruncationToken: "", 2019 }, 2020 } 2021 2022 if input == nil { 2023 input = &ListTableMetadataInput{} 2024 } 2025 2026 output = &ListTableMetadataOutput{} 2027 req = c.newRequest(op, input, output) 2028 return 2029} 2030 2031// ListTableMetadata API operation for Amazon Athena. 2032// 2033// Lists the metadata for the tables in the specified data catalog database. 2034// 2035// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2036// with awserr.Error's Code and Message methods to get detailed information about 2037// the error. 2038// 2039// See the AWS API reference guide for Amazon Athena's 2040// API operation ListTableMetadata for usage and error information. 2041// 2042// Returned Error Types: 2043// * InternalServerException 2044// Indicates a platform issue, which may be due to a transient condition or 2045// outage. 2046// 2047// * InvalidRequestException 2048// Indicates that something is wrong with the input to the request. For example, 2049// a required parameter may be missing or out of range. 2050// 2051// * MetadataException 2052// An exception that Athena received when it called a custom metastore. Occurs 2053// if the error is not caused by user input (InvalidRequestException) or from 2054// the Athena platform (InternalServerException). For example, if a user-created 2055// Lambda function is missing permissions, the Lambda 4XX exception is returned 2056// in a MetadataException. 2057// 2058// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTableMetadata 2059func (c *Athena) ListTableMetadata(input *ListTableMetadataInput) (*ListTableMetadataOutput, error) { 2060 req, out := c.ListTableMetadataRequest(input) 2061 return out, req.Send() 2062} 2063 2064// ListTableMetadataWithContext is the same as ListTableMetadata with the addition of 2065// the ability to pass a context and additional request options. 2066// 2067// See ListTableMetadata for details on how to use this API operation. 2068// 2069// The context must be non-nil and will be used for request cancellation. If 2070// the context is nil a panic will occur. In the future the SDK may create 2071// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2072// for more information on using Contexts. 2073func (c *Athena) ListTableMetadataWithContext(ctx aws.Context, input *ListTableMetadataInput, opts ...request.Option) (*ListTableMetadataOutput, error) { 2074 req, out := c.ListTableMetadataRequest(input) 2075 req.SetContext(ctx) 2076 req.ApplyOptions(opts...) 2077 return out, req.Send() 2078} 2079 2080// ListTableMetadataPages iterates over the pages of a ListTableMetadata operation, 2081// calling the "fn" function with the response data for each page. To stop 2082// iterating, return false from the fn function. 2083// 2084// See ListTableMetadata method for more information on how to use this operation. 2085// 2086// Note: This operation can generate multiple requests to a service. 2087// 2088// // Example iterating over at most 3 pages of a ListTableMetadata operation. 2089// pageNum := 0 2090// err := client.ListTableMetadataPages(params, 2091// func(page *athena.ListTableMetadataOutput, lastPage bool) bool { 2092// pageNum++ 2093// fmt.Println(page) 2094// return pageNum <= 3 2095// }) 2096// 2097func (c *Athena) ListTableMetadataPages(input *ListTableMetadataInput, fn func(*ListTableMetadataOutput, bool) bool) error { 2098 return c.ListTableMetadataPagesWithContext(aws.BackgroundContext(), input, fn) 2099} 2100 2101// ListTableMetadataPagesWithContext same as ListTableMetadataPages except 2102// it takes a Context and allows setting request options on the pages. 2103// 2104// The context must be non-nil and will be used for request cancellation. If 2105// the context is nil a panic will occur. In the future the SDK may create 2106// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2107// for more information on using Contexts. 2108func (c *Athena) ListTableMetadataPagesWithContext(ctx aws.Context, input *ListTableMetadataInput, fn func(*ListTableMetadataOutput, bool) bool, opts ...request.Option) error { 2109 p := request.Pagination{ 2110 NewRequest: func() (*request.Request, error) { 2111 var inCpy *ListTableMetadataInput 2112 if input != nil { 2113 tmp := *input 2114 inCpy = &tmp 2115 } 2116 req, _ := c.ListTableMetadataRequest(inCpy) 2117 req.SetContext(ctx) 2118 req.ApplyOptions(opts...) 2119 return req, nil 2120 }, 2121 } 2122 2123 for p.Next() { 2124 if !fn(p.Page().(*ListTableMetadataOutput), !p.HasNextPage()) { 2125 break 2126 } 2127 } 2128 2129 return p.Err() 2130} 2131 2132const opListTagsForResource = "ListTagsForResource" 2133 2134// ListTagsForResourceRequest generates a "aws/request.Request" representing the 2135// client's request for the ListTagsForResource operation. The "output" return 2136// value will be populated with the request's response once the request completes 2137// successfully. 2138// 2139// Use "Send" method on the returned Request to send the API call to the service. 2140// the "output" return value is not valid until after Send returns without error. 2141// 2142// See ListTagsForResource for more information on using the ListTagsForResource 2143// API call, and error handling. 2144// 2145// This method is useful when you want to inject custom logic or configuration 2146// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2147// 2148// 2149// // Example sending a request using the ListTagsForResourceRequest method. 2150// req, resp := client.ListTagsForResourceRequest(params) 2151// 2152// err := req.Send() 2153// if err == nil { // resp is now filled 2154// fmt.Println(resp) 2155// } 2156// 2157// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTagsForResource 2158func (c *Athena) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 2159 op := &request.Operation{ 2160 Name: opListTagsForResource, 2161 HTTPMethod: "POST", 2162 HTTPPath: "/", 2163 Paginator: &request.Paginator{ 2164 InputTokens: []string{"NextToken"}, 2165 OutputTokens: []string{"NextToken"}, 2166 LimitToken: "MaxResults", 2167 TruncationToken: "", 2168 }, 2169 } 2170 2171 if input == nil { 2172 input = &ListTagsForResourceInput{} 2173 } 2174 2175 output = &ListTagsForResourceOutput{} 2176 req = c.newRequest(op, input, output) 2177 return 2178} 2179 2180// ListTagsForResource API operation for Amazon Athena. 2181// 2182// Lists the tags associated with an Athena workgroup or data catalog resource. 2183// 2184// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2185// with awserr.Error's Code and Message methods to get detailed information about 2186// the error. 2187// 2188// See the AWS API reference guide for Amazon Athena's 2189// API operation ListTagsForResource for usage and error information. 2190// 2191// Returned Error Types: 2192// * InternalServerException 2193// Indicates a platform issue, which may be due to a transient condition or 2194// outage. 2195// 2196// * InvalidRequestException 2197// Indicates that something is wrong with the input to the request. For example, 2198// a required parameter may be missing or out of range. 2199// 2200// * ResourceNotFoundException 2201// A resource, such as a workgroup, was not found. 2202// 2203// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTagsForResource 2204func (c *Athena) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 2205 req, out := c.ListTagsForResourceRequest(input) 2206 return out, req.Send() 2207} 2208 2209// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 2210// the ability to pass a context and additional request options. 2211// 2212// See ListTagsForResource for details on how to use this API operation. 2213// 2214// The context must be non-nil and will be used for request cancellation. If 2215// the context is nil a panic will occur. In the future the SDK may create 2216// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2217// for more information on using Contexts. 2218func (c *Athena) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 2219 req, out := c.ListTagsForResourceRequest(input) 2220 req.SetContext(ctx) 2221 req.ApplyOptions(opts...) 2222 return out, req.Send() 2223} 2224 2225// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation, 2226// calling the "fn" function with the response data for each page. To stop 2227// iterating, return false from the fn function. 2228// 2229// See ListTagsForResource method for more information on how to use this operation. 2230// 2231// Note: This operation can generate multiple requests to a service. 2232// 2233// // Example iterating over at most 3 pages of a ListTagsForResource operation. 2234// pageNum := 0 2235// err := client.ListTagsForResourcePages(params, 2236// func(page *athena.ListTagsForResourceOutput, lastPage bool) bool { 2237// pageNum++ 2238// fmt.Println(page) 2239// return pageNum <= 3 2240// }) 2241// 2242func (c *Athena) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error { 2243 return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn) 2244} 2245 2246// ListTagsForResourcePagesWithContext same as ListTagsForResourcePages except 2247// it takes a Context and allows setting request options on the pages. 2248// 2249// The context must be non-nil and will be used for request cancellation. If 2250// the context is nil a panic will occur. In the future the SDK may create 2251// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2252// for more information on using Contexts. 2253func (c *Athena) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error { 2254 p := request.Pagination{ 2255 NewRequest: func() (*request.Request, error) { 2256 var inCpy *ListTagsForResourceInput 2257 if input != nil { 2258 tmp := *input 2259 inCpy = &tmp 2260 } 2261 req, _ := c.ListTagsForResourceRequest(inCpy) 2262 req.SetContext(ctx) 2263 req.ApplyOptions(opts...) 2264 return req, nil 2265 }, 2266 } 2267 2268 for p.Next() { 2269 if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { 2270 break 2271 } 2272 } 2273 2274 return p.Err() 2275} 2276 2277const opListWorkGroups = "ListWorkGroups" 2278 2279// ListWorkGroupsRequest generates a "aws/request.Request" representing the 2280// client's request for the ListWorkGroups operation. The "output" return 2281// value will be populated with the request's response once the request completes 2282// successfully. 2283// 2284// Use "Send" method on the returned Request to send the API call to the service. 2285// the "output" return value is not valid until after Send returns without error. 2286// 2287// See ListWorkGroups for more information on using the ListWorkGroups 2288// API call, and error handling. 2289// 2290// This method is useful when you want to inject custom logic or configuration 2291// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2292// 2293// 2294// // Example sending a request using the ListWorkGroupsRequest method. 2295// req, resp := client.ListWorkGroupsRequest(params) 2296// 2297// err := req.Send() 2298// if err == nil { // resp is now filled 2299// fmt.Println(resp) 2300// } 2301// 2302// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListWorkGroups 2303func (c *Athena) ListWorkGroupsRequest(input *ListWorkGroupsInput) (req *request.Request, output *ListWorkGroupsOutput) { 2304 op := &request.Operation{ 2305 Name: opListWorkGroups, 2306 HTTPMethod: "POST", 2307 HTTPPath: "/", 2308 Paginator: &request.Paginator{ 2309 InputTokens: []string{"NextToken"}, 2310 OutputTokens: []string{"NextToken"}, 2311 LimitToken: "MaxResults", 2312 TruncationToken: "", 2313 }, 2314 } 2315 2316 if input == nil { 2317 input = &ListWorkGroupsInput{} 2318 } 2319 2320 output = &ListWorkGroupsOutput{} 2321 req = c.newRequest(op, input, output) 2322 return 2323} 2324 2325// ListWorkGroups API operation for Amazon Athena. 2326// 2327// Lists available workgroups for the account. 2328// 2329// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2330// with awserr.Error's Code and Message methods to get detailed information about 2331// the error. 2332// 2333// See the AWS API reference guide for Amazon Athena's 2334// API operation ListWorkGroups for usage and error information. 2335// 2336// Returned Error Types: 2337// * InternalServerException 2338// Indicates a platform issue, which may be due to a transient condition or 2339// outage. 2340// 2341// * InvalidRequestException 2342// Indicates that something is wrong with the input to the request. For example, 2343// a required parameter may be missing or out of range. 2344// 2345// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListWorkGroups 2346func (c *Athena) ListWorkGroups(input *ListWorkGroupsInput) (*ListWorkGroupsOutput, error) { 2347 req, out := c.ListWorkGroupsRequest(input) 2348 return out, req.Send() 2349} 2350 2351// ListWorkGroupsWithContext is the same as ListWorkGroups with the addition of 2352// the ability to pass a context and additional request options. 2353// 2354// See ListWorkGroups for details on how to use this API operation. 2355// 2356// The context must be non-nil and will be used for request cancellation. If 2357// the context is nil a panic will occur. In the future the SDK may create 2358// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2359// for more information on using Contexts. 2360func (c *Athena) ListWorkGroupsWithContext(ctx aws.Context, input *ListWorkGroupsInput, opts ...request.Option) (*ListWorkGroupsOutput, error) { 2361 req, out := c.ListWorkGroupsRequest(input) 2362 req.SetContext(ctx) 2363 req.ApplyOptions(opts...) 2364 return out, req.Send() 2365} 2366 2367// ListWorkGroupsPages iterates over the pages of a ListWorkGroups operation, 2368// calling the "fn" function with the response data for each page. To stop 2369// iterating, return false from the fn function. 2370// 2371// See ListWorkGroups method for more information on how to use this operation. 2372// 2373// Note: This operation can generate multiple requests to a service. 2374// 2375// // Example iterating over at most 3 pages of a ListWorkGroups operation. 2376// pageNum := 0 2377// err := client.ListWorkGroupsPages(params, 2378// func(page *athena.ListWorkGroupsOutput, lastPage bool) bool { 2379// pageNum++ 2380// fmt.Println(page) 2381// return pageNum <= 3 2382// }) 2383// 2384func (c *Athena) ListWorkGroupsPages(input *ListWorkGroupsInput, fn func(*ListWorkGroupsOutput, bool) bool) error { 2385 return c.ListWorkGroupsPagesWithContext(aws.BackgroundContext(), input, fn) 2386} 2387 2388// ListWorkGroupsPagesWithContext same as ListWorkGroupsPages except 2389// it takes a Context and allows setting request options on the pages. 2390// 2391// The context must be non-nil and will be used for request cancellation. If 2392// the context is nil a panic will occur. In the future the SDK may create 2393// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2394// for more information on using Contexts. 2395func (c *Athena) ListWorkGroupsPagesWithContext(ctx aws.Context, input *ListWorkGroupsInput, fn func(*ListWorkGroupsOutput, bool) bool, opts ...request.Option) error { 2396 p := request.Pagination{ 2397 NewRequest: func() (*request.Request, error) { 2398 var inCpy *ListWorkGroupsInput 2399 if input != nil { 2400 tmp := *input 2401 inCpy = &tmp 2402 } 2403 req, _ := c.ListWorkGroupsRequest(inCpy) 2404 req.SetContext(ctx) 2405 req.ApplyOptions(opts...) 2406 return req, nil 2407 }, 2408 } 2409 2410 for p.Next() { 2411 if !fn(p.Page().(*ListWorkGroupsOutput), !p.HasNextPage()) { 2412 break 2413 } 2414 } 2415 2416 return p.Err() 2417} 2418 2419const opStartQueryExecution = "StartQueryExecution" 2420 2421// StartQueryExecutionRequest generates a "aws/request.Request" representing the 2422// client's request for the StartQueryExecution operation. The "output" return 2423// value will be populated with the request's response once the request completes 2424// successfully. 2425// 2426// Use "Send" method on the returned Request to send the API call to the service. 2427// the "output" return value is not valid until after Send returns without error. 2428// 2429// See StartQueryExecution for more information on using the StartQueryExecution 2430// API call, and error handling. 2431// 2432// This method is useful when you want to inject custom logic or configuration 2433// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2434// 2435// 2436// // Example sending a request using the StartQueryExecutionRequest method. 2437// req, resp := client.StartQueryExecutionRequest(params) 2438// 2439// err := req.Send() 2440// if err == nil { // resp is now filled 2441// fmt.Println(resp) 2442// } 2443// 2444// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution 2445func (c *Athena) StartQueryExecutionRequest(input *StartQueryExecutionInput) (req *request.Request, output *StartQueryExecutionOutput) { 2446 op := &request.Operation{ 2447 Name: opStartQueryExecution, 2448 HTTPMethod: "POST", 2449 HTTPPath: "/", 2450 } 2451 2452 if input == nil { 2453 input = &StartQueryExecutionInput{} 2454 } 2455 2456 output = &StartQueryExecutionOutput{} 2457 req = c.newRequest(op, input, output) 2458 return 2459} 2460 2461// StartQueryExecution API operation for Amazon Athena. 2462// 2463// Runs the SQL query statements contained in the Query. Requires you to have 2464// access to the workgroup in which the query ran. Running queries against an 2465// external catalog requires GetDataCatalog permission to the catalog. For code 2466// samples using the AWS SDK for Java, see Examples and Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) 2467// in the Amazon Athena User Guide. 2468// 2469// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2470// with awserr.Error's Code and Message methods to get detailed information about 2471// the error. 2472// 2473// See the AWS API reference guide for Amazon Athena's 2474// API operation StartQueryExecution for usage and error information. 2475// 2476// Returned Error Types: 2477// * InternalServerException 2478// Indicates a platform issue, which may be due to a transient condition or 2479// outage. 2480// 2481// * InvalidRequestException 2482// Indicates that something is wrong with the input to the request. For example, 2483// a required parameter may be missing or out of range. 2484// 2485// * TooManyRequestsException 2486// Indicates that the request was throttled. 2487// 2488// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution 2489func (c *Athena) StartQueryExecution(input *StartQueryExecutionInput) (*StartQueryExecutionOutput, error) { 2490 req, out := c.StartQueryExecutionRequest(input) 2491 return out, req.Send() 2492} 2493 2494// StartQueryExecutionWithContext is the same as StartQueryExecution with the addition of 2495// the ability to pass a context and additional request options. 2496// 2497// See StartQueryExecution for details on how to use this API operation. 2498// 2499// The context must be non-nil and will be used for request cancellation. If 2500// the context is nil a panic will occur. In the future the SDK may create 2501// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2502// for more information on using Contexts. 2503func (c *Athena) StartQueryExecutionWithContext(ctx aws.Context, input *StartQueryExecutionInput, opts ...request.Option) (*StartQueryExecutionOutput, error) { 2504 req, out := c.StartQueryExecutionRequest(input) 2505 req.SetContext(ctx) 2506 req.ApplyOptions(opts...) 2507 return out, req.Send() 2508} 2509 2510const opStopQueryExecution = "StopQueryExecution" 2511 2512// StopQueryExecutionRequest generates a "aws/request.Request" representing the 2513// client's request for the StopQueryExecution operation. The "output" return 2514// value will be populated with the request's response once the request completes 2515// successfully. 2516// 2517// Use "Send" method on the returned Request to send the API call to the service. 2518// the "output" return value is not valid until after Send returns without error. 2519// 2520// See StopQueryExecution for more information on using the StopQueryExecution 2521// API call, and error handling. 2522// 2523// This method is useful when you want to inject custom logic or configuration 2524// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2525// 2526// 2527// // Example sending a request using the StopQueryExecutionRequest method. 2528// req, resp := client.StopQueryExecutionRequest(params) 2529// 2530// err := req.Send() 2531// if err == nil { // resp is now filled 2532// fmt.Println(resp) 2533// } 2534// 2535// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecution 2536func (c *Athena) StopQueryExecutionRequest(input *StopQueryExecutionInput) (req *request.Request, output *StopQueryExecutionOutput) { 2537 op := &request.Operation{ 2538 Name: opStopQueryExecution, 2539 HTTPMethod: "POST", 2540 HTTPPath: "/", 2541 } 2542 2543 if input == nil { 2544 input = &StopQueryExecutionInput{} 2545 } 2546 2547 output = &StopQueryExecutionOutput{} 2548 req = c.newRequest(op, input, output) 2549 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2550 return 2551} 2552 2553// StopQueryExecution API operation for Amazon Athena. 2554// 2555// Stops a query execution. Requires you to have access to the workgroup in 2556// which the query ran. 2557// 2558// For code samples using the AWS SDK for Java, see Examples and Code Samples 2559// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon 2560// Athena User Guide. 2561// 2562// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2563// with awserr.Error's Code and Message methods to get detailed information about 2564// the error. 2565// 2566// See the AWS API reference guide for Amazon Athena's 2567// API operation StopQueryExecution for usage and error information. 2568// 2569// Returned Error Types: 2570// * InternalServerException 2571// Indicates a platform issue, which may be due to a transient condition or 2572// outage. 2573// 2574// * InvalidRequestException 2575// Indicates that something is wrong with the input to the request. For example, 2576// a required parameter may be missing or out of range. 2577// 2578// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecution 2579func (c *Athena) StopQueryExecution(input *StopQueryExecutionInput) (*StopQueryExecutionOutput, error) { 2580 req, out := c.StopQueryExecutionRequest(input) 2581 return out, req.Send() 2582} 2583 2584// StopQueryExecutionWithContext is the same as StopQueryExecution with the addition of 2585// the ability to pass a context and additional request options. 2586// 2587// See StopQueryExecution for details on how to use this API operation. 2588// 2589// The context must be non-nil and will be used for request cancellation. If 2590// the context is nil a panic will occur. In the future the SDK may create 2591// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2592// for more information on using Contexts. 2593func (c *Athena) StopQueryExecutionWithContext(ctx aws.Context, input *StopQueryExecutionInput, opts ...request.Option) (*StopQueryExecutionOutput, error) { 2594 req, out := c.StopQueryExecutionRequest(input) 2595 req.SetContext(ctx) 2596 req.ApplyOptions(opts...) 2597 return out, req.Send() 2598} 2599 2600const opTagResource = "TagResource" 2601 2602// TagResourceRequest generates a "aws/request.Request" representing the 2603// client's request for the TagResource operation. The "output" return 2604// value will be populated with the request's response once the request completes 2605// successfully. 2606// 2607// Use "Send" method on the returned Request to send the API call to the service. 2608// the "output" return value is not valid until after Send returns without error. 2609// 2610// See TagResource for more information on using the TagResource 2611// API call, and error handling. 2612// 2613// This method is useful when you want to inject custom logic or configuration 2614// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2615// 2616// 2617// // Example sending a request using the TagResourceRequest method. 2618// req, resp := client.TagResourceRequest(params) 2619// 2620// err := req.Send() 2621// if err == nil { // resp is now filled 2622// fmt.Println(resp) 2623// } 2624// 2625// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/TagResource 2626func (c *Athena) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 2627 op := &request.Operation{ 2628 Name: opTagResource, 2629 HTTPMethod: "POST", 2630 HTTPPath: "/", 2631 } 2632 2633 if input == nil { 2634 input = &TagResourceInput{} 2635 } 2636 2637 output = &TagResourceOutput{} 2638 req = c.newRequest(op, input, output) 2639 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2640 return 2641} 2642 2643// TagResource API operation for Amazon Athena. 2644// 2645// Adds one or more tags to an Athena resource. A tag is a label that you assign 2646// to a resource. In Athena, a resource can be a workgroup or data catalog. 2647// Each tag consists of a key and an optional value, both of which you define. 2648// For example, you can use tags to categorize Athena workgroups or data catalogs 2649// by purpose, owner, or environment. Use a consistent set of tag keys to make 2650// it easier to search and filter workgroups or data catalogs in your account. 2651// For best practices, see Tagging Best Practices (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). 2652// Tag keys can be from 1 to 128 UTF-8 Unicode characters, and tag values can 2653// be from 0 to 256 UTF-8 Unicode characters. Tags can use letters and numbers 2654// representable in UTF-8, and the following characters: + - = . _ : / @. Tag 2655// keys and values are case-sensitive. Tag keys must be unique per resource. 2656// If you specify more than one tag, separate them by commas. 2657// 2658// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2659// with awserr.Error's Code and Message methods to get detailed information about 2660// the error. 2661// 2662// See the AWS API reference guide for Amazon Athena's 2663// API operation TagResource for usage and error information. 2664// 2665// Returned Error Types: 2666// * InternalServerException 2667// Indicates a platform issue, which may be due to a transient condition or 2668// outage. 2669// 2670// * InvalidRequestException 2671// Indicates that something is wrong with the input to the request. For example, 2672// a required parameter may be missing or out of range. 2673// 2674// * ResourceNotFoundException 2675// A resource, such as a workgroup, was not found. 2676// 2677// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/TagResource 2678func (c *Athena) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 2679 req, out := c.TagResourceRequest(input) 2680 return out, req.Send() 2681} 2682 2683// TagResourceWithContext is the same as TagResource with the addition of 2684// the ability to pass a context and additional request options. 2685// 2686// See TagResource for details on how to use this API operation. 2687// 2688// The context must be non-nil and will be used for request cancellation. If 2689// the context is nil a panic will occur. In the future the SDK may create 2690// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2691// for more information on using Contexts. 2692func (c *Athena) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 2693 req, out := c.TagResourceRequest(input) 2694 req.SetContext(ctx) 2695 req.ApplyOptions(opts...) 2696 return out, req.Send() 2697} 2698 2699const opUntagResource = "UntagResource" 2700 2701// UntagResourceRequest generates a "aws/request.Request" representing the 2702// client's request for the UntagResource operation. The "output" return 2703// value will be populated with the request's response once the request completes 2704// successfully. 2705// 2706// Use "Send" method on the returned Request to send the API call to the service. 2707// the "output" return value is not valid until after Send returns without error. 2708// 2709// See UntagResource for more information on using the UntagResource 2710// API call, and error handling. 2711// 2712// This method is useful when you want to inject custom logic or configuration 2713// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2714// 2715// 2716// // Example sending a request using the UntagResourceRequest method. 2717// req, resp := client.UntagResourceRequest(params) 2718// 2719// err := req.Send() 2720// if err == nil { // resp is now filled 2721// fmt.Println(resp) 2722// } 2723// 2724// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UntagResource 2725func (c *Athena) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 2726 op := &request.Operation{ 2727 Name: opUntagResource, 2728 HTTPMethod: "POST", 2729 HTTPPath: "/", 2730 } 2731 2732 if input == nil { 2733 input = &UntagResourceInput{} 2734 } 2735 2736 output = &UntagResourceOutput{} 2737 req = c.newRequest(op, input, output) 2738 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2739 return 2740} 2741 2742// UntagResource API operation for Amazon Athena. 2743// 2744// Removes one or more tags from a data catalog or workgroup resource. 2745// 2746// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2747// with awserr.Error's Code and Message methods to get detailed information about 2748// the error. 2749// 2750// See the AWS API reference guide for Amazon Athena's 2751// API operation UntagResource for usage and error information. 2752// 2753// Returned Error Types: 2754// * InternalServerException 2755// Indicates a platform issue, which may be due to a transient condition or 2756// outage. 2757// 2758// * InvalidRequestException 2759// Indicates that something is wrong with the input to the request. For example, 2760// a required parameter may be missing or out of range. 2761// 2762// * ResourceNotFoundException 2763// A resource, such as a workgroup, was not found. 2764// 2765// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UntagResource 2766func (c *Athena) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 2767 req, out := c.UntagResourceRequest(input) 2768 return out, req.Send() 2769} 2770 2771// UntagResourceWithContext is the same as UntagResource with the addition of 2772// the ability to pass a context and additional request options. 2773// 2774// See UntagResource for details on how to use this API operation. 2775// 2776// The context must be non-nil and will be used for request cancellation. If 2777// the context is nil a panic will occur. In the future the SDK may create 2778// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2779// for more information on using Contexts. 2780func (c *Athena) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 2781 req, out := c.UntagResourceRequest(input) 2782 req.SetContext(ctx) 2783 req.ApplyOptions(opts...) 2784 return out, req.Send() 2785} 2786 2787const opUpdateDataCatalog = "UpdateDataCatalog" 2788 2789// UpdateDataCatalogRequest generates a "aws/request.Request" representing the 2790// client's request for the UpdateDataCatalog operation. The "output" return 2791// value will be populated with the request's response once the request completes 2792// successfully. 2793// 2794// Use "Send" method on the returned Request to send the API call to the service. 2795// the "output" return value is not valid until after Send returns without error. 2796// 2797// See UpdateDataCatalog for more information on using the UpdateDataCatalog 2798// API call, and error handling. 2799// 2800// This method is useful when you want to inject custom logic or configuration 2801// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2802// 2803// 2804// // Example sending a request using the UpdateDataCatalogRequest method. 2805// req, resp := client.UpdateDataCatalogRequest(params) 2806// 2807// err := req.Send() 2808// if err == nil { // resp is now filled 2809// fmt.Println(resp) 2810// } 2811// 2812// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateDataCatalog 2813func (c *Athena) UpdateDataCatalogRequest(input *UpdateDataCatalogInput) (req *request.Request, output *UpdateDataCatalogOutput) { 2814 op := &request.Operation{ 2815 Name: opUpdateDataCatalog, 2816 HTTPMethod: "POST", 2817 HTTPPath: "/", 2818 } 2819 2820 if input == nil { 2821 input = &UpdateDataCatalogInput{} 2822 } 2823 2824 output = &UpdateDataCatalogOutput{} 2825 req = c.newRequest(op, input, output) 2826 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2827 return 2828} 2829 2830// UpdateDataCatalog API operation for Amazon Athena. 2831// 2832// Updates the data catalog that has the specified name. 2833// 2834// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2835// with awserr.Error's Code and Message methods to get detailed information about 2836// the error. 2837// 2838// See the AWS API reference guide for Amazon Athena's 2839// API operation UpdateDataCatalog for usage and error information. 2840// 2841// Returned Error Types: 2842// * InternalServerException 2843// Indicates a platform issue, which may be due to a transient condition or 2844// outage. 2845// 2846// * InvalidRequestException 2847// Indicates that something is wrong with the input to the request. For example, 2848// a required parameter may be missing or out of range. 2849// 2850// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateDataCatalog 2851func (c *Athena) UpdateDataCatalog(input *UpdateDataCatalogInput) (*UpdateDataCatalogOutput, error) { 2852 req, out := c.UpdateDataCatalogRequest(input) 2853 return out, req.Send() 2854} 2855 2856// UpdateDataCatalogWithContext is the same as UpdateDataCatalog with the addition of 2857// the ability to pass a context and additional request options. 2858// 2859// See UpdateDataCatalog for details on how to use this API operation. 2860// 2861// The context must be non-nil and will be used for request cancellation. If 2862// the context is nil a panic will occur. In the future the SDK may create 2863// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2864// for more information on using Contexts. 2865func (c *Athena) UpdateDataCatalogWithContext(ctx aws.Context, input *UpdateDataCatalogInput, opts ...request.Option) (*UpdateDataCatalogOutput, error) { 2866 req, out := c.UpdateDataCatalogRequest(input) 2867 req.SetContext(ctx) 2868 req.ApplyOptions(opts...) 2869 return out, req.Send() 2870} 2871 2872const opUpdateWorkGroup = "UpdateWorkGroup" 2873 2874// UpdateWorkGroupRequest generates a "aws/request.Request" representing the 2875// client's request for the UpdateWorkGroup operation. The "output" return 2876// value will be populated with the request's response once the request completes 2877// successfully. 2878// 2879// Use "Send" method on the returned Request to send the API call to the service. 2880// the "output" return value is not valid until after Send returns without error. 2881// 2882// See UpdateWorkGroup for more information on using the UpdateWorkGroup 2883// API call, and error handling. 2884// 2885// This method is useful when you want to inject custom logic or configuration 2886// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2887// 2888// 2889// // Example sending a request using the UpdateWorkGroupRequest method. 2890// req, resp := client.UpdateWorkGroupRequest(params) 2891// 2892// err := req.Send() 2893// if err == nil { // resp is now filled 2894// fmt.Println(resp) 2895// } 2896// 2897// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateWorkGroup 2898func (c *Athena) UpdateWorkGroupRequest(input *UpdateWorkGroupInput) (req *request.Request, output *UpdateWorkGroupOutput) { 2899 op := &request.Operation{ 2900 Name: opUpdateWorkGroup, 2901 HTTPMethod: "POST", 2902 HTTPPath: "/", 2903 } 2904 2905 if input == nil { 2906 input = &UpdateWorkGroupInput{} 2907 } 2908 2909 output = &UpdateWorkGroupOutput{} 2910 req = c.newRequest(op, input, output) 2911 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2912 return 2913} 2914 2915// UpdateWorkGroup API operation for Amazon Athena. 2916// 2917// Updates the workgroup with the specified name. The workgroup's name cannot 2918// be changed. 2919// 2920// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2921// with awserr.Error's Code and Message methods to get detailed information about 2922// the error. 2923// 2924// See the AWS API reference guide for Amazon Athena's 2925// API operation UpdateWorkGroup for usage and error information. 2926// 2927// Returned Error Types: 2928// * InternalServerException 2929// Indicates a platform issue, which may be due to a transient condition or 2930// outage. 2931// 2932// * InvalidRequestException 2933// Indicates that something is wrong with the input to the request. For example, 2934// a required parameter may be missing or out of range. 2935// 2936// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateWorkGroup 2937func (c *Athena) UpdateWorkGroup(input *UpdateWorkGroupInput) (*UpdateWorkGroupOutput, error) { 2938 req, out := c.UpdateWorkGroupRequest(input) 2939 return out, req.Send() 2940} 2941 2942// UpdateWorkGroupWithContext is the same as UpdateWorkGroup with the addition of 2943// the ability to pass a context and additional request options. 2944// 2945// See UpdateWorkGroup for details on how to use this API operation. 2946// 2947// The context must be non-nil and will be used for request cancellation. If 2948// the context is nil a panic will occur. In the future the SDK may create 2949// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2950// for more information on using Contexts. 2951func (c *Athena) UpdateWorkGroupWithContext(ctx aws.Context, input *UpdateWorkGroupInput, opts ...request.Option) (*UpdateWorkGroupOutput, error) { 2952 req, out := c.UpdateWorkGroupRequest(input) 2953 req.SetContext(ctx) 2954 req.ApplyOptions(opts...) 2955 return out, req.Send() 2956} 2957 2958type BatchGetNamedQueryInput struct { 2959 _ struct{} `type:"structure"` 2960 2961 // An array of query IDs. 2962 // 2963 // NamedQueryIds is a required field 2964 NamedQueryIds []*string `min:"1" type:"list" required:"true"` 2965} 2966 2967// String returns the string representation 2968func (s BatchGetNamedQueryInput) String() string { 2969 return awsutil.Prettify(s) 2970} 2971 2972// GoString returns the string representation 2973func (s BatchGetNamedQueryInput) GoString() string { 2974 return s.String() 2975} 2976 2977// Validate inspects the fields of the type to determine if they are valid. 2978func (s *BatchGetNamedQueryInput) Validate() error { 2979 invalidParams := request.ErrInvalidParams{Context: "BatchGetNamedQueryInput"} 2980 if s.NamedQueryIds == nil { 2981 invalidParams.Add(request.NewErrParamRequired("NamedQueryIds")) 2982 } 2983 if s.NamedQueryIds != nil && len(s.NamedQueryIds) < 1 { 2984 invalidParams.Add(request.NewErrParamMinLen("NamedQueryIds", 1)) 2985 } 2986 2987 if invalidParams.Len() > 0 { 2988 return invalidParams 2989 } 2990 return nil 2991} 2992 2993// SetNamedQueryIds sets the NamedQueryIds field's value. 2994func (s *BatchGetNamedQueryInput) SetNamedQueryIds(v []*string) *BatchGetNamedQueryInput { 2995 s.NamedQueryIds = v 2996 return s 2997} 2998 2999type BatchGetNamedQueryOutput struct { 3000 _ struct{} `type:"structure"` 3001 3002 // Information about the named query IDs submitted. 3003 NamedQueries []*NamedQuery `type:"list"` 3004 3005 // Information about provided query IDs. 3006 UnprocessedNamedQueryIds []*UnprocessedNamedQueryId `type:"list"` 3007} 3008 3009// String returns the string representation 3010func (s BatchGetNamedQueryOutput) String() string { 3011 return awsutil.Prettify(s) 3012} 3013 3014// GoString returns the string representation 3015func (s BatchGetNamedQueryOutput) GoString() string { 3016 return s.String() 3017} 3018 3019// SetNamedQueries sets the NamedQueries field's value. 3020func (s *BatchGetNamedQueryOutput) SetNamedQueries(v []*NamedQuery) *BatchGetNamedQueryOutput { 3021 s.NamedQueries = v 3022 return s 3023} 3024 3025// SetUnprocessedNamedQueryIds sets the UnprocessedNamedQueryIds field's value. 3026func (s *BatchGetNamedQueryOutput) SetUnprocessedNamedQueryIds(v []*UnprocessedNamedQueryId) *BatchGetNamedQueryOutput { 3027 s.UnprocessedNamedQueryIds = v 3028 return s 3029} 3030 3031type BatchGetQueryExecutionInput struct { 3032 _ struct{} `type:"structure"` 3033 3034 // An array of query execution IDs. 3035 // 3036 // QueryExecutionIds is a required field 3037 QueryExecutionIds []*string `min:"1" type:"list" required:"true"` 3038} 3039 3040// String returns the string representation 3041func (s BatchGetQueryExecutionInput) String() string { 3042 return awsutil.Prettify(s) 3043} 3044 3045// GoString returns the string representation 3046func (s BatchGetQueryExecutionInput) GoString() string { 3047 return s.String() 3048} 3049 3050// Validate inspects the fields of the type to determine if they are valid. 3051func (s *BatchGetQueryExecutionInput) Validate() error { 3052 invalidParams := request.ErrInvalidParams{Context: "BatchGetQueryExecutionInput"} 3053 if s.QueryExecutionIds == nil { 3054 invalidParams.Add(request.NewErrParamRequired("QueryExecutionIds")) 3055 } 3056 if s.QueryExecutionIds != nil && len(s.QueryExecutionIds) < 1 { 3057 invalidParams.Add(request.NewErrParamMinLen("QueryExecutionIds", 1)) 3058 } 3059 3060 if invalidParams.Len() > 0 { 3061 return invalidParams 3062 } 3063 return nil 3064} 3065 3066// SetQueryExecutionIds sets the QueryExecutionIds field's value. 3067func (s *BatchGetQueryExecutionInput) SetQueryExecutionIds(v []*string) *BatchGetQueryExecutionInput { 3068 s.QueryExecutionIds = v 3069 return s 3070} 3071 3072type BatchGetQueryExecutionOutput struct { 3073 _ struct{} `type:"structure"` 3074 3075 // Information about a query execution. 3076 QueryExecutions []*QueryExecution `type:"list"` 3077 3078 // Information about the query executions that failed to run. 3079 UnprocessedQueryExecutionIds []*UnprocessedQueryExecutionId `type:"list"` 3080} 3081 3082// String returns the string representation 3083func (s BatchGetQueryExecutionOutput) String() string { 3084 return awsutil.Prettify(s) 3085} 3086 3087// GoString returns the string representation 3088func (s BatchGetQueryExecutionOutput) GoString() string { 3089 return s.String() 3090} 3091 3092// SetQueryExecutions sets the QueryExecutions field's value. 3093func (s *BatchGetQueryExecutionOutput) SetQueryExecutions(v []*QueryExecution) *BatchGetQueryExecutionOutput { 3094 s.QueryExecutions = v 3095 return s 3096} 3097 3098// SetUnprocessedQueryExecutionIds sets the UnprocessedQueryExecutionIds field's value. 3099func (s *BatchGetQueryExecutionOutput) SetUnprocessedQueryExecutionIds(v []*UnprocessedQueryExecutionId) *BatchGetQueryExecutionOutput { 3100 s.UnprocessedQueryExecutionIds = v 3101 return s 3102} 3103 3104// Contains metadata for a column in a table. 3105type Column struct { 3106 _ struct{} `type:"structure"` 3107 3108 // Optional information about the column. 3109 Comment *string `type:"string"` 3110 3111 // The name of the column. 3112 // 3113 // Name is a required field 3114 Name *string `min:"1" type:"string" required:"true"` 3115 3116 // The data type of the column. 3117 Type *string `type:"string"` 3118} 3119 3120// String returns the string representation 3121func (s Column) String() string { 3122 return awsutil.Prettify(s) 3123} 3124 3125// GoString returns the string representation 3126func (s Column) GoString() string { 3127 return s.String() 3128} 3129 3130// SetComment sets the Comment field's value. 3131func (s *Column) SetComment(v string) *Column { 3132 s.Comment = &v 3133 return s 3134} 3135 3136// SetName sets the Name field's value. 3137func (s *Column) SetName(v string) *Column { 3138 s.Name = &v 3139 return s 3140} 3141 3142// SetType sets the Type field's value. 3143func (s *Column) SetType(v string) *Column { 3144 s.Type = &v 3145 return s 3146} 3147 3148// Information about the columns in a query execution result. 3149type ColumnInfo struct { 3150 _ struct{} `type:"structure"` 3151 3152 // Indicates whether values in the column are case-sensitive. 3153 CaseSensitive *bool `type:"boolean"` 3154 3155 // The catalog to which the query results belong. 3156 CatalogName *string `type:"string"` 3157 3158 // A column label. 3159 Label *string `type:"string"` 3160 3161 // The name of the column. 3162 // 3163 // Name is a required field 3164 Name *string `type:"string" required:"true"` 3165 3166 // Indicates the column's nullable status. 3167 Nullable *string `type:"string" enum:"ColumnNullable"` 3168 3169 // For DECIMAL data types, specifies the total number of digits, up to 38. For 3170 // performance reasons, we recommend up to 18 digits. 3171 Precision *int64 `type:"integer"` 3172 3173 // For DECIMAL data types, specifies the total number of digits in the fractional 3174 // part of the value. Defaults to 0. 3175 Scale *int64 `type:"integer"` 3176 3177 // The schema name (database name) to which the query results belong. 3178 SchemaName *string `type:"string"` 3179 3180 // The table name for the query results. 3181 TableName *string `type:"string"` 3182 3183 // The data type of the column. 3184 // 3185 // Type is a required field 3186 Type *string `type:"string" required:"true"` 3187} 3188 3189// String returns the string representation 3190func (s ColumnInfo) String() string { 3191 return awsutil.Prettify(s) 3192} 3193 3194// GoString returns the string representation 3195func (s ColumnInfo) GoString() string { 3196 return s.String() 3197} 3198 3199// SetCaseSensitive sets the CaseSensitive field's value. 3200func (s *ColumnInfo) SetCaseSensitive(v bool) *ColumnInfo { 3201 s.CaseSensitive = &v 3202 return s 3203} 3204 3205// SetCatalogName sets the CatalogName field's value. 3206func (s *ColumnInfo) SetCatalogName(v string) *ColumnInfo { 3207 s.CatalogName = &v 3208 return s 3209} 3210 3211// SetLabel sets the Label field's value. 3212func (s *ColumnInfo) SetLabel(v string) *ColumnInfo { 3213 s.Label = &v 3214 return s 3215} 3216 3217// SetName sets the Name field's value. 3218func (s *ColumnInfo) SetName(v string) *ColumnInfo { 3219 s.Name = &v 3220 return s 3221} 3222 3223// SetNullable sets the Nullable field's value. 3224func (s *ColumnInfo) SetNullable(v string) *ColumnInfo { 3225 s.Nullable = &v 3226 return s 3227} 3228 3229// SetPrecision sets the Precision field's value. 3230func (s *ColumnInfo) SetPrecision(v int64) *ColumnInfo { 3231 s.Precision = &v 3232 return s 3233} 3234 3235// SetScale sets the Scale field's value. 3236func (s *ColumnInfo) SetScale(v int64) *ColumnInfo { 3237 s.Scale = &v 3238 return s 3239} 3240 3241// SetSchemaName sets the SchemaName field's value. 3242func (s *ColumnInfo) SetSchemaName(v string) *ColumnInfo { 3243 s.SchemaName = &v 3244 return s 3245} 3246 3247// SetTableName sets the TableName field's value. 3248func (s *ColumnInfo) SetTableName(v string) *ColumnInfo { 3249 s.TableName = &v 3250 return s 3251} 3252 3253// SetType sets the Type field's value. 3254func (s *ColumnInfo) SetType(v string) *ColumnInfo { 3255 s.Type = &v 3256 return s 3257} 3258 3259type CreateDataCatalogInput struct { 3260 _ struct{} `type:"structure"` 3261 3262 // A description of the data catalog to be created. 3263 Description *string `min:"1" type:"string"` 3264 3265 // The name of the data catalog to create. The catalog name must be unique for 3266 // the AWS account and can use a maximum of 128 alphanumeric, underscore, at 3267 // sign, or hyphen characters. 3268 // 3269 // Name is a required field 3270 Name *string `min:"1" type:"string" required:"true"` 3271 3272 // Specifies the Lambda function or functions to use for creating the data catalog. 3273 // This is a mapping whose values depend on the catalog type. 3274 // 3275 // * For the HIVE data catalog type, use the following syntax. The metadata-function 3276 // parameter is required. The sdk-version parameter is optional and defaults 3277 // to the currently supported version. metadata-function=lambda_arn, sdk-version=version_number 3278 // 3279 // * For the LAMBDA data catalog type, use one of the following sets of required 3280 // parameters, but not both. If you have one Lambda function that processes 3281 // metadata and another for reading the actual data, use the following syntax. 3282 // Both parameters are required. metadata-function=lambda_arn, record-function=lambda_arn 3283 // If you have a composite Lambda function that processes both metadata and 3284 // data, use the following syntax to specify your Lambda function. function=lambda_arn 3285 // 3286 // * The GLUE type has no parameters. 3287 Parameters map[string]*string `type:"map"` 3288 3289 // A list of comma separated tags to add to the data catalog that is created. 3290 Tags []*Tag `type:"list"` 3291 3292 // The type of data catalog to create: LAMBDA for a federated catalog, GLUE 3293 // for AWS Glue Catalog, or HIVE for an external hive metastore. 3294 // 3295 // Type is a required field 3296 Type *string `type:"string" required:"true" enum:"DataCatalogType"` 3297} 3298 3299// String returns the string representation 3300func (s CreateDataCatalogInput) String() string { 3301 return awsutil.Prettify(s) 3302} 3303 3304// GoString returns the string representation 3305func (s CreateDataCatalogInput) GoString() string { 3306 return s.String() 3307} 3308 3309// Validate inspects the fields of the type to determine if they are valid. 3310func (s *CreateDataCatalogInput) Validate() error { 3311 invalidParams := request.ErrInvalidParams{Context: "CreateDataCatalogInput"} 3312 if s.Description != nil && len(*s.Description) < 1 { 3313 invalidParams.Add(request.NewErrParamMinLen("Description", 1)) 3314 } 3315 if s.Name == nil { 3316 invalidParams.Add(request.NewErrParamRequired("Name")) 3317 } 3318 if s.Name != nil && len(*s.Name) < 1 { 3319 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3320 } 3321 if s.Type == nil { 3322 invalidParams.Add(request.NewErrParamRequired("Type")) 3323 } 3324 if s.Tags != nil { 3325 for i, v := range s.Tags { 3326 if v == nil { 3327 continue 3328 } 3329 if err := v.Validate(); err != nil { 3330 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 3331 } 3332 } 3333 } 3334 3335 if invalidParams.Len() > 0 { 3336 return invalidParams 3337 } 3338 return nil 3339} 3340 3341// SetDescription sets the Description field's value. 3342func (s *CreateDataCatalogInput) SetDescription(v string) *CreateDataCatalogInput { 3343 s.Description = &v 3344 return s 3345} 3346 3347// SetName sets the Name field's value. 3348func (s *CreateDataCatalogInput) SetName(v string) *CreateDataCatalogInput { 3349 s.Name = &v 3350 return s 3351} 3352 3353// SetParameters sets the Parameters field's value. 3354func (s *CreateDataCatalogInput) SetParameters(v map[string]*string) *CreateDataCatalogInput { 3355 s.Parameters = v 3356 return s 3357} 3358 3359// SetTags sets the Tags field's value. 3360func (s *CreateDataCatalogInput) SetTags(v []*Tag) *CreateDataCatalogInput { 3361 s.Tags = v 3362 return s 3363} 3364 3365// SetType sets the Type field's value. 3366func (s *CreateDataCatalogInput) SetType(v string) *CreateDataCatalogInput { 3367 s.Type = &v 3368 return s 3369} 3370 3371type CreateDataCatalogOutput struct { 3372 _ struct{} `type:"structure"` 3373} 3374 3375// String returns the string representation 3376func (s CreateDataCatalogOutput) String() string { 3377 return awsutil.Prettify(s) 3378} 3379 3380// GoString returns the string representation 3381func (s CreateDataCatalogOutput) GoString() string { 3382 return s.String() 3383} 3384 3385type CreateNamedQueryInput struct { 3386 _ struct{} `type:"structure"` 3387 3388 // A unique case-sensitive string used to ensure the request to create the query 3389 // is idempotent (executes only once). If another CreateNamedQuery request is 3390 // received, the same response is returned and another query is not created. 3391 // If a parameter has changed, for example, the QueryString, an error is returned. 3392 // 3393 // This token is listed as not required because AWS SDKs (for example the AWS 3394 // SDK for Java) auto-generate the token for users. If you are not using the 3395 // AWS SDK or the AWS CLI, you must provide this token or the action will fail. 3396 ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` 3397 3398 // The database to which the query belongs. 3399 // 3400 // Database is a required field 3401 Database *string `min:"1" type:"string" required:"true"` 3402 3403 // The query description. 3404 Description *string `min:"1" type:"string"` 3405 3406 // The query name. 3407 // 3408 // Name is a required field 3409 Name *string `min:"1" type:"string" required:"true"` 3410 3411 // The contents of the query with all query statements. 3412 // 3413 // QueryString is a required field 3414 QueryString *string `min:"1" type:"string" required:"true"` 3415 3416 // The name of the workgroup in which the named query is being created. 3417 WorkGroup *string `type:"string"` 3418} 3419 3420// String returns the string representation 3421func (s CreateNamedQueryInput) String() string { 3422 return awsutil.Prettify(s) 3423} 3424 3425// GoString returns the string representation 3426func (s CreateNamedQueryInput) GoString() string { 3427 return s.String() 3428} 3429 3430// Validate inspects the fields of the type to determine if they are valid. 3431func (s *CreateNamedQueryInput) Validate() error { 3432 invalidParams := request.ErrInvalidParams{Context: "CreateNamedQueryInput"} 3433 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { 3434 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) 3435 } 3436 if s.Database == nil { 3437 invalidParams.Add(request.NewErrParamRequired("Database")) 3438 } 3439 if s.Database != nil && len(*s.Database) < 1 { 3440 invalidParams.Add(request.NewErrParamMinLen("Database", 1)) 3441 } 3442 if s.Description != nil && len(*s.Description) < 1 { 3443 invalidParams.Add(request.NewErrParamMinLen("Description", 1)) 3444 } 3445 if s.Name == nil { 3446 invalidParams.Add(request.NewErrParamRequired("Name")) 3447 } 3448 if s.Name != nil && len(*s.Name) < 1 { 3449 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3450 } 3451 if s.QueryString == nil { 3452 invalidParams.Add(request.NewErrParamRequired("QueryString")) 3453 } 3454 if s.QueryString != nil && len(*s.QueryString) < 1 { 3455 invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) 3456 } 3457 3458 if invalidParams.Len() > 0 { 3459 return invalidParams 3460 } 3461 return nil 3462} 3463 3464// SetClientRequestToken sets the ClientRequestToken field's value. 3465func (s *CreateNamedQueryInput) SetClientRequestToken(v string) *CreateNamedQueryInput { 3466 s.ClientRequestToken = &v 3467 return s 3468} 3469 3470// SetDatabase sets the Database field's value. 3471func (s *CreateNamedQueryInput) SetDatabase(v string) *CreateNamedQueryInput { 3472 s.Database = &v 3473 return s 3474} 3475 3476// SetDescription sets the Description field's value. 3477func (s *CreateNamedQueryInput) SetDescription(v string) *CreateNamedQueryInput { 3478 s.Description = &v 3479 return s 3480} 3481 3482// SetName sets the Name field's value. 3483func (s *CreateNamedQueryInput) SetName(v string) *CreateNamedQueryInput { 3484 s.Name = &v 3485 return s 3486} 3487 3488// SetQueryString sets the QueryString field's value. 3489func (s *CreateNamedQueryInput) SetQueryString(v string) *CreateNamedQueryInput { 3490 s.QueryString = &v 3491 return s 3492} 3493 3494// SetWorkGroup sets the WorkGroup field's value. 3495func (s *CreateNamedQueryInput) SetWorkGroup(v string) *CreateNamedQueryInput { 3496 s.WorkGroup = &v 3497 return s 3498} 3499 3500type CreateNamedQueryOutput struct { 3501 _ struct{} `type:"structure"` 3502 3503 // The unique ID of the query. 3504 NamedQueryId *string `type:"string"` 3505} 3506 3507// String returns the string representation 3508func (s CreateNamedQueryOutput) String() string { 3509 return awsutil.Prettify(s) 3510} 3511 3512// GoString returns the string representation 3513func (s CreateNamedQueryOutput) GoString() string { 3514 return s.String() 3515} 3516 3517// SetNamedQueryId sets the NamedQueryId field's value. 3518func (s *CreateNamedQueryOutput) SetNamedQueryId(v string) *CreateNamedQueryOutput { 3519 s.NamedQueryId = &v 3520 return s 3521} 3522 3523type CreateWorkGroupInput struct { 3524 _ struct{} `type:"structure"` 3525 3526 // The configuration for the workgroup, which includes the location in Amazon 3527 // S3 where query results are stored, the encryption configuration, if any, 3528 // used for encrypting query results, whether the Amazon CloudWatch Metrics 3529 // are enabled for the workgroup, the limit for the amount of bytes scanned 3530 // (cutoff) per query, if it is specified, and whether workgroup's settings 3531 // (specified with EnforceWorkGroupConfiguration) in the WorkGroupConfiguration 3532 // override client-side settings. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. 3533 Configuration *WorkGroupConfiguration `type:"structure"` 3534 3535 // The workgroup description. 3536 Description *string `type:"string"` 3537 3538 // The workgroup name. 3539 // 3540 // Name is a required field 3541 Name *string `type:"string" required:"true"` 3542 3543 // A list of comma separated tags to add to the workgroup that is created. 3544 Tags []*Tag `type:"list"` 3545} 3546 3547// String returns the string representation 3548func (s CreateWorkGroupInput) String() string { 3549 return awsutil.Prettify(s) 3550} 3551 3552// GoString returns the string representation 3553func (s CreateWorkGroupInput) GoString() string { 3554 return s.String() 3555} 3556 3557// Validate inspects the fields of the type to determine if they are valid. 3558func (s *CreateWorkGroupInput) Validate() error { 3559 invalidParams := request.ErrInvalidParams{Context: "CreateWorkGroupInput"} 3560 if s.Name == nil { 3561 invalidParams.Add(request.NewErrParamRequired("Name")) 3562 } 3563 if s.Configuration != nil { 3564 if err := s.Configuration.Validate(); err != nil { 3565 invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) 3566 } 3567 } 3568 if s.Tags != nil { 3569 for i, v := range s.Tags { 3570 if v == nil { 3571 continue 3572 } 3573 if err := v.Validate(); err != nil { 3574 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 3575 } 3576 } 3577 } 3578 3579 if invalidParams.Len() > 0 { 3580 return invalidParams 3581 } 3582 return nil 3583} 3584 3585// SetConfiguration sets the Configuration field's value. 3586func (s *CreateWorkGroupInput) SetConfiguration(v *WorkGroupConfiguration) *CreateWorkGroupInput { 3587 s.Configuration = v 3588 return s 3589} 3590 3591// SetDescription sets the Description field's value. 3592func (s *CreateWorkGroupInput) SetDescription(v string) *CreateWorkGroupInput { 3593 s.Description = &v 3594 return s 3595} 3596 3597// SetName sets the Name field's value. 3598func (s *CreateWorkGroupInput) SetName(v string) *CreateWorkGroupInput { 3599 s.Name = &v 3600 return s 3601} 3602 3603// SetTags sets the Tags field's value. 3604func (s *CreateWorkGroupInput) SetTags(v []*Tag) *CreateWorkGroupInput { 3605 s.Tags = v 3606 return s 3607} 3608 3609type CreateWorkGroupOutput struct { 3610 _ struct{} `type:"structure"` 3611} 3612 3613// String returns the string representation 3614func (s CreateWorkGroupOutput) String() string { 3615 return awsutil.Prettify(s) 3616} 3617 3618// GoString returns the string representation 3619func (s CreateWorkGroupOutput) GoString() string { 3620 return s.String() 3621} 3622 3623// Contains information about a data catalog in an AWS account. 3624type DataCatalog struct { 3625 _ struct{} `type:"structure"` 3626 3627 // An optional description of the data catalog. 3628 Description *string `min:"1" type:"string"` 3629 3630 // The name of the data catalog. The catalog name must be unique for the AWS 3631 // account and can use a maximum of 128 alphanumeric, underscore, at sign, or 3632 // hyphen characters. 3633 // 3634 // Name is a required field 3635 Name *string `min:"1" type:"string" required:"true"` 3636 3637 // Specifies the Lambda function or functions to use for the data catalog. This 3638 // is a mapping whose values depend on the catalog type. 3639 // 3640 // * For the HIVE data catalog type, use the following syntax. The metadata-function 3641 // parameter is required. The sdk-version parameter is optional and defaults 3642 // to the currently supported version. metadata-function=lambda_arn, sdk-version=version_number 3643 // 3644 // * For the LAMBDA data catalog type, use one of the following sets of required 3645 // parameters, but not both. If you have one Lambda function that processes 3646 // metadata and another for reading the actual data, use the following syntax. 3647 // Both parameters are required. metadata-function=lambda_arn, record-function=lambda_arn 3648 // If you have a composite Lambda function that processes both metadata and 3649 // data, use the following syntax to specify your Lambda function. function=lambda_arn 3650 // 3651 // * The GLUE type has no parameters. 3652 Parameters map[string]*string `type:"map"` 3653 3654 // The type of data catalog: LAMBDA for a federated catalog, GLUE for AWS Glue 3655 // Catalog, or HIVE for an external hive metastore. 3656 // 3657 // Type is a required field 3658 Type *string `type:"string" required:"true" enum:"DataCatalogType"` 3659} 3660 3661// String returns the string representation 3662func (s DataCatalog) String() string { 3663 return awsutil.Prettify(s) 3664} 3665 3666// GoString returns the string representation 3667func (s DataCatalog) GoString() string { 3668 return s.String() 3669} 3670 3671// SetDescription sets the Description field's value. 3672func (s *DataCatalog) SetDescription(v string) *DataCatalog { 3673 s.Description = &v 3674 return s 3675} 3676 3677// SetName sets the Name field's value. 3678func (s *DataCatalog) SetName(v string) *DataCatalog { 3679 s.Name = &v 3680 return s 3681} 3682 3683// SetParameters sets the Parameters field's value. 3684func (s *DataCatalog) SetParameters(v map[string]*string) *DataCatalog { 3685 s.Parameters = v 3686 return s 3687} 3688 3689// SetType sets the Type field's value. 3690func (s *DataCatalog) SetType(v string) *DataCatalog { 3691 s.Type = &v 3692 return s 3693} 3694 3695// The summary information for the data catalog, which includes its name and 3696// type. 3697type DataCatalogSummary struct { 3698 _ struct{} `type:"structure"` 3699 3700 // The name of the data catalog. 3701 CatalogName *string `min:"1" type:"string"` 3702 3703 // The data catalog type. 3704 Type *string `type:"string" enum:"DataCatalogType"` 3705} 3706 3707// String returns the string representation 3708func (s DataCatalogSummary) String() string { 3709 return awsutil.Prettify(s) 3710} 3711 3712// GoString returns the string representation 3713func (s DataCatalogSummary) GoString() string { 3714 return s.String() 3715} 3716 3717// SetCatalogName sets the CatalogName field's value. 3718func (s *DataCatalogSummary) SetCatalogName(v string) *DataCatalogSummary { 3719 s.CatalogName = &v 3720 return s 3721} 3722 3723// SetType sets the Type field's value. 3724func (s *DataCatalogSummary) SetType(v string) *DataCatalogSummary { 3725 s.Type = &v 3726 return s 3727} 3728 3729// Contains metadata information for a database in a data catalog. 3730type Database struct { 3731 _ struct{} `type:"structure"` 3732 3733 // An optional description of the database. 3734 Description *string `min:"1" type:"string"` 3735 3736 // The name of the database. 3737 // 3738 // Name is a required field 3739 Name *string `min:"1" type:"string" required:"true"` 3740 3741 // A set of custom key/value pairs. 3742 Parameters map[string]*string `type:"map"` 3743} 3744 3745// String returns the string representation 3746func (s Database) String() string { 3747 return awsutil.Prettify(s) 3748} 3749 3750// GoString returns the string representation 3751func (s Database) GoString() string { 3752 return s.String() 3753} 3754 3755// SetDescription sets the Description field's value. 3756func (s *Database) SetDescription(v string) *Database { 3757 s.Description = &v 3758 return s 3759} 3760 3761// SetName sets the Name field's value. 3762func (s *Database) SetName(v string) *Database { 3763 s.Name = &v 3764 return s 3765} 3766 3767// SetParameters sets the Parameters field's value. 3768func (s *Database) SetParameters(v map[string]*string) *Database { 3769 s.Parameters = v 3770 return s 3771} 3772 3773// A piece of data (a field in the table). 3774type Datum struct { 3775 _ struct{} `type:"structure"` 3776 3777 // The value of the datum. 3778 VarCharValue *string `type:"string"` 3779} 3780 3781// String returns the string representation 3782func (s Datum) String() string { 3783 return awsutil.Prettify(s) 3784} 3785 3786// GoString returns the string representation 3787func (s Datum) GoString() string { 3788 return s.String() 3789} 3790 3791// SetVarCharValue sets the VarCharValue field's value. 3792func (s *Datum) SetVarCharValue(v string) *Datum { 3793 s.VarCharValue = &v 3794 return s 3795} 3796 3797type DeleteDataCatalogInput struct { 3798 _ struct{} `type:"structure"` 3799 3800 // The name of the data catalog to delete. 3801 // 3802 // Name is a required field 3803 Name *string `min:"1" type:"string" required:"true"` 3804} 3805 3806// String returns the string representation 3807func (s DeleteDataCatalogInput) String() string { 3808 return awsutil.Prettify(s) 3809} 3810 3811// GoString returns the string representation 3812func (s DeleteDataCatalogInput) GoString() string { 3813 return s.String() 3814} 3815 3816// Validate inspects the fields of the type to determine if they are valid. 3817func (s *DeleteDataCatalogInput) Validate() error { 3818 invalidParams := request.ErrInvalidParams{Context: "DeleteDataCatalogInput"} 3819 if s.Name == nil { 3820 invalidParams.Add(request.NewErrParamRequired("Name")) 3821 } 3822 if s.Name != nil && len(*s.Name) < 1 { 3823 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3824 } 3825 3826 if invalidParams.Len() > 0 { 3827 return invalidParams 3828 } 3829 return nil 3830} 3831 3832// SetName sets the Name field's value. 3833func (s *DeleteDataCatalogInput) SetName(v string) *DeleteDataCatalogInput { 3834 s.Name = &v 3835 return s 3836} 3837 3838type DeleteDataCatalogOutput struct { 3839 _ struct{} `type:"structure"` 3840} 3841 3842// String returns the string representation 3843func (s DeleteDataCatalogOutput) String() string { 3844 return awsutil.Prettify(s) 3845} 3846 3847// GoString returns the string representation 3848func (s DeleteDataCatalogOutput) GoString() string { 3849 return s.String() 3850} 3851 3852type DeleteNamedQueryInput struct { 3853 _ struct{} `type:"structure"` 3854 3855 // The unique ID of the query to delete. 3856 NamedQueryId *string `type:"string" idempotencyToken:"true"` 3857} 3858 3859// String returns the string representation 3860func (s DeleteNamedQueryInput) String() string { 3861 return awsutil.Prettify(s) 3862} 3863 3864// GoString returns the string representation 3865func (s DeleteNamedQueryInput) GoString() string { 3866 return s.String() 3867} 3868 3869// SetNamedQueryId sets the NamedQueryId field's value. 3870func (s *DeleteNamedQueryInput) SetNamedQueryId(v string) *DeleteNamedQueryInput { 3871 s.NamedQueryId = &v 3872 return s 3873} 3874 3875type DeleteNamedQueryOutput struct { 3876 _ struct{} `type:"structure"` 3877} 3878 3879// String returns the string representation 3880func (s DeleteNamedQueryOutput) String() string { 3881 return awsutil.Prettify(s) 3882} 3883 3884// GoString returns the string representation 3885func (s DeleteNamedQueryOutput) GoString() string { 3886 return s.String() 3887} 3888 3889type DeleteWorkGroupInput struct { 3890 _ struct{} `type:"structure"` 3891 3892 // The option to delete the workgroup and its contents even if the workgroup 3893 // contains any named queries. 3894 RecursiveDeleteOption *bool `type:"boolean"` 3895 3896 // The unique name of the workgroup to delete. 3897 // 3898 // WorkGroup is a required field 3899 WorkGroup *string `type:"string" required:"true"` 3900} 3901 3902// String returns the string representation 3903func (s DeleteWorkGroupInput) String() string { 3904 return awsutil.Prettify(s) 3905} 3906 3907// GoString returns the string representation 3908func (s DeleteWorkGroupInput) GoString() string { 3909 return s.String() 3910} 3911 3912// Validate inspects the fields of the type to determine if they are valid. 3913func (s *DeleteWorkGroupInput) Validate() error { 3914 invalidParams := request.ErrInvalidParams{Context: "DeleteWorkGroupInput"} 3915 if s.WorkGroup == nil { 3916 invalidParams.Add(request.NewErrParamRequired("WorkGroup")) 3917 } 3918 3919 if invalidParams.Len() > 0 { 3920 return invalidParams 3921 } 3922 return nil 3923} 3924 3925// SetRecursiveDeleteOption sets the RecursiveDeleteOption field's value. 3926func (s *DeleteWorkGroupInput) SetRecursiveDeleteOption(v bool) *DeleteWorkGroupInput { 3927 s.RecursiveDeleteOption = &v 3928 return s 3929} 3930 3931// SetWorkGroup sets the WorkGroup field's value. 3932func (s *DeleteWorkGroupInput) SetWorkGroup(v string) *DeleteWorkGroupInput { 3933 s.WorkGroup = &v 3934 return s 3935} 3936 3937type DeleteWorkGroupOutput struct { 3938 _ struct{} `type:"structure"` 3939} 3940 3941// String returns the string representation 3942func (s DeleteWorkGroupOutput) String() string { 3943 return awsutil.Prettify(s) 3944} 3945 3946// GoString returns the string representation 3947func (s DeleteWorkGroupOutput) GoString() string { 3948 return s.String() 3949} 3950 3951// If query results are encrypted in Amazon S3, indicates the encryption option 3952// used (for example, SSE-KMS or CSE-KMS) and key information. 3953type EncryptionConfiguration struct { 3954 _ struct{} `type:"structure"` 3955 3956 // Indicates whether Amazon S3 server-side encryption with Amazon S3-managed 3957 // keys (SSE-S3), server-side encryption with KMS-managed keys (SSE-KMS), or 3958 // client-side encryption with KMS-managed keys (CSE-KMS) is used. 3959 // 3960 // If a query runs in a workgroup and the workgroup overrides client-side settings, 3961 // then the workgroup's setting for encryption is used. It specifies whether 3962 // query results must be encrypted, for all queries that run in this workgroup. 3963 // 3964 // EncryptionOption is a required field 3965 EncryptionOption *string `type:"string" required:"true" enum:"EncryptionOption"` 3966 3967 // For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID. 3968 KmsKey *string `type:"string"` 3969} 3970 3971// String returns the string representation 3972func (s EncryptionConfiguration) String() string { 3973 return awsutil.Prettify(s) 3974} 3975 3976// GoString returns the string representation 3977func (s EncryptionConfiguration) GoString() string { 3978 return s.String() 3979} 3980 3981// Validate inspects the fields of the type to determine if they are valid. 3982func (s *EncryptionConfiguration) Validate() error { 3983 invalidParams := request.ErrInvalidParams{Context: "EncryptionConfiguration"} 3984 if s.EncryptionOption == nil { 3985 invalidParams.Add(request.NewErrParamRequired("EncryptionOption")) 3986 } 3987 3988 if invalidParams.Len() > 0 { 3989 return invalidParams 3990 } 3991 return nil 3992} 3993 3994// SetEncryptionOption sets the EncryptionOption field's value. 3995func (s *EncryptionConfiguration) SetEncryptionOption(v string) *EncryptionConfiguration { 3996 s.EncryptionOption = &v 3997 return s 3998} 3999 4000// SetKmsKey sets the KmsKey field's value. 4001func (s *EncryptionConfiguration) SetKmsKey(v string) *EncryptionConfiguration { 4002 s.KmsKey = &v 4003 return s 4004} 4005 4006type GetDataCatalogInput struct { 4007 _ struct{} `type:"structure"` 4008 4009 // The name of the data catalog to return. 4010 // 4011 // Name is a required field 4012 Name *string `min:"1" type:"string" required:"true"` 4013} 4014 4015// String returns the string representation 4016func (s GetDataCatalogInput) String() string { 4017 return awsutil.Prettify(s) 4018} 4019 4020// GoString returns the string representation 4021func (s GetDataCatalogInput) GoString() string { 4022 return s.String() 4023} 4024 4025// Validate inspects the fields of the type to determine if they are valid. 4026func (s *GetDataCatalogInput) Validate() error { 4027 invalidParams := request.ErrInvalidParams{Context: "GetDataCatalogInput"} 4028 if s.Name == nil { 4029 invalidParams.Add(request.NewErrParamRequired("Name")) 4030 } 4031 if s.Name != nil && len(*s.Name) < 1 { 4032 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4033 } 4034 4035 if invalidParams.Len() > 0 { 4036 return invalidParams 4037 } 4038 return nil 4039} 4040 4041// SetName sets the Name field's value. 4042func (s *GetDataCatalogInput) SetName(v string) *GetDataCatalogInput { 4043 s.Name = &v 4044 return s 4045} 4046 4047type GetDataCatalogOutput struct { 4048 _ struct{} `type:"structure"` 4049 4050 // The data catalog returned. 4051 DataCatalog *DataCatalog `type:"structure"` 4052} 4053 4054// String returns the string representation 4055func (s GetDataCatalogOutput) String() string { 4056 return awsutil.Prettify(s) 4057} 4058 4059// GoString returns the string representation 4060func (s GetDataCatalogOutput) GoString() string { 4061 return s.String() 4062} 4063 4064// SetDataCatalog sets the DataCatalog field's value. 4065func (s *GetDataCatalogOutput) SetDataCatalog(v *DataCatalog) *GetDataCatalogOutput { 4066 s.DataCatalog = v 4067 return s 4068} 4069 4070type GetDatabaseInput struct { 4071 _ struct{} `type:"structure"` 4072 4073 // The name of the data catalog that contains the database to return. 4074 // 4075 // CatalogName is a required field 4076 CatalogName *string `min:"1" type:"string" required:"true"` 4077 4078 // The name of the database to return. 4079 // 4080 // DatabaseName is a required field 4081 DatabaseName *string `min:"1" type:"string" required:"true"` 4082} 4083 4084// String returns the string representation 4085func (s GetDatabaseInput) String() string { 4086 return awsutil.Prettify(s) 4087} 4088 4089// GoString returns the string representation 4090func (s GetDatabaseInput) GoString() string { 4091 return s.String() 4092} 4093 4094// Validate inspects the fields of the type to determine if they are valid. 4095func (s *GetDatabaseInput) Validate() error { 4096 invalidParams := request.ErrInvalidParams{Context: "GetDatabaseInput"} 4097 if s.CatalogName == nil { 4098 invalidParams.Add(request.NewErrParamRequired("CatalogName")) 4099 } 4100 if s.CatalogName != nil && len(*s.CatalogName) < 1 { 4101 invalidParams.Add(request.NewErrParamMinLen("CatalogName", 1)) 4102 } 4103 if s.DatabaseName == nil { 4104 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 4105 } 4106 if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { 4107 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) 4108 } 4109 4110 if invalidParams.Len() > 0 { 4111 return invalidParams 4112 } 4113 return nil 4114} 4115 4116// SetCatalogName sets the CatalogName field's value. 4117func (s *GetDatabaseInput) SetCatalogName(v string) *GetDatabaseInput { 4118 s.CatalogName = &v 4119 return s 4120} 4121 4122// SetDatabaseName sets the DatabaseName field's value. 4123func (s *GetDatabaseInput) SetDatabaseName(v string) *GetDatabaseInput { 4124 s.DatabaseName = &v 4125 return s 4126} 4127 4128type GetDatabaseOutput struct { 4129 _ struct{} `type:"structure"` 4130 4131 // The database returned. 4132 Database *Database `type:"structure"` 4133} 4134 4135// String returns the string representation 4136func (s GetDatabaseOutput) String() string { 4137 return awsutil.Prettify(s) 4138} 4139 4140// GoString returns the string representation 4141func (s GetDatabaseOutput) GoString() string { 4142 return s.String() 4143} 4144 4145// SetDatabase sets the Database field's value. 4146func (s *GetDatabaseOutput) SetDatabase(v *Database) *GetDatabaseOutput { 4147 s.Database = v 4148 return s 4149} 4150 4151type GetNamedQueryInput struct { 4152 _ struct{} `type:"structure"` 4153 4154 // The unique ID of the query. Use ListNamedQueries to get query IDs. 4155 // 4156 // NamedQueryId is a required field 4157 NamedQueryId *string `type:"string" required:"true"` 4158} 4159 4160// String returns the string representation 4161func (s GetNamedQueryInput) String() string { 4162 return awsutil.Prettify(s) 4163} 4164 4165// GoString returns the string representation 4166func (s GetNamedQueryInput) GoString() string { 4167 return s.String() 4168} 4169 4170// Validate inspects the fields of the type to determine if they are valid. 4171func (s *GetNamedQueryInput) Validate() error { 4172 invalidParams := request.ErrInvalidParams{Context: "GetNamedQueryInput"} 4173 if s.NamedQueryId == nil { 4174 invalidParams.Add(request.NewErrParamRequired("NamedQueryId")) 4175 } 4176 4177 if invalidParams.Len() > 0 { 4178 return invalidParams 4179 } 4180 return nil 4181} 4182 4183// SetNamedQueryId sets the NamedQueryId field's value. 4184func (s *GetNamedQueryInput) SetNamedQueryId(v string) *GetNamedQueryInput { 4185 s.NamedQueryId = &v 4186 return s 4187} 4188 4189type GetNamedQueryOutput struct { 4190 _ struct{} `type:"structure"` 4191 4192 // Information about the query. 4193 NamedQuery *NamedQuery `type:"structure"` 4194} 4195 4196// String returns the string representation 4197func (s GetNamedQueryOutput) String() string { 4198 return awsutil.Prettify(s) 4199} 4200 4201// GoString returns the string representation 4202func (s GetNamedQueryOutput) GoString() string { 4203 return s.String() 4204} 4205 4206// SetNamedQuery sets the NamedQuery field's value. 4207func (s *GetNamedQueryOutput) SetNamedQuery(v *NamedQuery) *GetNamedQueryOutput { 4208 s.NamedQuery = v 4209 return s 4210} 4211 4212type GetQueryExecutionInput struct { 4213 _ struct{} `type:"structure"` 4214 4215 // The unique ID of the query execution. 4216 // 4217 // QueryExecutionId is a required field 4218 QueryExecutionId *string `type:"string" required:"true"` 4219} 4220 4221// String returns the string representation 4222func (s GetQueryExecutionInput) String() string { 4223 return awsutil.Prettify(s) 4224} 4225 4226// GoString returns the string representation 4227func (s GetQueryExecutionInput) GoString() string { 4228 return s.String() 4229} 4230 4231// Validate inspects the fields of the type to determine if they are valid. 4232func (s *GetQueryExecutionInput) Validate() error { 4233 invalidParams := request.ErrInvalidParams{Context: "GetQueryExecutionInput"} 4234 if s.QueryExecutionId == nil { 4235 invalidParams.Add(request.NewErrParamRequired("QueryExecutionId")) 4236 } 4237 4238 if invalidParams.Len() > 0 { 4239 return invalidParams 4240 } 4241 return nil 4242} 4243 4244// SetQueryExecutionId sets the QueryExecutionId field's value. 4245func (s *GetQueryExecutionInput) SetQueryExecutionId(v string) *GetQueryExecutionInput { 4246 s.QueryExecutionId = &v 4247 return s 4248} 4249 4250type GetQueryExecutionOutput struct { 4251 _ struct{} `type:"structure"` 4252 4253 // Information about the query execution. 4254 QueryExecution *QueryExecution `type:"structure"` 4255} 4256 4257// String returns the string representation 4258func (s GetQueryExecutionOutput) String() string { 4259 return awsutil.Prettify(s) 4260} 4261 4262// GoString returns the string representation 4263func (s GetQueryExecutionOutput) GoString() string { 4264 return s.String() 4265} 4266 4267// SetQueryExecution sets the QueryExecution field's value. 4268func (s *GetQueryExecutionOutput) SetQueryExecution(v *QueryExecution) *GetQueryExecutionOutput { 4269 s.QueryExecution = v 4270 return s 4271} 4272 4273type GetQueryResultsInput struct { 4274 _ struct{} `type:"structure"` 4275 4276 // The maximum number of results (rows) to return in this request. 4277 MaxResults *int64 `min:"1" type:"integer"` 4278 4279 // A token generated by the Athena service that specifies where to continue 4280 // pagination if a previous request was truncated. To obtain the next set of 4281 // pages, pass in the NextToken from the response object of the previous page 4282 // call. 4283 NextToken *string `min:"1" type:"string"` 4284 4285 // The unique ID of the query execution. 4286 // 4287 // QueryExecutionId is a required field 4288 QueryExecutionId *string `type:"string" required:"true"` 4289} 4290 4291// String returns the string representation 4292func (s GetQueryResultsInput) String() string { 4293 return awsutil.Prettify(s) 4294} 4295 4296// GoString returns the string representation 4297func (s GetQueryResultsInput) GoString() string { 4298 return s.String() 4299} 4300 4301// Validate inspects the fields of the type to determine if they are valid. 4302func (s *GetQueryResultsInput) Validate() error { 4303 invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"} 4304 if s.MaxResults != nil && *s.MaxResults < 1 { 4305 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4306 } 4307 if s.NextToken != nil && len(*s.NextToken) < 1 { 4308 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4309 } 4310 if s.QueryExecutionId == nil { 4311 invalidParams.Add(request.NewErrParamRequired("QueryExecutionId")) 4312 } 4313 4314 if invalidParams.Len() > 0 { 4315 return invalidParams 4316 } 4317 return nil 4318} 4319 4320// SetMaxResults sets the MaxResults field's value. 4321func (s *GetQueryResultsInput) SetMaxResults(v int64) *GetQueryResultsInput { 4322 s.MaxResults = &v 4323 return s 4324} 4325 4326// SetNextToken sets the NextToken field's value. 4327func (s *GetQueryResultsInput) SetNextToken(v string) *GetQueryResultsInput { 4328 s.NextToken = &v 4329 return s 4330} 4331 4332// SetQueryExecutionId sets the QueryExecutionId field's value. 4333func (s *GetQueryResultsInput) SetQueryExecutionId(v string) *GetQueryResultsInput { 4334 s.QueryExecutionId = &v 4335 return s 4336} 4337 4338type GetQueryResultsOutput struct { 4339 _ struct{} `type:"structure"` 4340 4341 // A token generated by the Athena service that specifies where to continue 4342 // pagination if a previous request was truncated. To obtain the next set of 4343 // pages, pass in the NextToken from the response object of the previous page 4344 // call. 4345 NextToken *string `min:"1" type:"string"` 4346 4347 // The results of the query execution. 4348 ResultSet *ResultSet `type:"structure"` 4349 4350 // The number of rows inserted with a CREATE TABLE AS SELECT statement. 4351 UpdateCount *int64 `type:"long"` 4352} 4353 4354// String returns the string representation 4355func (s GetQueryResultsOutput) String() string { 4356 return awsutil.Prettify(s) 4357} 4358 4359// GoString returns the string representation 4360func (s GetQueryResultsOutput) GoString() string { 4361 return s.String() 4362} 4363 4364// SetNextToken sets the NextToken field's value. 4365func (s *GetQueryResultsOutput) SetNextToken(v string) *GetQueryResultsOutput { 4366 s.NextToken = &v 4367 return s 4368} 4369 4370// SetResultSet sets the ResultSet field's value. 4371func (s *GetQueryResultsOutput) SetResultSet(v *ResultSet) *GetQueryResultsOutput { 4372 s.ResultSet = v 4373 return s 4374} 4375 4376// SetUpdateCount sets the UpdateCount field's value. 4377func (s *GetQueryResultsOutput) SetUpdateCount(v int64) *GetQueryResultsOutput { 4378 s.UpdateCount = &v 4379 return s 4380} 4381 4382type GetTableMetadataInput struct { 4383 _ struct{} `type:"structure"` 4384 4385 // The name of the data catalog that contains the database and table metadata 4386 // to return. 4387 // 4388 // CatalogName is a required field 4389 CatalogName *string `min:"1" type:"string" required:"true"` 4390 4391 // The name of the database that contains the table metadata to return. 4392 // 4393 // DatabaseName is a required field 4394 DatabaseName *string `min:"1" type:"string" required:"true"` 4395 4396 // The name of the table for which metadata is returned. 4397 // 4398 // TableName is a required field 4399 TableName *string `min:"1" type:"string" required:"true"` 4400} 4401 4402// String returns the string representation 4403func (s GetTableMetadataInput) String() string { 4404 return awsutil.Prettify(s) 4405} 4406 4407// GoString returns the string representation 4408func (s GetTableMetadataInput) GoString() string { 4409 return s.String() 4410} 4411 4412// Validate inspects the fields of the type to determine if they are valid. 4413func (s *GetTableMetadataInput) Validate() error { 4414 invalidParams := request.ErrInvalidParams{Context: "GetTableMetadataInput"} 4415 if s.CatalogName == nil { 4416 invalidParams.Add(request.NewErrParamRequired("CatalogName")) 4417 } 4418 if s.CatalogName != nil && len(*s.CatalogName) < 1 { 4419 invalidParams.Add(request.NewErrParamMinLen("CatalogName", 1)) 4420 } 4421 if s.DatabaseName == nil { 4422 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 4423 } 4424 if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { 4425 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) 4426 } 4427 if s.TableName == nil { 4428 invalidParams.Add(request.NewErrParamRequired("TableName")) 4429 } 4430 if s.TableName != nil && len(*s.TableName) < 1 { 4431 invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) 4432 } 4433 4434 if invalidParams.Len() > 0 { 4435 return invalidParams 4436 } 4437 return nil 4438} 4439 4440// SetCatalogName sets the CatalogName field's value. 4441func (s *GetTableMetadataInput) SetCatalogName(v string) *GetTableMetadataInput { 4442 s.CatalogName = &v 4443 return s 4444} 4445 4446// SetDatabaseName sets the DatabaseName field's value. 4447func (s *GetTableMetadataInput) SetDatabaseName(v string) *GetTableMetadataInput { 4448 s.DatabaseName = &v 4449 return s 4450} 4451 4452// SetTableName sets the TableName field's value. 4453func (s *GetTableMetadataInput) SetTableName(v string) *GetTableMetadataInput { 4454 s.TableName = &v 4455 return s 4456} 4457 4458type GetTableMetadataOutput struct { 4459 _ struct{} `type:"structure"` 4460 4461 // An object that contains table metadata. 4462 TableMetadata *TableMetadata `type:"structure"` 4463} 4464 4465// String returns the string representation 4466func (s GetTableMetadataOutput) String() string { 4467 return awsutil.Prettify(s) 4468} 4469 4470// GoString returns the string representation 4471func (s GetTableMetadataOutput) GoString() string { 4472 return s.String() 4473} 4474 4475// SetTableMetadata sets the TableMetadata field's value. 4476func (s *GetTableMetadataOutput) SetTableMetadata(v *TableMetadata) *GetTableMetadataOutput { 4477 s.TableMetadata = v 4478 return s 4479} 4480 4481type GetWorkGroupInput struct { 4482 _ struct{} `type:"structure"` 4483 4484 // The name of the workgroup. 4485 // 4486 // WorkGroup is a required field 4487 WorkGroup *string `type:"string" required:"true"` 4488} 4489 4490// String returns the string representation 4491func (s GetWorkGroupInput) String() string { 4492 return awsutil.Prettify(s) 4493} 4494 4495// GoString returns the string representation 4496func (s GetWorkGroupInput) GoString() string { 4497 return s.String() 4498} 4499 4500// Validate inspects the fields of the type to determine if they are valid. 4501func (s *GetWorkGroupInput) Validate() error { 4502 invalidParams := request.ErrInvalidParams{Context: "GetWorkGroupInput"} 4503 if s.WorkGroup == nil { 4504 invalidParams.Add(request.NewErrParamRequired("WorkGroup")) 4505 } 4506 4507 if invalidParams.Len() > 0 { 4508 return invalidParams 4509 } 4510 return nil 4511} 4512 4513// SetWorkGroup sets the WorkGroup field's value. 4514func (s *GetWorkGroupInput) SetWorkGroup(v string) *GetWorkGroupInput { 4515 s.WorkGroup = &v 4516 return s 4517} 4518 4519type GetWorkGroupOutput struct { 4520 _ struct{} `type:"structure"` 4521 4522 // Information about the workgroup. 4523 WorkGroup *WorkGroup `type:"structure"` 4524} 4525 4526// String returns the string representation 4527func (s GetWorkGroupOutput) String() string { 4528 return awsutil.Prettify(s) 4529} 4530 4531// GoString returns the string representation 4532func (s GetWorkGroupOutput) GoString() string { 4533 return s.String() 4534} 4535 4536// SetWorkGroup sets the WorkGroup field's value. 4537func (s *GetWorkGroupOutput) SetWorkGroup(v *WorkGroup) *GetWorkGroupOutput { 4538 s.WorkGroup = v 4539 return s 4540} 4541 4542// Indicates a platform issue, which may be due to a transient condition or 4543// outage. 4544type InternalServerException struct { 4545 _ struct{} `type:"structure"` 4546 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4547 4548 Message_ *string `locationName:"Message" type:"string"` 4549} 4550 4551// String returns the string representation 4552func (s InternalServerException) String() string { 4553 return awsutil.Prettify(s) 4554} 4555 4556// GoString returns the string representation 4557func (s InternalServerException) GoString() string { 4558 return s.String() 4559} 4560 4561func newErrorInternalServerException(v protocol.ResponseMetadata) error { 4562 return &InternalServerException{ 4563 RespMetadata: v, 4564 } 4565} 4566 4567// Code returns the exception type name. 4568func (s *InternalServerException) Code() string { 4569 return "InternalServerException" 4570} 4571 4572// Message returns the exception's message. 4573func (s *InternalServerException) Message() string { 4574 if s.Message_ != nil { 4575 return *s.Message_ 4576 } 4577 return "" 4578} 4579 4580// OrigErr always returns nil, satisfies awserr.Error interface. 4581func (s *InternalServerException) OrigErr() error { 4582 return nil 4583} 4584 4585func (s *InternalServerException) Error() string { 4586 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4587} 4588 4589// Status code returns the HTTP status code for the request's response error. 4590func (s *InternalServerException) StatusCode() int { 4591 return s.RespMetadata.StatusCode 4592} 4593 4594// RequestID returns the service's response RequestID for request. 4595func (s *InternalServerException) RequestID() string { 4596 return s.RespMetadata.RequestID 4597} 4598 4599// Indicates that something is wrong with the input to the request. For example, 4600// a required parameter may be missing or out of range. 4601type InvalidRequestException struct { 4602 _ struct{} `type:"structure"` 4603 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4604 4605 // The error code returned when the query execution failed to process, or when 4606 // the processing request for the named query failed. 4607 AthenaErrorCode *string `min:"1" type:"string"` 4608 4609 Message_ *string `locationName:"Message" type:"string"` 4610} 4611 4612// String returns the string representation 4613func (s InvalidRequestException) String() string { 4614 return awsutil.Prettify(s) 4615} 4616 4617// GoString returns the string representation 4618func (s InvalidRequestException) GoString() string { 4619 return s.String() 4620} 4621 4622func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { 4623 return &InvalidRequestException{ 4624 RespMetadata: v, 4625 } 4626} 4627 4628// Code returns the exception type name. 4629func (s *InvalidRequestException) Code() string { 4630 return "InvalidRequestException" 4631} 4632 4633// Message returns the exception's message. 4634func (s *InvalidRequestException) Message() string { 4635 if s.Message_ != nil { 4636 return *s.Message_ 4637 } 4638 return "" 4639} 4640 4641// OrigErr always returns nil, satisfies awserr.Error interface. 4642func (s *InvalidRequestException) OrigErr() error { 4643 return nil 4644} 4645 4646func (s *InvalidRequestException) Error() string { 4647 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4648} 4649 4650// Status code returns the HTTP status code for the request's response error. 4651func (s *InvalidRequestException) StatusCode() int { 4652 return s.RespMetadata.StatusCode 4653} 4654 4655// RequestID returns the service's response RequestID for request. 4656func (s *InvalidRequestException) RequestID() string { 4657 return s.RespMetadata.RequestID 4658} 4659 4660type ListDataCatalogsInput struct { 4661 _ struct{} `type:"structure"` 4662 4663 // Specifies the maximum number of data catalogs to return. 4664 MaxResults *int64 `min:"2" type:"integer"` 4665 4666 // A token generated by the Athena service that specifies where to continue 4667 // pagination if a previous request was truncated. To obtain the next set of 4668 // pages, pass in the NextToken from the response object of the previous page 4669 // call. 4670 NextToken *string `min:"1" type:"string"` 4671} 4672 4673// String returns the string representation 4674func (s ListDataCatalogsInput) String() string { 4675 return awsutil.Prettify(s) 4676} 4677 4678// GoString returns the string representation 4679func (s ListDataCatalogsInput) GoString() string { 4680 return s.String() 4681} 4682 4683// Validate inspects the fields of the type to determine if they are valid. 4684func (s *ListDataCatalogsInput) Validate() error { 4685 invalidParams := request.ErrInvalidParams{Context: "ListDataCatalogsInput"} 4686 if s.MaxResults != nil && *s.MaxResults < 2 { 4687 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 2)) 4688 } 4689 if s.NextToken != nil && len(*s.NextToken) < 1 { 4690 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4691 } 4692 4693 if invalidParams.Len() > 0 { 4694 return invalidParams 4695 } 4696 return nil 4697} 4698 4699// SetMaxResults sets the MaxResults field's value. 4700func (s *ListDataCatalogsInput) SetMaxResults(v int64) *ListDataCatalogsInput { 4701 s.MaxResults = &v 4702 return s 4703} 4704 4705// SetNextToken sets the NextToken field's value. 4706func (s *ListDataCatalogsInput) SetNextToken(v string) *ListDataCatalogsInput { 4707 s.NextToken = &v 4708 return s 4709} 4710 4711type ListDataCatalogsOutput struct { 4712 _ struct{} `type:"structure"` 4713 4714 // A summary list of data catalogs. 4715 DataCatalogsSummary []*DataCatalogSummary `type:"list"` 4716 4717 // A token generated by the Athena service that specifies where to continue 4718 // pagination if a previous request was truncated. To obtain the next set of 4719 // pages, pass in the NextToken from the response object of the previous page 4720 // call. 4721 NextToken *string `min:"1" type:"string"` 4722} 4723 4724// String returns the string representation 4725func (s ListDataCatalogsOutput) String() string { 4726 return awsutil.Prettify(s) 4727} 4728 4729// GoString returns the string representation 4730func (s ListDataCatalogsOutput) GoString() string { 4731 return s.String() 4732} 4733 4734// SetDataCatalogsSummary sets the DataCatalogsSummary field's value. 4735func (s *ListDataCatalogsOutput) SetDataCatalogsSummary(v []*DataCatalogSummary) *ListDataCatalogsOutput { 4736 s.DataCatalogsSummary = v 4737 return s 4738} 4739 4740// SetNextToken sets the NextToken field's value. 4741func (s *ListDataCatalogsOutput) SetNextToken(v string) *ListDataCatalogsOutput { 4742 s.NextToken = &v 4743 return s 4744} 4745 4746type ListDatabasesInput struct { 4747 _ struct{} `type:"structure"` 4748 4749 // The name of the data catalog that contains the databases to return. 4750 // 4751 // CatalogName is a required field 4752 CatalogName *string `min:"1" type:"string" required:"true"` 4753 4754 // Specifies the maximum number of results to return. 4755 MaxResults *int64 `min:"1" type:"integer"` 4756 4757 // A token generated by the Athena service that specifies where to continue 4758 // pagination if a previous request was truncated. To obtain the next set of 4759 // pages, pass in the NextToken from the response object of the previous page 4760 // call. 4761 NextToken *string `min:"1" type:"string"` 4762} 4763 4764// String returns the string representation 4765func (s ListDatabasesInput) String() string { 4766 return awsutil.Prettify(s) 4767} 4768 4769// GoString returns the string representation 4770func (s ListDatabasesInput) GoString() string { 4771 return s.String() 4772} 4773 4774// Validate inspects the fields of the type to determine if they are valid. 4775func (s *ListDatabasesInput) Validate() error { 4776 invalidParams := request.ErrInvalidParams{Context: "ListDatabasesInput"} 4777 if s.CatalogName == nil { 4778 invalidParams.Add(request.NewErrParamRequired("CatalogName")) 4779 } 4780 if s.CatalogName != nil && len(*s.CatalogName) < 1 { 4781 invalidParams.Add(request.NewErrParamMinLen("CatalogName", 1)) 4782 } 4783 if s.MaxResults != nil && *s.MaxResults < 1 { 4784 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4785 } 4786 if s.NextToken != nil && len(*s.NextToken) < 1 { 4787 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4788 } 4789 4790 if invalidParams.Len() > 0 { 4791 return invalidParams 4792 } 4793 return nil 4794} 4795 4796// SetCatalogName sets the CatalogName field's value. 4797func (s *ListDatabasesInput) SetCatalogName(v string) *ListDatabasesInput { 4798 s.CatalogName = &v 4799 return s 4800} 4801 4802// SetMaxResults sets the MaxResults field's value. 4803func (s *ListDatabasesInput) SetMaxResults(v int64) *ListDatabasesInput { 4804 s.MaxResults = &v 4805 return s 4806} 4807 4808// SetNextToken sets the NextToken field's value. 4809func (s *ListDatabasesInput) SetNextToken(v string) *ListDatabasesInput { 4810 s.NextToken = &v 4811 return s 4812} 4813 4814type ListDatabasesOutput struct { 4815 _ struct{} `type:"structure"` 4816 4817 // A list of databases from a data catalog. 4818 DatabaseList []*Database `type:"list"` 4819 4820 // A token generated by the Athena service that specifies where to continue 4821 // pagination if a previous request was truncated. To obtain the next set of 4822 // pages, pass in the NextToken from the response object of the previous page 4823 // call. 4824 NextToken *string `min:"1" type:"string"` 4825} 4826 4827// String returns the string representation 4828func (s ListDatabasesOutput) String() string { 4829 return awsutil.Prettify(s) 4830} 4831 4832// GoString returns the string representation 4833func (s ListDatabasesOutput) GoString() string { 4834 return s.String() 4835} 4836 4837// SetDatabaseList sets the DatabaseList field's value. 4838func (s *ListDatabasesOutput) SetDatabaseList(v []*Database) *ListDatabasesOutput { 4839 s.DatabaseList = v 4840 return s 4841} 4842 4843// SetNextToken sets the NextToken field's value. 4844func (s *ListDatabasesOutput) SetNextToken(v string) *ListDatabasesOutput { 4845 s.NextToken = &v 4846 return s 4847} 4848 4849type ListNamedQueriesInput struct { 4850 _ struct{} `type:"structure"` 4851 4852 // The maximum number of queries to return in this request. 4853 MaxResults *int64 `type:"integer"` 4854 4855 // A token generated by the Athena service that specifies where to continue 4856 // pagination if a previous request was truncated. To obtain the next set of 4857 // pages, pass in the NextToken from the response object of the previous page 4858 // call. 4859 NextToken *string `min:"1" type:"string"` 4860 4861 // The name of the workgroup from which the named queries are being returned. 4862 // If a workgroup is not specified, the saved queries for the primary workgroup 4863 // are returned. 4864 WorkGroup *string `type:"string"` 4865} 4866 4867// String returns the string representation 4868func (s ListNamedQueriesInput) String() string { 4869 return awsutil.Prettify(s) 4870} 4871 4872// GoString returns the string representation 4873func (s ListNamedQueriesInput) GoString() string { 4874 return s.String() 4875} 4876 4877// Validate inspects the fields of the type to determine if they are valid. 4878func (s *ListNamedQueriesInput) Validate() error { 4879 invalidParams := request.ErrInvalidParams{Context: "ListNamedQueriesInput"} 4880 if s.NextToken != nil && len(*s.NextToken) < 1 { 4881 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4882 } 4883 4884 if invalidParams.Len() > 0 { 4885 return invalidParams 4886 } 4887 return nil 4888} 4889 4890// SetMaxResults sets the MaxResults field's value. 4891func (s *ListNamedQueriesInput) SetMaxResults(v int64) *ListNamedQueriesInput { 4892 s.MaxResults = &v 4893 return s 4894} 4895 4896// SetNextToken sets the NextToken field's value. 4897func (s *ListNamedQueriesInput) SetNextToken(v string) *ListNamedQueriesInput { 4898 s.NextToken = &v 4899 return s 4900} 4901 4902// SetWorkGroup sets the WorkGroup field's value. 4903func (s *ListNamedQueriesInput) SetWorkGroup(v string) *ListNamedQueriesInput { 4904 s.WorkGroup = &v 4905 return s 4906} 4907 4908type ListNamedQueriesOutput struct { 4909 _ struct{} `type:"structure"` 4910 4911 // The list of unique query IDs. 4912 NamedQueryIds []*string `min:"1" type:"list"` 4913 4914 // A token generated by the Athena service that specifies where to continue 4915 // pagination if a previous request was truncated. To obtain the next set of 4916 // pages, pass in the NextToken from the response object of the previous page 4917 // call. 4918 NextToken *string `min:"1" type:"string"` 4919} 4920 4921// String returns the string representation 4922func (s ListNamedQueriesOutput) String() string { 4923 return awsutil.Prettify(s) 4924} 4925 4926// GoString returns the string representation 4927func (s ListNamedQueriesOutput) GoString() string { 4928 return s.String() 4929} 4930 4931// SetNamedQueryIds sets the NamedQueryIds field's value. 4932func (s *ListNamedQueriesOutput) SetNamedQueryIds(v []*string) *ListNamedQueriesOutput { 4933 s.NamedQueryIds = v 4934 return s 4935} 4936 4937// SetNextToken sets the NextToken field's value. 4938func (s *ListNamedQueriesOutput) SetNextToken(v string) *ListNamedQueriesOutput { 4939 s.NextToken = &v 4940 return s 4941} 4942 4943type ListQueryExecutionsInput struct { 4944 _ struct{} `type:"structure"` 4945 4946 // The maximum number of query executions to return in this request. 4947 MaxResults *int64 `type:"integer"` 4948 4949 // A token generated by the Athena service that specifies where to continue 4950 // pagination if a previous request was truncated. To obtain the next set of 4951 // pages, pass in the NextToken from the response object of the previous page 4952 // call. 4953 NextToken *string `min:"1" type:"string"` 4954 4955 // The name of the workgroup from which queries are being returned. If a workgroup 4956 // is not specified, a list of available query execution IDs for the queries 4957 // in the primary workgroup is returned. 4958 WorkGroup *string `type:"string"` 4959} 4960 4961// String returns the string representation 4962func (s ListQueryExecutionsInput) String() string { 4963 return awsutil.Prettify(s) 4964} 4965 4966// GoString returns the string representation 4967func (s ListQueryExecutionsInput) GoString() string { 4968 return s.String() 4969} 4970 4971// Validate inspects the fields of the type to determine if they are valid. 4972func (s *ListQueryExecutionsInput) Validate() error { 4973 invalidParams := request.ErrInvalidParams{Context: "ListQueryExecutionsInput"} 4974 if s.NextToken != nil && len(*s.NextToken) < 1 { 4975 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 4976 } 4977 4978 if invalidParams.Len() > 0 { 4979 return invalidParams 4980 } 4981 return nil 4982} 4983 4984// SetMaxResults sets the MaxResults field's value. 4985func (s *ListQueryExecutionsInput) SetMaxResults(v int64) *ListQueryExecutionsInput { 4986 s.MaxResults = &v 4987 return s 4988} 4989 4990// SetNextToken sets the NextToken field's value. 4991func (s *ListQueryExecutionsInput) SetNextToken(v string) *ListQueryExecutionsInput { 4992 s.NextToken = &v 4993 return s 4994} 4995 4996// SetWorkGroup sets the WorkGroup field's value. 4997func (s *ListQueryExecutionsInput) SetWorkGroup(v string) *ListQueryExecutionsInput { 4998 s.WorkGroup = &v 4999 return s 5000} 5001 5002type ListQueryExecutionsOutput struct { 5003 _ struct{} `type:"structure"` 5004 5005 // A token to be used by the next request if this request is truncated. 5006 NextToken *string `min:"1" type:"string"` 5007 5008 // The unique IDs of each query execution as an array of strings. 5009 QueryExecutionIds []*string `min:"1" type:"list"` 5010} 5011 5012// String returns the string representation 5013func (s ListQueryExecutionsOutput) String() string { 5014 return awsutil.Prettify(s) 5015} 5016 5017// GoString returns the string representation 5018func (s ListQueryExecutionsOutput) GoString() string { 5019 return s.String() 5020} 5021 5022// SetNextToken sets the NextToken field's value. 5023func (s *ListQueryExecutionsOutput) SetNextToken(v string) *ListQueryExecutionsOutput { 5024 s.NextToken = &v 5025 return s 5026} 5027 5028// SetQueryExecutionIds sets the QueryExecutionIds field's value. 5029func (s *ListQueryExecutionsOutput) SetQueryExecutionIds(v []*string) *ListQueryExecutionsOutput { 5030 s.QueryExecutionIds = v 5031 return s 5032} 5033 5034type ListTableMetadataInput struct { 5035 _ struct{} `type:"structure"` 5036 5037 // The name of the data catalog for which table metadata should be returned. 5038 // 5039 // CatalogName is a required field 5040 CatalogName *string `min:"1" type:"string" required:"true"` 5041 5042 // The name of the database for which table metadata should be returned. 5043 // 5044 // DatabaseName is a required field 5045 DatabaseName *string `min:"1" type:"string" required:"true"` 5046 5047 // A regex filter that pattern-matches table names. If no expression is supplied, 5048 // metadata for all tables are listed. 5049 Expression *string `type:"string"` 5050 5051 // Specifies the maximum number of results to return. 5052 MaxResults *int64 `min:"1" type:"integer"` 5053 5054 // A token generated by the Athena service that specifies where to continue 5055 // pagination if a previous request was truncated. To obtain the next set of 5056 // pages, pass in the NextToken from the response object of the previous page 5057 // call. 5058 NextToken *string `min:"1" type:"string"` 5059} 5060 5061// String returns the string representation 5062func (s ListTableMetadataInput) String() string { 5063 return awsutil.Prettify(s) 5064} 5065 5066// GoString returns the string representation 5067func (s ListTableMetadataInput) GoString() string { 5068 return s.String() 5069} 5070 5071// Validate inspects the fields of the type to determine if they are valid. 5072func (s *ListTableMetadataInput) Validate() error { 5073 invalidParams := request.ErrInvalidParams{Context: "ListTableMetadataInput"} 5074 if s.CatalogName == nil { 5075 invalidParams.Add(request.NewErrParamRequired("CatalogName")) 5076 } 5077 if s.CatalogName != nil && len(*s.CatalogName) < 1 { 5078 invalidParams.Add(request.NewErrParamMinLen("CatalogName", 1)) 5079 } 5080 if s.DatabaseName == nil { 5081 invalidParams.Add(request.NewErrParamRequired("DatabaseName")) 5082 } 5083 if s.DatabaseName != nil && len(*s.DatabaseName) < 1 { 5084 invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1)) 5085 } 5086 if s.MaxResults != nil && *s.MaxResults < 1 { 5087 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5088 } 5089 if s.NextToken != nil && len(*s.NextToken) < 1 { 5090 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5091 } 5092 5093 if invalidParams.Len() > 0 { 5094 return invalidParams 5095 } 5096 return nil 5097} 5098 5099// SetCatalogName sets the CatalogName field's value. 5100func (s *ListTableMetadataInput) SetCatalogName(v string) *ListTableMetadataInput { 5101 s.CatalogName = &v 5102 return s 5103} 5104 5105// SetDatabaseName sets the DatabaseName field's value. 5106func (s *ListTableMetadataInput) SetDatabaseName(v string) *ListTableMetadataInput { 5107 s.DatabaseName = &v 5108 return s 5109} 5110 5111// SetExpression sets the Expression field's value. 5112func (s *ListTableMetadataInput) SetExpression(v string) *ListTableMetadataInput { 5113 s.Expression = &v 5114 return s 5115} 5116 5117// SetMaxResults sets the MaxResults field's value. 5118func (s *ListTableMetadataInput) SetMaxResults(v int64) *ListTableMetadataInput { 5119 s.MaxResults = &v 5120 return s 5121} 5122 5123// SetNextToken sets the NextToken field's value. 5124func (s *ListTableMetadataInput) SetNextToken(v string) *ListTableMetadataInput { 5125 s.NextToken = &v 5126 return s 5127} 5128 5129type ListTableMetadataOutput struct { 5130 _ struct{} `type:"structure"` 5131 5132 // A token generated by the Athena service that specifies where to continue 5133 // pagination if a previous request was truncated. To obtain the next set of 5134 // pages, pass in the NextToken from the response object of the previous page 5135 // call. 5136 NextToken *string `min:"1" type:"string"` 5137 5138 // A list of table metadata. 5139 TableMetadataList []*TableMetadata `type:"list"` 5140} 5141 5142// String returns the string representation 5143func (s ListTableMetadataOutput) String() string { 5144 return awsutil.Prettify(s) 5145} 5146 5147// GoString returns the string representation 5148func (s ListTableMetadataOutput) GoString() string { 5149 return s.String() 5150} 5151 5152// SetNextToken sets the NextToken field's value. 5153func (s *ListTableMetadataOutput) SetNextToken(v string) *ListTableMetadataOutput { 5154 s.NextToken = &v 5155 return s 5156} 5157 5158// SetTableMetadataList sets the TableMetadataList field's value. 5159func (s *ListTableMetadataOutput) SetTableMetadataList(v []*TableMetadata) *ListTableMetadataOutput { 5160 s.TableMetadataList = v 5161 return s 5162} 5163 5164type ListTagsForResourceInput struct { 5165 _ struct{} `type:"structure"` 5166 5167 // The maximum number of results to be returned per request that lists the tags 5168 // for the resource. 5169 MaxResults *int64 `min:"75" type:"integer"` 5170 5171 // The token for the next set of results, or null if there are no additional 5172 // results for this request, where the request lists the tags for the resource 5173 // with the specified ARN. 5174 NextToken *string `min:"1" type:"string"` 5175 5176 // Lists the tags for the resource with the specified ARN. 5177 // 5178 // ResourceARN is a required field 5179 ResourceARN *string `min:"1" type:"string" required:"true"` 5180} 5181 5182// String returns the string representation 5183func (s ListTagsForResourceInput) String() string { 5184 return awsutil.Prettify(s) 5185} 5186 5187// GoString returns the string representation 5188func (s ListTagsForResourceInput) GoString() string { 5189 return s.String() 5190} 5191 5192// Validate inspects the fields of the type to determine if they are valid. 5193func (s *ListTagsForResourceInput) Validate() error { 5194 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 5195 if s.MaxResults != nil && *s.MaxResults < 75 { 5196 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 75)) 5197 } 5198 if s.NextToken != nil && len(*s.NextToken) < 1 { 5199 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5200 } 5201 if s.ResourceARN == nil { 5202 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 5203 } 5204 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 5205 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 5206 } 5207 5208 if invalidParams.Len() > 0 { 5209 return invalidParams 5210 } 5211 return nil 5212} 5213 5214// SetMaxResults sets the MaxResults field's value. 5215func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { 5216 s.MaxResults = &v 5217 return s 5218} 5219 5220// SetNextToken sets the NextToken field's value. 5221func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { 5222 s.NextToken = &v 5223 return s 5224} 5225 5226// SetResourceARN sets the ResourceARN field's value. 5227func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { 5228 s.ResourceARN = &v 5229 return s 5230} 5231 5232type ListTagsForResourceOutput struct { 5233 _ struct{} `type:"structure"` 5234 5235 // A token to be used by the next request if this request is truncated. 5236 NextToken *string `min:"1" type:"string"` 5237 5238 // The list of tags associated with the specified resource. 5239 Tags []*Tag `type:"list"` 5240} 5241 5242// String returns the string representation 5243func (s ListTagsForResourceOutput) String() string { 5244 return awsutil.Prettify(s) 5245} 5246 5247// GoString returns the string representation 5248func (s ListTagsForResourceOutput) GoString() string { 5249 return s.String() 5250} 5251 5252// SetNextToken sets the NextToken field's value. 5253func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { 5254 s.NextToken = &v 5255 return s 5256} 5257 5258// SetTags sets the Tags field's value. 5259func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 5260 s.Tags = v 5261 return s 5262} 5263 5264type ListWorkGroupsInput struct { 5265 _ struct{} `type:"structure"` 5266 5267 // The maximum number of workgroups to return in this request. 5268 MaxResults *int64 `min:"1" type:"integer"` 5269 5270 // A token generated by the Athena service that specifies where to continue 5271 // pagination if a previous request was truncated. To obtain the next set of 5272 // pages, pass in the NextToken from the response object of the previous page 5273 // call. 5274 NextToken *string `min:"1" type:"string"` 5275} 5276 5277// String returns the string representation 5278func (s ListWorkGroupsInput) String() string { 5279 return awsutil.Prettify(s) 5280} 5281 5282// GoString returns the string representation 5283func (s ListWorkGroupsInput) GoString() string { 5284 return s.String() 5285} 5286 5287// Validate inspects the fields of the type to determine if they are valid. 5288func (s *ListWorkGroupsInput) Validate() error { 5289 invalidParams := request.ErrInvalidParams{Context: "ListWorkGroupsInput"} 5290 if s.MaxResults != nil && *s.MaxResults < 1 { 5291 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 5292 } 5293 if s.NextToken != nil && len(*s.NextToken) < 1 { 5294 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 5295 } 5296 5297 if invalidParams.Len() > 0 { 5298 return invalidParams 5299 } 5300 return nil 5301} 5302 5303// SetMaxResults sets the MaxResults field's value. 5304func (s *ListWorkGroupsInput) SetMaxResults(v int64) *ListWorkGroupsInput { 5305 s.MaxResults = &v 5306 return s 5307} 5308 5309// SetNextToken sets the NextToken field's value. 5310func (s *ListWorkGroupsInput) SetNextToken(v string) *ListWorkGroupsInput { 5311 s.NextToken = &v 5312 return s 5313} 5314 5315type ListWorkGroupsOutput struct { 5316 _ struct{} `type:"structure"` 5317 5318 // A token generated by the Athena service that specifies where to continue 5319 // pagination if a previous request was truncated. To obtain the next set of 5320 // pages, pass in the NextToken from the response object of the previous page 5321 // call. 5322 NextToken *string `min:"1" type:"string"` 5323 5324 // The list of workgroups, including their names, descriptions, creation times, 5325 // and states. 5326 WorkGroups []*WorkGroupSummary `type:"list"` 5327} 5328 5329// String returns the string representation 5330func (s ListWorkGroupsOutput) String() string { 5331 return awsutil.Prettify(s) 5332} 5333 5334// GoString returns the string representation 5335func (s ListWorkGroupsOutput) GoString() string { 5336 return s.String() 5337} 5338 5339// SetNextToken sets the NextToken field's value. 5340func (s *ListWorkGroupsOutput) SetNextToken(v string) *ListWorkGroupsOutput { 5341 s.NextToken = &v 5342 return s 5343} 5344 5345// SetWorkGroups sets the WorkGroups field's value. 5346func (s *ListWorkGroupsOutput) SetWorkGroups(v []*WorkGroupSummary) *ListWorkGroupsOutput { 5347 s.WorkGroups = v 5348 return s 5349} 5350 5351// An exception that Athena received when it called a custom metastore. Occurs 5352// if the error is not caused by user input (InvalidRequestException) or from 5353// the Athena platform (InternalServerException). For example, if a user-created 5354// Lambda function is missing permissions, the Lambda 4XX exception is returned 5355// in a MetadataException. 5356type MetadataException struct { 5357 _ struct{} `type:"structure"` 5358 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5359 5360 Message_ *string `locationName:"Message" type:"string"` 5361} 5362 5363// String returns the string representation 5364func (s MetadataException) String() string { 5365 return awsutil.Prettify(s) 5366} 5367 5368// GoString returns the string representation 5369func (s MetadataException) GoString() string { 5370 return s.String() 5371} 5372 5373func newErrorMetadataException(v protocol.ResponseMetadata) error { 5374 return &MetadataException{ 5375 RespMetadata: v, 5376 } 5377} 5378 5379// Code returns the exception type name. 5380func (s *MetadataException) Code() string { 5381 return "MetadataException" 5382} 5383 5384// Message returns the exception's message. 5385func (s *MetadataException) Message() string { 5386 if s.Message_ != nil { 5387 return *s.Message_ 5388 } 5389 return "" 5390} 5391 5392// OrigErr always returns nil, satisfies awserr.Error interface. 5393func (s *MetadataException) OrigErr() error { 5394 return nil 5395} 5396 5397func (s *MetadataException) Error() string { 5398 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5399} 5400 5401// Status code returns the HTTP status code for the request's response error. 5402func (s *MetadataException) StatusCode() int { 5403 return s.RespMetadata.StatusCode 5404} 5405 5406// RequestID returns the service's response RequestID for request. 5407func (s *MetadataException) RequestID() string { 5408 return s.RespMetadata.RequestID 5409} 5410 5411// A query, where QueryString is the list of SQL query statements that comprise 5412// the query. 5413type NamedQuery struct { 5414 _ struct{} `type:"structure"` 5415 5416 // The database to which the query belongs. 5417 // 5418 // Database is a required field 5419 Database *string `min:"1" type:"string" required:"true"` 5420 5421 // The query description. 5422 Description *string `min:"1" type:"string"` 5423 5424 // The query name. 5425 // 5426 // Name is a required field 5427 Name *string `min:"1" type:"string" required:"true"` 5428 5429 // The unique identifier of the query. 5430 NamedQueryId *string `type:"string"` 5431 5432 // The SQL query statements that comprise the query. 5433 // 5434 // QueryString is a required field 5435 QueryString *string `min:"1" type:"string" required:"true"` 5436 5437 // The name of the workgroup that contains the named query. 5438 WorkGroup *string `type:"string"` 5439} 5440 5441// String returns the string representation 5442func (s NamedQuery) String() string { 5443 return awsutil.Prettify(s) 5444} 5445 5446// GoString returns the string representation 5447func (s NamedQuery) GoString() string { 5448 return s.String() 5449} 5450 5451// SetDatabase sets the Database field's value. 5452func (s *NamedQuery) SetDatabase(v string) *NamedQuery { 5453 s.Database = &v 5454 return s 5455} 5456 5457// SetDescription sets the Description field's value. 5458func (s *NamedQuery) SetDescription(v string) *NamedQuery { 5459 s.Description = &v 5460 return s 5461} 5462 5463// SetName sets the Name field's value. 5464func (s *NamedQuery) SetName(v string) *NamedQuery { 5465 s.Name = &v 5466 return s 5467} 5468 5469// SetNamedQueryId sets the NamedQueryId field's value. 5470func (s *NamedQuery) SetNamedQueryId(v string) *NamedQuery { 5471 s.NamedQueryId = &v 5472 return s 5473} 5474 5475// SetQueryString sets the QueryString field's value. 5476func (s *NamedQuery) SetQueryString(v string) *NamedQuery { 5477 s.QueryString = &v 5478 return s 5479} 5480 5481// SetWorkGroup sets the WorkGroup field's value. 5482func (s *NamedQuery) SetWorkGroup(v string) *NamedQuery { 5483 s.WorkGroup = &v 5484 return s 5485} 5486 5487// Information about a single instance of a query execution. 5488type QueryExecution struct { 5489 _ struct{} `type:"structure"` 5490 5491 // The SQL query statements which the query execution ran. 5492 Query *string `min:"1" type:"string"` 5493 5494 // The database in which the query execution occurred. 5495 QueryExecutionContext *QueryExecutionContext `type:"structure"` 5496 5497 // The unique identifier for each query execution. 5498 QueryExecutionId *string `type:"string"` 5499 5500 // The location in Amazon S3 where query results were stored and the encryption 5501 // option, if any, used for query results. These are known as "client-side settings". 5502 // If workgroup settings override client-side settings, then the query uses 5503 // the location for the query results and the encryption configuration that 5504 // are specified for the workgroup. 5505 ResultConfiguration *ResultConfiguration `type:"structure"` 5506 5507 // The type of query statement that was run. DDL indicates DDL query statements. 5508 // DML indicates DML (Data Manipulation Language) query statements, such as 5509 // CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL 5510 // and DML, such as SHOW CREATE TABLE, or DESCRIBE <table>. 5511 StatementType *string `type:"string" enum:"StatementType"` 5512 5513 // Query execution statistics, such as the amount of data scanned, the amount 5514 // of time that the query took to process, and the type of statement that was 5515 // run. 5516 Statistics *QueryExecutionStatistics `type:"structure"` 5517 5518 // The completion date, current state, submission time, and state change reason 5519 // (if applicable) for the query execution. 5520 Status *QueryExecutionStatus `type:"structure"` 5521 5522 // The name of the workgroup in which the query ran. 5523 WorkGroup *string `type:"string"` 5524} 5525 5526// String returns the string representation 5527func (s QueryExecution) String() string { 5528 return awsutil.Prettify(s) 5529} 5530 5531// GoString returns the string representation 5532func (s QueryExecution) GoString() string { 5533 return s.String() 5534} 5535 5536// SetQuery sets the Query field's value. 5537func (s *QueryExecution) SetQuery(v string) *QueryExecution { 5538 s.Query = &v 5539 return s 5540} 5541 5542// SetQueryExecutionContext sets the QueryExecutionContext field's value. 5543func (s *QueryExecution) SetQueryExecutionContext(v *QueryExecutionContext) *QueryExecution { 5544 s.QueryExecutionContext = v 5545 return s 5546} 5547 5548// SetQueryExecutionId sets the QueryExecutionId field's value. 5549func (s *QueryExecution) SetQueryExecutionId(v string) *QueryExecution { 5550 s.QueryExecutionId = &v 5551 return s 5552} 5553 5554// SetResultConfiguration sets the ResultConfiguration field's value. 5555func (s *QueryExecution) SetResultConfiguration(v *ResultConfiguration) *QueryExecution { 5556 s.ResultConfiguration = v 5557 return s 5558} 5559 5560// SetStatementType sets the StatementType field's value. 5561func (s *QueryExecution) SetStatementType(v string) *QueryExecution { 5562 s.StatementType = &v 5563 return s 5564} 5565 5566// SetStatistics sets the Statistics field's value. 5567func (s *QueryExecution) SetStatistics(v *QueryExecutionStatistics) *QueryExecution { 5568 s.Statistics = v 5569 return s 5570} 5571 5572// SetStatus sets the Status field's value. 5573func (s *QueryExecution) SetStatus(v *QueryExecutionStatus) *QueryExecution { 5574 s.Status = v 5575 return s 5576} 5577 5578// SetWorkGroup sets the WorkGroup field's value. 5579func (s *QueryExecution) SetWorkGroup(v string) *QueryExecution { 5580 s.WorkGroup = &v 5581 return s 5582} 5583 5584// The database and data catalog context in which the query execution occurs. 5585type QueryExecutionContext struct { 5586 _ struct{} `type:"structure"` 5587 5588 // The name of the data catalog used in the query execution. 5589 Catalog *string `min:"1" type:"string"` 5590 5591 // The name of the database used in the query execution. 5592 Database *string `min:"1" type:"string"` 5593} 5594 5595// String returns the string representation 5596func (s QueryExecutionContext) String() string { 5597 return awsutil.Prettify(s) 5598} 5599 5600// GoString returns the string representation 5601func (s QueryExecutionContext) GoString() string { 5602 return s.String() 5603} 5604 5605// Validate inspects the fields of the type to determine if they are valid. 5606func (s *QueryExecutionContext) Validate() error { 5607 invalidParams := request.ErrInvalidParams{Context: "QueryExecutionContext"} 5608 if s.Catalog != nil && len(*s.Catalog) < 1 { 5609 invalidParams.Add(request.NewErrParamMinLen("Catalog", 1)) 5610 } 5611 if s.Database != nil && len(*s.Database) < 1 { 5612 invalidParams.Add(request.NewErrParamMinLen("Database", 1)) 5613 } 5614 5615 if invalidParams.Len() > 0 { 5616 return invalidParams 5617 } 5618 return nil 5619} 5620 5621// SetCatalog sets the Catalog field's value. 5622func (s *QueryExecutionContext) SetCatalog(v string) *QueryExecutionContext { 5623 s.Catalog = &v 5624 return s 5625} 5626 5627// SetDatabase sets the Database field's value. 5628func (s *QueryExecutionContext) SetDatabase(v string) *QueryExecutionContext { 5629 s.Database = &v 5630 return s 5631} 5632 5633// The amount of data scanned during the query execution and the amount of time 5634// that it took to execute, and the type of statement that was run. 5635type QueryExecutionStatistics struct { 5636 _ struct{} `type:"structure"` 5637 5638 // The location and file name of a data manifest file. The manifest file is 5639 // saved to the Athena query results location in Amazon S3. The manifest file 5640 // tracks files that the query wrote to Amazon S3. If the query fails, the manifest 5641 // file also tracks files that the query intended to write. The manifest is 5642 // useful for identifying orphaned files resulting from a failed query. For 5643 // more information, see Working with Query Results, Output Files, and Query 5644 // History (https://docs.aws.amazon.com/athena/latest/ug/querying.html) in the 5645 // Amazon Athena User Guide. 5646 DataManifestLocation *string `type:"string"` 5647 5648 // The number of bytes in the data that was queried. 5649 DataScannedInBytes *int64 `type:"long"` 5650 5651 // The number of milliseconds that the query took to execute. 5652 EngineExecutionTimeInMillis *int64 `type:"long"` 5653 5654 // The number of milliseconds that Athena took to plan the query processing 5655 // flow. This includes the time spent retrieving table partitions from the data 5656 // source. Note that because the query engine performs the query planning, query 5657 // planning time is a subset of engine processing time. 5658 QueryPlanningTimeInMillis *int64 `type:"long"` 5659 5660 // The number of milliseconds that the query was in your query queue waiting 5661 // for resources. Note that if transient errors occur, Athena might automatically 5662 // add the query back to the queue. 5663 QueryQueueTimeInMillis *int64 `type:"long"` 5664 5665 // The number of milliseconds that Athena took to finalize and publish the query 5666 // results after the query engine finished running the query. 5667 ServiceProcessingTimeInMillis *int64 `type:"long"` 5668 5669 // The number of milliseconds that Athena took to run the query. 5670 TotalExecutionTimeInMillis *int64 `type:"long"` 5671} 5672 5673// String returns the string representation 5674func (s QueryExecutionStatistics) String() string { 5675 return awsutil.Prettify(s) 5676} 5677 5678// GoString returns the string representation 5679func (s QueryExecutionStatistics) GoString() string { 5680 return s.String() 5681} 5682 5683// SetDataManifestLocation sets the DataManifestLocation field's value. 5684func (s *QueryExecutionStatistics) SetDataManifestLocation(v string) *QueryExecutionStatistics { 5685 s.DataManifestLocation = &v 5686 return s 5687} 5688 5689// SetDataScannedInBytes sets the DataScannedInBytes field's value. 5690func (s *QueryExecutionStatistics) SetDataScannedInBytes(v int64) *QueryExecutionStatistics { 5691 s.DataScannedInBytes = &v 5692 return s 5693} 5694 5695// SetEngineExecutionTimeInMillis sets the EngineExecutionTimeInMillis field's value. 5696func (s *QueryExecutionStatistics) SetEngineExecutionTimeInMillis(v int64) *QueryExecutionStatistics { 5697 s.EngineExecutionTimeInMillis = &v 5698 return s 5699} 5700 5701// SetQueryPlanningTimeInMillis sets the QueryPlanningTimeInMillis field's value. 5702func (s *QueryExecutionStatistics) SetQueryPlanningTimeInMillis(v int64) *QueryExecutionStatistics { 5703 s.QueryPlanningTimeInMillis = &v 5704 return s 5705} 5706 5707// SetQueryQueueTimeInMillis sets the QueryQueueTimeInMillis field's value. 5708func (s *QueryExecutionStatistics) SetQueryQueueTimeInMillis(v int64) *QueryExecutionStatistics { 5709 s.QueryQueueTimeInMillis = &v 5710 return s 5711} 5712 5713// SetServiceProcessingTimeInMillis sets the ServiceProcessingTimeInMillis field's value. 5714func (s *QueryExecutionStatistics) SetServiceProcessingTimeInMillis(v int64) *QueryExecutionStatistics { 5715 s.ServiceProcessingTimeInMillis = &v 5716 return s 5717} 5718 5719// SetTotalExecutionTimeInMillis sets the TotalExecutionTimeInMillis field's value. 5720func (s *QueryExecutionStatistics) SetTotalExecutionTimeInMillis(v int64) *QueryExecutionStatistics { 5721 s.TotalExecutionTimeInMillis = &v 5722 return s 5723} 5724 5725// The completion date, current state, submission time, and state change reason 5726// (if applicable) for the query execution. 5727type QueryExecutionStatus struct { 5728 _ struct{} `type:"structure"` 5729 5730 // The date and time that the query completed. 5731 CompletionDateTime *time.Time `type:"timestamp"` 5732 5733 // The state of query execution. QUEUED indicates that the query has been submitted 5734 // to the service, and Athena will execute the query as soon as resources are 5735 // available. RUNNING indicates that the query is in execution phase. SUCCEEDED 5736 // indicates that the query completed without errors. FAILED indicates that 5737 // the query experienced an error and did not complete processing. CANCELLED 5738 // indicates that a user input interrupted query execution. 5739 // 5740 // Athena automatically retries your queries in cases of certain transient errors. 5741 // As a result, you may see the query state transition from RUNNING or FAILED 5742 // to QUEUED. 5743 State *string `type:"string" enum:"QueryExecutionState"` 5744 5745 // Further detail about the status of the query. 5746 StateChangeReason *string `type:"string"` 5747 5748 // The date and time that the query was submitted. 5749 SubmissionDateTime *time.Time `type:"timestamp"` 5750} 5751 5752// String returns the string representation 5753func (s QueryExecutionStatus) String() string { 5754 return awsutil.Prettify(s) 5755} 5756 5757// GoString returns the string representation 5758func (s QueryExecutionStatus) GoString() string { 5759 return s.String() 5760} 5761 5762// SetCompletionDateTime sets the CompletionDateTime field's value. 5763func (s *QueryExecutionStatus) SetCompletionDateTime(v time.Time) *QueryExecutionStatus { 5764 s.CompletionDateTime = &v 5765 return s 5766} 5767 5768// SetState sets the State field's value. 5769func (s *QueryExecutionStatus) SetState(v string) *QueryExecutionStatus { 5770 s.State = &v 5771 return s 5772} 5773 5774// SetStateChangeReason sets the StateChangeReason field's value. 5775func (s *QueryExecutionStatus) SetStateChangeReason(v string) *QueryExecutionStatus { 5776 s.StateChangeReason = &v 5777 return s 5778} 5779 5780// SetSubmissionDateTime sets the SubmissionDateTime field's value. 5781func (s *QueryExecutionStatus) SetSubmissionDateTime(v time.Time) *QueryExecutionStatus { 5782 s.SubmissionDateTime = &v 5783 return s 5784} 5785 5786// A resource, such as a workgroup, was not found. 5787type ResourceNotFoundException struct { 5788 _ struct{} `type:"structure"` 5789 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5790 5791 Message_ *string `locationName:"Message" type:"string"` 5792 5793 ResourceName *string `min:"1" type:"string"` 5794} 5795 5796// String returns the string representation 5797func (s ResourceNotFoundException) String() string { 5798 return awsutil.Prettify(s) 5799} 5800 5801// GoString returns the string representation 5802func (s ResourceNotFoundException) GoString() string { 5803 return s.String() 5804} 5805 5806func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 5807 return &ResourceNotFoundException{ 5808 RespMetadata: v, 5809 } 5810} 5811 5812// Code returns the exception type name. 5813func (s *ResourceNotFoundException) Code() string { 5814 return "ResourceNotFoundException" 5815} 5816 5817// Message returns the exception's message. 5818func (s *ResourceNotFoundException) Message() string { 5819 if s.Message_ != nil { 5820 return *s.Message_ 5821 } 5822 return "" 5823} 5824 5825// OrigErr always returns nil, satisfies awserr.Error interface. 5826func (s *ResourceNotFoundException) OrigErr() error { 5827 return nil 5828} 5829 5830func (s *ResourceNotFoundException) Error() string { 5831 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 5832} 5833 5834// Status code returns the HTTP status code for the request's response error. 5835func (s *ResourceNotFoundException) StatusCode() int { 5836 return s.RespMetadata.StatusCode 5837} 5838 5839// RequestID returns the service's response RequestID for request. 5840func (s *ResourceNotFoundException) RequestID() string { 5841 return s.RespMetadata.RequestID 5842} 5843 5844// The location in Amazon S3 where query results are stored and the encryption 5845// option, if any, used for query results. These are known as "client-side settings". 5846// If workgroup settings override client-side settings, then the query uses 5847// the workgroup settings. 5848type ResultConfiguration struct { 5849 _ struct{} `type:"structure"` 5850 5851 // If query results are encrypted in Amazon S3, indicates the encryption option 5852 // used (for example, SSE-KMS or CSE-KMS) and key information. This is a client-side 5853 // setting. If workgroup settings override client-side settings, then the query 5854 // uses the encryption configuration that is specified for the workgroup, and 5855 // also uses the location for storing query results specified in the workgroup. 5856 // See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings 5857 // Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 5858 EncryptionConfiguration *EncryptionConfiguration `type:"structure"` 5859 5860 // The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. 5861 // To run the query, you must specify the query results location using one of 5862 // the ways: either for individual queries using either this setting (client-side), 5863 // or in the workgroup, using WorkGroupConfiguration. If none of them is set, 5864 // Athena issues an error that no output location is provided. For more information, 5865 // see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html). 5866 // If workgroup settings override client-side settings, then the query uses 5867 // the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. 5868 OutputLocation *string `type:"string"` 5869} 5870 5871// String returns the string representation 5872func (s ResultConfiguration) String() string { 5873 return awsutil.Prettify(s) 5874} 5875 5876// GoString returns the string representation 5877func (s ResultConfiguration) GoString() string { 5878 return s.String() 5879} 5880 5881// Validate inspects the fields of the type to determine if they are valid. 5882func (s *ResultConfiguration) Validate() error { 5883 invalidParams := request.ErrInvalidParams{Context: "ResultConfiguration"} 5884 if s.EncryptionConfiguration != nil { 5885 if err := s.EncryptionConfiguration.Validate(); err != nil { 5886 invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) 5887 } 5888 } 5889 5890 if invalidParams.Len() > 0 { 5891 return invalidParams 5892 } 5893 return nil 5894} 5895 5896// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. 5897func (s *ResultConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *ResultConfiguration { 5898 s.EncryptionConfiguration = v 5899 return s 5900} 5901 5902// SetOutputLocation sets the OutputLocation field's value. 5903func (s *ResultConfiguration) SetOutputLocation(v string) *ResultConfiguration { 5904 s.OutputLocation = &v 5905 return s 5906} 5907 5908// The information about the updates in the query results, such as output location 5909// and encryption configuration for the query results. 5910type ResultConfigurationUpdates struct { 5911 _ struct{} `type:"structure"` 5912 5913 // The encryption configuration for the query results. 5914 EncryptionConfiguration *EncryptionConfiguration `type:"structure"` 5915 5916 // The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. 5917 // For more information, see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html) 5918 // If workgroup settings override client-side settings, then the query uses 5919 // the location for the query results and the encryption configuration that 5920 // are specified for the workgroup. The "workgroup settings override" is specified 5921 // in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. 5922 // See WorkGroupConfiguration$EnforceWorkGroupConfiguration. 5923 OutputLocation *string `type:"string"` 5924 5925 // If set to "true", indicates that the previously-specified encryption configuration 5926 // (also known as the client-side setting) for queries in this workgroup should 5927 // be ignored and set to null. If set to "false" or not set, and a value is 5928 // present in the EncryptionConfiguration in ResultConfigurationUpdates (the 5929 // client-side setting), the EncryptionConfiguration in the workgroup's ResultConfiguration 5930 // will be updated with the new value. For more information, see Workgroup Settings 5931 // Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 5932 RemoveEncryptionConfiguration *bool `type:"boolean"` 5933 5934 // If set to "true", indicates that the previously-specified query results location 5935 // (also known as a client-side setting) for queries in this workgroup should 5936 // be ignored and set to null. If set to "false" or not set, and a value is 5937 // present in the OutputLocation in ResultConfigurationUpdates (the client-side 5938 // setting), the OutputLocation in the workgroup's ResultConfiguration will 5939 // be updated with the new value. For more information, see Workgroup Settings 5940 // Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 5941 RemoveOutputLocation *bool `type:"boolean"` 5942} 5943 5944// String returns the string representation 5945func (s ResultConfigurationUpdates) String() string { 5946 return awsutil.Prettify(s) 5947} 5948 5949// GoString returns the string representation 5950func (s ResultConfigurationUpdates) GoString() string { 5951 return s.String() 5952} 5953 5954// Validate inspects the fields of the type to determine if they are valid. 5955func (s *ResultConfigurationUpdates) Validate() error { 5956 invalidParams := request.ErrInvalidParams{Context: "ResultConfigurationUpdates"} 5957 if s.EncryptionConfiguration != nil { 5958 if err := s.EncryptionConfiguration.Validate(); err != nil { 5959 invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams)) 5960 } 5961 } 5962 5963 if invalidParams.Len() > 0 { 5964 return invalidParams 5965 } 5966 return nil 5967} 5968 5969// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. 5970func (s *ResultConfigurationUpdates) SetEncryptionConfiguration(v *EncryptionConfiguration) *ResultConfigurationUpdates { 5971 s.EncryptionConfiguration = v 5972 return s 5973} 5974 5975// SetOutputLocation sets the OutputLocation field's value. 5976func (s *ResultConfigurationUpdates) SetOutputLocation(v string) *ResultConfigurationUpdates { 5977 s.OutputLocation = &v 5978 return s 5979} 5980 5981// SetRemoveEncryptionConfiguration sets the RemoveEncryptionConfiguration field's value. 5982func (s *ResultConfigurationUpdates) SetRemoveEncryptionConfiguration(v bool) *ResultConfigurationUpdates { 5983 s.RemoveEncryptionConfiguration = &v 5984 return s 5985} 5986 5987// SetRemoveOutputLocation sets the RemoveOutputLocation field's value. 5988func (s *ResultConfigurationUpdates) SetRemoveOutputLocation(v bool) *ResultConfigurationUpdates { 5989 s.RemoveOutputLocation = &v 5990 return s 5991} 5992 5993// The metadata and rows that comprise a query result set. The metadata describes 5994// the column structure and data types. To return a ResultSet object, use GetQueryResults. 5995type ResultSet struct { 5996 _ struct{} `type:"structure"` 5997 5998 // The metadata that describes the column structure and data types of a table 5999 // of query results. 6000 ResultSetMetadata *ResultSetMetadata `type:"structure"` 6001 6002 // The rows in the table. 6003 Rows []*Row `type:"list"` 6004} 6005 6006// String returns the string representation 6007func (s ResultSet) String() string { 6008 return awsutil.Prettify(s) 6009} 6010 6011// GoString returns the string representation 6012func (s ResultSet) GoString() string { 6013 return s.String() 6014} 6015 6016// SetResultSetMetadata sets the ResultSetMetadata field's value. 6017func (s *ResultSet) SetResultSetMetadata(v *ResultSetMetadata) *ResultSet { 6018 s.ResultSetMetadata = v 6019 return s 6020} 6021 6022// SetRows sets the Rows field's value. 6023func (s *ResultSet) SetRows(v []*Row) *ResultSet { 6024 s.Rows = v 6025 return s 6026} 6027 6028// The metadata that describes the column structure and data types of a table 6029// of query results. To return a ResultSetMetadata object, use GetQueryResults. 6030type ResultSetMetadata struct { 6031 _ struct{} `type:"structure"` 6032 6033 // Information about the columns returned in a query result metadata. 6034 ColumnInfo []*ColumnInfo `type:"list"` 6035} 6036 6037// String returns the string representation 6038func (s ResultSetMetadata) String() string { 6039 return awsutil.Prettify(s) 6040} 6041 6042// GoString returns the string representation 6043func (s ResultSetMetadata) GoString() string { 6044 return s.String() 6045} 6046 6047// SetColumnInfo sets the ColumnInfo field's value. 6048func (s *ResultSetMetadata) SetColumnInfo(v []*ColumnInfo) *ResultSetMetadata { 6049 s.ColumnInfo = v 6050 return s 6051} 6052 6053// The rows that comprise a query result table. 6054type Row struct { 6055 _ struct{} `type:"structure"` 6056 6057 // The data that populates a row in a query result table. 6058 Data []*Datum `type:"list"` 6059} 6060 6061// String returns the string representation 6062func (s Row) String() string { 6063 return awsutil.Prettify(s) 6064} 6065 6066// GoString returns the string representation 6067func (s Row) GoString() string { 6068 return s.String() 6069} 6070 6071// SetData sets the Data field's value. 6072func (s *Row) SetData(v []*Datum) *Row { 6073 s.Data = v 6074 return s 6075} 6076 6077type StartQueryExecutionInput struct { 6078 _ struct{} `type:"structure"` 6079 6080 // A unique case-sensitive string used to ensure the request to create the query 6081 // is idempotent (executes only once). If another StartQueryExecution request 6082 // is received, the same response is returned and another query is not created. 6083 // If a parameter has changed, for example, the QueryString, an error is returned. 6084 // 6085 // This token is listed as not required because AWS SDKs (for example the AWS 6086 // SDK for Java) auto-generate the token for users. If you are not using the 6087 // AWS SDK or the AWS CLI, you must provide this token or the action will fail. 6088 ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"` 6089 6090 // The database within which the query executes. 6091 QueryExecutionContext *QueryExecutionContext `type:"structure"` 6092 6093 // The SQL query statements to be executed. 6094 // 6095 // QueryString is a required field 6096 QueryString *string `min:"1" type:"string" required:"true"` 6097 6098 // Specifies information about where and how to save the results of the query 6099 // execution. If the query runs in a workgroup, then workgroup's settings may 6100 // override query settings. This affects the query results location. The workgroup 6101 // settings override is specified in EnforceWorkGroupConfiguration (true/false) 6102 // in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. 6103 ResultConfiguration *ResultConfiguration `type:"structure"` 6104 6105 // The name of the workgroup in which the query is being started. 6106 WorkGroup *string `type:"string"` 6107} 6108 6109// String returns the string representation 6110func (s StartQueryExecutionInput) String() string { 6111 return awsutil.Prettify(s) 6112} 6113 6114// GoString returns the string representation 6115func (s StartQueryExecutionInput) GoString() string { 6116 return s.String() 6117} 6118 6119// Validate inspects the fields of the type to determine if they are valid. 6120func (s *StartQueryExecutionInput) Validate() error { 6121 invalidParams := request.ErrInvalidParams{Context: "StartQueryExecutionInput"} 6122 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 { 6123 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32)) 6124 } 6125 if s.QueryString == nil { 6126 invalidParams.Add(request.NewErrParamRequired("QueryString")) 6127 } 6128 if s.QueryString != nil && len(*s.QueryString) < 1 { 6129 invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) 6130 } 6131 if s.QueryExecutionContext != nil { 6132 if err := s.QueryExecutionContext.Validate(); err != nil { 6133 invalidParams.AddNested("QueryExecutionContext", err.(request.ErrInvalidParams)) 6134 } 6135 } 6136 if s.ResultConfiguration != nil { 6137 if err := s.ResultConfiguration.Validate(); err != nil { 6138 invalidParams.AddNested("ResultConfiguration", err.(request.ErrInvalidParams)) 6139 } 6140 } 6141 6142 if invalidParams.Len() > 0 { 6143 return invalidParams 6144 } 6145 return nil 6146} 6147 6148// SetClientRequestToken sets the ClientRequestToken field's value. 6149func (s *StartQueryExecutionInput) SetClientRequestToken(v string) *StartQueryExecutionInput { 6150 s.ClientRequestToken = &v 6151 return s 6152} 6153 6154// SetQueryExecutionContext sets the QueryExecutionContext field's value. 6155func (s *StartQueryExecutionInput) SetQueryExecutionContext(v *QueryExecutionContext) *StartQueryExecutionInput { 6156 s.QueryExecutionContext = v 6157 return s 6158} 6159 6160// SetQueryString sets the QueryString field's value. 6161func (s *StartQueryExecutionInput) SetQueryString(v string) *StartQueryExecutionInput { 6162 s.QueryString = &v 6163 return s 6164} 6165 6166// SetResultConfiguration sets the ResultConfiguration field's value. 6167func (s *StartQueryExecutionInput) SetResultConfiguration(v *ResultConfiguration) *StartQueryExecutionInput { 6168 s.ResultConfiguration = v 6169 return s 6170} 6171 6172// SetWorkGroup sets the WorkGroup field's value. 6173func (s *StartQueryExecutionInput) SetWorkGroup(v string) *StartQueryExecutionInput { 6174 s.WorkGroup = &v 6175 return s 6176} 6177 6178type StartQueryExecutionOutput struct { 6179 _ struct{} `type:"structure"` 6180 6181 // The unique ID of the query that ran as a result of this request. 6182 QueryExecutionId *string `type:"string"` 6183} 6184 6185// String returns the string representation 6186func (s StartQueryExecutionOutput) String() string { 6187 return awsutil.Prettify(s) 6188} 6189 6190// GoString returns the string representation 6191func (s StartQueryExecutionOutput) GoString() string { 6192 return s.String() 6193} 6194 6195// SetQueryExecutionId sets the QueryExecutionId field's value. 6196func (s *StartQueryExecutionOutput) SetQueryExecutionId(v string) *StartQueryExecutionOutput { 6197 s.QueryExecutionId = &v 6198 return s 6199} 6200 6201type StopQueryExecutionInput struct { 6202 _ struct{} `type:"structure"` 6203 6204 // The unique ID of the query execution to stop. 6205 QueryExecutionId *string `type:"string" idempotencyToken:"true"` 6206} 6207 6208// String returns the string representation 6209func (s StopQueryExecutionInput) String() string { 6210 return awsutil.Prettify(s) 6211} 6212 6213// GoString returns the string representation 6214func (s StopQueryExecutionInput) GoString() string { 6215 return s.String() 6216} 6217 6218// SetQueryExecutionId sets the QueryExecutionId field's value. 6219func (s *StopQueryExecutionInput) SetQueryExecutionId(v string) *StopQueryExecutionInput { 6220 s.QueryExecutionId = &v 6221 return s 6222} 6223 6224type StopQueryExecutionOutput struct { 6225 _ struct{} `type:"structure"` 6226} 6227 6228// String returns the string representation 6229func (s StopQueryExecutionOutput) String() string { 6230 return awsutil.Prettify(s) 6231} 6232 6233// GoString returns the string representation 6234func (s StopQueryExecutionOutput) GoString() string { 6235 return s.String() 6236} 6237 6238// Contains metadata for a table. 6239type TableMetadata struct { 6240 _ struct{} `type:"structure"` 6241 6242 // A list of the columns in the table. 6243 Columns []*Column `type:"list"` 6244 6245 // The time that the table was created. 6246 CreateTime *time.Time `type:"timestamp"` 6247 6248 // The last time the table was accessed. 6249 LastAccessTime *time.Time `type:"timestamp"` 6250 6251 // The name of the table. 6252 // 6253 // Name is a required field 6254 Name *string `min:"1" type:"string" required:"true"` 6255 6256 // A set of custom key/value pairs for table properties. 6257 Parameters map[string]*string `type:"map"` 6258 6259 // A list of the partition keys in the table. 6260 PartitionKeys []*Column `type:"list"` 6261 6262 // The type of table. In Athena, only EXTERNAL_TABLE is supported. 6263 TableType *string `type:"string"` 6264} 6265 6266// String returns the string representation 6267func (s TableMetadata) String() string { 6268 return awsutil.Prettify(s) 6269} 6270 6271// GoString returns the string representation 6272func (s TableMetadata) GoString() string { 6273 return s.String() 6274} 6275 6276// SetColumns sets the Columns field's value. 6277func (s *TableMetadata) SetColumns(v []*Column) *TableMetadata { 6278 s.Columns = v 6279 return s 6280} 6281 6282// SetCreateTime sets the CreateTime field's value. 6283func (s *TableMetadata) SetCreateTime(v time.Time) *TableMetadata { 6284 s.CreateTime = &v 6285 return s 6286} 6287 6288// SetLastAccessTime sets the LastAccessTime field's value. 6289func (s *TableMetadata) SetLastAccessTime(v time.Time) *TableMetadata { 6290 s.LastAccessTime = &v 6291 return s 6292} 6293 6294// SetName sets the Name field's value. 6295func (s *TableMetadata) SetName(v string) *TableMetadata { 6296 s.Name = &v 6297 return s 6298} 6299 6300// SetParameters sets the Parameters field's value. 6301func (s *TableMetadata) SetParameters(v map[string]*string) *TableMetadata { 6302 s.Parameters = v 6303 return s 6304} 6305 6306// SetPartitionKeys sets the PartitionKeys field's value. 6307func (s *TableMetadata) SetPartitionKeys(v []*Column) *TableMetadata { 6308 s.PartitionKeys = v 6309 return s 6310} 6311 6312// SetTableType sets the TableType field's value. 6313func (s *TableMetadata) SetTableType(v string) *TableMetadata { 6314 s.TableType = &v 6315 return s 6316} 6317 6318// A label that you assign to a resource. In Athena, a resource can be a workgroup 6319// or data catalog. Each tag consists of a key and an optional value, both of 6320// which you define. For example, you can use tags to categorize Athena workgroups 6321// or data catalogs by purpose, owner, or environment. Use a consistent set 6322// of tag keys to make it easier to search and filter workgroups or data catalogs 6323// in your account. For best practices, see Tagging Best Practices (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). 6324// Tag keys can be from 1 to 128 UTF-8 Unicode characters, and tag values can 6325// be from 0 to 256 UTF-8 Unicode characters. Tags can use letters and numbers 6326// representable in UTF-8, and the following characters: + - = . _ : / @. Tag 6327// keys and values are case-sensitive. Tag keys must be unique per resource. 6328// If you specify more than one tag, separate them by commas. 6329type Tag struct { 6330 _ struct{} `type:"structure"` 6331 6332 // A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. 6333 // You can use letters and numbers representable in UTF-8, and the following 6334 // characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique 6335 // per resource. 6336 Key *string `min:"1" type:"string"` 6337 6338 // A tag value. The tag value length is from 0 to 256 Unicode characters in 6339 // UTF-8. You can use letters and numbers representable in UTF-8, and the following 6340 // characters: + - = . _ : / @. Tag values are case-sensitive. 6341 Value *string `type:"string"` 6342} 6343 6344// String returns the string representation 6345func (s Tag) String() string { 6346 return awsutil.Prettify(s) 6347} 6348 6349// GoString returns the string representation 6350func (s Tag) GoString() string { 6351 return s.String() 6352} 6353 6354// Validate inspects the fields of the type to determine if they are valid. 6355func (s *Tag) Validate() error { 6356 invalidParams := request.ErrInvalidParams{Context: "Tag"} 6357 if s.Key != nil && len(*s.Key) < 1 { 6358 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 6359 } 6360 6361 if invalidParams.Len() > 0 { 6362 return invalidParams 6363 } 6364 return nil 6365} 6366 6367// SetKey sets the Key field's value. 6368func (s *Tag) SetKey(v string) *Tag { 6369 s.Key = &v 6370 return s 6371} 6372 6373// SetValue sets the Value field's value. 6374func (s *Tag) SetValue(v string) *Tag { 6375 s.Value = &v 6376 return s 6377} 6378 6379type TagResourceInput struct { 6380 _ struct{} `type:"structure"` 6381 6382 // Specifies the ARN of the Athena resource (workgroup or data catalog) to which 6383 // tags are to be added. 6384 // 6385 // ResourceARN is a required field 6386 ResourceARN *string `min:"1" type:"string" required:"true"` 6387 6388 // A collection of one or more tags, separated by commas, to be added to an 6389 // Athena workgroup or data catalog resource. 6390 // 6391 // Tags is a required field 6392 Tags []*Tag `type:"list" required:"true"` 6393} 6394 6395// String returns the string representation 6396func (s TagResourceInput) String() string { 6397 return awsutil.Prettify(s) 6398} 6399 6400// GoString returns the string representation 6401func (s TagResourceInput) GoString() string { 6402 return s.String() 6403} 6404 6405// Validate inspects the fields of the type to determine if they are valid. 6406func (s *TagResourceInput) Validate() error { 6407 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 6408 if s.ResourceARN == nil { 6409 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 6410 } 6411 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 6412 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 6413 } 6414 if s.Tags == nil { 6415 invalidParams.Add(request.NewErrParamRequired("Tags")) 6416 } 6417 if s.Tags != nil { 6418 for i, v := range s.Tags { 6419 if v == nil { 6420 continue 6421 } 6422 if err := v.Validate(); err != nil { 6423 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 6424 } 6425 } 6426 } 6427 6428 if invalidParams.Len() > 0 { 6429 return invalidParams 6430 } 6431 return nil 6432} 6433 6434// SetResourceARN sets the ResourceARN field's value. 6435func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { 6436 s.ResourceARN = &v 6437 return s 6438} 6439 6440// SetTags sets the Tags field's value. 6441func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 6442 s.Tags = v 6443 return s 6444} 6445 6446type TagResourceOutput struct { 6447 _ struct{} `type:"structure"` 6448} 6449 6450// String returns the string representation 6451func (s TagResourceOutput) String() string { 6452 return awsutil.Prettify(s) 6453} 6454 6455// GoString returns the string representation 6456func (s TagResourceOutput) GoString() string { 6457 return s.String() 6458} 6459 6460// Indicates that the request was throttled. 6461type TooManyRequestsException struct { 6462 _ struct{} `type:"structure"` 6463 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6464 6465 Message_ *string `locationName:"Message" type:"string"` 6466 6467 // The reason for the query throttling, for example, when it exceeds the concurrent 6468 // query limit. 6469 Reason *string `type:"string" enum:"ThrottleReason"` 6470} 6471 6472// String returns the string representation 6473func (s TooManyRequestsException) String() string { 6474 return awsutil.Prettify(s) 6475} 6476 6477// GoString returns the string representation 6478func (s TooManyRequestsException) GoString() string { 6479 return s.String() 6480} 6481 6482func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { 6483 return &TooManyRequestsException{ 6484 RespMetadata: v, 6485 } 6486} 6487 6488// Code returns the exception type name. 6489func (s *TooManyRequestsException) Code() string { 6490 return "TooManyRequestsException" 6491} 6492 6493// Message returns the exception's message. 6494func (s *TooManyRequestsException) Message() string { 6495 if s.Message_ != nil { 6496 return *s.Message_ 6497 } 6498 return "" 6499} 6500 6501// OrigErr always returns nil, satisfies awserr.Error interface. 6502func (s *TooManyRequestsException) OrigErr() error { 6503 return nil 6504} 6505 6506func (s *TooManyRequestsException) Error() string { 6507 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 6508} 6509 6510// Status code returns the HTTP status code for the request's response error. 6511func (s *TooManyRequestsException) StatusCode() int { 6512 return s.RespMetadata.StatusCode 6513} 6514 6515// RequestID returns the service's response RequestID for request. 6516func (s *TooManyRequestsException) RequestID() string { 6517 return s.RespMetadata.RequestID 6518} 6519 6520// Information about a named query ID that could not be processed. 6521type UnprocessedNamedQueryId struct { 6522 _ struct{} `type:"structure"` 6523 6524 // The error code returned when the processing request for the named query failed, 6525 // if applicable. 6526 ErrorCode *string `min:"1" type:"string"` 6527 6528 // The error message returned when the processing request for the named query 6529 // failed, if applicable. 6530 ErrorMessage *string `type:"string"` 6531 6532 // The unique identifier of the named query. 6533 NamedQueryId *string `type:"string"` 6534} 6535 6536// String returns the string representation 6537func (s UnprocessedNamedQueryId) String() string { 6538 return awsutil.Prettify(s) 6539} 6540 6541// GoString returns the string representation 6542func (s UnprocessedNamedQueryId) GoString() string { 6543 return s.String() 6544} 6545 6546// SetErrorCode sets the ErrorCode field's value. 6547func (s *UnprocessedNamedQueryId) SetErrorCode(v string) *UnprocessedNamedQueryId { 6548 s.ErrorCode = &v 6549 return s 6550} 6551 6552// SetErrorMessage sets the ErrorMessage field's value. 6553func (s *UnprocessedNamedQueryId) SetErrorMessage(v string) *UnprocessedNamedQueryId { 6554 s.ErrorMessage = &v 6555 return s 6556} 6557 6558// SetNamedQueryId sets the NamedQueryId field's value. 6559func (s *UnprocessedNamedQueryId) SetNamedQueryId(v string) *UnprocessedNamedQueryId { 6560 s.NamedQueryId = &v 6561 return s 6562} 6563 6564// Describes a query execution that failed to process. 6565type UnprocessedQueryExecutionId struct { 6566 _ struct{} `type:"structure"` 6567 6568 // The error code returned when the query execution failed to process, if applicable. 6569 ErrorCode *string `min:"1" type:"string"` 6570 6571 // The error message returned when the query execution failed to process, if 6572 // applicable. 6573 ErrorMessage *string `type:"string"` 6574 6575 // The unique identifier of the query execution. 6576 QueryExecutionId *string `type:"string"` 6577} 6578 6579// String returns the string representation 6580func (s UnprocessedQueryExecutionId) String() string { 6581 return awsutil.Prettify(s) 6582} 6583 6584// GoString returns the string representation 6585func (s UnprocessedQueryExecutionId) GoString() string { 6586 return s.String() 6587} 6588 6589// SetErrorCode sets the ErrorCode field's value. 6590func (s *UnprocessedQueryExecutionId) SetErrorCode(v string) *UnprocessedQueryExecutionId { 6591 s.ErrorCode = &v 6592 return s 6593} 6594 6595// SetErrorMessage sets the ErrorMessage field's value. 6596func (s *UnprocessedQueryExecutionId) SetErrorMessage(v string) *UnprocessedQueryExecutionId { 6597 s.ErrorMessage = &v 6598 return s 6599} 6600 6601// SetQueryExecutionId sets the QueryExecutionId field's value. 6602func (s *UnprocessedQueryExecutionId) SetQueryExecutionId(v string) *UnprocessedQueryExecutionId { 6603 s.QueryExecutionId = &v 6604 return s 6605} 6606 6607type UntagResourceInput struct { 6608 _ struct{} `type:"structure"` 6609 6610 // Specifies the ARN of the resource from which tags are to be removed. 6611 // 6612 // ResourceARN is a required field 6613 ResourceARN *string `min:"1" type:"string" required:"true"` 6614 6615 // A comma-separated list of one or more tag keys whose tags are to be removed 6616 // from the specified resource. 6617 // 6618 // TagKeys is a required field 6619 TagKeys []*string `type:"list" required:"true"` 6620} 6621 6622// String returns the string representation 6623func (s UntagResourceInput) String() string { 6624 return awsutil.Prettify(s) 6625} 6626 6627// GoString returns the string representation 6628func (s UntagResourceInput) GoString() string { 6629 return s.String() 6630} 6631 6632// Validate inspects the fields of the type to determine if they are valid. 6633func (s *UntagResourceInput) Validate() error { 6634 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 6635 if s.ResourceARN == nil { 6636 invalidParams.Add(request.NewErrParamRequired("ResourceARN")) 6637 } 6638 if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { 6639 invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) 6640 } 6641 if s.TagKeys == nil { 6642 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 6643 } 6644 6645 if invalidParams.Len() > 0 { 6646 return invalidParams 6647 } 6648 return nil 6649} 6650 6651// SetResourceARN sets the ResourceARN field's value. 6652func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { 6653 s.ResourceARN = &v 6654 return s 6655} 6656 6657// SetTagKeys sets the TagKeys field's value. 6658func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 6659 s.TagKeys = v 6660 return s 6661} 6662 6663type UntagResourceOutput struct { 6664 _ struct{} `type:"structure"` 6665} 6666 6667// String returns the string representation 6668func (s UntagResourceOutput) String() string { 6669 return awsutil.Prettify(s) 6670} 6671 6672// GoString returns the string representation 6673func (s UntagResourceOutput) GoString() string { 6674 return s.String() 6675} 6676 6677type UpdateDataCatalogInput struct { 6678 _ struct{} `type:"structure"` 6679 6680 // New or modified text that describes the data catalog. 6681 Description *string `min:"1" type:"string"` 6682 6683 // The name of the data catalog to update. The catalog name must be unique for 6684 // the AWS account and can use a maximum of 128 alphanumeric, underscore, at 6685 // sign, or hyphen characters. 6686 // 6687 // Name is a required field 6688 Name *string `min:"1" type:"string" required:"true"` 6689 6690 // Specifies the Lambda function or functions to use for updating the data catalog. 6691 // This is a mapping whose values depend on the catalog type. 6692 // 6693 // * For the HIVE data catalog type, use the following syntax. The metadata-function 6694 // parameter is required. The sdk-version parameter is optional and defaults 6695 // to the currently supported version. metadata-function=lambda_arn, sdk-version=version_number 6696 // 6697 // * For the LAMBDA data catalog type, use one of the following sets of required 6698 // parameters, but not both. If you have one Lambda function that processes 6699 // metadata and another for reading the actual data, use the following syntax. 6700 // Both parameters are required. metadata-function=lambda_arn, record-function=lambda_arn 6701 // If you have a composite Lambda function that processes both metadata and 6702 // data, use the following syntax to specify your Lambda function. function=lambda_arn 6703 // 6704 // * The GLUE type has no parameters. 6705 Parameters map[string]*string `type:"map"` 6706 6707 // Specifies the type of data catalog to update. Specify LAMBDA for a federated 6708 // catalog, GLUE for AWS Glue Catalog, or HIVE for an external hive metastore. 6709 // 6710 // Type is a required field 6711 Type *string `type:"string" required:"true" enum:"DataCatalogType"` 6712} 6713 6714// String returns the string representation 6715func (s UpdateDataCatalogInput) String() string { 6716 return awsutil.Prettify(s) 6717} 6718 6719// GoString returns the string representation 6720func (s UpdateDataCatalogInput) GoString() string { 6721 return s.String() 6722} 6723 6724// Validate inspects the fields of the type to determine if they are valid. 6725func (s *UpdateDataCatalogInput) Validate() error { 6726 invalidParams := request.ErrInvalidParams{Context: "UpdateDataCatalogInput"} 6727 if s.Description != nil && len(*s.Description) < 1 { 6728 invalidParams.Add(request.NewErrParamMinLen("Description", 1)) 6729 } 6730 if s.Name == nil { 6731 invalidParams.Add(request.NewErrParamRequired("Name")) 6732 } 6733 if s.Name != nil && len(*s.Name) < 1 { 6734 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 6735 } 6736 if s.Type == nil { 6737 invalidParams.Add(request.NewErrParamRequired("Type")) 6738 } 6739 6740 if invalidParams.Len() > 0 { 6741 return invalidParams 6742 } 6743 return nil 6744} 6745 6746// SetDescription sets the Description field's value. 6747func (s *UpdateDataCatalogInput) SetDescription(v string) *UpdateDataCatalogInput { 6748 s.Description = &v 6749 return s 6750} 6751 6752// SetName sets the Name field's value. 6753func (s *UpdateDataCatalogInput) SetName(v string) *UpdateDataCatalogInput { 6754 s.Name = &v 6755 return s 6756} 6757 6758// SetParameters sets the Parameters field's value. 6759func (s *UpdateDataCatalogInput) SetParameters(v map[string]*string) *UpdateDataCatalogInput { 6760 s.Parameters = v 6761 return s 6762} 6763 6764// SetType sets the Type field's value. 6765func (s *UpdateDataCatalogInput) SetType(v string) *UpdateDataCatalogInput { 6766 s.Type = &v 6767 return s 6768} 6769 6770type UpdateDataCatalogOutput struct { 6771 _ struct{} `type:"structure"` 6772} 6773 6774// String returns the string representation 6775func (s UpdateDataCatalogOutput) String() string { 6776 return awsutil.Prettify(s) 6777} 6778 6779// GoString returns the string representation 6780func (s UpdateDataCatalogOutput) GoString() string { 6781 return s.String() 6782} 6783 6784type UpdateWorkGroupInput struct { 6785 _ struct{} `type:"structure"` 6786 6787 // The workgroup configuration that will be updated for the given workgroup. 6788 ConfigurationUpdates *WorkGroupConfigurationUpdates `type:"structure"` 6789 6790 // The workgroup description. 6791 Description *string `type:"string"` 6792 6793 // The workgroup state that will be updated for the given workgroup. 6794 State *string `type:"string" enum:"WorkGroupState"` 6795 6796 // The specified workgroup that will be updated. 6797 // 6798 // WorkGroup is a required field 6799 WorkGroup *string `type:"string" required:"true"` 6800} 6801 6802// String returns the string representation 6803func (s UpdateWorkGroupInput) String() string { 6804 return awsutil.Prettify(s) 6805} 6806 6807// GoString returns the string representation 6808func (s UpdateWorkGroupInput) GoString() string { 6809 return s.String() 6810} 6811 6812// Validate inspects the fields of the type to determine if they are valid. 6813func (s *UpdateWorkGroupInput) Validate() error { 6814 invalidParams := request.ErrInvalidParams{Context: "UpdateWorkGroupInput"} 6815 if s.WorkGroup == nil { 6816 invalidParams.Add(request.NewErrParamRequired("WorkGroup")) 6817 } 6818 if s.ConfigurationUpdates != nil { 6819 if err := s.ConfigurationUpdates.Validate(); err != nil { 6820 invalidParams.AddNested("ConfigurationUpdates", err.(request.ErrInvalidParams)) 6821 } 6822 } 6823 6824 if invalidParams.Len() > 0 { 6825 return invalidParams 6826 } 6827 return nil 6828} 6829 6830// SetConfigurationUpdates sets the ConfigurationUpdates field's value. 6831func (s *UpdateWorkGroupInput) SetConfigurationUpdates(v *WorkGroupConfigurationUpdates) *UpdateWorkGroupInput { 6832 s.ConfigurationUpdates = v 6833 return s 6834} 6835 6836// SetDescription sets the Description field's value. 6837func (s *UpdateWorkGroupInput) SetDescription(v string) *UpdateWorkGroupInput { 6838 s.Description = &v 6839 return s 6840} 6841 6842// SetState sets the State field's value. 6843func (s *UpdateWorkGroupInput) SetState(v string) *UpdateWorkGroupInput { 6844 s.State = &v 6845 return s 6846} 6847 6848// SetWorkGroup sets the WorkGroup field's value. 6849func (s *UpdateWorkGroupInput) SetWorkGroup(v string) *UpdateWorkGroupInput { 6850 s.WorkGroup = &v 6851 return s 6852} 6853 6854type UpdateWorkGroupOutput struct { 6855 _ struct{} `type:"structure"` 6856} 6857 6858// String returns the string representation 6859func (s UpdateWorkGroupOutput) String() string { 6860 return awsutil.Prettify(s) 6861} 6862 6863// GoString returns the string representation 6864func (s UpdateWorkGroupOutput) GoString() string { 6865 return s.String() 6866} 6867 6868// A workgroup, which contains a name, description, creation time, state, and 6869// other configuration, listed under WorkGroup$Configuration. Each workgroup 6870// enables you to isolate queries for you or your group of users from other 6871// queries in the same account, to configure the query results location and 6872// the encryption configuration (known as workgroup settings), to enable sending 6873// query metrics to Amazon CloudWatch, and to establish per-query data usage 6874// control limits for all queries in a workgroup. The workgroup settings override 6875// is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. 6876// See WorkGroupConfiguration$EnforceWorkGroupConfiguration. 6877type WorkGroup struct { 6878 _ struct{} `type:"structure"` 6879 6880 // The configuration of the workgroup, which includes the location in Amazon 6881 // S3 where query results are stored, the encryption configuration, if any, 6882 // used for query results; whether the Amazon CloudWatch Metrics are enabled 6883 // for the workgroup; whether workgroup settings override client-side settings; 6884 // and the data usage limits for the amount of data scanned per query or per 6885 // workgroup. The workgroup settings override is specified in EnforceWorkGroupConfiguration 6886 // (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. 6887 Configuration *WorkGroupConfiguration `type:"structure"` 6888 6889 // The date and time the workgroup was created. 6890 CreationTime *time.Time `type:"timestamp"` 6891 6892 // The workgroup description. 6893 Description *string `type:"string"` 6894 6895 // The workgroup name. 6896 // 6897 // Name is a required field 6898 Name *string `type:"string" required:"true"` 6899 6900 // The state of the workgroup: ENABLED or DISABLED. 6901 State *string `type:"string" enum:"WorkGroupState"` 6902} 6903 6904// String returns the string representation 6905func (s WorkGroup) String() string { 6906 return awsutil.Prettify(s) 6907} 6908 6909// GoString returns the string representation 6910func (s WorkGroup) GoString() string { 6911 return s.String() 6912} 6913 6914// SetConfiguration sets the Configuration field's value. 6915func (s *WorkGroup) SetConfiguration(v *WorkGroupConfiguration) *WorkGroup { 6916 s.Configuration = v 6917 return s 6918} 6919 6920// SetCreationTime sets the CreationTime field's value. 6921func (s *WorkGroup) SetCreationTime(v time.Time) *WorkGroup { 6922 s.CreationTime = &v 6923 return s 6924} 6925 6926// SetDescription sets the Description field's value. 6927func (s *WorkGroup) SetDescription(v string) *WorkGroup { 6928 s.Description = &v 6929 return s 6930} 6931 6932// SetName sets the Name field's value. 6933func (s *WorkGroup) SetName(v string) *WorkGroup { 6934 s.Name = &v 6935 return s 6936} 6937 6938// SetState sets the State field's value. 6939func (s *WorkGroup) SetState(v string) *WorkGroup { 6940 s.State = &v 6941 return s 6942} 6943 6944// The configuration of the workgroup, which includes the location in Amazon 6945// S3 where query results are stored, the encryption option, if any, used for 6946// query results, whether the Amazon CloudWatch Metrics are enabled for the 6947// workgroup and whether workgroup settings override query settings, and the 6948// data usage limits for the amount of data scanned per query or per workgroup. 6949// The workgroup settings override is specified in EnforceWorkGroupConfiguration 6950// (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration. 6951type WorkGroupConfiguration struct { 6952 _ struct{} `type:"structure"` 6953 6954 // The upper data usage limit (cutoff) for the amount of bytes a single query 6955 // in a workgroup is allowed to scan. 6956 BytesScannedCutoffPerQuery *int64 `min:"1e+07" type:"long"` 6957 6958 // If set to "true", the settings for the workgroup override client-side settings. 6959 // If set to "false", client-side settings are used. For more information, see 6960 // Workgroup Settings Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 6961 EnforceWorkGroupConfiguration *bool `type:"boolean"` 6962 6963 // Indicates that the Amazon CloudWatch metrics are enabled for the workgroup. 6964 PublishCloudWatchMetricsEnabled *bool `type:"boolean"` 6965 6966 // If set to true, allows members assigned to a workgroup to reference Amazon 6967 // S3 Requester Pays buckets in queries. If set to false, workgroup members 6968 // cannot query data from Requester Pays buckets, and queries that retrieve 6969 // data from Requester Pays buckets cause an error. The default is false. For 6970 // more information about Requester Pays buckets, see Requester Pays Buckets 6971 // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html) 6972 // in the Amazon Simple Storage Service Developer Guide. 6973 RequesterPaysEnabled *bool `type:"boolean"` 6974 6975 // The configuration for the workgroup, which includes the location in Amazon 6976 // S3 where query results are stored and the encryption option, if any, used 6977 // for query results. To run the query, you must specify the query results location 6978 // using one of the ways: either in the workgroup using this setting, or for 6979 // individual queries (client-side), using ResultConfiguration$OutputLocation. 6980 // If none of them is set, Athena issues an error that no output location is 6981 // provided. For more information, see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html). 6982 ResultConfiguration *ResultConfiguration `type:"structure"` 6983} 6984 6985// String returns the string representation 6986func (s WorkGroupConfiguration) String() string { 6987 return awsutil.Prettify(s) 6988} 6989 6990// GoString returns the string representation 6991func (s WorkGroupConfiguration) GoString() string { 6992 return s.String() 6993} 6994 6995// Validate inspects the fields of the type to determine if they are valid. 6996func (s *WorkGroupConfiguration) Validate() error { 6997 invalidParams := request.ErrInvalidParams{Context: "WorkGroupConfiguration"} 6998 if s.BytesScannedCutoffPerQuery != nil && *s.BytesScannedCutoffPerQuery < 1e+07 { 6999 invalidParams.Add(request.NewErrParamMinValue("BytesScannedCutoffPerQuery", 1e+07)) 7000 } 7001 if s.ResultConfiguration != nil { 7002 if err := s.ResultConfiguration.Validate(); err != nil { 7003 invalidParams.AddNested("ResultConfiguration", err.(request.ErrInvalidParams)) 7004 } 7005 } 7006 7007 if invalidParams.Len() > 0 { 7008 return invalidParams 7009 } 7010 return nil 7011} 7012 7013// SetBytesScannedCutoffPerQuery sets the BytesScannedCutoffPerQuery field's value. 7014func (s *WorkGroupConfiguration) SetBytesScannedCutoffPerQuery(v int64) *WorkGroupConfiguration { 7015 s.BytesScannedCutoffPerQuery = &v 7016 return s 7017} 7018 7019// SetEnforceWorkGroupConfiguration sets the EnforceWorkGroupConfiguration field's value. 7020func (s *WorkGroupConfiguration) SetEnforceWorkGroupConfiguration(v bool) *WorkGroupConfiguration { 7021 s.EnforceWorkGroupConfiguration = &v 7022 return s 7023} 7024 7025// SetPublishCloudWatchMetricsEnabled sets the PublishCloudWatchMetricsEnabled field's value. 7026func (s *WorkGroupConfiguration) SetPublishCloudWatchMetricsEnabled(v bool) *WorkGroupConfiguration { 7027 s.PublishCloudWatchMetricsEnabled = &v 7028 return s 7029} 7030 7031// SetRequesterPaysEnabled sets the RequesterPaysEnabled field's value. 7032func (s *WorkGroupConfiguration) SetRequesterPaysEnabled(v bool) *WorkGroupConfiguration { 7033 s.RequesterPaysEnabled = &v 7034 return s 7035} 7036 7037// SetResultConfiguration sets the ResultConfiguration field's value. 7038func (s *WorkGroupConfiguration) SetResultConfiguration(v *ResultConfiguration) *WorkGroupConfiguration { 7039 s.ResultConfiguration = v 7040 return s 7041} 7042 7043// The configuration information that will be updated for this workgroup, which 7044// includes the location in Amazon S3 where query results are stored, the encryption 7045// option, if any, used for query results, whether the Amazon CloudWatch Metrics 7046// are enabled for the workgroup, whether the workgroup settings override the 7047// client-side settings, and the data usage limit for the amount of bytes scanned 7048// per query, if it is specified. 7049type WorkGroupConfigurationUpdates struct { 7050 _ struct{} `type:"structure"` 7051 7052 // The upper limit (cutoff) for the amount of bytes a single query in a workgroup 7053 // is allowed to scan. 7054 BytesScannedCutoffPerQuery *int64 `min:"1e+07" type:"long"` 7055 7056 // If set to "true", the settings for the workgroup override client-side settings. 7057 // If set to "false" client-side settings are used. For more information, see 7058 // Workgroup Settings Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html). 7059 EnforceWorkGroupConfiguration *bool `type:"boolean"` 7060 7061 // Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch. 7062 PublishCloudWatchMetricsEnabled *bool `type:"boolean"` 7063 7064 // Indicates that the data usage control limit per query is removed. WorkGroupConfiguration$BytesScannedCutoffPerQuery 7065 RemoveBytesScannedCutoffPerQuery *bool `type:"boolean"` 7066 7067 // If set to true, allows members assigned to a workgroup to specify Amazon 7068 // S3 Requester Pays buckets in queries. If set to false, workgroup members 7069 // cannot query data from Requester Pays buckets, and queries that retrieve 7070 // data from Requester Pays buckets cause an error. The default is false. For 7071 // more information about Requester Pays buckets, see Requester Pays Buckets 7072 // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html) 7073 // in the Amazon Simple Storage Service Developer Guide. 7074 RequesterPaysEnabled *bool `type:"boolean"` 7075 7076 // The result configuration information about the queries in this workgroup 7077 // that will be updated. Includes the updated results location and an updated 7078 // option for encrypting query results. 7079 ResultConfigurationUpdates *ResultConfigurationUpdates `type:"structure"` 7080} 7081 7082// String returns the string representation 7083func (s WorkGroupConfigurationUpdates) String() string { 7084 return awsutil.Prettify(s) 7085} 7086 7087// GoString returns the string representation 7088func (s WorkGroupConfigurationUpdates) GoString() string { 7089 return s.String() 7090} 7091 7092// Validate inspects the fields of the type to determine if they are valid. 7093func (s *WorkGroupConfigurationUpdates) Validate() error { 7094 invalidParams := request.ErrInvalidParams{Context: "WorkGroupConfigurationUpdates"} 7095 if s.BytesScannedCutoffPerQuery != nil && *s.BytesScannedCutoffPerQuery < 1e+07 { 7096 invalidParams.Add(request.NewErrParamMinValue("BytesScannedCutoffPerQuery", 1e+07)) 7097 } 7098 if s.ResultConfigurationUpdates != nil { 7099 if err := s.ResultConfigurationUpdates.Validate(); err != nil { 7100 invalidParams.AddNested("ResultConfigurationUpdates", err.(request.ErrInvalidParams)) 7101 } 7102 } 7103 7104 if invalidParams.Len() > 0 { 7105 return invalidParams 7106 } 7107 return nil 7108} 7109 7110// SetBytesScannedCutoffPerQuery sets the BytesScannedCutoffPerQuery field's value. 7111func (s *WorkGroupConfigurationUpdates) SetBytesScannedCutoffPerQuery(v int64) *WorkGroupConfigurationUpdates { 7112 s.BytesScannedCutoffPerQuery = &v 7113 return s 7114} 7115 7116// SetEnforceWorkGroupConfiguration sets the EnforceWorkGroupConfiguration field's value. 7117func (s *WorkGroupConfigurationUpdates) SetEnforceWorkGroupConfiguration(v bool) *WorkGroupConfigurationUpdates { 7118 s.EnforceWorkGroupConfiguration = &v 7119 return s 7120} 7121 7122// SetPublishCloudWatchMetricsEnabled sets the PublishCloudWatchMetricsEnabled field's value. 7123func (s *WorkGroupConfigurationUpdates) SetPublishCloudWatchMetricsEnabled(v bool) *WorkGroupConfigurationUpdates { 7124 s.PublishCloudWatchMetricsEnabled = &v 7125 return s 7126} 7127 7128// SetRemoveBytesScannedCutoffPerQuery sets the RemoveBytesScannedCutoffPerQuery field's value. 7129func (s *WorkGroupConfigurationUpdates) SetRemoveBytesScannedCutoffPerQuery(v bool) *WorkGroupConfigurationUpdates { 7130 s.RemoveBytesScannedCutoffPerQuery = &v 7131 return s 7132} 7133 7134// SetRequesterPaysEnabled sets the RequesterPaysEnabled field's value. 7135func (s *WorkGroupConfigurationUpdates) SetRequesterPaysEnabled(v bool) *WorkGroupConfigurationUpdates { 7136 s.RequesterPaysEnabled = &v 7137 return s 7138} 7139 7140// SetResultConfigurationUpdates sets the ResultConfigurationUpdates field's value. 7141func (s *WorkGroupConfigurationUpdates) SetResultConfigurationUpdates(v *ResultConfigurationUpdates) *WorkGroupConfigurationUpdates { 7142 s.ResultConfigurationUpdates = v 7143 return s 7144} 7145 7146// The summary information for the workgroup, which includes its name, state, 7147// description, and the date and time it was created. 7148type WorkGroupSummary struct { 7149 _ struct{} `type:"structure"` 7150 7151 // The workgroup creation date and time. 7152 CreationTime *time.Time `type:"timestamp"` 7153 7154 // The workgroup description. 7155 Description *string `type:"string"` 7156 7157 // The name of the workgroup. 7158 Name *string `type:"string"` 7159 7160 // The state of the workgroup. 7161 State *string `type:"string" enum:"WorkGroupState"` 7162} 7163 7164// String returns the string representation 7165func (s WorkGroupSummary) String() string { 7166 return awsutil.Prettify(s) 7167} 7168 7169// GoString returns the string representation 7170func (s WorkGroupSummary) GoString() string { 7171 return s.String() 7172} 7173 7174// SetCreationTime sets the CreationTime field's value. 7175func (s *WorkGroupSummary) SetCreationTime(v time.Time) *WorkGroupSummary { 7176 s.CreationTime = &v 7177 return s 7178} 7179 7180// SetDescription sets the Description field's value. 7181func (s *WorkGroupSummary) SetDescription(v string) *WorkGroupSummary { 7182 s.Description = &v 7183 return s 7184} 7185 7186// SetName sets the Name field's value. 7187func (s *WorkGroupSummary) SetName(v string) *WorkGroupSummary { 7188 s.Name = &v 7189 return s 7190} 7191 7192// SetState sets the State field's value. 7193func (s *WorkGroupSummary) SetState(v string) *WorkGroupSummary { 7194 s.State = &v 7195 return s 7196} 7197 7198const ( 7199 // ColumnNullableNotNull is a ColumnNullable enum value 7200 ColumnNullableNotNull = "NOT_NULL" 7201 7202 // ColumnNullableNullable is a ColumnNullable enum value 7203 ColumnNullableNullable = "NULLABLE" 7204 7205 // ColumnNullableUnknown is a ColumnNullable enum value 7206 ColumnNullableUnknown = "UNKNOWN" 7207) 7208 7209const ( 7210 // DataCatalogTypeLambda is a DataCatalogType enum value 7211 DataCatalogTypeLambda = "LAMBDA" 7212 7213 // DataCatalogTypeGlue is a DataCatalogType enum value 7214 DataCatalogTypeGlue = "GLUE" 7215 7216 // DataCatalogTypeHive is a DataCatalogType enum value 7217 DataCatalogTypeHive = "HIVE" 7218) 7219 7220const ( 7221 // EncryptionOptionSseS3 is a EncryptionOption enum value 7222 EncryptionOptionSseS3 = "SSE_S3" 7223 7224 // EncryptionOptionSseKms is a EncryptionOption enum value 7225 EncryptionOptionSseKms = "SSE_KMS" 7226 7227 // EncryptionOptionCseKms is a EncryptionOption enum value 7228 EncryptionOptionCseKms = "CSE_KMS" 7229) 7230 7231const ( 7232 // QueryExecutionStateQueued is a QueryExecutionState enum value 7233 QueryExecutionStateQueued = "QUEUED" 7234 7235 // QueryExecutionStateRunning is a QueryExecutionState enum value 7236 QueryExecutionStateRunning = "RUNNING" 7237 7238 // QueryExecutionStateSucceeded is a QueryExecutionState enum value 7239 QueryExecutionStateSucceeded = "SUCCEEDED" 7240 7241 // QueryExecutionStateFailed is a QueryExecutionState enum value 7242 QueryExecutionStateFailed = "FAILED" 7243 7244 // QueryExecutionStateCancelled is a QueryExecutionState enum value 7245 QueryExecutionStateCancelled = "CANCELLED" 7246) 7247 7248const ( 7249 // StatementTypeDdl is a StatementType enum value 7250 StatementTypeDdl = "DDL" 7251 7252 // StatementTypeDml is a StatementType enum value 7253 StatementTypeDml = "DML" 7254 7255 // StatementTypeUtility is a StatementType enum value 7256 StatementTypeUtility = "UTILITY" 7257) 7258 7259// The reason for the query throttling, for example, when it exceeds the concurrent 7260// query limit. 7261const ( 7262 // ThrottleReasonConcurrentQueryLimitExceeded is a ThrottleReason enum value 7263 ThrottleReasonConcurrentQueryLimitExceeded = "CONCURRENT_QUERY_LIMIT_EXCEEDED" 7264) 7265 7266const ( 7267 // WorkGroupStateEnabled is a WorkGroupState enum value 7268 WorkGroupStateEnabled = "ENABLED" 7269 7270 // WorkGroupStateDisabled is a WorkGroupState enum value 7271 WorkGroupStateDisabled = "DISABLED" 7272) 7273