aws-sdk-athena 1.25.0 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a94c044e0aede9a181dda056ceb1ac911229f6cbd8d8c7b4239031cf70f74df7
4
- data.tar.gz: 6a58d0e5b2abcc0e19e9a0a8ce9ef2cf9524d5988d4ac9917e4e27326722489b
3
+ metadata.gz: 5909a19369451e35dec5ee23568eb4dda3fec47d1acd736e72b3b3391c20d254
4
+ data.tar.gz: 6d4664bfea466cddd2945dcd650eb4f9959703e41f267581efc2a654932fa96e
5
5
  SHA512:
6
- metadata.gz: 4682da88df10797acc8cc6a3033af63a1ec057dce1ffad7ed92f581ca70660493c56adb1e395a31ae3b4d2ebecc660fc1d2400e17d3c9c2ed29dd6df551483f9
7
- data.tar.gz: 6c0c68e5374603b8775dabaef37b6091eeb9f471356d4ad57f63b6dc1a4c5162a5b02e9c30039aaa90ec205eda0de40327859d2968087a2263ac2940470f7f34
6
+ metadata.gz: 39c2288209b40273f012c7c9340315358d439104204a3c607cf07152098e7e8d6bd93bad177844153e0eb07ce1e275ea86fed27f243d2d72b8b06adb39e27814
7
+ data.tar.gz: ec4ed48084fcdfe09541bcc780f5f3c17a03a7d9e16d503012b89861b1b17862b7262c5ee91468432b6e09a49a344cc5aca49b62a848a306fa9758407110ee37
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
@@ -45,6 +47,6 @@ require_relative 'aws-sdk-athena/customizations'
45
47
  # @service
46
48
  module Aws::Athena
47
49
 
48
- GEM_VERSION = '1.25.0'
50
+ GEM_VERSION = '1.30.0'
49
51
 
50
52
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # WARNING ABOUT GENERATED CODE
2
4
  #
3
5
  # This file is generated. See the contributing guide for more information:
@@ -24,6 +26,7 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
26
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
27
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
28
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
27
30
  require 'aws-sdk-core/plugins/signature_v4.rb'
28
31
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
29
32
 
@@ -69,6 +72,7 @@ module Aws::Athena
69
72
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
70
73
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
71
74
  add_plugin(Aws::Plugins::TransferEncoding)
75
+ add_plugin(Aws::Plugins::HttpChecksum)
72
76
  add_plugin(Aws::Plugins::SignatureV4)
73
77
  add_plugin(Aws::Plugins::Protocols::JsonRpc)
74
78
 
@@ -161,7 +165,7 @@ module Aws::Athena
161
165
  # @option options [String] :endpoint
162
166
  # The client endpoint is normally constructed from the `:region`
163
167
  # option. You should only configure an `:endpoint` when connecting
164
- # to test endpoints. This should be a valid HTTP(S) URI.
168
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
165
169
  #
166
170
  # @option options [Integer] :endpoint_cache_max_entries (1000)
167
171
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -176,7 +180,7 @@ module Aws::Athena
176
180
  # requests fetching endpoints information. Defaults to 60 sec.
177
181
  #
178
182
  # @option options [Boolean] :endpoint_discovery (false)
179
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
183
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
180
184
  #
181
185
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
182
186
  # The log formatter.
@@ -398,6 +402,7 @@ module Aws::Athena
398
402
  # resp.query_executions[0].result_configuration.encryption_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS", "CSE_KMS"
399
403
  # resp.query_executions[0].result_configuration.encryption_configuration.kms_key #=> String
400
404
  # resp.query_executions[0].query_execution_context.database #=> String
405
+ # resp.query_executions[0].query_execution_context.catalog #=> String
401
406
  # resp.query_executions[0].status.state #=> String, one of "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"
402
407
  # resp.query_executions[0].status.state_change_reason #=> String
403
408
  # resp.query_executions[0].status.submission_date_time #=> Time
@@ -424,6 +429,83 @@ module Aws::Athena
424
429
  req.send_request(options)
425
430
  end
426
431
 
432
+ # Creates (registers) a data catalog with the specified name and
433
+ # properties. Catalogs created are visible to all users of the same AWS
434
+ # account.
435
+ #
436
+ # @option params [required, String] :name
437
+ # The name of the data catalog to create. The catalog name must be
438
+ # unique for the AWS account and can use a maximum of 128 alphanumeric,
439
+ # underscore, at sign, or hyphen characters.
440
+ #
441
+ # @option params [required, String] :type
442
+ # The type of data catalog to create: `LAMBDA` for a federated catalog,
443
+ # `GLUE` for AWS Glue Catalog, or `HIVE` for an external hive metastore.
444
+ #
445
+ # @option params [String] :description
446
+ # A description of the data catalog to be created.
447
+ #
448
+ # @option params [Hash<String,String>] :parameters
449
+ # Specifies the Lambda function or functions to use for creating the
450
+ # data catalog. This is a mapping whose values depend on the catalog
451
+ # type.
452
+ #
453
+ # * For the `HIVE` data catalog type, use the following syntax. The
454
+ # `metadata-function` parameter is required. `The sdk-version`
455
+ # parameter is optional and defaults to the currently supported
456
+ # version.
457
+ #
458
+ # `metadata-function=lambda_arn, sdk-version=version_number `
459
+ #
460
+ # * For the `LAMBDA` data catalog type, use one of the following sets of
461
+ # required parameters, but not both.
462
+ #
463
+ # * If you have one Lambda function that processes metadata and
464
+ # another for reading the actual data, use the following syntax.
465
+ # Both parameters are required.
466
+ #
467
+ # `metadata-function=lambda_arn, record-function=lambda_arn `
468
+ #
469
+ # * If you have a composite Lambda function that processes both
470
+ # metadata and data, use the following syntax to specify your Lambda
471
+ # function.
472
+ #
473
+ # `function=lambda_arn `
474
+ #
475
+ # * The `GLUE` type has no parameters.
476
+ #
477
+ # @option params [Array<Types::Tag>] :tags
478
+ # A list of comma separated tags to add to the data catalog that is
479
+ # created.
480
+ #
481
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
482
+ #
483
+ # @example Request syntax with placeholder values
484
+ #
485
+ # resp = client.create_data_catalog({
486
+ # name: "CatalogNameString", # required
487
+ # type: "LAMBDA", # required, accepts LAMBDA, GLUE, HIVE
488
+ # description: "DescriptionString",
489
+ # parameters: {
490
+ # "KeyString" => "ParametersMapValue",
491
+ # },
492
+ # tags: [
493
+ # {
494
+ # key: "TagKey",
495
+ # value: "TagValue",
496
+ # },
497
+ # ],
498
+ # })
499
+ #
500
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateDataCatalog AWS API Documentation
501
+ #
502
+ # @overload create_data_catalog(params = {})
503
+ # @param [Hash] params ({})
504
+ def create_data_catalog(params = {}, options = {})
505
+ req = build_request(:create_data_catalog, params)
506
+ req.send_request(options)
507
+ end
508
+
427
509
  # Creates a named query in the specified workgroup. Requires that you
428
510
  # have access to the workgroup.
429
511
  #
@@ -512,8 +594,8 @@ module Aws::Athena
512
594
  # The workgroup description.
513
595
  #
514
596
  # @option params [Array<Types::Tag>] :tags
515
- # One or more tags, separated by commas, that you want to attach to the
516
- # workgroup as you create it.
597
+ # A list of comma separated tags to add to the workgroup that is
598
+ # created.
517
599
  #
518
600
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
519
601
  #
@@ -552,6 +634,28 @@ module Aws::Athena
552
634
  req.send_request(options)
553
635
  end
554
636
 
637
+ # Deletes a data catalog.
638
+ #
639
+ # @option params [required, String] :name
640
+ # The name of the data catalog to delete.
641
+ #
642
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
643
+ #
644
+ # @example Request syntax with placeholder values
645
+ #
646
+ # resp = client.delete_data_catalog({
647
+ # name: "CatalogNameString", # required
648
+ # })
649
+ #
650
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteDataCatalog AWS API Documentation
651
+ #
652
+ # @overload delete_data_catalog(params = {})
653
+ # @param [Hash] params ({})
654
+ def delete_data_catalog(params = {}, options = {})
655
+ req = build_request(:delete_data_catalog, params)
656
+ req.send_request(options)
657
+ end
658
+
555
659
  # Deletes the named query if you have access to the workgroup in which
556
660
  # the query was saved.
557
661
  #
@@ -613,6 +717,73 @@ module Aws::Athena
613
717
  req.send_request(options)
614
718
  end
615
719
 
720
+ # Returns the specified data catalog.
721
+ #
722
+ # @option params [required, String] :name
723
+ # The name of the data catalog to return.
724
+ #
725
+ # @return [Types::GetDataCatalogOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
726
+ #
727
+ # * {Types::GetDataCatalogOutput#data_catalog #data_catalog} => Types::DataCatalog
728
+ #
729
+ # @example Request syntax with placeholder values
730
+ #
731
+ # resp = client.get_data_catalog({
732
+ # name: "CatalogNameString", # required
733
+ # })
734
+ #
735
+ # @example Response structure
736
+ #
737
+ # resp.data_catalog.name #=> String
738
+ # resp.data_catalog.description #=> String
739
+ # resp.data_catalog.type #=> String, one of "LAMBDA", "GLUE", "HIVE"
740
+ # resp.data_catalog.parameters #=> Hash
741
+ # resp.data_catalog.parameters["KeyString"] #=> String
742
+ #
743
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDataCatalog AWS API Documentation
744
+ #
745
+ # @overload get_data_catalog(params = {})
746
+ # @param [Hash] params ({})
747
+ def get_data_catalog(params = {}, options = {})
748
+ req = build_request(:get_data_catalog, params)
749
+ req.send_request(options)
750
+ end
751
+
752
+ # Returns a database object for the specfied database and data catalog.
753
+ #
754
+ # @option params [required, String] :catalog_name
755
+ # The name of the data catalog that contains the database to return.
756
+ #
757
+ # @option params [required, String] :database_name
758
+ # The name of the database to return.
759
+ #
760
+ # @return [Types::GetDatabaseOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
761
+ #
762
+ # * {Types::GetDatabaseOutput#database #database} => Types::Database
763
+ #
764
+ # @example Request syntax with placeholder values
765
+ #
766
+ # resp = client.get_database({
767
+ # catalog_name: "CatalogNameString", # required
768
+ # database_name: "NameString", # required
769
+ # })
770
+ #
771
+ # @example Response structure
772
+ #
773
+ # resp.database.name #=> String
774
+ # resp.database.description #=> String
775
+ # resp.database.parameters #=> Hash
776
+ # resp.database.parameters["KeyString"] #=> String
777
+ #
778
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDatabase AWS API Documentation
779
+ #
780
+ # @overload get_database(params = {})
781
+ # @param [Hash] params ({})
782
+ def get_database(params = {}, options = {})
783
+ req = build_request(:get_database, params)
784
+ req.send_request(options)
785
+ end
786
+
616
787
  # Returns information about a single query. Requires that you have
617
788
  # access to the workgroup in which the query was saved.
618
789
  #
@@ -674,6 +845,7 @@ module Aws::Athena
674
845
  # resp.query_execution.result_configuration.encryption_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS", "CSE_KMS"
675
846
  # resp.query_execution.result_configuration.encryption_configuration.kms_key #=> String
676
847
  # resp.query_execution.query_execution_context.database #=> String
848
+ # resp.query_execution.query_execution_context.catalog #=> String
677
849
  # resp.query_execution.status.state #=> String, one of "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"
678
850
  # resp.query_execution.status.state_change_reason #=> String
679
851
  # resp.query_execution.status.submission_date_time #=> Time
@@ -720,8 +892,10 @@ module Aws::Athena
720
892
  # The unique ID of the query execution.
721
893
  #
722
894
  # @option params [String] :next_token
723
- # The token that specifies where to start pagination if a previous
724
- # request was truncated.
895
+ # A token generated by the Athena service that specifies where to
896
+ # continue pagination if a previous request was truncated. To obtain the
897
+ # next set of pages, pass in the `NextToken` from the response object of
898
+ # the previous page call.
725
899
  #
726
900
  # @option params [Integer] :max_results
727
901
  # The maximum number of results (rows) to return in this request.
@@ -770,6 +944,56 @@ module Aws::Athena
770
944
  req.send_request(options)
771
945
  end
772
946
 
947
+ # Returns table metadata for the specified catalog, database, and table.
948
+ #
949
+ # @option params [required, String] :catalog_name
950
+ # The name of the data catalog that contains the database and table
951
+ # metadata to return.
952
+ #
953
+ # @option params [required, String] :database_name
954
+ # The name of the database that contains the table metadata to return.
955
+ #
956
+ # @option params [required, String] :table_name
957
+ # The name of the table for which metadata is returned.
958
+ #
959
+ # @return [Types::GetTableMetadataOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
960
+ #
961
+ # * {Types::GetTableMetadataOutput#table_metadata #table_metadata} => Types::TableMetadata
962
+ #
963
+ # @example Request syntax with placeholder values
964
+ #
965
+ # resp = client.get_table_metadata({
966
+ # catalog_name: "CatalogNameString", # required
967
+ # database_name: "NameString", # required
968
+ # table_name: "NameString", # required
969
+ # })
970
+ #
971
+ # @example Response structure
972
+ #
973
+ # resp.table_metadata.name #=> String
974
+ # resp.table_metadata.create_time #=> Time
975
+ # resp.table_metadata.last_access_time #=> Time
976
+ # resp.table_metadata.table_type #=> String
977
+ # resp.table_metadata.columns #=> Array
978
+ # resp.table_metadata.columns[0].name #=> String
979
+ # resp.table_metadata.columns[0].type #=> String
980
+ # resp.table_metadata.columns[0].comment #=> String
981
+ # resp.table_metadata.partition_keys #=> Array
982
+ # resp.table_metadata.partition_keys[0].name #=> String
983
+ # resp.table_metadata.partition_keys[0].type #=> String
984
+ # resp.table_metadata.partition_keys[0].comment #=> String
985
+ # resp.table_metadata.parameters #=> Hash
986
+ # resp.table_metadata.parameters["KeyString"] #=> String
987
+ #
988
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetTableMetadata AWS API Documentation
989
+ #
990
+ # @overload get_table_metadata(params = {})
991
+ # @param [Hash] params ({})
992
+ def get_table_metadata(params = {}, options = {})
993
+ req = build_request(:get_table_metadata, params)
994
+ req.send_request(options)
995
+ end
996
+
773
997
  # Returns information about the workgroup with the specified name.
774
998
  #
775
999
  # @option params [required, String] :work_group
@@ -808,10 +1032,98 @@ module Aws::Athena
808
1032
  req.send_request(options)
809
1033
  end
810
1034
 
1035
+ # Lists the data catalogs in the current AWS account.
1036
+ #
1037
+ # @option params [String] :next_token
1038
+ # A token generated by the Athena service that specifies where to
1039
+ # continue pagination if a previous request was truncated. To obtain the
1040
+ # next set of pages, pass in the NextToken from the response object of
1041
+ # the previous page call.
1042
+ #
1043
+ # @option params [Integer] :max_results
1044
+ # Specifies the maximum number of data catalogs to return.
1045
+ #
1046
+ # @return [Types::ListDataCatalogsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1047
+ #
1048
+ # * {Types::ListDataCatalogsOutput#data_catalogs_summary #data_catalogs_summary} => Array&lt;Types::DataCatalogSummary&gt;
1049
+ # * {Types::ListDataCatalogsOutput#next_token #next_token} => String
1050
+ #
1051
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1052
+ #
1053
+ # @example Request syntax with placeholder values
1054
+ #
1055
+ # resp = client.list_data_catalogs({
1056
+ # next_token: "Token",
1057
+ # max_results: 1,
1058
+ # })
1059
+ #
1060
+ # @example Response structure
1061
+ #
1062
+ # resp.data_catalogs_summary #=> Array
1063
+ # resp.data_catalogs_summary[0].catalog_name #=> String
1064
+ # resp.data_catalogs_summary[0].type #=> String, one of "LAMBDA", "GLUE", "HIVE"
1065
+ # resp.next_token #=> String
1066
+ #
1067
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDataCatalogs AWS API Documentation
1068
+ #
1069
+ # @overload list_data_catalogs(params = {})
1070
+ # @param [Hash] params ({})
1071
+ def list_data_catalogs(params = {}, options = {})
1072
+ req = build_request(:list_data_catalogs, params)
1073
+ req.send_request(options)
1074
+ end
1075
+
1076
+ # Lists the databases in the specified data catalog.
1077
+ #
1078
+ # @option params [required, String] :catalog_name
1079
+ # The name of the data catalog that contains the databases to return.
1080
+ #
1081
+ # @option params [String] :next_token
1082
+ # A token generated by the Athena service that specifies where to
1083
+ # continue pagination if a previous request was truncated. To obtain the
1084
+ # next set of pages, pass in the `NextToken` from the response object of
1085
+ # the previous page call.
1086
+ #
1087
+ # @option params [Integer] :max_results
1088
+ # Specifies the maximum number of results to return.
1089
+ #
1090
+ # @return [Types::ListDatabasesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1091
+ #
1092
+ # * {Types::ListDatabasesOutput#database_list #database_list} => Array&lt;Types::Database&gt;
1093
+ # * {Types::ListDatabasesOutput#next_token #next_token} => String
1094
+ #
1095
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1096
+ #
1097
+ # @example Request syntax with placeholder values
1098
+ #
1099
+ # resp = client.list_databases({
1100
+ # catalog_name: "CatalogNameString", # required
1101
+ # next_token: "Token",
1102
+ # max_results: 1,
1103
+ # })
1104
+ #
1105
+ # @example Response structure
1106
+ #
1107
+ # resp.database_list #=> Array
1108
+ # resp.database_list[0].name #=> String
1109
+ # resp.database_list[0].description #=> String
1110
+ # resp.database_list[0].parameters #=> Hash
1111
+ # resp.database_list[0].parameters["KeyString"] #=> String
1112
+ # resp.next_token #=> String
1113
+ #
1114
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDatabases AWS API Documentation
1115
+ #
1116
+ # @overload list_databases(params = {})
1117
+ # @param [Hash] params ({})
1118
+ def list_databases(params = {}, options = {})
1119
+ req = build_request(:list_databases, params)
1120
+ req.send_request(options)
1121
+ end
1122
+
811
1123
  # Provides a list of available query IDs only for queries saved in the
812
- # specified workgroup. Requires that you have access to the workgroup.
813
- # If a workgroup is not specified, lists the saved queries for the
814
- # primary workgroup.
1124
+ # specified workgroup. Requires that you have access to the specified
1125
+ # workgroup. If a workgroup is not specified, lists the saved queries
1126
+ # for the primary workgroup.
815
1127
  #
816
1128
  # For code samples using the AWS SDK for Java, see [Examples and Code
817
1129
  # Samples][1] in the *Amazon Athena User Guide*.
@@ -821,16 +1133,18 @@ module Aws::Athena
821
1133
  # [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
822
1134
  #
823
1135
  # @option params [String] :next_token
824
- # The token that specifies where to start pagination if a previous
825
- # request was truncated.
1136
+ # A token generated by the Athena service that specifies where to
1137
+ # continue pagination if a previous request was truncated. To obtain the
1138
+ # next set of pages, pass in the `NextToken` from the response object of
1139
+ # the previous page call.
826
1140
  #
827
1141
  # @option params [Integer] :max_results
828
1142
  # The maximum number of queries to return in this request.
829
1143
  #
830
1144
  # @option params [String] :work_group
831
- # The name of the workgroup from which the named queries are returned.
832
- # If a workgroup is not specified, the saved queries for the primary
833
- # workgroup are returned.
1145
+ # The name of the workgroup from which the named queries are being
1146
+ # returned. If a workgroup is not specified, the saved queries for the
1147
+ # primary workgroup are returned.
834
1148
  #
835
1149
  # @return [Types::ListNamedQueriesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
836
1150
  #
@@ -875,14 +1189,16 @@ module Aws::Athena
875
1189
  # [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
876
1190
  #
877
1191
  # @option params [String] :next_token
878
- # The token that specifies where to start pagination if a previous
879
- # request was truncated.
1192
+ # A token generated by the Athena service that specifies where to
1193
+ # continue pagination if a previous request was truncated. To obtain the
1194
+ # next set of pages, pass in the `NextToken` from the response object of
1195
+ # the previous page call.
880
1196
  #
881
1197
  # @option params [Integer] :max_results
882
1198
  # The maximum number of query executions to return in this request.
883
1199
  #
884
1200
  # @option params [String] :work_group
885
- # The name of the workgroup from which queries are returned. If a
1201
+ # The name of the workgroup from which queries are being returned. If a
886
1202
  # workgroup is not specified, a list of available query execution IDs
887
1203
  # for the queries in the primary workgroup is returned.
888
1204
  #
@@ -916,25 +1232,96 @@ module Aws::Athena
916
1232
  req.send_request(options)
917
1233
  end
918
1234
 
919
- # Lists the tags associated with this workgroup.
1235
+ # Lists the metadata for the tables in the specified data catalog
1236
+ # database.
1237
+ #
1238
+ # @option params [required, String] :catalog_name
1239
+ # The name of the data catalog for which table metadata should be
1240
+ # returned.
1241
+ #
1242
+ # @option params [required, String] :database_name
1243
+ # The name of the database for which table metadata should be returned.
1244
+ #
1245
+ # @option params [String] :expression
1246
+ # A regex filter that pattern-matches table names. If no expression is
1247
+ # supplied, metadata for all tables are listed.
1248
+ #
1249
+ # @option params [String] :next_token
1250
+ # A token generated by the Athena service that specifies where to
1251
+ # continue pagination if a previous request was truncated. To obtain the
1252
+ # next set of pages, pass in the NextToken from the response object of
1253
+ # the previous page call.
1254
+ #
1255
+ # @option params [Integer] :max_results
1256
+ # Specifies the maximum number of results to return.
1257
+ #
1258
+ # @return [Types::ListTableMetadataOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1259
+ #
1260
+ # * {Types::ListTableMetadataOutput#table_metadata_list #table_metadata_list} => Array&lt;Types::TableMetadata&gt;
1261
+ # * {Types::ListTableMetadataOutput#next_token #next_token} => String
1262
+ #
1263
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1264
+ #
1265
+ # @example Request syntax with placeholder values
1266
+ #
1267
+ # resp = client.list_table_metadata({
1268
+ # catalog_name: "CatalogNameString", # required
1269
+ # database_name: "NameString", # required
1270
+ # expression: "ExpressionString",
1271
+ # next_token: "Token",
1272
+ # max_results: 1,
1273
+ # })
1274
+ #
1275
+ # @example Response structure
1276
+ #
1277
+ # resp.table_metadata_list #=> Array
1278
+ # resp.table_metadata_list[0].name #=> String
1279
+ # resp.table_metadata_list[0].create_time #=> Time
1280
+ # resp.table_metadata_list[0].last_access_time #=> Time
1281
+ # resp.table_metadata_list[0].table_type #=> String
1282
+ # resp.table_metadata_list[0].columns #=> Array
1283
+ # resp.table_metadata_list[0].columns[0].name #=> String
1284
+ # resp.table_metadata_list[0].columns[0].type #=> String
1285
+ # resp.table_metadata_list[0].columns[0].comment #=> String
1286
+ # resp.table_metadata_list[0].partition_keys #=> Array
1287
+ # resp.table_metadata_list[0].partition_keys[0].name #=> String
1288
+ # resp.table_metadata_list[0].partition_keys[0].type #=> String
1289
+ # resp.table_metadata_list[0].partition_keys[0].comment #=> String
1290
+ # resp.table_metadata_list[0].parameters #=> Hash
1291
+ # resp.table_metadata_list[0].parameters["KeyString"] #=> String
1292
+ # resp.next_token #=> String
1293
+ #
1294
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTableMetadata AWS API Documentation
1295
+ #
1296
+ # @overload list_table_metadata(params = {})
1297
+ # @param [Hash] params ({})
1298
+ def list_table_metadata(params = {}, options = {})
1299
+ req = build_request(:list_table_metadata, params)
1300
+ req.send_request(options)
1301
+ end
1302
+
1303
+ # Lists the tags associated with an Athena workgroup or data catalog
1304
+ # resource.
920
1305
  #
921
1306
  # @option params [required, String] :resource_arn
922
- # Lists the tags for the workgroup resource with the specified ARN.
1307
+ # Lists the tags for the resource with the specified ARN.
923
1308
  #
924
1309
  # @option params [String] :next_token
925
1310
  # The token for the next set of results, or null if there are no
926
1311
  # additional results for this request, where the request lists the tags
927
- # for the workgroup resource with the specified ARN.
1312
+ # for the resource with the specified ARN.
928
1313
  #
929
1314
  # @option params [Integer] :max_results
930
1315
  # The maximum number of results to be returned per request that lists
931
- # the tags for the workgroup resource.
1316
+ # the tags for the resource.
932
1317
  #
933
1318
  # @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
934
1319
  #
935
1320
  # * {Types::ListTagsForResourceOutput#tags #tags} => Array&lt;Types::Tag&gt;
936
1321
  # * {Types::ListTagsForResourceOutput#next_token #next_token} => String
937
1322
  #
1323
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1324
+ #
938
1325
  # @example Request syntax with placeholder values
939
1326
  #
940
1327
  # resp = client.list_tags_for_resource({
@@ -962,7 +1349,10 @@ module Aws::Athena
962
1349
  # Lists available workgroups for the account.
963
1350
  #
964
1351
  # @option params [String] :next_token
965
- # A token to be used by the next request if this request is truncated.
1352
+ # A token generated by the Athena service that specifies where to
1353
+ # continue pagination if a previous request was truncated. To obtain the
1354
+ # next set of pages, pass in the `NextToken` from the response object of
1355
+ # the previous page call.
966
1356
  #
967
1357
  # @option params [Integer] :max_results
968
1358
  # The maximum number of workgroups to return in this request.
@@ -1000,10 +1390,10 @@ module Aws::Athena
1000
1390
  end
1001
1391
 
1002
1392
  # Runs the SQL query statements contained in the `Query`. Requires you
1003
- # to have access to the workgroup in which the query ran.
1004
- #
1005
- # For code samples using the AWS SDK for Java, see [Examples and Code
1006
- # Samples][1] in the *Amazon Athena User Guide*.
1393
+ # to have access to the workgroup in which the query ran. Running
1394
+ # queries against an external catalog requires GetDataCatalog permission
1395
+ # to the catalog. For code samples using the AWS SDK for Java, see
1396
+ # [Examples and Code Samples][1] in the *Amazon Athena User Guide*.
1007
1397
  #
1008
1398
  #
1009
1399
  #
@@ -1053,6 +1443,7 @@ module Aws::Athena
1053
1443
  # client_request_token: "IdempotencyToken",
1054
1444
  # query_execution_context: {
1055
1445
  # database: "DatabaseString",
1446
+ # catalog: "CatalogNameString",
1056
1447
  # },
1057
1448
  # result_configuration: {
1058
1449
  # output_location: "String",
@@ -1110,31 +1501,31 @@ module Aws::Athena
1110
1501
  req.send_request(options)
1111
1502
  end
1112
1503
 
1113
- # Adds one or more tags to the resource, such as a workgroup. A tag is a
1114
- # label that you assign to an AWS Athena resource (a workgroup). Each
1115
- # tag consists of a key and an optional value, both of which you define.
1116
- # Tags enable you to categorize resources (workgroups) in Athena, for
1117
- # example, by purpose, owner, or environment. Use a consistent set of
1118
- # tag keys to make it easier to search and filter workgroups in your
1119
- # account. For best practices, see [AWS Tagging Strategies][1]. The key
1120
- # length is from 1 (minimum) to 128 (maximum) Unicode characters in
1121
- # UTF-8. The tag value length is from 0 (minimum) to 256 (maximum)
1122
- # Unicode characters in UTF-8. You can use letters and numbers
1123
- # representable in UTF-8, and the following characters: + - = . \_ : /
1124
- # @. Tag keys and values are case-sensitive. Tag keys must be unique per
1125
- # resource. If you specify more than one, separate them by commas.
1504
+ # Adds one or more tags to an Athena resource. A tag is a label that you
1505
+ # assign to a resource. In Athena, a resource can be a workgroup or data
1506
+ # catalog. Each tag consists of a key and an optional value, both of
1507
+ # which you define. For example, you can use tags to categorize Athena
1508
+ # workgroups or data catalogs by purpose, owner, or environment. Use a
1509
+ # consistent set of tag keys to make it easier to search and filter
1510
+ # workgroups or data catalogs in your account. For best practices, see
1511
+ # [Tagging Best Practices][1]. Tag keys can be from 1 to 128 UTF-8
1512
+ # Unicode characters, and tag values can be from 0 to 256 UTF-8 Unicode
1513
+ # characters. Tags can use letters and numbers representable in UTF-8,
1514
+ # and the following characters: + - = . \_ : / @. Tag keys and values
1515
+ # are case-sensitive. Tag keys must be unique per resource. If you
1516
+ # specify more than one tag, separate them by commas.
1126
1517
  #
1127
1518
  #
1128
1519
  #
1129
1520
  # [1]: https://aws.amazon.com/answers/account-management/aws-tagging-strategies/
1130
1521
  #
1131
1522
  # @option params [required, String] :resource_arn
1132
- # Requests that one or more tags are added to the resource (such as a
1133
- # workgroup) for the specified ARN.
1523
+ # Specifies the ARN of the Athena resource (workgroup or data catalog)
1524
+ # to which tags are to be added.
1134
1525
  #
1135
1526
  # @option params [required, Array<Types::Tag>] :tags
1136
- # One or more tags, separated by commas, to be added to the resource,
1137
- # such as a workgroup.
1527
+ # A collection of one or more tags, separated by commas, to be added to
1528
+ # an Athena workgroup or data catalog resource.
1138
1529
  #
1139
1530
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1140
1531
  #
@@ -1159,17 +1550,14 @@ module Aws::Athena
1159
1550
  req.send_request(options)
1160
1551
  end
1161
1552
 
1162
- # Removes one or more tags from the workgroup resource. Takes as an
1163
- # input a list of TagKey Strings separated by commas, and removes their
1164
- # tags at the same time.
1553
+ # Removes one or more tags from a data catalog or workgroup resource.
1165
1554
  #
1166
1555
  # @option params [required, String] :resource_arn
1167
- # Removes one or more tags from the workgroup resource for the specified
1168
- # ARN.
1556
+ # Specifies the ARN of the resource from which tags are to be removed.
1169
1557
  #
1170
1558
  # @option params [required, Array<String>] :tag_keys
1171
- # Removes the tags associated with one or more tag keys from the
1172
- # workgroup resource.
1559
+ # A comma-separated list of one or more tag keys whose tags are to be
1560
+ # removed from the specified resource.
1173
1561
  #
1174
1562
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1175
1563
  #
@@ -1189,6 +1577,72 @@ module Aws::Athena
1189
1577
  req.send_request(options)
1190
1578
  end
1191
1579
 
1580
+ # Updates the data catalog that has the specified name.
1581
+ #
1582
+ # @option params [required, String] :name
1583
+ # The name of the data catalog to update. The catalog name must be
1584
+ # unique for the AWS account and can use a maximum of 128 alphanumeric,
1585
+ # underscore, at sign, or hyphen characters.
1586
+ #
1587
+ # @option params [required, String] :type
1588
+ # Specifies the type of data catalog to update. Specify `LAMBDA` for a
1589
+ # federated catalog, `GLUE` for AWS Glue Catalog, or `HIVE` for an
1590
+ # external hive metastore.
1591
+ #
1592
+ # @option params [String] :description
1593
+ # New or modified text that describes the data catalog.
1594
+ #
1595
+ # @option params [Hash<String,String>] :parameters
1596
+ # Specifies the Lambda function or functions to use for updating the
1597
+ # data catalog. This is a mapping whose values depend on the catalog
1598
+ # type.
1599
+ #
1600
+ # * For the `HIVE` data catalog type, use the following syntax. The
1601
+ # `metadata-function` parameter is required. `The sdk-version`
1602
+ # parameter is optional and defaults to the currently supported
1603
+ # version.
1604
+ #
1605
+ # `metadata-function=lambda_arn, sdk-version=version_number `
1606
+ #
1607
+ # * For the `LAMBDA` data catalog type, use one of the following sets of
1608
+ # required parameters, but not both.
1609
+ #
1610
+ # * If you have one Lambda function that processes metadata and
1611
+ # another for reading the actual data, use the following syntax.
1612
+ # Both parameters are required.
1613
+ #
1614
+ # `metadata-function=lambda_arn, record-function=lambda_arn `
1615
+ #
1616
+ # * If you have a composite Lambda function that processes both
1617
+ # metadata and data, use the following syntax to specify your Lambda
1618
+ # function.
1619
+ #
1620
+ # `function=lambda_arn `
1621
+ #
1622
+ # * The `GLUE` type has no parameters.
1623
+ #
1624
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1625
+ #
1626
+ # @example Request syntax with placeholder values
1627
+ #
1628
+ # resp = client.update_data_catalog({
1629
+ # name: "CatalogNameString", # required
1630
+ # type: "LAMBDA", # required, accepts LAMBDA, GLUE, HIVE
1631
+ # description: "DescriptionString",
1632
+ # parameters: {
1633
+ # "KeyString" => "ParametersMapValue",
1634
+ # },
1635
+ # })
1636
+ #
1637
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateDataCatalog AWS API Documentation
1638
+ #
1639
+ # @overload update_data_catalog(params = {})
1640
+ # @param [Hash] params ({})
1641
+ def update_data_catalog(params = {}, options = {})
1642
+ req = build_request(:update_data_catalog, params)
1643
+ req.send_request(options)
1644
+ end
1645
+
1192
1646
  # Updates the workgroup with the specified name. The workgroup's name
1193
1647
  # cannot be changed.
1194
1648
  #
@@ -1253,7 +1707,7 @@ module Aws::Athena
1253
1707
  params: params,
1254
1708
  config: config)
1255
1709
  context[:gem_name] = 'aws-sdk-athena'
1256
- context[:gem_version] = '1.25.0'
1710
+ context[:gem_version] = '1.30.0'
1257
1711
  Seahorse::Client::Request.new(handlers, context)
1258
1712
  end
1259
1713