Skip to content

Commit 584860b

Browse files
Amazon CloudWatch Logs: Added endTimeOffset parameter to Scheduled Queries APIs (Create, Update, Get) enabling bounded time window configuration. Introduced scheduleType filter (CUSTOMER MANAGED, AWS MANAGED) for ListScheduledQueries and exposed it in Get and Update responses.
1 parent a037d84 commit 584860b

2 files changed

Lines changed: 55 additions & 8 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon CloudWatch Logs",
4+
"contributor": "",
5+
"description": "Added endTimeOffset parameter to Scheduled Queries APIs (Create, Update, Get) enabling bounded time window configuration. Introduced scheduleType filter (CUSTOMER MANAGED, AWS MANAGED) for ListScheduledQueries and exposed it in Get and Update responses."
6+
}

services/cloudwatchlogs/src/main/resources/codegen-resources/service-2.json

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@
10971097
{"shape":"ResourceNotFoundException"},
10981098
{"shape":"ServiceUnavailableException"}
10991099
],
1100-
"documentation":"<p>Returns the results from the specified query.</p> <p>Only the fields requested in the query are returned, along with a <code>@ptr</code> field, which is the identifier for the log record. You can use the value of <code>@ptr</code> in a <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html\">GetLogRecord</a> operation to get the full log record.</p> <p> <code>GetQueryResults</code> does not start running a query. To run a query, use <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html\">StartQuery</a>. For more information about how long results of previous queries are available, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html\">CloudWatch Logs quotas</a>.</p> <p>If the value of the <code>Status</code> field in the output is <code>Running</code>, this operation returns only partial results. If you see a value of <code>Scheduled</code> or <code>Running</code> for the status, you can retry the operation later to see the final results. </p> <p>This operation is used both for retrieving results from interactive queries and from automated scheduled query executions. Scheduled queries use <code>GetQueryResults</code> internally to retrieve query results for processing and delivery to configured destinations.</p> <p>You can retrieve up to 100,000 log event results from a query, if available, by using pagination. Use the <code>nextToken</code> returned in the response to request additional pages of results, with each page returning up to 10,000 log events.</p> <p>If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account to start queries in linked source accounts. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html\">CloudWatch cross-account observability</a>.</p>"
1100+
"documentation":"<p>Returns the results from the specified query.</p> <p>Only the fields requested in the query are returned, along with a <code>@ptr</code> field, which is the identifier for the log record. You can use the value of <code>@ptr</code> in a <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html\">GetLogRecord</a> operation to get the full log record.</p> <p> <code>GetQueryResults</code> does not start running a query. To run a query, use <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html\">StartQuery</a>. For more information about how long results of previous queries are available, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html\">CloudWatch Logs quotas</a>.</p> <p>If the value of the <code>Status</code> field in the output is <code>Running</code>, this operation returns only partial results. If you see a value of <code>Scheduled</code> or <code>Running</code> for the status, you can retry the operation later to see the final results. </p> <p>This operation is used both for retrieving results from interactive queries and from automated scheduled query executions. Scheduled queries use <code>GetQueryResults</code> internally to retrieve query results for processing and delivery to configured destinations.</p> <p>You can retrieve up to 100,000 log event results from a query, if available, by using pagination. Use the <code>nextToken</code> returned in the response to request additional pages of results, with each page returning up to 10,000 log events. This is only supported for Logs Insights QL and is currently not supported for PPL and SQL query languages.</p> <p>If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account to start queries in linked source accounts. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html\">CloudWatch cross-account observability</a>.</p>"
11011101
},
11021102
"GetScheduledQuery":{
11031103
"name":"GetScheduledQuery",
@@ -1816,6 +1816,7 @@
18161816
{"shape":"ValidationException"},
18171817
{"shape":"AccessDeniedException"},
18181818
{"shape":"ResourceNotFoundException"},
1819+
{"shape":"ConflictException"},
18191820
{"shape":"ThrottlingException"},
18201821
{"shape":"InternalServerException"}
18211822
],
@@ -2681,7 +2682,7 @@
26812682
"members":{
26822683
"name":{
26832684
"shape":"ScheduledQueryName",
2684-
"documentation":"<p>The name of the scheduled query. The name must be unique within your account and region. Valid characters are alphanumeric characters, hyphens, underscores, and periods. Length must be between 1 and 255 characters.</p>"
2685+
"documentation":"<p>The name of the scheduled query. The name must be unique within your account and region. Length must be between 1 and 300 characters.</p>"
26852686
},
26862687
"description":{
26872688
"shape":"ScheduledQueryDescription",
@@ -2711,6 +2712,10 @@
27112712
"shape":"StartTimeOffset",
27122713
"documentation":"<p>The time offset in seconds that defines the lookback period for the query. This determines how far back in time the query searches from the execution time.</p>"
27132714
},
2715+
"endTimeOffset":{
2716+
"shape":"EndTimeOffset",
2717+
"documentation":"<p>The time offset in seconds that defines the end of the lookback period for the query. Together with <code>startTimeOffset</code>, this determines the time window relative to the execution time over which the query runs.</p>"
2718+
},
27142719
"destinationConfiguration":{
27152720
"shape":"DestinationConfiguration",
27162721
"documentation":"<p>Configuration for where to deliver query results. Currently supports Amazon S3 destinations for storing query output.</p>"
@@ -4167,6 +4172,7 @@
41674172
"type":"string",
41684173
"max":256
41694174
},
4175+
"EndTimeOffset":{"type":"long"},
41704176
"Entity":{
41714177
"type":"structure",
41724178
"members":{
@@ -5046,7 +5052,7 @@
50465052
},
50475053
"nextToken":{
50485054
"shape":"GetQueryResultsNextToken",
5049-
"documentation":"<p>If there are more log events remaining in the results, the response includes a <code>nextToken</code>. You can use this token in a subsequent <code>GetQueryResults</code> request to get the next set of results. You can retrieve up to 100,000 log event results from a query by paginating with this token.</p>"
5055+
"documentation":"<p>If there are more log events remaining in the results, the response includes a <code>nextToken</code>. You can use this token in a subsequent <code>GetQueryResults</code> request to get the next set of results. You can retrieve up to 100,000 log event results from a query by paginating with this token. This is only supported for Logs Insights QL and is currently not supported for PPL and SQL query languages.</p>"
50505056
}
50515057
}
50525058
},
@@ -5153,6 +5159,10 @@
51535159
"shape":"StartTimeOffset",
51545160
"documentation":"<p>The time offset in seconds that defines the lookback period for the query.</p>"
51555161
},
5162+
"endTimeOffset":{
5163+
"shape":"EndTimeOffset",
5164+
"documentation":"<p>The time offset in seconds that defines the end of the lookback period for the query.</p>"
5165+
},
51565166
"destinationConfiguration":{
51575167
"shape":"DestinationConfiguration",
51585168
"documentation":"<p>Configuration for where query results are delivered.</p>"
@@ -5161,6 +5171,10 @@
51615171
"shape":"ScheduledQueryState",
51625172
"documentation":"<p>The current state of the scheduled query.</p>"
51635173
},
5174+
"scheduleType":{
5175+
"shape":"ScheduleType",
5176+
"documentation":"<p>The schedule type of the scheduled query. Valid values are <code>CUSTOMER_MANAGED</code> and <code>AWS_MANAGED</code>.</p>"
5177+
},
51645178
"lastTriggeredTime":{
51655179
"shape":"Timestamp",
51665180
"documentation":"<p>The timestamp when the scheduled query was last executed.</p>"
@@ -5837,6 +5851,10 @@
58375851
"state":{
58385852
"shape":"ScheduledQueryState",
58395853
"documentation":"<p>Filter scheduled queries by state. Valid values are <code>ENABLED</code> and <code>DISABLED</code>. If not specified, all scheduled queries are returned.</p>"
5854+
},
5855+
"scheduleType":{
5856+
"shape":"ScheduleType",
5857+
"documentation":"<p>Filter scheduled queries by schedule type. Valid values are <code>CUSTOMER_MANAGED</code> and <code>AWS_MANAGED</code>. If not specified, scheduled queries of all schedule types are returned.</p>"
58405858
}
58415859
}
58425860
},
@@ -8356,6 +8374,13 @@
83568374
"type":"string",
83578375
"min":1
83588376
},
8377+
"ScheduleType":{
8378+
"type":"string",
8379+
"enum":[
8380+
"CUSTOMER_MANAGED",
8381+
"AWS_MANAGED"
8382+
]
8383+
},
83598384
"ScheduledQueryDescription":{
83608385
"type":"string",
83618386
"max":1024
@@ -8396,7 +8421,8 @@
83968421
},
83978422
"ScheduledQueryIdentifier":{
83988423
"type":"string",
8399-
"pattern":"[\\w#+=/:,.@-]*"
8424+
"max":300,
8425+
"min":1
84008426
},
84018427
"ScheduledQueryLogGroupIdentifiers":{
84028428
"type":"list",
@@ -8406,9 +8432,8 @@
84068432
},
84078433
"ScheduledQueryName":{
84088434
"type":"string",
8409-
"max":255,
8410-
"min":1,
8411-
"pattern":"^[a-zA-Z0-9_\\-/.#]+$"
8435+
"max":300,
8436+
"min":1
84128437
},
84138438
"ScheduledQueryState":{
84148439
"type":"string",
@@ -8432,6 +8457,10 @@
84328457
"shape":"ScheduledQueryState",
84338458
"documentation":"<p>The current state of the scheduled query.</p>"
84348459
},
8460+
"scheduleType":{
8461+
"shape":"ScheduleType",
8462+
"documentation":"<p>The schedule type of the scheduled query. Valid values are <code>CUSTOMER_MANAGED</code> and <code>AWS_MANAGED</code>.</p>"
8463+
},
84358464
"lastTriggeredTime":{
84368465
"shape":"Timestamp",
84378466
"documentation":"<p>The timestamp when the scheduled query was last executed.</p>"
@@ -8714,7 +8743,7 @@
87148743
},
87158744
"limit":{
87168745
"shape":"EventsLimitStartQuery",
8717-
"documentation":"<p>The maximum number of log events to return in the query. If the query string uses the <code>fields</code> command, only the specified fields and their values are returned. The default is 10,000.</p> <p>The maximum value is 100,000.</p>"
8746+
"documentation":"<p>The maximum number of log events to return from the query. The maximum limit is 100,000. The maximum events returned in a single GetQueryResults API call is 10,000 log events per request. You can retrieve up to 100,000 log event results from a query by paginating with the <code>nextToken</code>. 100,000 limit is only supported for Logs Insights QL and is currently not supported for PPL and SQL query languages.</p>"
87188747
}
87198748
}
87208749
},
@@ -9428,6 +9457,10 @@
94289457
"shape":"StartTimeOffset",
94299458
"documentation":"<p>The updated time offset in seconds that defines the lookback period for the query.</p>"
94309459
},
9460+
"endTimeOffset":{
9461+
"shape":"EndTimeOffset",
9462+
"documentation":"<p>The updated time offset in seconds that defines the end of the lookback period for the query.</p>"
9463+
},
94319464
"destinationConfiguration":{
94329465
"shape":"DestinationConfiguration",
94339466
"documentation":"<p>The updated configuration for where to deliver query results.</p>"
@@ -9489,6 +9522,10 @@
94899522
"shape":"StartTimeOffset",
94909523
"documentation":"<p>The time offset of the updated scheduled query.</p>"
94919524
},
9525+
"endTimeOffset":{
9526+
"shape":"EndTimeOffset",
9527+
"documentation":"<p>The end time offset in seconds of the updated scheduled query.</p>"
9528+
},
94929529
"destinationConfiguration":{
94939530
"shape":"DestinationConfiguration",
94949531
"documentation":"<p>The destination configuration of the updated scheduled query.</p>"
@@ -9497,6 +9534,10 @@
94979534
"shape":"ScheduledQueryState",
94989535
"documentation":"<p>The state of the updated scheduled query.</p>"
94999536
},
9537+
"scheduleType":{
9538+
"shape":"ScheduleType",
9539+
"documentation":"<p>The schedule type of the updated scheduled query.</p>"
9540+
},
95009541
"lastTriggeredTime":{
95019542
"shape":"Timestamp",
95029543
"documentation":"<p>The timestamp when the updated scheduled query was last executed.</p>"

0 commit comments

Comments
 (0)