Class: Aws::Athena::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Athena::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-athena/client.rb
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#batch_get_named_query(params = {}) ⇒ Types::BatchGetNamedQueryOutput
Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings.
-
#batch_get_query_execution(params = {}) ⇒ Types::BatchGetQueryExecutionOutput
Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings.
-
#create_named_query(params = {}) ⇒ Types::CreateNamedQueryOutput
Creates a named query in the specified workgroup.
-
#create_work_group(params = {}) ⇒ Struct
Creates a workgroup with the specified name.
-
#delete_named_query(params = {}) ⇒ Struct
Deletes the named query if you have access to the workgroup in which the query was saved.
-
#delete_work_group(params = {}) ⇒ Struct
Deletes the workgroup with the specified name.
-
#get_named_query(params = {}) ⇒ Types::GetNamedQueryOutput
Returns information about a single query.
-
#get_query_execution(params = {}) ⇒ Types::GetQueryExecutionOutput
Returns information about a single execution of a query if you have access to the workgroup in which the query ran.
-
#get_query_results(params = {}) ⇒ Types::GetQueryResultsOutput
Streams the results of a single query execution specified by ‘QueryExecutionId` from the Athena query results location in Amazon S3.
-
#get_work_group(params = {}) ⇒ Types::GetWorkGroupOutput
Returns information about the workgroup with the specified name.
-
#list_named_queries(params = {}) ⇒ Types::ListNamedQueriesOutput
Provides a list of available query IDs only for queries saved in the specified workgroup.
-
#list_query_executions(params = {}) ⇒ Types::ListQueryExecutionsOutput
Provides a list of available query execution IDs for the queries in the specified workgroup.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists the tags associated with this workgroup.
-
#list_work_groups(params = {}) ⇒ Types::ListWorkGroupsOutput
Lists available workgroups for the account.
-
#start_query_execution(params = {}) ⇒ Types::StartQueryExecutionOutput
Runs the SQL query statements contained in the ‘Query`.
-
#stop_query_execution(params = {}) ⇒ Struct
Stops a query execution.
-
#tag_resource(params = {}) ⇒ Struct
Adds one or more tags to the resource, such as a workgroup.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from the workgroup resource.
-
#update_work_group(params = {}) ⇒ Struct
Updates the workgroup with the specified name.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
261 262 263 |
# File 'lib/aws-sdk-athena/client.rb', line 261 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1193 1194 1195 |
# File 'lib/aws-sdk-athena/client.rb', line 1193 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1196 1197 1198 |
# File 'lib/aws-sdk-athena/client.rb', line 1196 def errors_module Errors end |
Instance Method Details
#batch_get_named_query(params = {}) ⇒ Types::BatchGetNamedQueryOutput
Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings. Requires you to have access to the workgroup in which the queries were saved. Use ListNamedQueriesInput to get the list of named query IDs in the specified workgroup. If information could not be retrieved for a submitted query ID, information about the query ID submitted is listed under UnprocessedNamedQueryId. Named queries differ from executed queries. Use BatchGetQueryExecutionInput to get details about each unique query execution, and ListQueryExecutionsInput to get a list of query execution IDs.
310 311 312 313 |
# File 'lib/aws-sdk-athena/client.rb', line 310 def batch_get_named_query(params = {}, = {}) req = build_request(:batch_get_named_query, params) req.send_request() end |
#batch_get_query_execution(params = {}) ⇒ Types::BatchGetQueryExecutionOutput
Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup. Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput to get details about named queries.
364 365 366 367 |
# File 'lib/aws-sdk-athena/client.rb', line 364 def batch_get_query_execution(params = {}, = {}) req = build_request(:batch_get_query_execution, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 |
# File 'lib/aws-sdk-athena/client.rb', line 1171 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-athena' context[:gem_version] = '1.20.0' Seahorse::Client::Request.new(handlers, context) end |
#create_named_query(params = {}) ⇒ Types::CreateNamedQueryOutput
Creates a named query in the specified workgroup. Requires that you have access to the workgroup.
For code samples using the AWS SDK for Java, see [Examples and Code Samples] in the *Amazon Athena User Guide*.
432 433 434 435 |
# File 'lib/aws-sdk-athena/client.rb', line 432 def create_named_query(params = {}, = {}) req = build_request(:create_named_query, params) req.send_request() end |
#create_work_group(params = {}) ⇒ Struct
Creates a workgroup with the specified name.
492 493 494 495 |
# File 'lib/aws-sdk-athena/client.rb', line 492 def create_work_group(params = {}, = {}) req = build_request(:create_work_group, params) req.send_request() end |
#delete_named_query(params = {}) ⇒ Struct
Deletes the named query if you have access to the workgroup in which the query was saved.
For code samples using the AWS SDK for Java, see [Examples and Code Samples] in the *Amazon Athena User Guide*.
525 526 527 528 |
# File 'lib/aws-sdk-athena/client.rb', line 525 def delete_named_query(params = {}, = {}) req = build_request(:delete_named_query, params) req.send_request() end |
#delete_work_group(params = {}) ⇒ Struct
Deletes the workgroup with the specified name. The primary workgroup cannot be deleted.
553 554 555 556 |
# File 'lib/aws-sdk-athena/client.rb', line 553 def delete_work_group(params = {}, = {}) req = build_request(:delete_work_group, params) req.send_request() end |
#get_named_query(params = {}) ⇒ Types::GetNamedQueryOutput
Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.
587 588 589 590 |
# File 'lib/aws-sdk-athena/client.rb', line 587 def get_named_query(params = {}, = {}) req = build_request(:get_named_query, params) req.send_request() end |
#get_query_execution(params = {}) ⇒ Types::GetQueryExecutionOutput
Returns information about a single execution of a query if you have access to the workgroup in which the query ran. Each time a query executes, information about the query execution is saved with a unique ID.
632 633 634 635 |
# File 'lib/aws-sdk-athena/client.rb', line 632 def get_query_execution(params = {}, = {}) req = build_request(:get_query_execution, params) req.send_request() end |
#get_query_results(params = {}) ⇒ Types::GetQueryResultsOutput
Streams the results of a single query execution specified by ‘QueryExecutionId` from the Athena query results location in Amazon S3. For more information, see [Query Results] in the *Amazon Athena User Guide*. This request does not execute the query but returns results. Use StartQueryExecution to run a query.
To stream query results successfully, the IAM principal with permission to call ‘GetQueryResults` also must have permissions to the Amazon S3 `GetObject` action for the Athena query results location.
IAM principals with permission to the Amazon S3 ‘GetObject` action for the query results location are able to retrieve query results from Amazon S3 even if permission to the `GetQueryResults` action is denied. To restrict user or role access, ensure that Amazon S3 permissions to the Athena query location are denied.
704 705 706 707 |
# File 'lib/aws-sdk-athena/client.rb', line 704 def get_query_results(params = {}, = {}) req = build_request(:get_query_results, params) req.send_request() end |
#get_work_group(params = {}) ⇒ Types::GetWorkGroupOutput
Returns information about the workgroup with the specified name.
742 743 744 745 |
# File 'lib/aws-sdk-athena/client.rb', line 742 def get_work_group(params = {}, = {}) req = build_request(:get_work_group, params) req.send_request() end |
#list_named_queries(params = {}) ⇒ Types::ListNamedQueriesOutput
Provides a list of available query IDs only for queries saved in the specified workgroup. Requires that you have access to the workgroup.
For code samples using the AWS SDK for Java, see [Examples and Code Samples] in the *Amazon Athena User Guide*.
791 792 793 794 |
# File 'lib/aws-sdk-athena/client.rb', line 791 def list_named_queries(params = {}, = {}) req = build_request(:list_named_queries, params) req.send_request() end |
#list_query_executions(params = {}) ⇒ Types::ListQueryExecutionsOutput
Provides a list of available query execution IDs for the queries in the specified workgroup. Requires you to have access to the workgroup in which the queries ran.
For code samples using the AWS SDK for Java, see [Examples and Code Samples] in the *Amazon Athena User Guide*.
840 841 842 843 |
# File 'lib/aws-sdk-athena/client.rb', line 840 def list_query_executions(params = {}, = {}) req = build_request(:list_query_executions, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists the tags associated with this workgroup.
883 884 885 886 |
# File 'lib/aws-sdk-athena/client.rb', line 883 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#list_work_groups(params = {}) ⇒ Types::ListWorkGroupsOutput
Lists available workgroups for the account.
921 922 923 924 |
# File 'lib/aws-sdk-athena/client.rb', line 921 def list_work_groups(params = {}, = {}) req = build_request(:list_work_groups, params) req.send_request() end |
#start_query_execution(params = {}) ⇒ Types::StartQueryExecutionOutput
Runs the SQL query statements contained in the ‘Query`. Requires you to have access to the workgroup in which the query ran.
For code samples using the AWS SDK for Java, see [Examples and Code Samples] in the *Amazon Athena User Guide*.
999 1000 1001 1002 |
# File 'lib/aws-sdk-athena/client.rb', line 999 def start_query_execution(params = {}, = {}) req = build_request(:start_query_execution, params) req.send_request() end |
#stop_query_execution(params = {}) ⇒ Struct
Stops a query execution. Requires you to have access to the workgroup in which the query ran.
For code samples using the AWS SDK for Java, see [Examples and Code Samples] in the *Amazon Athena User Guide*.
1032 1033 1034 1035 |
# File 'lib/aws-sdk-athena/client.rb', line 1032 def stop_query_execution(params = {}, = {}) req = build_request(:stop_query_execution, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds one or more tags to the resource, such as a workgroup. A tag is a label that you assign to an AWS Athena resource (a workgroup). Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize resources (workgroups) in Athena, for example, by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to search and filter workgroups in your account. For best practices, see [AWS Tagging Strategies]. The key length is from 1 (minimum) to 128 (maximum) Unicode characters in UTF-8. The tag value length is from 0 (minimum) to 256 (maximum) Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you specify more than one, separate them by commas.
[1]: aws.amazon.com/answers/account-management/aws-tagging-strategies/
1081 1082 1083 1084 |
# File 'lib/aws-sdk-athena/client.rb', line 1081 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from the workgroup resource. Takes as an input a list of TagKey Strings separated by commas, and removes their tags at the same time.
1111 1112 1113 1114 |
# File 'lib/aws-sdk-athena/client.rb', line 1111 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_work_group(params = {}) ⇒ Struct
Updates the workgroup with the specified name. The workgroup’s name cannot be changed.
1162 1163 1164 1165 |
# File 'lib/aws-sdk-athena/client.rb', line 1162 def update_work_group(params = {}, = {}) req = build_request(:update_work_group, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1186 1187 1188 |
# File 'lib/aws-sdk-athena/client.rb', line 1186 def waiter_names [] end |