TimestreamQuery / Client / execute_scheduled_query
execute_scheduled_query#
- TimestreamQuery.Client.execute_scheduled_query(**kwargs)#
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 aboutQueryInsights
, see Using query insights to optimize queries in Amazon Timestream.See also: AWS API Documentation
Request Syntax
response = client.execute_scheduled_query( ScheduledQueryArn='string', InvocationTime=datetime(2015, 1, 1), ClientToken='string', QueryInsights={ 'Mode': 'ENABLED_WITH_RATE_CONTROL'|'DISABLED' } )
- Parameters:
ScheduledQueryArn (string) –
[REQUIRED]
ARN of the scheduled query.
InvocationTime (datetime) –
[REQUIRED]
The timestamp in UTC. Query will be run as if it was invoked at this timestamp.
ClientToken (string) –
Not used.
This field is autopopulated if not provided.
QueryInsights (dict) –
Encapsulates settings for enabling
QueryInsights
.Enabling
QueryInsights
returns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can useQueryInsights
to tune your query performance and cost.Mode (string) – [REQUIRED]
Provides the following modes to enable
ScheduledQueryInsights
:ENABLED_WITH_RATE_CONTROL
– EnablesScheduledQueryInsights
for the queries being processed. This mode also includes a rate control mechanism, which limits theQueryInsights
feature to 1 query per second (QPS).DISABLED
– DisablesScheduledQueryInsights
.
- Returns:
None
Exceptions