aws-sdk-athena 1.26.0 → 1.31.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: 153434d1a7bd6aa063aa1a4b4af05c6c3ecf6ea32b3246e5fcb7fdb0c3081b55
4
- data.tar.gz: fb707b1f72a69b9c02b8d9bbab1b62d4df9e60616cc41c6799733bdcafb8c016
3
+ metadata.gz: f21a5cefb9f4516014f0b552f7970323f5ac326b11bfb4d4cf0521477458d538
4
+ data.tar.gz: be61d68bf7b27e2eeb83342afaae325882b38343df9527327f66e94121f18f61
5
5
  SHA512:
6
- metadata.gz: 553322ade016623483639392c26ff9003e6189b76063f298c9096e4bbe4597d9ac60be8c29a9f3f066cb9e3b0b5a39af48718e309fd7e9d09a684e42e0562a87
7
- data.tar.gz: 255eb3599d4c3e8f3062a73d24f3d6472cd5e87531fc949b2121facb9973dee373b60ee80ee73a53e4e1283f8b5870889c0a8616944f472b3f0e122179ff309a
6
+ metadata.gz: 64dc3393b86bf0688f9df5441aa99ff310c3fe5378c36d78440d35224da18a605e1885e08de5347b30cb293dbde2a5bb7b08c9b9d233b795724abbd9ad32bc84
7
+ data.tar.gz: bfa10da2f4b74c26e5183f730b04b0d43d7a8700bfcc19cd1671cf594f31b2dc4e6b2b87f96cb40554f270ad04b216e31b89b92cd413039ae7a2e71bbbaa26c2
@@ -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:
@@ -42,9 +44,9 @@ require_relative 'aws-sdk-athena/customizations'
42
44
  #
43
45
  # See {Errors} for more information.
44
46
  #
45
- # @service
47
+ # @!group service
46
48
  module Aws::Athena
47
49
 
48
- GEM_VERSION = '1.26.0'
50
+ GEM_VERSION = '1.31.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
 
@@ -81,13 +85,28 @@ module Aws::Athena
81
85
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
82
86
  # credentials.
83
87
  #
88
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
89
+ # shared file, such as `~/.aws/config`.
90
+ #
91
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
92
+ #
93
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
94
+ # assume a role after providing credentials via the web.
95
+ #
96
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
97
+ # access token generated from `aws login`.
98
+ #
99
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
100
+ # process that outputs to stdout.
101
+ #
84
102
  # * `Aws::InstanceProfileCredentials` - Used for loading credentials
85
103
  # from an EC2 IMDS on an EC2 instance.
86
104
  #
87
- # * `Aws::SharedCredentials` - Used for loading credentials from a
88
- # shared file, such as `~/.aws/config`.
105
+ # * `Aws::ECSCredentials` - Used for loading credentials from
106
+ # instances running in ECS.
89
107
  #
90
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
108
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
109
+ # from the Cognito Identity service.
91
110
  #
92
111
  # When `:credentials` are not configured directly, the following
93
112
  # locations will be searched for credentials:
@@ -97,10 +116,10 @@ module Aws::Athena
97
116
  # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
98
117
  # * `~/.aws/credentials`
99
118
  # * `~/.aws/config`
100
- # * EC2 IMDS instance profile - When used by default, the timeouts are
101
- # very aggressive. Construct and pass an instance of
102
- # `Aws::InstanceProfileCredentails` to enable retries and extended
103
- # timeouts.
119
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
+ # are very aggressive. Construct and pass an instance of
121
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
+ # enable retries and extended timeouts.
104
123
  #
105
124
  # @option options [required, String] :region
106
125
  # The AWS region to connect to. The configured `:region` is
@@ -161,7 +180,7 @@ module Aws::Athena
161
180
  # @option options [String] :endpoint
162
181
  # The client endpoint is normally constructed from the `:region`
163
182
  # option. You should only configure an `:endpoint` when connecting
164
- # to test endpoints. This should be a valid HTTP(S) URI.
183
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
165
184
  #
166
185
  # @option options [Integer] :endpoint_cache_max_entries (1000)
167
186
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -398,6 +417,7 @@ module Aws::Athena
398
417
  # resp.query_executions[0].result_configuration.encryption_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS", "CSE_KMS"
399
418
  # resp.query_executions[0].result_configuration.encryption_configuration.kms_key #=> String
400
419
  # resp.query_executions[0].query_execution_context.database #=> String
420
+ # resp.query_executions[0].query_execution_context.catalog #=> String
401
421
  # resp.query_executions[0].status.state #=> String, one of "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"
402
422
  # resp.query_executions[0].status.state_change_reason #=> String
403
423
  # resp.query_executions[0].status.submission_date_time #=> Time
@@ -424,6 +444,83 @@ module Aws::Athena
424
444
  req.send_request(options)
425
445
  end
426
446
 
447
+ # Creates (registers) a data catalog with the specified name and
448
+ # properties. Catalogs created are visible to all users of the same AWS
449
+ # account.
450
+ #
451
+ # @option params [required, String] :name
452
+ # The name of the data catalog to create. The catalog name must be
453
+ # unique for the AWS account and can use a maximum of 128 alphanumeric,
454
+ # underscore, at sign, or hyphen characters.
455
+ #
456
+ # @option params [required, String] :type
457
+ # The type of data catalog to create: `LAMBDA` for a federated catalog,
458
+ # `GLUE` for AWS Glue Catalog, or `HIVE` for an external hive metastore.
459
+ #
460
+ # @option params [String] :description
461
+ # A description of the data catalog to be created.
462
+ #
463
+ # @option params [Hash<String,String>] :parameters
464
+ # Specifies the Lambda function or functions to use for creating the
465
+ # data catalog. This is a mapping whose values depend on the catalog
466
+ # type.
467
+ #
468
+ # * For the `HIVE` data catalog type, use the following syntax. The
469
+ # `metadata-function` parameter is required. `The sdk-version`
470
+ # parameter is optional and defaults to the currently supported
471
+ # version.
472
+ #
473
+ # `metadata-function=lambda_arn, sdk-version=version_number `
474
+ #
475
+ # * For the `LAMBDA` data catalog type, use one of the following sets of
476
+ # required parameters, but not both.
477
+ #
478
+ # * If you have one Lambda function that processes metadata and
479
+ # another for reading the actual data, use the following syntax.
480
+ # Both parameters are required.
481
+ #
482
+ # `metadata-function=lambda_arn, record-function=lambda_arn `
483
+ #
484
+ # * If you have a composite Lambda function that processes both
485
+ # metadata and data, use the following syntax to specify your Lambda
486
+ # function.
487
+ #
488
+ # `function=lambda_arn `
489
+ #
490
+ # * The `GLUE` type has no parameters.
491
+ #
492
+ # @option params [Array<Types::Tag>] :tags
493
+ # A list of comma separated tags to add to the data catalog that is
494
+ # created.
495
+ #
496
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
497
+ #
498
+ # @example Request syntax with placeholder values
499
+ #
500
+ # resp = client.create_data_catalog({
501
+ # name: "CatalogNameString", # required
502
+ # type: "LAMBDA", # required, accepts LAMBDA, GLUE, HIVE
503
+ # description: "DescriptionString",
504
+ # parameters: {
505
+ # "KeyString" => "ParametersMapValue",
506
+ # },
507
+ # tags: [
508
+ # {
509
+ # key: "TagKey",
510
+ # value: "TagValue",
511
+ # },
512
+ # ],
513
+ # })
514
+ #
515
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateDataCatalog AWS API Documentation
516
+ #
517
+ # @overload create_data_catalog(params = {})
518
+ # @param [Hash] params ({})
519
+ def create_data_catalog(params = {}, options = {})
520
+ req = build_request(:create_data_catalog, params)
521
+ req.send_request(options)
522
+ end
523
+
427
524
  # Creates a named query in the specified workgroup. Requires that you
428
525
  # have access to the workgroup.
429
526
  #
@@ -512,8 +609,8 @@ module Aws::Athena
512
609
  # The workgroup description.
513
610
  #
514
611
  # @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.
612
+ # A list of comma separated tags to add to the workgroup that is
613
+ # created.
517
614
  #
518
615
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
519
616
  #
@@ -552,6 +649,28 @@ module Aws::Athena
552
649
  req.send_request(options)
553
650
  end
554
651
 
652
+ # Deletes a data catalog.
653
+ #
654
+ # @option params [required, String] :name
655
+ # The name of the data catalog to delete.
656
+ #
657
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
658
+ #
659
+ # @example Request syntax with placeholder values
660
+ #
661
+ # resp = client.delete_data_catalog({
662
+ # name: "CatalogNameString", # required
663
+ # })
664
+ #
665
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteDataCatalog AWS API Documentation
666
+ #
667
+ # @overload delete_data_catalog(params = {})
668
+ # @param [Hash] params ({})
669
+ def delete_data_catalog(params = {}, options = {})
670
+ req = build_request(:delete_data_catalog, params)
671
+ req.send_request(options)
672
+ end
673
+
555
674
  # Deletes the named query if you have access to the workgroup in which
556
675
  # the query was saved.
557
676
  #
@@ -613,6 +732,73 @@ module Aws::Athena
613
732
  req.send_request(options)
614
733
  end
615
734
 
735
+ # Returns the specified data catalog.
736
+ #
737
+ # @option params [required, String] :name
738
+ # The name of the data catalog to return.
739
+ #
740
+ # @return [Types::GetDataCatalogOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
741
+ #
742
+ # * {Types::GetDataCatalogOutput#data_catalog #data_catalog} => Types::DataCatalog
743
+ #
744
+ # @example Request syntax with placeholder values
745
+ #
746
+ # resp = client.get_data_catalog({
747
+ # name: "CatalogNameString", # required
748
+ # })
749
+ #
750
+ # @example Response structure
751
+ #
752
+ # resp.data_catalog.name #=> String
753
+ # resp.data_catalog.description #=> String
754
+ # resp.data_catalog.type #=> String, one of "LAMBDA", "GLUE", "HIVE"
755
+ # resp.data_catalog.parameters #=> Hash
756
+ # resp.data_catalog.parameters["KeyString"] #=> String
757
+ #
758
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDataCatalog AWS API Documentation
759
+ #
760
+ # @overload get_data_catalog(params = {})
761
+ # @param [Hash] params ({})
762
+ def get_data_catalog(params = {}, options = {})
763
+ req = build_request(:get_data_catalog, params)
764
+ req.send_request(options)
765
+ end
766
+
767
+ # Returns a database object for the specfied database and data catalog.
768
+ #
769
+ # @option params [required, String] :catalog_name
770
+ # The name of the data catalog that contains the database to return.
771
+ #
772
+ # @option params [required, String] :database_name
773
+ # The name of the database to return.
774
+ #
775
+ # @return [Types::GetDatabaseOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
776
+ #
777
+ # * {Types::GetDatabaseOutput#database #database} => Types::Database
778
+ #
779
+ # @example Request syntax with placeholder values
780
+ #
781
+ # resp = client.get_database({
782
+ # catalog_name: "CatalogNameString", # required
783
+ # database_name: "NameString", # required
784
+ # })
785
+ #
786
+ # @example Response structure
787
+ #
788
+ # resp.database.name #=> String
789
+ # resp.database.description #=> String
790
+ # resp.database.parameters #=> Hash
791
+ # resp.database.parameters["KeyString"] #=> String
792
+ #
793
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetDatabase AWS API Documentation
794
+ #
795
+ # @overload get_database(params = {})
796
+ # @param [Hash] params ({})
797
+ def get_database(params = {}, options = {})
798
+ req = build_request(:get_database, params)
799
+ req.send_request(options)
800
+ end
801
+
616
802
  # Returns information about a single query. Requires that you have
617
803
  # access to the workgroup in which the query was saved.
618
804
  #
@@ -674,6 +860,7 @@ module Aws::Athena
674
860
  # resp.query_execution.result_configuration.encryption_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS", "CSE_KMS"
675
861
  # resp.query_execution.result_configuration.encryption_configuration.kms_key #=> String
676
862
  # resp.query_execution.query_execution_context.database #=> String
863
+ # resp.query_execution.query_execution_context.catalog #=> String
677
864
  # resp.query_execution.status.state #=> String, one of "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"
678
865
  # resp.query_execution.status.state_change_reason #=> String
679
866
  # resp.query_execution.status.submission_date_time #=> Time
@@ -720,8 +907,10 @@ module Aws::Athena
720
907
  # The unique ID of the query execution.
721
908
  #
722
909
  # @option params [String] :next_token
723
- # The token that specifies where to start pagination if a previous
724
- # request was truncated.
910
+ # A token generated by the Athena service that specifies where to
911
+ # continue pagination if a previous request was truncated. To obtain the
912
+ # next set of pages, pass in the `NextToken` from the response object of
913
+ # the previous page call.
725
914
  #
726
915
  # @option params [Integer] :max_results
727
916
  # The maximum number of results (rows) to return in this request.
@@ -770,6 +959,56 @@ module Aws::Athena
770
959
  req.send_request(options)
771
960
  end
772
961
 
962
+ # Returns table metadata for the specified catalog, database, and table.
963
+ #
964
+ # @option params [required, String] :catalog_name
965
+ # The name of the data catalog that contains the database and table
966
+ # metadata to return.
967
+ #
968
+ # @option params [required, String] :database_name
969
+ # The name of the database that contains the table metadata to return.
970
+ #
971
+ # @option params [required, String] :table_name
972
+ # The name of the table for which metadata is returned.
973
+ #
974
+ # @return [Types::GetTableMetadataOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
975
+ #
976
+ # * {Types::GetTableMetadataOutput#table_metadata #table_metadata} => Types::TableMetadata
977
+ #
978
+ # @example Request syntax with placeholder values
979
+ #
980
+ # resp = client.get_table_metadata({
981
+ # catalog_name: "CatalogNameString", # required
982
+ # database_name: "NameString", # required
983
+ # table_name: "NameString", # required
984
+ # })
985
+ #
986
+ # @example Response structure
987
+ #
988
+ # resp.table_metadata.name #=> String
989
+ # resp.table_metadata.create_time #=> Time
990
+ # resp.table_metadata.last_access_time #=> Time
991
+ # resp.table_metadata.table_type #=> String
992
+ # resp.table_metadata.columns #=> Array
993
+ # resp.table_metadata.columns[0].name #=> String
994
+ # resp.table_metadata.columns[0].type #=> String
995
+ # resp.table_metadata.columns[0].comment #=> String
996
+ # resp.table_metadata.partition_keys #=> Array
997
+ # resp.table_metadata.partition_keys[0].name #=> String
998
+ # resp.table_metadata.partition_keys[0].type #=> String
999
+ # resp.table_metadata.partition_keys[0].comment #=> String
1000
+ # resp.table_metadata.parameters #=> Hash
1001
+ # resp.table_metadata.parameters["KeyString"] #=> String
1002
+ #
1003
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetTableMetadata AWS API Documentation
1004
+ #
1005
+ # @overload get_table_metadata(params = {})
1006
+ # @param [Hash] params ({})
1007
+ def get_table_metadata(params = {}, options = {})
1008
+ req = build_request(:get_table_metadata, params)
1009
+ req.send_request(options)
1010
+ end
1011
+
773
1012
  # Returns information about the workgroup with the specified name.
774
1013
  #
775
1014
  # @option params [required, String] :work_group
@@ -808,10 +1047,98 @@ module Aws::Athena
808
1047
  req.send_request(options)
809
1048
  end
810
1049
 
1050
+ # Lists the data catalogs in the current AWS account.
1051
+ #
1052
+ # @option params [String] :next_token
1053
+ # A token generated by the Athena service that specifies where to
1054
+ # continue pagination if a previous request was truncated. To obtain the
1055
+ # next set of pages, pass in the NextToken from the response object of
1056
+ # the previous page call.
1057
+ #
1058
+ # @option params [Integer] :max_results
1059
+ # Specifies the maximum number of data catalogs to return.
1060
+ #
1061
+ # @return [Types::ListDataCatalogsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1062
+ #
1063
+ # * {Types::ListDataCatalogsOutput#data_catalogs_summary #data_catalogs_summary} => Array&lt;Types::DataCatalogSummary&gt;
1064
+ # * {Types::ListDataCatalogsOutput#next_token #next_token} => String
1065
+ #
1066
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1067
+ #
1068
+ # @example Request syntax with placeholder values
1069
+ #
1070
+ # resp = client.list_data_catalogs({
1071
+ # next_token: "Token",
1072
+ # max_results: 1,
1073
+ # })
1074
+ #
1075
+ # @example Response structure
1076
+ #
1077
+ # resp.data_catalogs_summary #=> Array
1078
+ # resp.data_catalogs_summary[0].catalog_name #=> String
1079
+ # resp.data_catalogs_summary[0].type #=> String, one of "LAMBDA", "GLUE", "HIVE"
1080
+ # resp.next_token #=> String
1081
+ #
1082
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDataCatalogs AWS API Documentation
1083
+ #
1084
+ # @overload list_data_catalogs(params = {})
1085
+ # @param [Hash] params ({})
1086
+ def list_data_catalogs(params = {}, options = {})
1087
+ req = build_request(:list_data_catalogs, params)
1088
+ req.send_request(options)
1089
+ end
1090
+
1091
+ # Lists the databases in the specified data catalog.
1092
+ #
1093
+ # @option params [required, String] :catalog_name
1094
+ # The name of the data catalog that contains the databases to return.
1095
+ #
1096
+ # @option params [String] :next_token
1097
+ # A token generated by the Athena service that specifies where to
1098
+ # continue pagination if a previous request was truncated. To obtain the
1099
+ # next set of pages, pass in the `NextToken` from the response object of
1100
+ # the previous page call.
1101
+ #
1102
+ # @option params [Integer] :max_results
1103
+ # Specifies the maximum number of results to return.
1104
+ #
1105
+ # @return [Types::ListDatabasesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1106
+ #
1107
+ # * {Types::ListDatabasesOutput#database_list #database_list} => Array&lt;Types::Database&gt;
1108
+ # * {Types::ListDatabasesOutput#next_token #next_token} => String
1109
+ #
1110
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1111
+ #
1112
+ # @example Request syntax with placeholder values
1113
+ #
1114
+ # resp = client.list_databases({
1115
+ # catalog_name: "CatalogNameString", # required
1116
+ # next_token: "Token",
1117
+ # max_results: 1,
1118
+ # })
1119
+ #
1120
+ # @example Response structure
1121
+ #
1122
+ # resp.database_list #=> Array
1123
+ # resp.database_list[0].name #=> String
1124
+ # resp.database_list[0].description #=> String
1125
+ # resp.database_list[0].parameters #=> Hash
1126
+ # resp.database_list[0].parameters["KeyString"] #=> String
1127
+ # resp.next_token #=> String
1128
+ #
1129
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListDatabases AWS API Documentation
1130
+ #
1131
+ # @overload list_databases(params = {})
1132
+ # @param [Hash] params ({})
1133
+ def list_databases(params = {}, options = {})
1134
+ req = build_request(:list_databases, params)
1135
+ req.send_request(options)
1136
+ end
1137
+
811
1138
  # 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.
1139
+ # specified workgroup. Requires that you have access to the specified
1140
+ # workgroup. If a workgroup is not specified, lists the saved queries
1141
+ # for the primary workgroup.
815
1142
  #
816
1143
  # For code samples using the AWS SDK for Java, see [Examples and Code
817
1144
  # Samples][1] in the *Amazon Athena User Guide*.
@@ -821,16 +1148,18 @@ module Aws::Athena
821
1148
  # [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
822
1149
  #
823
1150
  # @option params [String] :next_token
824
- # The token that specifies where to start pagination if a previous
825
- # request was truncated.
1151
+ # A token generated by the Athena service that specifies where to
1152
+ # continue pagination if a previous request was truncated. To obtain the
1153
+ # next set of pages, pass in the `NextToken` from the response object of
1154
+ # the previous page call.
826
1155
  #
827
1156
  # @option params [Integer] :max_results
828
1157
  # The maximum number of queries to return in this request.
829
1158
  #
830
1159
  # @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.
1160
+ # The name of the workgroup from which the named queries are being
1161
+ # returned. If a workgroup is not specified, the saved queries for the
1162
+ # primary workgroup are returned.
834
1163
  #
835
1164
  # @return [Types::ListNamedQueriesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
836
1165
  #
@@ -875,14 +1204,16 @@ module Aws::Athena
875
1204
  # [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
876
1205
  #
877
1206
  # @option params [String] :next_token
878
- # The token that specifies where to start pagination if a previous
879
- # request was truncated.
1207
+ # A token generated by the Athena service that specifies where to
1208
+ # continue pagination if a previous request was truncated. To obtain the
1209
+ # next set of pages, pass in the `NextToken` from the response object of
1210
+ # the previous page call.
880
1211
  #
881
1212
  # @option params [Integer] :max_results
882
1213
  # The maximum number of query executions to return in this request.
883
1214
  #
884
1215
  # @option params [String] :work_group
885
- # The name of the workgroup from which queries are returned. If a
1216
+ # The name of the workgroup from which queries are being returned. If a
886
1217
  # workgroup is not specified, a list of available query execution IDs
887
1218
  # for the queries in the primary workgroup is returned.
888
1219
  #
@@ -916,25 +1247,96 @@ module Aws::Athena
916
1247
  req.send_request(options)
917
1248
  end
918
1249
 
919
- # Lists the tags associated with this workgroup.
1250
+ # Lists the metadata for the tables in the specified data catalog
1251
+ # database.
1252
+ #
1253
+ # @option params [required, String] :catalog_name
1254
+ # The name of the data catalog for which table metadata should be
1255
+ # returned.
1256
+ #
1257
+ # @option params [required, String] :database_name
1258
+ # The name of the database for which table metadata should be returned.
1259
+ #
1260
+ # @option params [String] :expression
1261
+ # A regex filter that pattern-matches table names. If no expression is
1262
+ # supplied, metadata for all tables are listed.
1263
+ #
1264
+ # @option params [String] :next_token
1265
+ # A token generated by the Athena service that specifies where to
1266
+ # continue pagination if a previous request was truncated. To obtain the
1267
+ # next set of pages, pass in the NextToken from the response object of
1268
+ # the previous page call.
1269
+ #
1270
+ # @option params [Integer] :max_results
1271
+ # Specifies the maximum number of results to return.
1272
+ #
1273
+ # @return [Types::ListTableMetadataOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1274
+ #
1275
+ # * {Types::ListTableMetadataOutput#table_metadata_list #table_metadata_list} => Array&lt;Types::TableMetadata&gt;
1276
+ # * {Types::ListTableMetadataOutput#next_token #next_token} => String
1277
+ #
1278
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1279
+ #
1280
+ # @example Request syntax with placeholder values
1281
+ #
1282
+ # resp = client.list_table_metadata({
1283
+ # catalog_name: "CatalogNameString", # required
1284
+ # database_name: "NameString", # required
1285
+ # expression: "ExpressionString",
1286
+ # next_token: "Token",
1287
+ # max_results: 1,
1288
+ # })
1289
+ #
1290
+ # @example Response structure
1291
+ #
1292
+ # resp.table_metadata_list #=> Array
1293
+ # resp.table_metadata_list[0].name #=> String
1294
+ # resp.table_metadata_list[0].create_time #=> Time
1295
+ # resp.table_metadata_list[0].last_access_time #=> Time
1296
+ # resp.table_metadata_list[0].table_type #=> String
1297
+ # resp.table_metadata_list[0].columns #=> Array
1298
+ # resp.table_metadata_list[0].columns[0].name #=> String
1299
+ # resp.table_metadata_list[0].columns[0].type #=> String
1300
+ # resp.table_metadata_list[0].columns[0].comment #=> String
1301
+ # resp.table_metadata_list[0].partition_keys #=> Array
1302
+ # resp.table_metadata_list[0].partition_keys[0].name #=> String
1303
+ # resp.table_metadata_list[0].partition_keys[0].type #=> String
1304
+ # resp.table_metadata_list[0].partition_keys[0].comment #=> String
1305
+ # resp.table_metadata_list[0].parameters #=> Hash
1306
+ # resp.table_metadata_list[0].parameters["KeyString"] #=> String
1307
+ # resp.next_token #=> String
1308
+ #
1309
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTableMetadata AWS API Documentation
1310
+ #
1311
+ # @overload list_table_metadata(params = {})
1312
+ # @param [Hash] params ({})
1313
+ def list_table_metadata(params = {}, options = {})
1314
+ req = build_request(:list_table_metadata, params)
1315
+ req.send_request(options)
1316
+ end
1317
+
1318
+ # Lists the tags associated with an Athena workgroup or data catalog
1319
+ # resource.
920
1320
  #
921
1321
  # @option params [required, String] :resource_arn
922
- # Lists the tags for the workgroup resource with the specified ARN.
1322
+ # Lists the tags for the resource with the specified ARN.
923
1323
  #
924
1324
  # @option params [String] :next_token
925
1325
  # The token for the next set of results, or null if there are no
926
1326
  # additional results for this request, where the request lists the tags
927
- # for the workgroup resource with the specified ARN.
1327
+ # for the resource with the specified ARN.
928
1328
  #
929
1329
  # @option params [Integer] :max_results
930
1330
  # The maximum number of results to be returned per request that lists
931
- # the tags for the workgroup resource.
1331
+ # the tags for the resource.
932
1332
  #
933
1333
  # @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
934
1334
  #
935
1335
  # * {Types::ListTagsForResourceOutput#tags #tags} => Array&lt;Types::Tag&gt;
936
1336
  # * {Types::ListTagsForResourceOutput#next_token #next_token} => String
937
1337
  #
1338
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1339
+ #
938
1340
  # @example Request syntax with placeholder values
939
1341
  #
940
1342
  # resp = client.list_tags_for_resource({
@@ -962,7 +1364,10 @@ module Aws::Athena
962
1364
  # Lists available workgroups for the account.
963
1365
  #
964
1366
  # @option params [String] :next_token
965
- # A token to be used by the next request if this request is truncated.
1367
+ # A token generated by the Athena service that specifies where to
1368
+ # continue pagination if a previous request was truncated. To obtain the
1369
+ # next set of pages, pass in the `NextToken` from the response object of
1370
+ # the previous page call.
966
1371
  #
967
1372
  # @option params [Integer] :max_results
968
1373
  # The maximum number of workgroups to return in this request.
@@ -1000,10 +1405,10 @@ module Aws::Athena
1000
1405
  end
1001
1406
 
1002
1407
  # 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*.
1408
+ # to have access to the workgroup in which the query ran. Running
1409
+ # queries against an external catalog requires GetDataCatalog permission
1410
+ # to the catalog. For code samples using the AWS SDK for Java, see
1411
+ # [Examples and Code Samples][1] in the *Amazon Athena User Guide*.
1007
1412
  #
1008
1413
  #
1009
1414
  #
@@ -1053,6 +1458,7 @@ module Aws::Athena
1053
1458
  # client_request_token: "IdempotencyToken",
1054
1459
  # query_execution_context: {
1055
1460
  # database: "DatabaseString",
1461
+ # catalog: "CatalogNameString",
1056
1462
  # },
1057
1463
  # result_configuration: {
1058
1464
  # output_location: "String",
@@ -1110,31 +1516,31 @@ module Aws::Athena
1110
1516
  req.send_request(options)
1111
1517
  end
1112
1518
 
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.
1519
+ # Adds one or more tags to an Athena resource. A tag is a label that you
1520
+ # assign to a resource. In Athena, a resource can be a workgroup or data
1521
+ # catalog. Each tag consists of a key and an optional value, both of
1522
+ # which you define. For example, you can use tags to categorize Athena
1523
+ # workgroups or data catalogs by purpose, owner, or environment. Use a
1524
+ # consistent set of tag keys to make it easier to search and filter
1525
+ # workgroups or data catalogs in your account. For best practices, see
1526
+ # [Tagging Best Practices][1]. Tag keys can be from 1 to 128 UTF-8
1527
+ # Unicode characters, and tag values can be from 0 to 256 UTF-8 Unicode
1528
+ # characters. Tags can use letters and numbers representable in UTF-8,
1529
+ # and the following characters: + - = . \_ : / @. Tag keys and values
1530
+ # are case-sensitive. Tag keys must be unique per resource. If you
1531
+ # specify more than one tag, separate them by commas.
1126
1532
  #
1127
1533
  #
1128
1534
  #
1129
1535
  # [1]: https://aws.amazon.com/answers/account-management/aws-tagging-strategies/
1130
1536
  #
1131
1537
  # @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.
1538
+ # Specifies the ARN of the Athena resource (workgroup or data catalog)
1539
+ # to which tags are to be added.
1134
1540
  #
1135
1541
  # @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.
1542
+ # A collection of one or more tags, separated by commas, to be added to
1543
+ # an Athena workgroup or data catalog resource.
1138
1544
  #
1139
1545
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1140
1546
  #
@@ -1159,17 +1565,14 @@ module Aws::Athena
1159
1565
  req.send_request(options)
1160
1566
  end
1161
1567
 
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.
1568
+ # Removes one or more tags from a data catalog or workgroup resource.
1165
1569
  #
1166
1570
  # @option params [required, String] :resource_arn
1167
- # Removes one or more tags from the workgroup resource for the specified
1168
- # ARN.
1571
+ # Specifies the ARN of the resource from which tags are to be removed.
1169
1572
  #
1170
1573
  # @option params [required, Array<String>] :tag_keys
1171
- # Removes the tags associated with one or more tag keys from the
1172
- # workgroup resource.
1574
+ # A comma-separated list of one or more tag keys whose tags are to be
1575
+ # removed from the specified resource.
1173
1576
  #
1174
1577
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1175
1578
  #
@@ -1189,6 +1592,72 @@ module Aws::Athena
1189
1592
  req.send_request(options)
1190
1593
  end
1191
1594
 
1595
+ # Updates the data catalog that has the specified name.
1596
+ #
1597
+ # @option params [required, String] :name
1598
+ # The name of the data catalog to update. The catalog name must be
1599
+ # unique for the AWS account and can use a maximum of 128 alphanumeric,
1600
+ # underscore, at sign, or hyphen characters.
1601
+ #
1602
+ # @option params [required, String] :type
1603
+ # Specifies the type of data catalog to update. Specify `LAMBDA` for a
1604
+ # federated catalog, `GLUE` for AWS Glue Catalog, or `HIVE` for an
1605
+ # external hive metastore.
1606
+ #
1607
+ # @option params [String] :description
1608
+ # New or modified text that describes the data catalog.
1609
+ #
1610
+ # @option params [Hash<String,String>] :parameters
1611
+ # Specifies the Lambda function or functions to use for updating the
1612
+ # data catalog. This is a mapping whose values depend on the catalog
1613
+ # type.
1614
+ #
1615
+ # * For the `HIVE` data catalog type, use the following syntax. The
1616
+ # `metadata-function` parameter is required. `The sdk-version`
1617
+ # parameter is optional and defaults to the currently supported
1618
+ # version.
1619
+ #
1620
+ # `metadata-function=lambda_arn, sdk-version=version_number `
1621
+ #
1622
+ # * For the `LAMBDA` data catalog type, use one of the following sets of
1623
+ # required parameters, but not both.
1624
+ #
1625
+ # * If you have one Lambda function that processes metadata and
1626
+ # another for reading the actual data, use the following syntax.
1627
+ # Both parameters are required.
1628
+ #
1629
+ # `metadata-function=lambda_arn, record-function=lambda_arn `
1630
+ #
1631
+ # * If you have a composite Lambda function that processes both
1632
+ # metadata and data, use the following syntax to specify your Lambda
1633
+ # function.
1634
+ #
1635
+ # `function=lambda_arn `
1636
+ #
1637
+ # * The `GLUE` type has no parameters.
1638
+ #
1639
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1640
+ #
1641
+ # @example Request syntax with placeholder values
1642
+ #
1643
+ # resp = client.update_data_catalog({
1644
+ # name: "CatalogNameString", # required
1645
+ # type: "LAMBDA", # required, accepts LAMBDA, GLUE, HIVE
1646
+ # description: "DescriptionString",
1647
+ # parameters: {
1648
+ # "KeyString" => "ParametersMapValue",
1649
+ # },
1650
+ # })
1651
+ #
1652
+ # @see http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateDataCatalog AWS API Documentation
1653
+ #
1654
+ # @overload update_data_catalog(params = {})
1655
+ # @param [Hash] params ({})
1656
+ def update_data_catalog(params = {}, options = {})
1657
+ req = build_request(:update_data_catalog, params)
1658
+ req.send_request(options)
1659
+ end
1660
+
1192
1661
  # Updates the workgroup with the specified name. The workgroup's name
1193
1662
  # cannot be changed.
1194
1663
  #
@@ -1253,7 +1722,7 @@ module Aws::Athena
1253
1722
  params: params,
1254
1723
  config: config)
1255
1724
  context[:gem_name] = 'aws-sdk-athena'
1256
- context[:gem_version] = '1.26.0'
1725
+ context[:gem_version] = '1.31.0'
1257
1726
  Seahorse::Client::Request.new(handlers, context)
1258
1727
  end
1259
1728