Client — AWS SDK for Ruby V3 (original) (raw)

Class: Aws::TimestreamQuery::Client

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.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operationscollapse

Instance Method Summarycollapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

474 475 476 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 474 def initialize(*args) super end

Instance Method Details

#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.

513 514 515 516 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 513 def cancel_query(params = {}, options = {}) req = build_request(:cancel_query, params) req.send_request(options) 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.

669 670 671 672 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 669 def create_scheduled_query(params = {}, options = {}) req = build_request(:create_scheduled_query, params) req.send_request(options) end

#delete_scheduled_query(params = {}) ⇒ Struct

Deletes a given scheduled query. This is an irreversible operation.

691 692 693 694 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 691 def delete_scheduled_query(params = {}, options = {}) req = build_request(:delete_scheduled_query, params) req.send_request(options) 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.

725 726 727 728 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 725 def describe_account_settings(params = {}, options = {}) req = build_request(:describe_account_settings, params) req.send_request(options) 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:

For detailed information on how and when to use and implement DescribeEndpoints, see The Endpoint Discovery Pattern.

769 770 771 772 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 769 def describe_endpoints(params = {}, options = {}) req = build_request(:describe_endpoints, params) req.send_request(options) end

#describe_scheduled_query(params = {}) ⇒ Types::DescribeScheduledQueryResponse

Provides detailed information about a scheduled query.

874 875 876 877 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 874 def describe_scheduled_query(params = {}, options = {}) req = build_request(:describe_scheduled_query, params) req.send_request(options) 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.

928 929 930 931 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 928 def execute_scheduled_query(params = {}, options = {}) req = build_request(:execute_scheduled_query, params) req.send_request(options) 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.

981 982 983 984 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 981 def list_scheduled_queries(params = {}, options = {}) req = build_request(:list_scheduled_queries, params) req.send_request(options) 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.

1024 1025 1026 1027 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 1024 def list_tags_for_resource(params = {}, options = {}) req = build_request(:list_tags_for_resource, params) req.send_request(options) 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.

1087 1088 1089 1090 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 1087 def prepare_query(params = {}, options = {}) req = build_request(:prepare_query, params) req.send_request(options) 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 aboutQueryInsights, see Using query insights to optimize queries in Amazon Timestream.

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.

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:

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

1285 1286 1287 1288 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 1285 def query(params = {}, options = {}) req = build_request(:query, params) req.send_request(options) 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.

1319 1320 1321 1322 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 1319 def tag_resource(params = {}, options = {}) req = build_request(:tag_resource, params) req.send_request(options) end

#untag_resource(params = {}) ⇒ Struct

Removes the association of tags from a Timestream query resource.

1347 1348 1349 1350 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 1347 def untag_resource(params = {}, options = {}) req = build_request(:untag_resource, params) req.send_request(options) 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.

After you've transitioned your account to use TCUs for query pricing, you can't transition to using bytes scanned for query pricing.

1442 1443 1444 1445 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 1442 def update_account_settings(params = {}, options = {}) req = build_request(:update_account_settings, params) req.send_request(options) end

#update_scheduled_query(params = {}) ⇒ Struct

Update a scheduled query.

1468 1469 1470 1471 # File 'gems/aws-sdk-timestreamquery/lib/aws-sdk-timestreamquery/client.rb', line 1468 def update_scheduled_query(params = {}, options = {}) req = build_request(:update_scheduled_query, params) req.send_request(options) end