UpdateScheduledQuery
Updates an existing scheduled query with new configuration. This operation uses PUT semantics, allowing modification of query parameters, schedule, and destinations.
Request Syntax
{
"description": "string",
"destinationConfiguration": {
"s3Configuration": {
"destinationIdentifier": "string",
"roleArn": "string"
}
},
"executionRoleArn": "string",
"identifier": "string",
"logGroupIdentifiers": [ "string" ],
"queryLanguage": "string",
"queryString": "string",
"scheduleEndTime": number,
"scheduleExpression": "string",
"scheduleStartTime": number,
"startTimeOffset": number,
"state": "string",
"timezone": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- description
-
An updated description for the scheduled query.
Type: String
Length Constraints: Maximum length of 1024.
Required: No
- destinationConfiguration
-
The updated configuration for where to deliver query results.
Type: DestinationConfiguration object
Required: No
- executionRoleArn
-
The updated ARN of the IAM role that grants permissions to execute the query and deliver results.
Type: String
Length Constraints: Minimum length of 1.
Required: Yes
- identifier
-
The ARN or name of the scheduled query to update.
Type: String
Pattern:
[\w#+=/:,.@-]*Required: Yes
- logGroupIdentifiers
-
The updated array of log group names or ARNs to query.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 50 items.
Length Constraints: Minimum length of 1. Maximum length of 2048.
Pattern:
[\w#+=/:,.@-]*Required: No
- queryLanguage
-
The updated query language for the scheduled query.
Type: String
Valid Values:
CWLI | SQL | PPLRequired: Yes
- queryString
-
The updated query string to execute.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 10000.
Required: Yes
- scheduleEndTime
-
The updated end time for the scheduled query in Unix epoch format.
Type: Long
Valid Range: Minimum value of 0.
Required: No
- scheduleExpression
-
The updated cron expression that defines when the scheduled query runs.
Type: String
Length Constraints: Maximum length of 256.
Required: Yes
- scheduleStartTime
-
The updated start time for the scheduled query in Unix epoch format.
Type: Long
Valid Range: Minimum value of 0.
Required: No
- startTimeOffset
-
The updated time offset in seconds that defines the lookback period for the query.
Type: Long
Required: No
- state
-
The updated state of the scheduled query.
Type: String
Valid Values:
ENABLED | DISABLEDRequired: No
- timezone
-
The updated timezone for evaluating the schedule expression.
Type: String
Length Constraints: Minimum length of 1.
Required: No
Response Syntax
{
"creationTime": number,
"description": "string",
"destinationConfiguration": {
"s3Configuration": {
"destinationIdentifier": "string",
"roleArn": "string"
}
},
"executionRoleArn": "string",
"lastExecutionStatus": "string",
"lastTriggeredTime": number,
"lastUpdatedTime": number,
"logGroupIdentifiers": [ "string" ],
"name": "string",
"queryLanguage": "string",
"queryString": "string",
"scheduledQueryArn": "string",
"scheduleEndTime": number,
"scheduleExpression": "string",
"scheduleStartTime": number,
"startTimeOffset": number,
"state": "string",
"timezone": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- creationTime
-
The timestamp when the scheduled query was originally created.
Type: Long
Valid Range: Minimum value of 0.
- description
-
The description of the updated scheduled query.
Type: String
Length Constraints: Maximum length of 1024.
- destinationConfiguration
-
The destination configuration of the updated scheduled query.
Type: DestinationConfiguration object
- executionRoleArn
-
The execution role ARN of the updated scheduled query.
Type: String
Length Constraints: Minimum length of 1.
- lastExecutionStatus
-
The status of the most recent execution of the updated scheduled query.
Type: String
Valid Values:
Running | InvalidQuery | Complete | Failed | Timeout - lastTriggeredTime
-
The timestamp when the updated scheduled query was last executed.
Type: Long
Valid Range: Minimum value of 0.
- lastUpdatedTime
-
The timestamp when the scheduled query was last updated.
Type: Long
Valid Range: Minimum value of 0.
- logGroupIdentifiers
-
The log groups queried by the updated scheduled query.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 50 items.
Length Constraints: Minimum length of 1. Maximum length of 2048.
Pattern:
[\w#+=/:,.@-]* - name
-
The name of the updated scheduled query.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern:
^[a-zA-Z0-9_\-/.#]+$ - queryLanguage
-
The query language of the updated scheduled query.
Type: String
Valid Values:
CWLI | SQL | PPL - queryString
-
The query string of the updated scheduled query.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 10000.
- scheduledQueryArn
-
The ARN of the updated scheduled query.
Type: String
- scheduleEndTime
-
The end time of the updated scheduled query.
Type: Long
Valid Range: Minimum value of 0.
- scheduleExpression
-
The cron expression of the updated scheduled query.
Type: String
Length Constraints: Maximum length of 256.
- scheduleStartTime
-
The start time of the updated scheduled query.
Type: Long
Valid Range: Minimum value of 0.
- startTimeOffset
-
The time offset of the updated scheduled query.
Type: Long
- state
-
The state of the updated scheduled query.
Type: String
Valid Values:
ENABLED | DISABLED - timezone
-
The timezone of the updated scheduled query.
Type: String
Length Constraints: Minimum length of 1.
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You don't have sufficient permissions to perform this action.
HTTP Status Code: 400
- InternalServerException
-
An internal server error occurred while processing the request. This exception is returned when the service encounters an unexpected condition that prevents it from fulfilling the request.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified resource does not exist.
HTTP Status Code: 400
- ThrottlingException
-
The request was throttled because of quota limits.
HTTP Status Code: 400
- ValidationException
-
One of the parameters for the request is not valid.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: