aws-sdk-athena 1.26.0 → 1.27.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,7 @@ module Aws::Athena
27
27
  # ## Error Classes
28
28
  # * {InternalServerException}
29
29
  # * {InvalidRequestException}
30
+ # * {MetadataException}
30
31
  # * {ResourceNotFoundException}
31
32
  # * {TooManyRequestsException}
32
33
  #
@@ -71,6 +72,21 @@ module Aws::Athena
71
72
  end
72
73
  end
73
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
83
+
84
+ # @return [String]
85
+ def message
86
+ @message || @data[:message]
87
+ end
88
+ end
89
+
74
90
  class ResourceNotFoundException < ServiceError
75
91
 
76
92
  # @param [Seahorse::Client::RequestContext] context
@@ -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
@@ -565,9 +1003,9 @@ module Aws::Athena
565
1003
  # @return [Integer]
566
1004
  #
567
1005
  # @!attribute [rw] work_group
568
- # The name of the workgroup from which the named queries are returned.
569
- # If a workgroup is not specified, the saved queries for the primary
570
- # workgroup are returned.
1006
+ # The name of the workgroup from which the named queries are being
1007
+ # returned. If a workgroup is not specified, the saved queries for the
1008
+ # primary workgroup are returned.
571
1009
  # @return [String]
572
1010
  #
573
1011
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueriesInput AWS API Documentation
@@ -584,7 +1022,10 @@ module Aws::Athena
584
1022
  # @return [Array<String>]
585
1023
  #
586
1024
  # @!attribute [rw] next_token
587
- # 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.
588
1029
  # @return [String]
589
1030
  #
590
1031
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueriesOutput AWS API Documentation
@@ -605,8 +1046,10 @@ module Aws::Athena
605
1046
  # }
606
1047
  #
607
1048
  # @!attribute [rw] next_token
608
- # The token that specifies where to start pagination if a previous
609
- # 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.
610
1053
  # @return [String]
611
1054
  #
612
1055
  # @!attribute [rw] max_results
@@ -614,9 +1057,9 @@ module Aws::Athena
614
1057
  # @return [Integer]
615
1058
  #
616
1059
  # @!attribute [rw] work_group
617
- # The name of the workgroup from which queries are returned. If a
618
- # workgroup is not specified, a list of available query execution IDs
619
- # for the queries in the primary workgroup is 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.
620
1063
  # @return [String]
621
1064
  #
622
1065
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutionsInput AWS API Documentation
@@ -644,6 +1087,73 @@ module Aws::Athena
644
1087
  include Aws::Structure
645
1088
  end
646
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
+
647
1157
  # @note When making an API call, you may pass ListTagsForResourceInput
648
1158
  # data as a hash:
649
1159
  #
@@ -654,18 +1164,18 @@ module Aws::Athena
654
1164
  # }
655
1165
  #
656
1166
  # @!attribute [rw] resource_arn
657
- # Lists the tags for the workgroup resource with the specified ARN.
1167
+ # Lists the tags for the resource with the specified ARN.
658
1168
  # @return [String]
659
1169
  #
660
1170
  # @!attribute [rw] next_token
661
1171
  # The token for the next set of results, or null if there are no
662
1172
  # additional results for this request, where the request lists the
663
- # tags for the workgroup resource with the specified ARN.
1173
+ # tags for the resource with the specified ARN.
664
1174
  # @return [String]
665
1175
  #
666
1176
  # @!attribute [rw] max_results
667
1177
  # The maximum number of results to be returned per request that lists
668
- # the tags for the workgroup resource.
1178
+ # the tags for the resource.
669
1179
  # @return [Integer]
670
1180
  #
671
1181
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTagsForResourceInput AWS API Documentation
@@ -678,7 +1188,7 @@ module Aws::Athena
678
1188
  end
679
1189
 
680
1190
  # @!attribute [rw] tags
681
- # The list of tags associated with this workgroup.
1191
+ # The list of tags associated with the specified resource.
682
1192
  # @return [Array<Types::Tag>]
683
1193
  #
684
1194
  # @!attribute [rw] next_token
@@ -702,7 +1212,10 @@ module Aws::Athena
702
1212
  # }
703
1213
  #
704
1214
  # @!attribute [rw] next_token
705
- # 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.
706
1219
  # @return [String]
707
1220
  #
708
1221
  # @!attribute [rw] max_results
@@ -723,7 +1236,10 @@ module Aws::Athena
723
1236
  # @return [Array<Types::WorkGroupSummary>]
724
1237
  #
725
1238
  # @!attribute [rw] next_token
726
- # 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.
727
1243
  # @return [String]
728
1244
  #
729
1245
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListWorkGroupsOutput AWS API Documentation
@@ -734,6 +1250,23 @@ module Aws::Athena
734
1250
  include Aws::Structure
735
1251
  end
736
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
+
737
1270
  # A query, where `QueryString` is the list of SQL query statements that
738
1271
  # comprise the query.
739
1272
  #
@@ -833,23 +1366,30 @@ module Aws::Athena
833
1366
  include Aws::Structure
834
1367
  end
835
1368
 
836
- # The database in which the query execution occurs.
1369
+ # The database and data catalog context in which the query execution
1370
+ # occurs.
837
1371
  #
838
1372
  # @note When making an API call, you may pass QueryExecutionContext
839
1373
  # data as a hash:
840
1374
  #
841
1375
  # {
842
1376
  # database: "DatabaseString",
1377
+ # catalog: "CatalogNameString",
843
1378
  # }
844
1379
  #
845
1380
  # @!attribute [rw] database
846
- # 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.
847
1386
  # @return [String]
848
1387
  #
849
1388
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/QueryExecutionContext AWS API Documentation
850
1389
  #
851
1390
  class QueryExecutionContext < Struct.new(
852
- :database)
1391
+ :database,
1392
+ :catalog)
853
1393
  include Aws::Structure
854
1394
  end
855
1395
 
@@ -927,6 +1467,12 @@ module Aws::Athena
927
1467
  # completed without errors. `FAILED` indicates that the query
928
1468
  # experienced an error and did not complete processing. `CANCELLED`
929
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>
930
1476
  # @return [String]
931
1477
  #
932
1478
  # @!attribute [rw] state_change_reason
@@ -1101,7 +1647,8 @@ module Aws::Athena
1101
1647
  end
1102
1648
 
1103
1649
  # The metadata and rows that comprise a query result set. The metadata
1104
- # describes the column structure and data types.
1650
+ # describes the column structure and data types. To return a `ResultSet`
1651
+ # object, use GetQueryResults.
1105
1652
  #
1106
1653
  # @!attribute [rw] rows
1107
1654
  # The rows in the table.
@@ -1121,7 +1668,8 @@ module Aws::Athena
1121
1668
  end
1122
1669
 
1123
1670
  # The metadata that describes the column structure and data types of a
1124
- # table of query results.
1671
+ # table of query results. To return a `ResultSetMetadata` object, use
1672
+ # GetQueryResults.
1125
1673
  #
1126
1674
  # @!attribute [rw] column_info
1127
1675
  # Information about the columns returned in a query result metadata.
@@ -1155,6 +1703,7 @@ module Aws::Athena
1155
1703
  # client_request_token: "IdempotencyToken",
1156
1704
  # query_execution_context: {
1157
1705
  # database: "DatabaseString",
1706
+ # catalog: "CatalogNameString",
1158
1707
  # },
1159
1708
  # result_configuration: {
1160
1709
  # output_location: "String",
@@ -1251,17 +1800,65 @@ module Aws::Athena
1251
1800
  #
1252
1801
  class StopQueryExecutionOutput < Aws::EmptyStructure; end
1253
1802
 
1254
- # A tag that you can add to a resource. A tag is a label that you assign
1255
- # to an AWS Athena resource (a workgroup). Each tag consists of a key
1256
- # and an optional value, both of which you define. Tags enable you to
1257
- # 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
1258
1850
  # environment. Use a consistent set of tag keys to make it easier to
1259
- # search and filter workgroups in your account. The maximum tag key
1260
- # length is 128 Unicode characters in UTF-8. The maximum tag value
1261
- # length is 256 Unicode characters in UTF-8. You can use letters and
1262
- # numbers representable in UTF-8, and the following characters: + - = .
1263
- # \_ : / @. Tag keys and values are case-sensitive. Tag keys must be
1264
- # 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/
1265
1862
  #
1266
1863
  # @note When making an API call, you may pass Tag
1267
1864
  # data as a hash:
@@ -1307,13 +1904,13 @@ module Aws::Athena
1307
1904
  # }
1308
1905
  #
1309
1906
  # @!attribute [rw] resource_arn
1310
- # Requests that one or more tags are added to the resource (such as a
1311
- # 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.
1312
1909
  # @return [String]
1313
1910
  #
1314
1911
  # @!attribute [rw] tags
1315
- # One or more tags, separated by commas, to be added to the resource,
1316
- # 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.
1317
1914
  # @return [Array<Types::Tag>]
1318
1915
  #
1319
1916
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/TagResourceInput AWS API Documentation
@@ -1405,13 +2002,12 @@ module Aws::Athena
1405
2002
  # }
1406
2003
  #
1407
2004
  # @!attribute [rw] resource_arn
1408
- # Removes one or more tags from the workgroup resource for the
1409
- # specified ARN.
2005
+ # Specifies the ARN of the resource from which tags are to be removed.
1410
2006
  # @return [String]
1411
2007
  #
1412
2008
  # @!attribute [rw] tag_keys
1413
- # Removes the tags associated with one or more tag keys from the
1414
- # workgroup resource.
2009
+ # A comma-separated list of one or more tag keys whose tags are to be
2010
+ # removed from the specified resource.
1415
2011
  # @return [Array<String>]
1416
2012
  #
1417
2013
  # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UntagResourceInput AWS API Documentation
@@ -1426,6 +2022,78 @@ module Aws::Athena
1426
2022
  #
1427
2023
  class UntagResourceOutput < Aws::EmptyStructure; end
1428
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
+
1429
2097
  # @note When making an API call, you may pass UpdateWorkGroupInput
1430
2098
  # data as a hash:
1431
2099
  #