aws-sdk-athena 1.24.0 → 1.29.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1824ce28dbe966d72d6fd47002ade72f49c92968
4
- data.tar.gz: f4c217c7cf9aae82cd2482b8ded194302db600cf
2
+ SHA256:
3
+ metadata.gz: 6ac822ee708f06b45d36f0efee5c66b7ff73b40693a83c41c2775086a59a65d4
4
+ data.tar.gz: 4a0e72384059410cf3a3d06c852854a675611d8f74aa6b84981c382d8f27a7a5
5
5
  SHA512:
6
- metadata.gz: 48ba5521f94c615d81eba7d4fbc45eb8e20825c85e3ca42c697af66df83d991c10bfea3bfc9e7be21afbd6dbd9cd05b0c6028f760e81761450453ff6a3185bf6
7
- data.tar.gz: 7dd8a08ece7d8d8f48af00e1695a095cd0ded2050febc3c4f792681f3e5f21da6705a56d3dec5430a5383ab19f436af533bef1276e35d9821e10e8738806f6f3
6
+ metadata.gz: 9e616b95e2c4a45d09f640be16cc2ea398724c79744d8f2a1c4ff8498106520c30f0411359f48b33cc996fa2cddfb9cf7fa99d9cd466ee5f0e7913e0df8fa071
7
+ data.tar.gz: 00262e1d5cc40cdb4a146f9aa9d1b1e3c740cd4d2e879c1236e8c57b49c259ad5c79a501946cfdd341769be0c907ddcd61f99f50af08f7fa8595952ef7233839
@@ -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.24.0'
50
+ GEM_VERSION = '1.29.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
 
@@ -105,7 +109,7 @@ module Aws::Athena
105
109
  # @option options [required, String] :region
106
110
  # The AWS region to connect to. The configured `:region` is
107
111
  # used to determine the service `:endpoint`. When not passed,
108
- # a default `:region` is search for in the following locations:
112
+ # a default `:region` is searched for in the following locations:
109
113
  #
110
114
  # * `Aws.config[:region]`
111
115
  # * `ENV['AWS_REGION']`
@@ -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 avalid 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.
@@ -279,8 +283,7 @@ module Aws::Athena
279
283
  #
280
284
  # @option options [Integer] :http_read_timeout (60) The default
281
285
  # number of seconds to wait for response data. This value can
282
- # safely be set
283
- # per-request on the session yielded by {#session_for}.
286
+ # safely be set per-request on the session.
284
287
  #
285
288
  # @option options [Float] :http_idle_timeout (5) The number of
286
289
  # seconds a connection is allowed to sit idle before it is
@@ -292,7 +295,7 @@ module Aws::Athena
292
295
  # request body. This option has no effect unless the request has
293
296
  # "Expect" header set to "100-continue". Defaults to `nil` which
294
297
  # disables this behaviour. This value can safely be set per
295
- # request on the session yielded by {#session_for}.
298
+ # request on the session.
296
299
  #
297
300
  # @option options [Boolean] :http_wire_trace (false) When `true`,
298
301
  # HTTP debug output will be sent to the `:logger`.
@@ -399,6 +402,7 @@ module Aws::Athena
399
402
  # resp.query_executions[0].result_configuration.encryption_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS", "CSE_KMS"
400
403
  # resp.query_executions[0].result_configuration.encryption_configuration.kms_key #=> String
401
404
  # resp.query_executions[0].query_execution_context.database #=> String
405
+ # resp.query_executions[0].query_execution_context.catalog #=> String
402
406
  # resp.query_executions[0].status.state #=> String, one of "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"
403
407
  # resp.query_executions[0].status.state_change_reason #=> String
404
408
  # resp.query_executions[0].status.submission_date_time #=> Time
@@ -425,6 +429,83 @@ module Aws::Athena
425
429
  req.send_request(options)
426
430
  end
427
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
+
428
509
  # Creates a named query in the specified workgroup. Requires that you
429
510
  # have access to the workgroup.
430
511
  #
@@ -513,8 +594,8 @@ module Aws::Athena
513
594
  # The workgroup description.
514
595
  #
515
596
  # @option params [Array<Types::Tag>] :tags
516
- # One or more tags, separated by commas, that you want to attach to the
517
- # workgroup as you create it.
597
+ # A list of comma separated tags to add to the workgroup that is
598
+ # created.
518
599
  #
519
600
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
520
601
  #
@@ -553,6 +634,28 @@ module Aws::Athena
553
634
  req.send_request(options)
554
635
  end
555
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
+
556
659
  # Deletes the named query if you have access to the workgroup in which
557
660
  # the query was saved.
558
661
  #
@@ -614,6 +717,73 @@ module Aws::Athena
614
717
  req.send_request(options)
615
718
  end
616
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
+
617
787
  # Returns information about a single query. Requires that you have
618
788
  # access to the workgroup in which the query was saved.
619
789
  #
@@ -675,6 +845,7 @@ module Aws::Athena
675
845
  # resp.query_execution.result_configuration.encryption_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS", "CSE_KMS"
676
846
  # resp.query_execution.result_configuration.encryption_configuration.kms_key #=> String
677
847
  # resp.query_execution.query_execution_context.database #=> String
848
+ # resp.query_execution.query_execution_context.catalog #=> String
678
849
  # resp.query_execution.status.state #=> String, one of "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"
679
850
  # resp.query_execution.status.state_change_reason #=> String
680
851
  # resp.query_execution.status.submission_date_time #=> Time
@@ -721,8 +892,10 @@ module Aws::Athena
721
892
  # The unique ID of the query execution.
722
893
  #
723
894
  # @option params [String] :next_token
724
- # The token that specifies where to start pagination if a previous
725
- # 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.
726
899
  #
727
900
  # @option params [Integer] :max_results
728
901
  # The maximum number of results (rows) to return in this request.
@@ -771,6 +944,56 @@ module Aws::Athena
771
944
  req.send_request(options)
772
945
  end
773
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
+
774
997
  # Returns information about the workgroup with the specified name.
775
998
  #
776
999
  # @option params [required, String] :work_group
@@ -809,10 +1032,98 @@ module Aws::Athena
809
1032
  req.send_request(options)
810
1033
  end
811
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
+
812
1123
  # Provides a list of available query IDs only for queries saved in the
813
- # specified workgroup. Requires that you have access to the workgroup.
814
- # If a workgroup is not specified, lists the saved queries for the
815
- # 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.
816
1127
  #
817
1128
  # For code samples using the AWS SDK for Java, see [Examples and Code
818
1129
  # Samples][1] in the *Amazon Athena User Guide*.
@@ -822,16 +1133,18 @@ module Aws::Athena
822
1133
  # [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
823
1134
  #
824
1135
  # @option params [String] :next_token
825
- # The token that specifies where to start pagination if a previous
826
- # 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.
827
1140
  #
828
1141
  # @option params [Integer] :max_results
829
1142
  # The maximum number of queries to return in this request.
830
1143
  #
831
1144
  # @option params [String] :work_group
832
- # The name of the workgroup from which the named queries are returned.
833
- # If a workgroup is not specified, the saved queries for the primary
834
- # 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.
835
1148
  #
836
1149
  # @return [Types::ListNamedQueriesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
837
1150
  #
@@ -876,14 +1189,16 @@ module Aws::Athena
876
1189
  # [1]: http://docs.aws.amazon.com/athena/latest/ug/code-samples.html
877
1190
  #
878
1191
  # @option params [String] :next_token
879
- # The token that specifies where to start pagination if a previous
880
- # 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.
881
1196
  #
882
1197
  # @option params [Integer] :max_results
883
1198
  # The maximum number of query executions to return in this request.
884
1199
  #
885
1200
  # @option params [String] :work_group
886
- # 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
887
1202
  # workgroup is not specified, a list of available query execution IDs
888
1203
  # for the queries in the primary workgroup is returned.
889
1204
  #
@@ -917,25 +1232,96 @@ module Aws::Athena
917
1232
  req.send_request(options)
918
1233
  end
919
1234
 
920
- # 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.
921
1305
  #
922
1306
  # @option params [required, String] :resource_arn
923
- # Lists the tags for the workgroup resource with the specified ARN.
1307
+ # Lists the tags for the resource with the specified ARN.
924
1308
  #
925
1309
  # @option params [String] :next_token
926
1310
  # The token for the next set of results, or null if there are no
927
1311
  # additional results for this request, where the request lists the tags
928
- # for the workgroup resource with the specified ARN.
1312
+ # for the resource with the specified ARN.
929
1313
  #
930
1314
  # @option params [Integer] :max_results
931
1315
  # The maximum number of results to be returned per request that lists
932
- # the tags for the workgroup resource.
1316
+ # the tags for the resource.
933
1317
  #
934
1318
  # @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
935
1319
  #
936
1320
  # * {Types::ListTagsForResourceOutput#tags #tags} => Array&lt;Types::Tag&gt;
937
1321
  # * {Types::ListTagsForResourceOutput#next_token #next_token} => String
938
1322
  #
1323
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1324
+ #
939
1325
  # @example Request syntax with placeholder values
940
1326
  #
941
1327
  # resp = client.list_tags_for_resource({
@@ -963,7 +1349,10 @@ module Aws::Athena
963
1349
  # Lists available workgroups for the account.
964
1350
  #
965
1351
  # @option params [String] :next_token
966
- # 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.
967
1356
  #
968
1357
  # @option params [Integer] :max_results
969
1358
  # The maximum number of workgroups to return in this request.
@@ -1001,10 +1390,10 @@ module Aws::Athena
1001
1390
  end
1002
1391
 
1003
1392
  # Runs the SQL query statements contained in the `Query`. Requires you
1004
- # to have access to the workgroup in which the query ran.
1005
- #
1006
- # For code samples using the AWS SDK for Java, see [Examples and Code
1007
- # 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*.
1008
1397
  #
1009
1398
  #
1010
1399
  #
@@ -1054,6 +1443,7 @@ module Aws::Athena
1054
1443
  # client_request_token: "IdempotencyToken",
1055
1444
  # query_execution_context: {
1056
1445
  # database: "DatabaseString",
1446
+ # catalog: "CatalogNameString",
1057
1447
  # },
1058
1448
  # result_configuration: {
1059
1449
  # output_location: "String",
@@ -1111,31 +1501,31 @@ module Aws::Athena
1111
1501
  req.send_request(options)
1112
1502
  end
1113
1503
 
1114
- # Adds one or more tags to the resource, such as a workgroup. A tag is a
1115
- # label that you assign to an AWS Athena resource (a workgroup). Each
1116
- # tag consists of a key and an optional value, both of which you define.
1117
- # Tags enable you to categorize resources (workgroups) in Athena, for
1118
- # example, by purpose, owner, or environment. Use a consistent set of
1119
- # tag keys to make it easier to search and filter workgroups in your
1120
- # account. For best practices, see [AWS Tagging Strategies][1]. The key
1121
- # length is from 1 (minimum) to 128 (maximum) Unicode characters in
1122
- # UTF-8. The tag value length is from 0 (minimum) to 256 (maximum)
1123
- # Unicode characters in UTF-8. You can use letters and numbers
1124
- # representable in UTF-8, and the following characters: + - = . \_ : /
1125
- # @. Tag keys and values are case-sensitive. Tag keys must be unique per
1126
- # 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.
1127
1517
  #
1128
1518
  #
1129
1519
  #
1130
1520
  # [1]: https://aws.amazon.com/answers/account-management/aws-tagging-strategies/
1131
1521
  #
1132
1522
  # @option params [required, String] :resource_arn
1133
- # Requests that one or more tags are added to the resource (such as a
1134
- # 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.
1135
1525
  #
1136
1526
  # @option params [required, Array<Types::Tag>] :tags
1137
- # One or more tags, separated by commas, to be added to the resource,
1138
- # 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.
1139
1529
  #
1140
1530
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1141
1531
  #
@@ -1160,17 +1550,14 @@ module Aws::Athena
1160
1550
  req.send_request(options)
1161
1551
  end
1162
1552
 
1163
- # Removes one or more tags from the workgroup resource. Takes as an
1164
- # input a list of TagKey Strings separated by commas, and removes their
1165
- # tags at the same time.
1553
+ # Removes one or more tags from a data catalog or workgroup resource.
1166
1554
  #
1167
1555
  # @option params [required, String] :resource_arn
1168
- # Removes one or more tags from the workgroup resource for the specified
1169
- # ARN.
1556
+ # Specifies the ARN of the resource from which tags are to be removed.
1170
1557
  #
1171
1558
  # @option params [required, Array<String>] :tag_keys
1172
- # Removes the tags associated with one or more tag keys from the
1173
- # workgroup resource.
1559
+ # A comma-separated list of one or more tag keys whose tags are to be
1560
+ # removed from the specified resource.
1174
1561
  #
1175
1562
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1176
1563
  #
@@ -1190,6 +1577,72 @@ module Aws::Athena
1190
1577
  req.send_request(options)
1191
1578
  end
1192
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
+
1193
1646
  # Updates the workgroup with the specified name. The workgroup's name
1194
1647
  # cannot be changed.
1195
1648
  #
@@ -1254,7 +1707,7 @@ module Aws::Athena
1254
1707
  params: params,
1255
1708
  config: config)
1256
1709
  context[:gem_name] = 'aws-sdk-athena'
1257
- context[:gem_version] = '1.24.0'
1710
+ context[:gem_version] = '1.29.0'
1258
1711
  Seahorse::Client::Request.new(handlers, context)
1259
1712
  end
1260
1713