-
Notifications
You must be signed in to change notification settings - Fork 623
/
api_types.go
856 lines (691 loc) · 32.2 KB
/
api_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package athena
import (
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
var _ aws.Config
var _ = awsutil.Prettify
// Contains metadata for a column in a table.
type Column struct {
_ struct{} `type:"structure"`
// Optional information about the column.
Comment *string `type:"string"`
// The name of the column.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true"`
// The data type of the column.
Type *string `type:"string"`
}
// String returns the string representation
func (s Column) String() string {
return awsutil.Prettify(s)
}
// Information about the columns in a query execution result.
type ColumnInfo struct {
_ struct{} `type:"structure"`
// Indicates whether values in the column are case-sensitive.
CaseSensitive *bool `type:"boolean"`
// The catalog to which the query results belong.
CatalogName *string `type:"string"`
// A column label.
Label *string `type:"string"`
// The name of the column.
//
// Name is a required field
Name *string `type:"string" required:"true"`
// Indicates the column's nullable status.
Nullable ColumnNullable `type:"string" enum:"true"`
// For DECIMAL data types, specifies the total number of digits, up to 38. For
// performance reasons, we recommend up to 18 digits.
Precision *int64 `type:"integer"`
// For DECIMAL data types, specifies the total number of digits in the fractional
// part of the value. Defaults to 0.
Scale *int64 `type:"integer"`
// The schema name (database name) to which the query results belong.
SchemaName *string `type:"string"`
// The table name for the query results.
TableName *string `type:"string"`
// The data type of the column.
//
// Type is a required field
Type *string `type:"string" required:"true"`
}
// String returns the string representation
func (s ColumnInfo) String() string {
return awsutil.Prettify(s)
}
// Contains information about a data catalog in an AWS account.
type DataCatalog struct {
_ struct{} `type:"structure"`
// An optional description of the data catalog.
Description *string `min:"1" type:"string"`
// The name of the data catalog. The catalog name must be unique for the AWS
// account and can use a maximum of 128 alphanumeric, underscore, at sign, or
// hyphen characters.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true"`
// Specifies the Lambda function or functions to use for the data catalog. This
// is a mapping whose values depend on the catalog type.
//
// * For the HIVE data catalog type, use the following syntax. The metadata-function
// parameter is required. The sdk-version parameter is optional and defaults
// to the currently supported version. metadata-function=lambda_arn, sdk-version=version_number
//
// * For the LAMBDA data catalog type, use one of the following sets of required
// parameters, but not both. If you have one Lambda function that processes
// metadata and another for reading the actual data, use the following syntax.
// Both parameters are required. metadata-function=lambda_arn, record-function=lambda_arn
// If you have a composite Lambda function that processes both metadata and
// data, use the following syntax to specify your Lambda function. function=lambda_arn
//
// * The GLUE type has no parameters.
Parameters map[string]string `type:"map"`
// The type of data catalog: LAMBDA for a federated catalog, GLUE for AWS Glue
// Catalog, or HIVE for an external hive metastore.
//
// Type is a required field
Type DataCatalogType `type:"string" required:"true" enum:"true"`
}
// String returns the string representation
func (s DataCatalog) String() string {
return awsutil.Prettify(s)
}
// The summary information for the data catalog, which includes its name and
// type.
type DataCatalogSummary struct {
_ struct{} `type:"structure"`
// The name of the data catalog.
CatalogName *string `min:"1" type:"string"`
// The data catalog type.
Type DataCatalogType `type:"string" enum:"true"`
}
// String returns the string representation
func (s DataCatalogSummary) String() string {
return awsutil.Prettify(s)
}
// Contains metadata information for a database in a data catalog.
type Database struct {
_ struct{} `type:"structure"`
// An optional description of the database.
Description *string `min:"1" type:"string"`
// The name of the database.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true"`
// A set of custom key/value pairs.
Parameters map[string]string `type:"map"`
}
// String returns the string representation
func (s Database) String() string {
return awsutil.Prettify(s)
}
// A piece of data (a field in the table).
type Datum struct {
_ struct{} `type:"structure"`
// The value of the datum.
VarCharValue *string `type:"string"`
}
// String returns the string representation
func (s Datum) String() string {
return awsutil.Prettify(s)
}
// If query results are encrypted in Amazon S3, indicates the encryption option
// used (for example, SSE-KMS or CSE-KMS) and key information.
type EncryptionConfiguration struct {
_ struct{} `type:"structure"`
// Indicates whether Amazon S3 server-side encryption with Amazon S3-managed
// keys (SSE-S3), server-side encryption with KMS-managed keys (SSE-KMS), or
// client-side encryption with KMS-managed keys (CSE-KMS) is used.
//
// If a query runs in a workgroup and the workgroup overrides client-side settings,
// then the workgroup's setting for encryption is used. It specifies whether
// query results must be encrypted, for all queries that run in this workgroup.
//
// EncryptionOption is a required field
EncryptionOption EncryptionOption `type:"string" required:"true" enum:"true"`
// For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID.
KmsKey *string `type:"string"`
}
// String returns the string representation
func (s EncryptionConfiguration) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *EncryptionConfiguration) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "EncryptionConfiguration"}
if len(s.EncryptionOption) == 0 {
invalidParams.Add(aws.NewErrParamRequired("EncryptionOption"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// A query, where QueryString is the list of SQL query statements that comprise
// the query.
type NamedQuery struct {
_ struct{} `type:"structure"`
// The database to which the query belongs.
//
// Database is a required field
Database *string `min:"1" type:"string" required:"true"`
// The query description.
Description *string `min:"1" type:"string"`
// The query name.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true"`
// The unique identifier of the query.
NamedQueryId *string `type:"string"`
// The SQL query statements that comprise the query.
//
// QueryString is a required field
QueryString *string `min:"1" type:"string" required:"true"`
// The name of the workgroup that contains the named query.
WorkGroup *string `type:"string"`
}
// String returns the string representation
func (s NamedQuery) String() string {
return awsutil.Prettify(s)
}
// Information about a single instance of a query execution.
type QueryExecution struct {
_ struct{} `type:"structure"`
// The SQL query statements which the query execution ran.
Query *string `min:"1" type:"string"`
// The database in which the query execution occurred.
QueryExecutionContext *QueryExecutionContext `type:"structure"`
// The unique identifier for each query execution.
QueryExecutionId *string `type:"string"`
// The location in Amazon S3 where query results were stored and the encryption
// option, if any, used for query results. These are known as "client-side settings".
// If workgroup settings override client-side settings, then the query uses
// the location for the query results and the encryption configuration that
// are specified for the workgroup.
ResultConfiguration *ResultConfiguration `type:"structure"`
// The type of query statement that was run. DDL indicates DDL query statements.
// DML indicates DML (Data Manipulation Language) query statements, such as
// CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL
// and DML, such as SHOW CREATE TABLE, or DESCRIBE <table>.
StatementType StatementType `type:"string" enum:"true"`
// Query execution statistics, such as the amount of data scanned, the amount
// of time that the query took to process, and the type of statement that was
// run.
Statistics *QueryExecutionStatistics `type:"structure"`
// The completion date, current state, submission time, and state change reason
// (if applicable) for the query execution.
Status *QueryExecutionStatus `type:"structure"`
// The name of the workgroup in which the query ran.
WorkGroup *string `type:"string"`
}
// String returns the string representation
func (s QueryExecution) String() string {
return awsutil.Prettify(s)
}
// The database and data catalog context in which the query execution occurs.
type QueryExecutionContext struct {
_ struct{} `type:"structure"`
// The name of the data catalog used in the query execution.
Catalog *string `min:"1" type:"string"`
// The name of the database used in the query execution.
Database *string `min:"1" type:"string"`
}
// String returns the string representation
func (s QueryExecutionContext) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *QueryExecutionContext) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "QueryExecutionContext"}
if s.Catalog != nil && len(*s.Catalog) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Catalog", 1))
}
if s.Database != nil && len(*s.Database) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Database", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// The amount of data scanned during the query execution and the amount of time
// that it took to execute, and the type of statement that was run.
type QueryExecutionStatistics struct {
_ struct{} `type:"structure"`
// The location and file name of a data manifest file. The manifest file is
// saved to the Athena query results location in Amazon S3. The manifest file
// tracks files that the query wrote to Amazon S3. If the query fails, the manifest
// file also tracks files that the query intended to write. The manifest is
// useful for identifying orphaned files resulting from a failed query. For
// more information, see Working with Query Results, Output Files, and Query
// History (https://docs.aws.amazon.com/athena/latest/ug/querying.html) in the
// Amazon Athena User Guide.
DataManifestLocation *string `type:"string"`
// The number of bytes in the data that was queried.
DataScannedInBytes *int64 `type:"long"`
// The number of milliseconds that the query took to execute.
EngineExecutionTimeInMillis *int64 `type:"long"`
// The number of milliseconds that Athena took to plan the query processing
// flow. This includes the time spent retrieving table partitions from the data
// source. Note that because the query engine performs the query planning, query
// planning time is a subset of engine processing time.
QueryPlanningTimeInMillis *int64 `type:"long"`
// The number of milliseconds that the query was in your query queue waiting
// for resources. Note that if transient errors occur, Athena might automatically
// add the query back to the queue.
QueryQueueTimeInMillis *int64 `type:"long"`
// The number of milliseconds that Athena took to finalize and publish the query
// results after the query engine finished running the query.
ServiceProcessingTimeInMillis *int64 `type:"long"`
// The number of milliseconds that Athena took to run the query.
TotalExecutionTimeInMillis *int64 `type:"long"`
}
// String returns the string representation
func (s QueryExecutionStatistics) String() string {
return awsutil.Prettify(s)
}
// The completion date, current state, submission time, and state change reason
// (if applicable) for the query execution.
type QueryExecutionStatus struct {
_ struct{} `type:"structure"`
// The date and time that the query completed.
CompletionDateTime *time.Time `type:"timestamp"`
// The state of query execution. QUEUED indicates that the query has been submitted
// to the service, and Athena will execute the query as soon as resources are
// available. RUNNING indicates that the query is in execution phase. SUCCEEDED
// indicates that the query completed without errors. FAILED indicates that
// the query experienced an error and did not complete processing. CANCELLED
// indicates that a user input interrupted query execution.
//
// Athena automatically retries your queries in cases of certain transient errors.
// As a result, you may see the query state transition from RUNNING or FAILED
// to QUEUED.
State QueryExecutionState `type:"string" enum:"true"`
// Further detail about the status of the query.
StateChangeReason *string `type:"string"`
// The date and time that the query was submitted.
SubmissionDateTime *time.Time `type:"timestamp"`
}
// String returns the string representation
func (s QueryExecutionStatus) String() string {
return awsutil.Prettify(s)
}
// The location in Amazon S3 where query results are stored and the encryption
// option, if any, used for query results. These are known as "client-side settings".
// If workgroup settings override client-side settings, then the query uses
// the workgroup settings.
type ResultConfiguration struct {
_ struct{} `type:"structure"`
// If query results are encrypted in Amazon S3, indicates the encryption option
// used (for example, SSE-KMS or CSE-KMS) and key information. This is a client-side
// setting. If workgroup settings override client-side settings, then the query
// uses the encryption configuration that is specified for the workgroup, and
// also uses the location for storing query results specified in the workgroup.
// See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings
// Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
// The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/.
// To run the query, you must specify the query results location using one of
// the ways: either for individual queries using either this setting (client-side),
// or in the workgroup, using WorkGroupConfiguration. If none of them is set,
// Athena issues an error that no output location is provided. For more information,
// see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html).
// If workgroup settings override client-side settings, then the query uses
// the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
OutputLocation *string `type:"string"`
}
// String returns the string representation
func (s ResultConfiguration) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ResultConfiguration) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "ResultConfiguration"}
if s.EncryptionConfiguration != nil {
if err := s.EncryptionConfiguration.Validate(); err != nil {
invalidParams.AddNested("EncryptionConfiguration", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// The information about the updates in the query results, such as output location
// and encryption configuration for the query results.
type ResultConfigurationUpdates struct {
_ struct{} `type:"structure"`
// The encryption configuration for the query results.
EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
// The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/.
// For more information, see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html)
// If workgroup settings override client-side settings, then the query uses
// the location for the query results and the encryption configuration that
// are specified for the workgroup. The "workgroup settings override" is specified
// in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration.
// See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
OutputLocation *string `type:"string"`
// If set to "true", indicates that the previously-specified encryption configuration
// (also known as the client-side setting) for queries in this workgroup should
// be ignored and set to null. If set to "false" or not set, and a value is
// present in the EncryptionConfiguration in ResultConfigurationUpdates (the
// client-side setting), the EncryptionConfiguration in the workgroup's ResultConfiguration
// will be updated with the new value. For more information, see Workgroup Settings
// Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
RemoveEncryptionConfiguration *bool `type:"boolean"`
// If set to "true", indicates that the previously-specified query results location
// (also known as a client-side setting) for queries in this workgroup should
// be ignored and set to null. If set to "false" or not set, and a value is
// present in the OutputLocation in ResultConfigurationUpdates (the client-side
// setting), the OutputLocation in the workgroup's ResultConfiguration will
// be updated with the new value. For more information, see Workgroup Settings
// Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
RemoveOutputLocation *bool `type:"boolean"`
}
// String returns the string representation
func (s ResultConfigurationUpdates) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ResultConfigurationUpdates) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "ResultConfigurationUpdates"}
if s.EncryptionConfiguration != nil {
if err := s.EncryptionConfiguration.Validate(); err != nil {
invalidParams.AddNested("EncryptionConfiguration", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// The metadata and rows that comprise a query result set. The metadata describes
// the column structure and data types. To return a ResultSet object, use GetQueryResults.
type ResultSet struct {
_ struct{} `type:"structure"`
// The metadata that describes the column structure and data types of a table
// of query results.
ResultSetMetadata *ResultSetMetadata `type:"structure"`
// The rows in the table.
Rows []Row `type:"list"`
}
// String returns the string representation
func (s ResultSet) String() string {
return awsutil.Prettify(s)
}
// The metadata that describes the column structure and data types of a table
// of query results. To return a ResultSetMetadata object, use GetQueryResults.
type ResultSetMetadata struct {
_ struct{} `type:"structure"`
// Information about the columns returned in a query result metadata.
ColumnInfo []ColumnInfo `type:"list"`
}
// String returns the string representation
func (s ResultSetMetadata) String() string {
return awsutil.Prettify(s)
}
// The rows that comprise a query result table.
type Row struct {
_ struct{} `type:"structure"`
// The data that populates a row in a query result table.
Data []Datum `type:"list"`
}
// String returns the string representation
func (s Row) String() string {
return awsutil.Prettify(s)
}
// Contains metadata for a table.
type TableMetadata struct {
_ struct{} `type:"structure"`
// A list of the columns in the table.
Columns []Column `type:"list"`
// The time that the table was created.
CreateTime *time.Time `type:"timestamp"`
// The last time the table was accessed.
LastAccessTime *time.Time `type:"timestamp"`
// The name of the table.
//
// Name is a required field
Name *string `min:"1" type:"string" required:"true"`
// A set of custom key/value pairs for table properties.
Parameters map[string]string `type:"map"`
// A list of the partition keys in the table.
PartitionKeys []Column `type:"list"`
// The type of table. In Athena, only EXTERNAL_TABLE is supported.
TableType *string `type:"string"`
}
// String returns the string representation
func (s TableMetadata) String() string {
return awsutil.Prettify(s)
}
// A label that you assign to a resource. In Athena, a resource can be a workgroup
// or data catalog. Each tag consists of a key and an optional value, both of
// which you define. For example, you can use tags to categorize Athena workgroups
// or data catalogs by purpose, owner, or environment. Use a consistent set
// of tag keys to make it easier to search and filter workgroups or data catalogs
// in your account. For best practices, see Tagging Best Practices (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/).
// Tag keys can be from 1 to 128 UTF-8 Unicode characters, and tag values can
// be from 0 to 256 UTF-8 Unicode characters. Tags can use letters and numbers
// representable in UTF-8, and the following characters: + - = . _ : / @. Tag
// keys and values are case-sensitive. Tag keys must be unique per resource.
// If you specify more than one tag, separate them by commas.
type Tag struct {
_ struct{} `type:"structure"`
// A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8.
// You can use letters and numbers representable in UTF-8, and the following
// characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique
// per resource.
Key *string `min:"1" type:"string"`
// A tag value. The tag value length is from 0 to 256 Unicode characters in
// UTF-8. You can use letters and numbers representable in UTF-8, and the following
// characters: + - = . _ : / @. Tag values are case-sensitive.
Value *string `type:"string"`
}
// String returns the string representation
func (s Tag) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Tag) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "Tag"}
if s.Key != nil && len(*s.Key) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Key", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Information about a named query ID that could not be processed.
type UnprocessedNamedQueryId struct {
_ struct{} `type:"structure"`
// The error code returned when the processing request for the named query failed,
// if applicable.
ErrorCode *string `min:"1" type:"string"`
// The error message returned when the processing request for the named query
// failed, if applicable.
ErrorMessage *string `type:"string"`
// The unique identifier of the named query.
NamedQueryId *string `type:"string"`
}
// String returns the string representation
func (s UnprocessedNamedQueryId) String() string {
return awsutil.Prettify(s)
}
// Describes a query execution that failed to process.
type UnprocessedQueryExecutionId struct {
_ struct{} `type:"structure"`
// The error code returned when the query execution failed to process, if applicable.
ErrorCode *string `min:"1" type:"string"`
// The error message returned when the query execution failed to process, if
// applicable.
ErrorMessage *string `type:"string"`
// The unique identifier of the query execution.
QueryExecutionId *string `type:"string"`
}
// String returns the string representation
func (s UnprocessedQueryExecutionId) String() string {
return awsutil.Prettify(s)
}
// A workgroup, which contains a name, description, creation time, state, and
// other configuration, listed under WorkGroup$Configuration. Each workgroup
// enables you to isolate queries for you or your group of users from other
// queries in the same account, to configure the query results location and
// the encryption configuration (known as workgroup settings), to enable sending
// query metrics to Amazon CloudWatch, and to establish per-query data usage
// control limits for all queries in a workgroup. The workgroup settings override
// is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration.
// See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
type WorkGroup struct {
_ struct{} `type:"structure"`
// The configuration of the workgroup, which includes the location in Amazon
// S3 where query results are stored, the encryption configuration, if any,
// used for query results; whether the Amazon CloudWatch Metrics are enabled
// for the workgroup; whether workgroup settings override client-side settings;
// and the data usage limits for the amount of data scanned per query or per
// workgroup. The workgroup settings override is specified in EnforceWorkGroupConfiguration
// (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
Configuration *WorkGroupConfiguration `type:"structure"`
// The date and time the workgroup was created.
CreationTime *time.Time `type:"timestamp"`
// The workgroup description.
Description *string `type:"string"`
// The workgroup name.
//
// Name is a required field
Name *string `type:"string" required:"true"`
// The state of the workgroup: ENABLED or DISABLED.
State WorkGroupState `type:"string" enum:"true"`
}
// String returns the string representation
func (s WorkGroup) String() string {
return awsutil.Prettify(s)
}
// The configuration of the workgroup, which includes the location in Amazon
// S3 where query results are stored, the encryption option, if any, used for
// query results, whether the Amazon CloudWatch Metrics are enabled for the
// workgroup and whether workgroup settings override query settings, and the
// data usage limits for the amount of data scanned per query or per workgroup.
// The workgroup settings override is specified in EnforceWorkGroupConfiguration
// (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
type WorkGroupConfiguration struct {
_ struct{} `type:"structure"`
// The upper data usage limit (cutoff) for the amount of bytes a single query
// in a workgroup is allowed to scan.
BytesScannedCutoffPerQuery *int64 `min:"1e+07" type:"long"`
// If set to "true", the settings for the workgroup override client-side settings.
// If set to "false", client-side settings are used. For more information, see
// Workgroup Settings Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
EnforceWorkGroupConfiguration *bool `type:"boolean"`
// Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
PublishCloudWatchMetricsEnabled *bool `type:"boolean"`
// If set to true, allows members assigned to a workgroup to reference Amazon
// S3 Requester Pays buckets in queries. If set to false, workgroup members
// cannot query data from Requester Pays buckets, and queries that retrieve
// data from Requester Pays buckets cause an error. The default is false. For
// more information about Requester Pays buckets, see Requester Pays Buckets
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
// in the Amazon Simple Storage Service Developer Guide.
RequesterPaysEnabled *bool `type:"boolean"`
// The configuration for the workgroup, which includes the location in Amazon
// S3 where query results are stored and the encryption option, if any, used
// for query results. To run the query, you must specify the query results location
// using one of the ways: either in the workgroup using this setting, or for
// individual queries (client-side), using ResultConfiguration$OutputLocation.
// If none of them is set, Athena issues an error that no output location is
// provided. For more information, see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html).
ResultConfiguration *ResultConfiguration `type:"structure"`
}
// String returns the string representation
func (s WorkGroupConfiguration) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *WorkGroupConfiguration) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "WorkGroupConfiguration"}
if s.BytesScannedCutoffPerQuery != nil && *s.BytesScannedCutoffPerQuery < 1e+07 {
invalidParams.Add(aws.NewErrParamMinValue("BytesScannedCutoffPerQuery", 1e+07))
}
if s.ResultConfiguration != nil {
if err := s.ResultConfiguration.Validate(); err != nil {
invalidParams.AddNested("ResultConfiguration", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// The configuration information that will be updated for this workgroup, which
// includes the location in Amazon S3 where query results are stored, the encryption
// option, if any, used for query results, whether the Amazon CloudWatch Metrics
// are enabled for the workgroup, whether the workgroup settings override the
// client-side settings, and the data usage limit for the amount of bytes scanned
// per query, if it is specified.
type WorkGroupConfigurationUpdates struct {
_ struct{} `type:"structure"`
// The upper limit (cutoff) for the amount of bytes a single query in a workgroup
// is allowed to scan.
BytesScannedCutoffPerQuery *int64 `min:"1e+07" type:"long"`
// If set to "true", the settings for the workgroup override client-side settings.
// If set to "false" client-side settings are used. For more information, see
// Workgroup Settings Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
EnforceWorkGroupConfiguration *bool `type:"boolean"`
// Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.
PublishCloudWatchMetricsEnabled *bool `type:"boolean"`
// Indicates that the data usage control limit per query is removed. WorkGroupConfiguration$BytesScannedCutoffPerQuery
RemoveBytesScannedCutoffPerQuery *bool `type:"boolean"`
// If set to true, allows members assigned to a workgroup to specify Amazon
// S3 Requester Pays buckets in queries. If set to false, workgroup members
// cannot query data from Requester Pays buckets, and queries that retrieve
// data from Requester Pays buckets cause an error. The default is false. For
// more information about Requester Pays buckets, see Requester Pays Buckets
// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
// in the Amazon Simple Storage Service Developer Guide.
RequesterPaysEnabled *bool `type:"boolean"`
// The result configuration information about the queries in this workgroup
// that will be updated. Includes the updated results location and an updated
// option for encrypting query results.
ResultConfigurationUpdates *ResultConfigurationUpdates `type:"structure"`
}
// String returns the string representation
func (s WorkGroupConfigurationUpdates) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *WorkGroupConfigurationUpdates) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "WorkGroupConfigurationUpdates"}
if s.BytesScannedCutoffPerQuery != nil && *s.BytesScannedCutoffPerQuery < 1e+07 {
invalidParams.Add(aws.NewErrParamMinValue("BytesScannedCutoffPerQuery", 1e+07))
}
if s.ResultConfigurationUpdates != nil {
if err := s.ResultConfigurationUpdates.Validate(); err != nil {
invalidParams.AddNested("ResultConfigurationUpdates", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// The summary information for the workgroup, which includes its name, state,
// description, and the date and time it was created.
type WorkGroupSummary struct {
_ struct{} `type:"structure"`
// The workgroup creation date and time.
CreationTime *time.Time `type:"timestamp"`
// The workgroup description.
Description *string `type:"string"`
// The name of the workgroup.
Name *string `type:"string"`
// The state of the workgroup.
State WorkGroupState `type:"string" enum:"true"`
}
// String returns the string representation
func (s WorkGroupSummary) String() string {
return awsutil.Prettify(s)
}