aws-sdk-athena 1.22.0 → 1.27.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,33 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Athena
9
+
10
+ # When Athena returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::Athena::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all Athena errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::Athena::Errors::ServiceError
18
+ # # rescues all Athena API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {InternalServerException}
29
+ # * {InvalidRequestException}
30
+ # * {MetadataException}
31
+ # * {ResourceNotFoundException}
32
+ # * {TooManyRequestsException}
33
+ #
34
+ # Additionally, error classes are dynamically generated for service errors based on the error code
35
+ # if they are not defined above.
9
36
  module Errors
10
37
 
11
38
  extend Aws::Errors::DynamicErrors
@@ -23,7 +50,6 @@ module Aws::Athena
23
50
  def message
24
51
  @message || @data[:message]
25
52
  end
26
-
27
53
  end
28
54
 
29
55
  class InvalidRequestException < ServiceError
@@ -44,7 +70,21 @@ module Aws::Athena
44
70
  def message
45
71
  @message || @data[:message]
46
72
  end
73
+ end
74
+
75
+ class MetadataException < ServiceError
76
+
77
+ # @param [Seahorse::Client::RequestContext] context
78
+ # @param [String] message
79
+ # @param [Aws::Athena::Types::MetadataException] data
80
+ def initialize(context, message, data = Aws::EmptyStructure.new)
81
+ super(context, message, data)
82
+ end
47
83
 
84
+ # @return [String]
85
+ def message
86
+ @message || @data[:message]
87
+ end
48
88
  end
49
89
 
50
90
  class ResourceNotFoundException < ServiceError
@@ -65,7 +105,6 @@ module Aws::Athena
65
105
  def resource_name
66
106
  @data[:resource_name]
67
107
  end
68
-
69
108
  end
70
109
 
71
110
  class TooManyRequestsException < ServiceError
@@ -86,7 +125,6 @@ module Aws::Athena
86
125
  def reason
87
126
  @data[:reason]
88
127
  end
89
-
90
128
  end
91
129
 
92
130
  end
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Athena
9
+
9
10
  class Resource
10
11
 
11
12
  # @param options ({})
@@ -76,6 +76,29 @@ module Aws::Athena
76
76
  include Aws::Structure
77
77
  end
78
78
 
79
+ # Contains metadata for a column in a table.
80
+ #
81
+ # @!attribute [rw] name
82
+ # The name of the column.
83
+ # @return [String]
84
+ #
85
+ # @!attribute [rw] type
86
+ # The data type of the column.
87
+ # @return [String]
88
+ #
89
+ # @!attribute [rw] comment
90
+ # Optional information about the column.
91
+ # @return [String]
92
+ #
93
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/Column AWS API Documentation
94
+ #
95
+ class Column < Struct.new(
96
+ :name,
97
+ :type,
98
+ :comment)
99
+ include Aws::Structure
100
+ end
101
+
79
102
  # Information about the columns in a query execution result.
80
103
  #
81
104
  # @!attribute [rw] catalog_name
@@ -136,6 +159,90 @@ module Aws::Athena
136
159
  include Aws::Structure
137
160
  end
138
161
 
162
+ # @note When making an API call, you may pass CreateDataCatalogInput
163
+ # data as a hash:
164
+ #
165
+ # {
166
+ # name: "CatalogNameString", # required
167
+ # type: "LAMBDA", # required, accepts LAMBDA, GLUE, HIVE
168
+ # description: "DescriptionString",
169
+ # parameters: {
170
+ # "KeyString" => "ParametersMapValue",
171
+ # },
172
+ # tags: [
173
+ # {
174
+ # key: "TagKey",
175
+ # value: "TagValue",
176
+ # },
177
+ # ],
178
+ # }
179
+ #
180
+ # @!attribute [rw] name
181
+ # The name of the data catalog to create. The catalog name must be
182
+ # unique for the AWS account and can use a maximum of 128
183
+ # alphanumeric, underscore, at sign, or hyphen characters.
184
+ # @return [String]
185
+ #
186
+ # @!attribute [rw] type
187
+ # The type of data catalog to create: `LAMBDA` for a federated
188
+ # catalog, `GLUE` for AWS Glue Catalog, or `HIVE` for an external hive
189
+ # metastore.
190
+ # @return [String]
191
+ #
192
+ # @!attribute [rw] description
193
+ # A description of the data catalog to be created.
194
+ # @return [String]
195
+ #
196
+ # @!attribute [rw] parameters
197
+ # Specifies the Lambda function or functions to use for creating the
198
+ # data catalog. This is a mapping whose values depend on the catalog
199
+ # type.
200
+ #
201
+ # * For the `HIVE` data catalog type, use the following syntax. The
202
+ # `metadata-function` parameter is required. `The sdk-version`
203
+ # parameter is optional and defaults to the currently supported
204
+ # version.
205
+ #
206
+ # `metadata-function=lambda_arn, sdk-version=version_number `
207
+ #
208
+ # * For the `LAMBDA` data catalog type, use one of the following sets
209
+ # of required parameters, but not both.
210
+ #
211
+ # * If you have one Lambda function that processes metadata and
212
+ # another for reading the actual data, use the following syntax.
213
+ # Both parameters are required.
214
+ #
215
+ # `metadata-function=lambda_arn, record-function=lambda_arn `
216
+ #
217
+ # * If you have a composite Lambda function that processes both
218
+ # metadata and data, use the following syntax to specify your
219
+ # Lambda function.
220
+ #
221
+ # `function=lambda_arn `
222
+ #
223
+ # * The `GLUE` type has no parameters.
224
+ # @return [Hash<String,String>]
225
+ #
226
+ # @!attribute [rw] tags
227
+ # A list of comma separated tags to add to the data catalog that is
228
+ # created.
229
+ # @return [Array<Types::Tag>]
230
+ #
231
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateDataCatalogInput AWS API Documentation
232
+ #
233
+ class CreateDataCatalogInput < Struct.new(
234
+ :name,
235
+ :type,
236
+ :description,
237
+ :parameters,
238
+ :tags)
239
+ include Aws::Structure
240
+ end
241
+
242
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateDataCatalogOutput AWS API Documentation
243
+ #
244
+ class CreateDataCatalogOutput < Aws::EmptyStructure; end
245
+
139
246
  # @note When making an API call, you may pass CreateNamedQueryInput
140
247
  # data as a hash:
141
248
  #
@@ -255,8 +362,8 @@ module Aws::Athena
255
362
  # @return [String]
256
363
  #
257
364
  # @!attribute [rw] tags
258
- # One or more tags, separated by commas, that you want to attach to
259
- # the workgroup as you create it.
365
+ # A list of comma separated tags to add to the workgroup that is
366
+ # created.
260
367
  # @return [Array<Types::Tag>]
261
368
  #
262
369
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateWorkGroupInput AWS API Documentation
@@ -273,6 +380,104 @@ module Aws::Athena
273
380
  #
274
381
  class CreateWorkGroupOutput < Aws::EmptyStructure; end
275
382
 
383
+ # Contains information about a data catalog in an AWS account.
384
+ #
385
+ # @!attribute [rw] name
386
+ # The name of the data catalog. The catalog name must be unique for
387
+ # the AWS account and can use a maximum of 128 alphanumeric,
388
+ # underscore, at sign, or hyphen characters.
389
+ # @return [String]
390
+ #
391
+ # @!attribute [rw] description
392
+ # An optional description of the data catalog.
393
+ # @return [String]
394
+ #
395
+ # @!attribute [rw] type
396
+ # The type of data catalog: `LAMBDA` for a federated catalog, `GLUE`
397
+ # for AWS Glue Catalog, or `HIVE` for an external hive metastore.
398
+ # @return [String]
399
+ #
400
+ # @!attribute [rw] parameters
401
+ # Specifies the Lambda function or functions to use for the data
402
+ # catalog. This is a mapping whose values depend on the catalog type.
403
+ #
404
+ # * For the `HIVE` data catalog type, use the following syntax. The
405
+ # `metadata-function` parameter is required. `The sdk-version`
406
+ # parameter is optional and defaults to the currently supported
407
+ # version.
408
+ #
409
+ # `metadata-function=lambda_arn, sdk-version=version_number `
410
+ #
411
+ # * For the `LAMBDA` data catalog type, use one of the following sets
412
+ # of required parameters, but not both.
413
+ #
414
+ # * If you have one Lambda function that processes metadata and
415
+ # another for reading the actual data, use the following syntax.
416
+ # Both parameters are required.
417
+ #
418
+ # `metadata-function=lambda_arn, record-function=lambda_arn `
419
+ #
420
+ # * If you have a composite Lambda function that processes both
421
+ # metadata and data, use the following syntax to specify your
422
+ # Lambda function.
423
+ #
424
+ # `function=lambda_arn `
425
+ #
426
+ # * The `GLUE` type has no parameters.
427
+ # @return [Hash<String,String>]
428
+ #
429
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DataCatalog AWS API Documentation
430
+ #
431
+ class DataCatalog < Struct.new(
432
+ :name,
433
+ :description,
434
+ :type,
435
+ :parameters)
436
+ include Aws::Structure
437
+ end
438
+
439
+ # The summary information for the data catalog, which includes its name
440
+ # and type.
441
+ #
442
+ # @!attribute [rw] catalog_name
443
+ # The name of the data catalog.
444
+ # @return [String]
445
+ #
446
+ # @!attribute [rw] type
447
+ # The data catalog type.
448
+ # @return [String]
449
+ #
450
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DataCatalogSummary AWS API Documentation
451
+ #
452
+ class DataCatalogSummary < Struct.new(
453
+ :catalog_name,
454
+ :type)
455
+ include Aws::Structure
456
+ end
457
+
458
+ # Contains metadata information for a database in a data catalog.
459
+ #
460
+ # @!attribute [rw] name
461
+ # The name of the database.
462
+ # @return [String]
463
+ #
464
+ # @!attribute [rw] description
465
+ # An optional description of the database.
466
+ # @return [String]
467
+ #
468
+ # @!attribute [rw] parameters
469
+ # A set of custom key/value pairs.
470
+ # @return [Hash<String,String>]
471
+ #
472
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/Database AWS API Documentation
473
+ #
474
+ class Database < Struct.new(
475
+ :name,
476
+ :description,
477
+ :parameters)
478
+ include Aws::Structure
479
+ end
480
+
276
481
  # A piece of data (a field in the table).
277
482
  #
278
483
  # @!attribute [rw] var_char_value
@@ -286,6 +491,28 @@ module Aws::Athena
286
491
  include Aws::Structure
287
492
  end
288
493
 
494
+ # @note When making an API call, you may pass DeleteDataCatalogInput
495
+ # data as a hash:
496
+ #
497
+ # {
498
+ # name: "CatalogNameString", # required
499
+ # }
500
+ #
501
+ # @!attribute [rw] name
502
+ # The name of the data catalog to delete.
503
+ # @return [String]
504
+ #
505
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteDataCatalogInput AWS API Documentation
506
+ #
507
+ class DeleteDataCatalogInput < Struct.new(
508
+ :name)
509
+ include Aws::Structure
510
+ end
511
+
512
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteDataCatalogOutput AWS API Documentation
513
+ #
514
+ class DeleteDataCatalogOutput < Aws::EmptyStructure; end
515
+
289
516
  # @note When making an API call, you may pass DeleteNamedQueryInput
290
517
  # data as a hash:
291
518
  #
@@ -375,6 +602,70 @@ module Aws::Athena
375
602
  include Aws::Structure
376
603
  end
377
604
 
605
+ # @note When making an API call, you may pass GetDataCatalogInput
606
+ # data as a hash:
607
+ #
608
+ # {
609
+ # name: "CatalogNameString", # required
610
+ # }
611
+ #
612
+ # @!attribute [rw] name
613
+ # The name of the data catalog to return.
614
+ # @return [String]
615
+ #
616
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDataCatalogInput AWS API Documentation
617
+ #
618
+ class GetDataCatalogInput < Struct.new(
619
+ :name)
620
+ include Aws::Structure
621
+ end
622
+
623
+ # @!attribute [rw] data_catalog
624
+ # The data catalog returned.
625
+ # @return [Types::DataCatalog]
626
+ #
627
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDataCatalogOutput AWS API Documentation
628
+ #
629
+ class GetDataCatalogOutput < Struct.new(
630
+ :data_catalog)
631
+ include Aws::Structure
632
+ end
633
+
634
+ # @note When making an API call, you may pass GetDatabaseInput
635
+ # data as a hash:
636
+ #
637
+ # {
638
+ # catalog_name: "CatalogNameString", # required
639
+ # database_name: "NameString", # required
640
+ # }
641
+ #
642
+ # @!attribute [rw] catalog_name
643
+ # The name of the data catalog that contains the database to return.
644
+ # @return [String]
645
+ #
646
+ # @!attribute [rw] database_name
647
+ # The name of the database to return.
648
+ # @return [String]
649
+ #
650
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDatabaseInput AWS API Documentation
651
+ #
652
+ class GetDatabaseInput < Struct.new(
653
+ :catalog_name,
654
+ :database_name)
655
+ include Aws::Structure
656
+ end
657
+
658
+ # @!attribute [rw] database
659
+ # The database returned.
660
+ # @return [Types::Database]
661
+ #
662
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDatabaseOutput AWS API Documentation
663
+ #
664
+ class GetDatabaseOutput < Struct.new(
665
+ :database)
666
+ include Aws::Structure
667
+ end
668
+
378
669
  # @note When making an API call, you may pass GetNamedQueryInput
379
670
  # data as a hash:
380
671
  #
@@ -447,8 +738,10 @@ module Aws::Athena
447
738
  # @return [String]
448
739
  #
449
740
  # @!attribute [rw] next_token
450
- # The token that specifies where to start pagination if a previous
451
- # request was truncated.
741
+ # A token generated by the Athena service that specifies where to
742
+ # continue pagination if a previous request was truncated. To obtain
743
+ # the next set of pages, pass in the `NextToken` from the response
744
+ # object of the previous page call.
452
745
  # @return [String]
453
746
  #
454
747
  # @!attribute [rw] max_results
@@ -473,7 +766,10 @@ module Aws::Athena
473
766
  # @return [Types::ResultSet]
474
767
  #
475
768
  # @!attribute [rw] next_token
476
- # A token to be used by the next request if this request is truncated.
769
+ # A token generated by the Athena service that specifies where to
770
+ # continue pagination if a previous request was truncated. To obtain
771
+ # the next set of pages, pass in the `NextToken` from the response
772
+ # object of the previous page call.
477
773
  # @return [String]
478
774
  #
479
775
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResultsOutput AWS API Documentation
@@ -485,6 +781,48 @@ module Aws::Athena
485
781
  include Aws::Structure
486
782
  end
487
783
 
784
+ # @note When making an API call, you may pass GetTableMetadataInput
785
+ # data as a hash:
786
+ #
787
+ # {
788
+ # catalog_name: "CatalogNameString", # required
789
+ # database_name: "NameString", # required
790
+ # table_name: "NameString", # required
791
+ # }
792
+ #
793
+ # @!attribute [rw] catalog_name
794
+ # The name of the data catalog that contains the database and table
795
+ # metadata to return.
796
+ # @return [String]
797
+ #
798
+ # @!attribute [rw] database_name
799
+ # The name of the database that contains the table metadata to return.
800
+ # @return [String]
801
+ #
802
+ # @!attribute [rw] table_name
803
+ # The name of the table for which metadata is returned.
804
+ # @return [String]
805
+ #
806
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetTableMetadataInput AWS API Documentation
807
+ #
808
+ class GetTableMetadataInput < Struct.new(
809
+ :catalog_name,
810
+ :database_name,
811
+ :table_name)
812
+ include Aws::Structure
813
+ end
814
+
815
+ # @!attribute [rw] table_metadata
816
+ # An object that contains table metadata.
817
+ # @return [Types::TableMetadata]
818
+ #
819
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetTableMetadataOutput AWS API Documentation
820
+ #
821
+ class GetTableMetadataOutput < Struct.new(
822
+ :table_metadata)
823
+ include Aws::Structure
824
+ end
825
+
488
826
  # @note When making an API call, you may pass GetWorkGroupInput
489
827
  # data as a hash:
490
828
  #
@@ -546,6 +884,104 @@ module Aws::Athena
546
884
  include Aws::Structure
547
885
  end
548
886
 
887
+ # @note When making an API call, you may pass ListDataCatalogsInput
888
+ # data as a hash:
889
+ #
890
+ # {
891
+ # next_token: "Token",
892
+ # max_results: 1,
893
+ # }
894
+ #
895
+ # @!attribute [rw] next_token
896
+ # A token generated by the Athena service that specifies where to
897
+ # continue pagination if a previous request was truncated. To obtain
898
+ # the next set of pages, pass in the NextToken from the response
899
+ # object of the previous page call.
900
+ # @return [String]
901
+ #
902
+ # @!attribute [rw] max_results
903
+ # Specifies the maximum number of data catalogs to return.
904
+ # @return [Integer]
905
+ #
906
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDataCatalogsInput AWS API Documentation
907
+ #
908
+ class ListDataCatalogsInput < Struct.new(
909
+ :next_token,
910
+ :max_results)
911
+ include Aws::Structure
912
+ end
913
+
914
+ # @!attribute [rw] data_catalogs_summary
915
+ # A summary list of data catalogs.
916
+ # @return [Array<Types::DataCatalogSummary>]
917
+ #
918
+ # @!attribute [rw] next_token
919
+ # A token generated by the Athena service that specifies where to
920
+ # continue pagination if a previous request was truncated. To obtain
921
+ # the next set of pages, pass in the NextToken from the response
922
+ # object of the previous page call.
923
+ # @return [String]
924
+ #
925
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDataCatalogsOutput AWS API Documentation
926
+ #
927
+ class ListDataCatalogsOutput < Struct.new(
928
+ :data_catalogs_summary,
929
+ :next_token)
930
+ include Aws::Structure
931
+ end
932
+
933
+ # @note When making an API call, you may pass ListDatabasesInput
934
+ # data as a hash:
935
+ #
936
+ # {
937
+ # catalog_name: "CatalogNameString", # required
938
+ # next_token: "Token",
939
+ # max_results: 1,
940
+ # }
941
+ #
942
+ # @!attribute [rw] catalog_name
943
+ # The name of the data catalog that contains the databases to return.
944
+ # @return [String]
945
+ #
946
+ # @!attribute [rw] next_token
947
+ # A token generated by the Athena service that specifies where to
948
+ # continue pagination if a previous request was truncated. To obtain
949
+ # the next set of pages, pass in the `NextToken` from the response
950
+ # object of the previous page call.
951
+ # @return [String]
952
+ #
953
+ # @!attribute [rw] max_results
954
+ # Specifies the maximum number of results to return.
955
+ # @return [Integer]
956
+ #
957
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDatabasesInput AWS API Documentation
958
+ #
959
+ class ListDatabasesInput < Struct.new(
960
+ :catalog_name,
961
+ :next_token,
962
+ :max_results)
963
+ include Aws::Structure
964
+ end
965
+
966
+ # @!attribute [rw] database_list
967
+ # A list of databases from a data catalog.
968
+ # @return [Array<Types::Database>]
969
+ #
970
+ # @!attribute [rw] next_token
971
+ # A token generated by the Athena service that specifies where to
972
+ # continue pagination if a previous request was truncated. To obtain
973
+ # the next set of pages, pass in the NextToken from the response
974
+ # object of the previous page call.
975
+ # @return [String]
976
+ #
977
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDatabasesOutput AWS API Documentation
978
+ #
979
+ class ListDatabasesOutput < Struct.new(
980
+ :database_list,
981
+ :next_token)
982
+ include Aws::Structure
983
+ end
984
+
549
985
  # @note When making an API call, you may pass ListNamedQueriesInput
550
986
  # data as a hash:
551
987
  #
@@ -556,8 +992,10 @@ module Aws::Athena
556
992
  # }
557
993
  #
558
994
  # @!attribute [rw] next_token
559
- # The token that specifies where to start pagination if a previous
560
- # request was truncated.
995
+ # A token generated by the Athena service that specifies where to
996
+ # continue pagination if a previous request was truncated. To obtain
997
+ # the next set of pages, pass in the `NextToken` from the response
998
+ # object of the previous page call.
561
999
  # @return [String]
562
1000
  #
563
1001
  # @!attribute [rw] max_results
@@ -566,7 +1004,8 @@ module Aws::Athena
566
1004
  #
567
1005
  # @!attribute [rw] work_group
568
1006
  # The name of the workgroup from which the named queries are being
569
- # returned.
1007
+ # returned. If a workgroup is not specified, the saved queries for the
1008
+ # primary workgroup are returned.
570
1009
  # @return [String]
571
1010
  #
572
1011
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueriesInput AWS API Documentation
@@ -583,7 +1022,10 @@ module Aws::Athena
583
1022
  # @return [Array<String>]
584
1023
  #
585
1024
  # @!attribute [rw] next_token
586
- # A token to be used by the next request if this request is truncated.
1025
+ # A token generated by the Athena service that specifies where to
1026
+ # continue pagination if a previous request was truncated. To obtain
1027
+ # the next set of pages, pass in the `NextToken` from the response
1028
+ # object of the previous page call.
587
1029
  # @return [String]
588
1030
  #
589
1031
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueriesOutput AWS API Documentation
@@ -604,8 +1046,10 @@ module Aws::Athena
604
1046
  # }
605
1047
  #
606
1048
  # @!attribute [rw] next_token
607
- # The token that specifies where to start pagination if a previous
608
- # request was truncated.
1049
+ # A token generated by the Athena service that specifies where to
1050
+ # continue pagination if a previous request was truncated. To obtain
1051
+ # the next set of pages, pass in the `NextToken` from the response
1052
+ # object of the previous page call.
609
1053
  # @return [String]
610
1054
  #
611
1055
  # @!attribute [rw] max_results
@@ -613,7 +1057,9 @@ module Aws::Athena
613
1057
  # @return [Integer]
614
1058
  #
615
1059
  # @!attribute [rw] work_group
616
- # The name of the workgroup from which queries are being returned.
1060
+ # The name of the workgroup from which queries are being returned. If
1061
+ # a workgroup is not specified, a list of available query execution
1062
+ # IDs for the queries in the primary workgroup is returned.
617
1063
  # @return [String]
618
1064
  #
619
1065
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutionsInput AWS API Documentation
@@ -641,6 +1087,73 @@ module Aws::Athena
641
1087
  include Aws::Structure
642
1088
  end
643
1089
 
1090
+ # @note When making an API call, you may pass ListTableMetadataInput
1091
+ # data as a hash:
1092
+ #
1093
+ # {
1094
+ # catalog_name: "CatalogNameString", # required
1095
+ # database_name: "NameString", # required
1096
+ # expression: "ExpressionString",
1097
+ # next_token: "Token",
1098
+ # max_results: 1,
1099
+ # }
1100
+ #
1101
+ # @!attribute [rw] catalog_name
1102
+ # The name of the data catalog for which table metadata should be
1103
+ # returned.
1104
+ # @return [String]
1105
+ #
1106
+ # @!attribute [rw] database_name
1107
+ # The name of the database for which table metadata should be
1108
+ # returned.
1109
+ # @return [String]
1110
+ #
1111
+ # @!attribute [rw] expression
1112
+ # A regex filter that pattern-matches table names. If no expression is
1113
+ # supplied, metadata for all tables are listed.
1114
+ # @return [String]
1115
+ #
1116
+ # @!attribute [rw] next_token
1117
+ # A token generated by the Athena service that specifies where to
1118
+ # continue pagination if a previous request was truncated. To obtain
1119
+ # the next set of pages, pass in the NextToken from the response
1120
+ # object of the previous page call.
1121
+ # @return [String]
1122
+ #
1123
+ # @!attribute [rw] max_results
1124
+ # Specifies the maximum number of results to return.
1125
+ # @return [Integer]
1126
+ #
1127
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTableMetadataInput AWS API Documentation
1128
+ #
1129
+ class ListTableMetadataInput < Struct.new(
1130
+ :catalog_name,
1131
+ :database_name,
1132
+ :expression,
1133
+ :next_token,
1134
+ :max_results)
1135
+ include Aws::Structure
1136
+ end
1137
+
1138
+ # @!attribute [rw] table_metadata_list
1139
+ # A list of table metadata.
1140
+ # @return [Array<Types::TableMetadata>]
1141
+ #
1142
+ # @!attribute [rw] next_token
1143
+ # A token generated by the Athena service that specifies where to
1144
+ # continue pagination if a previous request was truncated. To obtain
1145
+ # the next set of pages, pass in the NextToken from the response
1146
+ # object of the previous page call.
1147
+ # @return [String]
1148
+ #
1149
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTableMetadataOutput AWS API Documentation
1150
+ #
1151
+ class ListTableMetadataOutput < Struct.new(
1152
+ :table_metadata_list,
1153
+ :next_token)
1154
+ include Aws::Structure
1155
+ end
1156
+
644
1157
  # @note When making an API call, you may pass ListTagsForResourceInput
645
1158
  # data as a hash:
646
1159
  #
@@ -651,18 +1164,18 @@ module Aws::Athena
651
1164
  # }
652
1165
  #
653
1166
  # @!attribute [rw] resource_arn
654
- # Lists the tags for the workgroup resource with the specified ARN.
1167
+ # Lists the tags for the resource with the specified ARN.
655
1168
  # @return [String]
656
1169
  #
657
1170
  # @!attribute [rw] next_token
658
1171
  # The token for the next set of results, or null if there are no
659
1172
  # additional results for this request, where the request lists the
660
- # tags for the workgroup resource with the specified ARN.
1173
+ # tags for the resource with the specified ARN.
661
1174
  # @return [String]
662
1175
  #
663
1176
  # @!attribute [rw] max_results
664
1177
  # The maximum number of results to be returned per request that lists
665
- # the tags for the workgroup resource.
1178
+ # the tags for the resource.
666
1179
  # @return [Integer]
667
1180
  #
668
1181
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTagsForResourceInput AWS API Documentation
@@ -675,7 +1188,7 @@ module Aws::Athena
675
1188
  end
676
1189
 
677
1190
  # @!attribute [rw] tags
678
- # The list of tags associated with this workgroup.
1191
+ # The list of tags associated with the specified resource.
679
1192
  # @return [Array<Types::Tag>]
680
1193
  #
681
1194
  # @!attribute [rw] next_token
@@ -699,7 +1212,10 @@ module Aws::Athena
699
1212
  # }
700
1213
  #
701
1214
  # @!attribute [rw] next_token
702
- # A token to be used by the next request if this request is truncated.
1215
+ # A token generated by the Athena service that specifies where to
1216
+ # continue pagination if a previous request was truncated. To obtain
1217
+ # the next set of pages, pass in the `NextToken` from the response
1218
+ # object of the previous page call.
703
1219
  # @return [String]
704
1220
  #
705
1221
  # @!attribute [rw] max_results
@@ -720,7 +1236,10 @@ module Aws::Athena
720
1236
  # @return [Array<Types::WorkGroupSummary>]
721
1237
  #
722
1238
  # @!attribute [rw] next_token
723
- # A token to be used by the next request if this request is truncated.
1239
+ # A token generated by the Athena service that specifies where to
1240
+ # continue pagination if a previous request was truncated. To obtain
1241
+ # the next set of pages, pass in the `NextToken` from the response
1242
+ # object of the previous page call.
724
1243
  # @return [String]
725
1244
  #
726
1245
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListWorkGroupsOutput AWS API Documentation
@@ -731,6 +1250,23 @@ module Aws::Athena
731
1250
  include Aws::Structure
732
1251
  end
733
1252
 
1253
+ # An exception that Athena received when it called a custom metastore.
1254
+ # Occurs if the error is not caused by user input
1255
+ # (`InvalidRequestException`) or from the Athena platform
1256
+ # (`InternalServerException`). For example, if a user-created Lambda
1257
+ # function is missing permissions, the Lambda `4XX` exception is
1258
+ # returned in a `MetadataException`.
1259
+ #
1260
+ # @!attribute [rw] message
1261
+ # @return [String]
1262
+ #
1263
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/MetadataException AWS API Documentation
1264
+ #
1265
+ class MetadataException < Struct.new(
1266
+ :message)
1267
+ include Aws::Structure
1268
+ end
1269
+
734
1270
  # A query, where `QueryString` is the list of SQL query statements that
735
1271
  # comprise the query.
736
1272
  #
@@ -807,9 +1343,9 @@ module Aws::Athena
807
1343
  # @return [Types::QueryExecutionStatus]
808
1344
  #
809
1345
  # @!attribute [rw] statistics
810
- # The amount of data scanned during the query execution and the amount
811
- # of time that it took to execute, and the type of statement that was
812
- # run.
1346
+ # Query execution statistics, such as the amount of data scanned, the
1347
+ # amount of time that the query took to process, and the type of
1348
+ # statement that was run.
813
1349
  # @return [Types::QueryExecutionStatistics]
814
1350
  #
815
1351
  # @!attribute [rw] work_group
@@ -830,23 +1366,30 @@ module Aws::Athena
830
1366
  include Aws::Structure
831
1367
  end
832
1368
 
833
- # The database in which the query execution occurs.
1369
+ # The database and data catalog context in which the query execution
1370
+ # occurs.
834
1371
  #
835
1372
  # @note When making an API call, you may pass QueryExecutionContext
836
1373
  # data as a hash:
837
1374
  #
838
1375
  # {
839
1376
  # database: "DatabaseString",
1377
+ # catalog: "CatalogNameString",
840
1378
  # }
841
1379
  #
842
1380
  # @!attribute [rw] database
843
- # The name of the database.
1381
+ # The name of the database used in the query execution.
1382
+ # @return [String]
1383
+ #
1384
+ # @!attribute [rw] catalog
1385
+ # The name of the data catalog used in the query execution.
844
1386
  # @return [String]
845
1387
  #
846
1388
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/QueryExecutionContext AWS API Documentation
847
1389
  #
848
1390
  class QueryExecutionContext < Struct.new(
849
- :database)
1391
+ :database,
1392
+ :catalog)
850
1393
  include Aws::Structure
851
1394
  end
852
1395
 
@@ -917,14 +1460,19 @@ module Aws::Athena
917
1460
  # reason (if applicable) for the query execution.
918
1461
  #
919
1462
  # @!attribute [rw] state
920
- # The state of query execution. `QUEUED` state is listed but is not
921
- # used by Athena and is reserved for future use. `RUNNING` indicates
922
- # that the query has been submitted to the service, and Athena will
923
- # execute the query as soon as resources are available. `SUCCEEDED`
924
- # indicates that the query completed without errors. `FAILED`
925
- # indicates that the query experienced an error and did not complete
926
- # processing. `CANCELLED` indicates that a user input interrupted
927
- # query execution.
1463
+ # The state of query execution. `QUEUED` indicates that the query has
1464
+ # been submitted to the service, and Athena will execute the query as
1465
+ # soon as resources are available. `RUNNING` indicates that the query
1466
+ # is in execution phase. `SUCCEEDED` indicates that the query
1467
+ # completed without errors. `FAILED` indicates that the query
1468
+ # experienced an error and did not complete processing. `CANCELLED`
1469
+ # indicates that a user input interrupted query execution.
1470
+ #
1471
+ # <note markdown="1"> Athena automatically retries your queries in cases of certain
1472
+ # transient errors. As a result, you may see the query state
1473
+ # transition from `RUNNING` or `FAILED` to `QUEUED`.
1474
+ #
1475
+ # </note>
928
1476
  # @return [String]
929
1477
  #
930
1478
  # @!attribute [rw] state_change_reason
@@ -1099,7 +1647,8 @@ module Aws::Athena
1099
1647
  end
1100
1648
 
1101
1649
  # The metadata and rows that comprise a query result set. The metadata
1102
- # describes the column structure and data types.
1650
+ # describes the column structure and data types. To return a `ResultSet`
1651
+ # object, use GetQueryResults.
1103
1652
  #
1104
1653
  # @!attribute [rw] rows
1105
1654
  # The rows in the table.
@@ -1119,7 +1668,8 @@ module Aws::Athena
1119
1668
  end
1120
1669
 
1121
1670
  # The metadata that describes the column structure and data types of a
1122
- # table of query results.
1671
+ # table of query results. To return a `ResultSetMetadata` object, use
1672
+ # GetQueryResults.
1123
1673
  #
1124
1674
  # @!attribute [rw] column_info
1125
1675
  # Information about the columns returned in a query result metadata.
@@ -1153,6 +1703,7 @@ module Aws::Athena
1153
1703
  # client_request_token: "IdempotencyToken",
1154
1704
  # query_execution_context: {
1155
1705
  # database: "DatabaseString",
1706
+ # catalog: "CatalogNameString",
1156
1707
  # },
1157
1708
  # result_configuration: {
1158
1709
  # output_location: "String",
@@ -1249,17 +1800,65 @@ module Aws::Athena
1249
1800
  #
1250
1801
  class StopQueryExecutionOutput < Aws::EmptyStructure; end
1251
1802
 
1252
- # A tag that you can add to a resource. A tag is a label that you assign
1253
- # to an AWS Athena resource (a workgroup). Each tag consists of a key
1254
- # and an optional value, both of which you define. Tags enable you to
1255
- # categorize workgroups in Athena, for example, by purpose, owner, or
1803
+ # Contains metadata for a table.
1804
+ #
1805
+ # @!attribute [rw] name
1806
+ # The name of the table.
1807
+ # @return [String]
1808
+ #
1809
+ # @!attribute [rw] create_time
1810
+ # The time that the table was created.
1811
+ # @return [Time]
1812
+ #
1813
+ # @!attribute [rw] last_access_time
1814
+ # The last time the table was accessed.
1815
+ # @return [Time]
1816
+ #
1817
+ # @!attribute [rw] table_type
1818
+ # The type of table. In Athena, only `EXTERNAL_TABLE` is supported.
1819
+ # @return [String]
1820
+ #
1821
+ # @!attribute [rw] columns
1822
+ # A list of the columns in the table.
1823
+ # @return [Array<Types::Column>]
1824
+ #
1825
+ # @!attribute [rw] partition_keys
1826
+ # A list of the partition keys in the table.
1827
+ # @return [Array<Types::Column>]
1828
+ #
1829
+ # @!attribute [rw] parameters
1830
+ # A set of custom key/value pairs for table properties.
1831
+ # @return [Hash<String,String>]
1832
+ #
1833
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/TableMetadata AWS API Documentation
1834
+ #
1835
+ class TableMetadata < Struct.new(
1836
+ :name,
1837
+ :create_time,
1838
+ :last_access_time,
1839
+ :table_type,
1840
+ :columns,
1841
+ :partition_keys,
1842
+ :parameters)
1843
+ include Aws::Structure
1844
+ end
1845
+
1846
+ # A label that you assign to a resource. In Athena, a resource can be a
1847
+ # workgroup or data catalog. Each tag consists of a key and an optional
1848
+ # value, both of which you define. For example, you can use tags to
1849
+ # categorize Athena workgroups or data catalogs by purpose, owner, or
1256
1850
  # environment. Use a consistent set of tag keys to make it easier to
1257
- # search and filter workgroups in your account. The maximum tag key
1258
- # length is 128 Unicode characters in UTF-8. The maximum tag value
1259
- # length is 256 Unicode characters in UTF-8. You can use letters and
1260
- # numbers representable in UTF-8, and the following characters: + - = .
1261
- # \_ : / @. Tag keys and values are case-sensitive. Tag keys must be
1262
- # unique per resource.
1851
+ # search and filter workgroups or data catalogs in your account. For
1852
+ # best practices, see [Tagging Best Practices][1]. Tag keys can be from
1853
+ # 1 to 128 UTF-8 Unicode characters, and tag values can be from 0 to 256
1854
+ # UTF-8 Unicode characters. Tags can use letters and numbers
1855
+ # representable in UTF-8, and the following characters: + - = . \_ : /
1856
+ # @. Tag keys and values are case-sensitive. Tag keys must be unique per
1857
+ # resource. If you specify more than one tag, separate them by commas.
1858
+ #
1859
+ #
1860
+ #
1861
+ # [1]: https://aws.amazon.com/answers/account-management/aws-tagging-strategies/
1263
1862
  #
1264
1863
  # @note When making an API call, you may pass Tag
1265
1864
  # data as a hash:
@@ -1305,13 +1904,13 @@ module Aws::Athena
1305
1904
  # }
1306
1905
  #
1307
1906
  # @!attribute [rw] resource_arn
1308
- # Requests that one or more tags are added to the resource (such as a
1309
- # workgroup) for the specified ARN.
1907
+ # Specifies the ARN of the Athena resource (workgroup or data catalog)
1908
+ # to which tags are to be added.
1310
1909
  # @return [String]
1311
1910
  #
1312
1911
  # @!attribute [rw] tags
1313
- # One or more tags, separated by commas, to be added to the resource,
1314
- # such as a workgroup.
1912
+ # A collection of one or more tags, separated by commas, to be added
1913
+ # to an Athena workgroup or data catalog resource.
1315
1914
  # @return [Array<Types::Tag>]
1316
1915
  #
1317
1916
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/TagResourceInput AWS API Documentation
@@ -1403,13 +2002,12 @@ module Aws::Athena
1403
2002
  # }
1404
2003
  #
1405
2004
  # @!attribute [rw] resource_arn
1406
- # Removes one or more tags from the workgroup resource for the
1407
- # specified ARN.
2005
+ # Specifies the ARN of the resource from which tags are to be removed.
1408
2006
  # @return [String]
1409
2007
  #
1410
2008
  # @!attribute [rw] tag_keys
1411
- # Removes the tags associated with one or more tag keys from the
1412
- # workgroup resource.
2009
+ # A comma-separated list of one or more tag keys whose tags are to be
2010
+ # removed from the specified resource.
1413
2011
  # @return [Array<String>]
1414
2012
  #
1415
2013
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UntagResourceInput AWS API Documentation
@@ -1424,6 +2022,78 @@ module Aws::Athena
1424
2022
  #
1425
2023
  class UntagResourceOutput < Aws::EmptyStructure; end
1426
2024
 
2025
+ # @note When making an API call, you may pass UpdateDataCatalogInput
2026
+ # data as a hash:
2027
+ #
2028
+ # {
2029
+ # name: "CatalogNameString", # required
2030
+ # type: "LAMBDA", # required, accepts LAMBDA, GLUE, HIVE
2031
+ # description: "DescriptionString",
2032
+ # parameters: {
2033
+ # "KeyString" => "ParametersMapValue",
2034
+ # },
2035
+ # }
2036
+ #
2037
+ # @!attribute [rw] name
2038
+ # The name of the data catalog to update. The catalog name must be
2039
+ # unique for the AWS account and can use a maximum of 128
2040
+ # alphanumeric, underscore, at sign, or hyphen characters.
2041
+ # @return [String]
2042
+ #
2043
+ # @!attribute [rw] type
2044
+ # Specifies the type of data catalog to update. Specify `LAMBDA` for a
2045
+ # federated catalog, `GLUE` for AWS Glue Catalog, or `HIVE` for an
2046
+ # external hive metastore.
2047
+ # @return [String]
2048
+ #
2049
+ # @!attribute [rw] description
2050
+ # New or modified text that describes the data catalog.
2051
+ # @return [String]
2052
+ #
2053
+ # @!attribute [rw] parameters
2054
+ # Specifies the Lambda function or functions to use for updating the
2055
+ # data catalog. This is a mapping whose values depend on the catalog
2056
+ # type.
2057
+ #
2058
+ # * For the `HIVE` data catalog type, use the following syntax. The
2059
+ # `metadata-function` parameter is required. `The sdk-version`
2060
+ # parameter is optional and defaults to the currently supported
2061
+ # version.
2062
+ #
2063
+ # `metadata-function=lambda_arn, sdk-version=version_number `
2064
+ #
2065
+ # * For the `LAMBDA` data catalog type, use one of the following sets
2066
+ # of required parameters, but not both.
2067
+ #
2068
+ # * If you have one Lambda function that processes metadata and
2069
+ # another for reading the actual data, use the following syntax.
2070
+ # Both parameters are required.
2071
+ #
2072
+ # `metadata-function=lambda_arn, record-function=lambda_arn `
2073
+ #
2074
+ # * If you have a composite Lambda function that processes both
2075
+ # metadata and data, use the following syntax to specify your
2076
+ # Lambda function.
2077
+ #
2078
+ # `function=lambda_arn `
2079
+ #
2080
+ # * The `GLUE` type has no parameters.
2081
+ # @return [Hash<String,String>]
2082
+ #
2083
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateDataCatalogInput AWS API Documentation
2084
+ #
2085
+ class UpdateDataCatalogInput < Struct.new(
2086
+ :name,
2087
+ :type,
2088
+ :description,
2089
+ :parameters)
2090
+ include Aws::Structure
2091
+ end
2092
+
2093
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateDataCatalogOutput AWS API Documentation
2094
+ #
2095
+ class UpdateDataCatalogOutput < Aws::EmptyStructure; end
2096
+
1427
2097
  # @note When making an API call, you may pass UpdateWorkGroupInput
1428
2098
  # data as a hash:
1429
2099
  #