Class: Aws::TimestreamQuery::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::TimestreamQuery::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-timestreamquery/client.rb
Overview
An API client for TimestreamQuery. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::TimestreamQuery::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#cancel_query(params = {}) ⇒ Types::CancelQueryResponse
Cancels a query that has been issued.
-
#create_scheduled_query(params = {}) ⇒ Types::CreateScheduledQueryResponse
Create a scheduled query that will be run on your behalf at the configured schedule.
-
#delete_scheduled_query(params = {}) ⇒ Struct
Deletes a given scheduled query.
-
#describe_account_settings(params = {}) ⇒ Types::DescribeAccountSettingsResponse
Describes the settings for your account that include the query pricing model and the configured maximum TCUs the service can use for your query workload.
-
#describe_endpoints(params = {}) ⇒ Types::DescribeEndpointsResponse
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against.
-
#describe_scheduled_query(params = {}) ⇒ Types::DescribeScheduledQueryResponse
Provides detailed information about a scheduled query.
-
#execute_scheduled_query(params = {}) ⇒ Struct
You can use this API to run a scheduled query manually.
-
#list_scheduled_queries(params = {}) ⇒ Types::ListScheduledQueriesResponse
Gets a list of all scheduled queries in the caller’s Amazon account and Region.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all tags on a Timestream query resource.
-
#prepare_query(params = {}) ⇒ Types::PrepareQueryResponse
A synchronous operation that allows you to submit a query with parameters to be stored by Timestream for later running.
-
#query(params = {}) ⇒ Types::QueryResponse
‘Query` is a synchronous operation that enables you to run a query against your Amazon Timestream data.
-
#tag_resource(params = {}) ⇒ Struct
Associate a set of tags with a Timestream resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes the association of tags from a Timestream query resource.
-
#update_account_settings(params = {}) ⇒ Types::UpdateAccountSettingsResponse
Transitions your account to use TCUs for query pricing and modifies the maximum query compute units that you’ve configured.
-
#update_scheduled_query(params = {}) ⇒ Struct
Update a scheduled query.
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.
451 452 453 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 451 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.
1481 1482 1483 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1481 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.
1484 1485 1486 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1484 def errors_module Errors end |
Instance Method Details
#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.
1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1454 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::TimestreamQuery') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-timestreamquery' context[:gem_version] = '1.47.0' Seahorse::Client::Request.new(handlers, context) end |
#cancel_query(params = {}) ⇒ Types::CancelQueryResponse
Cancels a query that has been issued. Cancellation is provided only if the query has not completed running before the cancellation request was issued. Because cancellation is an idempotent operation, subsequent cancellation requests will return a ‘CancellationMessage`, indicating that the query has already been canceled. See [code sample] for details.
[1]: docs.aws.amazon.com/timestream/latest/developerguide/code-samples.cancel-query.html
490 491 492 493 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 490 def cancel_query(params = {}, = {}) req = build_request(:cancel_query, params) req.send_request() end |
#create_scheduled_query(params = {}) ⇒ Types::CreateScheduledQueryResponse
Create a scheduled query that will be run on your behalf at the configured schedule. Timestream assumes the execution role provided as part of the ‘ScheduledQueryExecutionRoleArn` parameter to run the query. You can use the `NotificationConfiguration` parameter to configure notification for your scheduled query operations.
646 647 648 649 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 646 def create_scheduled_query(params = {}, = {}) req = build_request(:create_scheduled_query, params) req.send_request() end |
#delete_scheduled_query(params = {}) ⇒ Struct
Deletes a given scheduled query. This is an irreversible operation.
668 669 670 671 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 668 def delete_scheduled_query(params = {}, = {}) req = build_request(:delete_scheduled_query, params) req.send_request() end |
#describe_account_settings(params = {}) ⇒ Types::DescribeAccountSettingsResponse
Describes the settings for your account that include the query pricing model and the configured maximum TCUs the service can use for your query workload.
You’re charged only for the duration of compute units used for your workloads.
702 703 704 705 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 702 def describe_account_settings(params = {}, = {}) req = build_request(:describe_account_settings, params) req.send_request() end |
#describe_endpoints(params = {}) ⇒ Types::DescribeEndpointsResponse
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.
Because the Timestream SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, *it is not recommended that you use this API unless*:
-
You are using [VPC endpoints (Amazon Web Services PrivateLink) with Timestream ][1]
-
Your application uses a programming language that does not yet have SDK support
-
You require better control over the client-side implementation
For detailed information on how and when to use and implement DescribeEndpoints, see [The Endpoint Discovery Pattern].
[1]: docs.aws.amazon.com/timestream/latest/developerguide/VPCEndpoints [2]: docs.aws.amazon.com/timestream/latest/developerguide/Using.API.html#Using-API.endpoint-discovery
746 747 748 749 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 746 def describe_endpoints(params = {}, = {}) req = build_request(:describe_endpoints, params) req.send_request() end |
#describe_scheduled_query(params = {}) ⇒ Types::DescribeScheduledQueryResponse
Provides detailed information about a scheduled query.
851 852 853 854 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 851 def describe_scheduled_query(params = {}, = {}) req = build_request(:describe_scheduled_query, params) req.send_request() end |
#execute_scheduled_query(params = {}) ⇒ Struct
You can use this API to run a scheduled query manually.
If you enabled ‘QueryInsights`, this API also returns insights and metrics related to the query that you executed as part of an Amazon SNS notification. `QueryInsights` helps with performance tuning of your query. For more information about `QueryInsights`, see [Using query insights to optimize queries in Amazon Timestream].
[1]: docs.aws.amazon.com/timestream/latest/developerguide/using-query-insights.html
905 906 907 908 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 905 def execute_scheduled_query(params = {}, = {}) req = build_request(:execute_scheduled_query, params) req.send_request() end |
#list_scheduled_queries(params = {}) ⇒ Types::ListScheduledQueriesResponse
Gets a list of all scheduled queries in the caller’s Amazon account and Region. ‘ListScheduledQueries` is eventually consistent.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
958 959 960 961 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 958 def list_scheduled_queries(params = {}, = {}) req = build_request(:list_scheduled_queries, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all tags on a Timestream query resource.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1001 1002 1003 1004 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1001 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#prepare_query(params = {}) ⇒ Types::PrepareQueryResponse
A synchronous operation that allows you to submit a query with parameters to be stored by Timestream for later running. Timestream only supports using this operation with ‘ValidateOnly` set to `true`.
1064 1065 1066 1067 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1064 def prepare_query(params = {}, = {}) req = build_request(:prepare_query, params) req.send_request() end |
#query(params = {}) ⇒ Types::QueryResponse
‘Query` is a synchronous operation that enables you to run a query against your Amazon Timestream data.
If you enabled ‘QueryInsights`, this API also returns insights and metrics related to the query that you executed. `QueryInsights` helps with performance tuning of your query. For more information about `QueryInsights`, see [Using query insights to optimize queries in Amazon Timestream].
<note markdown=“1”> The maximum number of ‘Query` API requests you’re allowed to make with ‘QueryInsights` enabled is 1 query per second (QPS). If you exceed this query rate, it might result in throttling.
</note>
‘Query` will time out after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. See the [code sample] for details.
Your query request will fail in the following cases:
-
If you submit a ‘Query` request with the same client token outside of the 5-minute idempotency window.
-
If you submit a ‘Query` request with the same client token, but change other parameters, within the 5-minute idempotency window.
-
If the size of the row (including the query metadata) exceeds 1 MB, then the query will fail with the following error message:
‘Query aborted as max page response size has been exceeded by the output result row`
-
If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an ‘Invalid pagination token` error.
[1]: docs.aws.amazon.com/timestream/latest/developerguide/using-query-insights.html [2]: docs.aws.amazon.com/timestream/latest/developerguide/code-samples.run-query.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1262 1263 1264 1265 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1262 def query(params = {}, = {}) req = build_request(:query, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Associate a set of tags with a Timestream resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking.
1296 1297 1298 1299 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1296 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes the association of tags from a Timestream query resource.
1324 1325 1326 1327 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1324 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_account_settings(params = {}) ⇒ Types::UpdateAccountSettingsResponse
Transitions your account to use TCUs for query pricing and modifies the maximum query compute units that you’ve configured. If you reduce the value of ‘MaxQueryTCU` to a desired configuration, the new value can take up to 24 hours to be effective.
<note markdown=“1”> After you’ve transitioned your account to use TCUs for query pricing, you can’t transition to using bytes scanned for query pricing.
</note>
1419 1420 1421 1422 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1419 def update_account_settings(params = {}, = {}) req = build_request(:update_account_settings, params) req.send_request() end |
#update_scheduled_query(params = {}) ⇒ Struct
Update a scheduled query.
1445 1446 1447 1448 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1445 def update_scheduled_query(params = {}, = {}) req = build_request(:update_scheduled_query, 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.
1474 1475 1476 |
# File 'lib/aws-sdk-timestreamquery/client.rb', line 1474 def waiter_names [] end |