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.QueryInsightshelps with performance tuning of your query.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
QueryInsightsreturns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can useQueryInsightsto tune your query performance and cost.Mode (string) – [REQUIRED]
Provides the following modes to enable
ScheduledQueryInsights:ENABLED_WITH_RATE_CONTROL– EnablesScheduledQueryInsightsfor the queries being processed. This mode also includes a rate control mechanism, which limits theQueryInsightsfeature to 1 query per second (QPS).DISABLED– DisablesScheduledQueryInsights.
- Returns:
None
Exceptions
TimestreamQuery.Client.exceptions.AccessDeniedExceptionTimestreamQuery.Client.exceptions.InternalServerExceptionTimestreamQuery.Client.exceptions.ResourceNotFoundExceptionTimestreamQuery.Client.exceptions.ThrottlingExceptionTimestreamQuery.Client.exceptions.ValidationExceptionTimestreamQuery.Client.exceptions.InvalidEndpointException