UpdateScheduledQuery
Updates the configuration of an existing scheduled query. This operation follows PUT semantics, replacing the existing configuration with the provided values.
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
-
Updated description for the scheduled query.
Type: String
Length Constraints: Maximum length of 1024.
Required: No
- destinationConfiguration
-
Updated configuration for destinations where the query results will be delivered.
Type: DestinationConfiguration object
Required: No
- executionRoleArn
-
Updated ARN of the IAM role that CloudWatch Logs will assume to execute the scheduled query.
Type: String
Length Constraints: Minimum length of 1.
Required: Yes
- identifier
-
The name or ARN of the scheduled query to update.
Type: String
Pattern:
[\w#+=/:,.@-]*Required: Yes
- logGroupIdentifiers
-
Updated log group identifiers 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
-
Updated query language to use (LogsQL, PPL, or SQL).
Type: String
Valid Values:
CWLI | SQL | PPLRequired: Yes
- queryString
-
Updated CloudWatch Logs Insights query string to execute.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 10000.
Required: Yes
- scheduleEndTime
-
Updated end time for the query schedule in Unix epoch time.
Type: Long
Valid Range: Minimum value of 0.
Required: No
- scheduleExpression
-
Updated cron expression that defines when the scheduled query runs.
Type: String
Length Constraints: Maximum length of 256.
Required: Yes
- scheduleStartTime
-
Updated start time for the query schedule in Unix epoch time.
Type: Long
Valid Range: Minimum value of 0.
Required: No
- startTimeOffset
-
Updated time offset in seconds from the execution time for the start of the query time range.
Type: Long
Required: No
- state
-
Updated state of the scheduled query (ENABLED or DISABLED).
Type: String
Valid Values:
ENABLED | DISABLEDRequired: No
- timezone
-
Updated timezone in which the schedule expression is evaluated.
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 creation time of the updated scheduled query.
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 last execution of the updated scheduled query (Running, Complete, Failed, Timeout, or InvalidQuery).
Type: String
Valid Values:
Running | InvalidQuery | Complete | Failed | Timeout - lastTriggeredTime
-
The time when the updated scheduled query was last executed.
Type: Long
Valid Range: Minimum value of 0.
- lastUpdatedTime
-
The last updated time of the scheduled query.
Type: Long
Valid Range: Minimum value of 0.
- logGroupIdentifiers
-
The log group identifiers of 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 used by 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 schedule end time of the updated scheduled query.
Type: Long
Valid Range: Minimum value of 0.
- scheduleExpression
-
The schedule expression of the updated scheduled query.
Type: String
Length Constraints: Maximum length of 256.
- scheduleStartTime
-
The schedule start time of the updated scheduled query.
Type: Long
Valid Range: Minimum value of 0.
- startTimeOffset
-
The start 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 is typically a temporary issue and the request can be retried.
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 AWS SDKs, see the following: