@@ -40,17 +40,17 @@ def start_query(
4040
4141 Parameters
4242 ----------
43- query : str
43+ query: str
4444 The query string.
45- log_group_names : str
46- The list of log groups to be queried. You can include up to 20 log groups.
47- start_time : datetime.datetime
45+ log_group_names: List[ str]
46+ The list of log group names or ARNs to be queried. You can include up to 50 log groups.
47+ start_time: datetime.datetime
4848 The beginning of the time range to query.
49- end_time : datetime.datetime
49+ end_time: datetime.datetime
5050 The end of the time range to query.
51- limit : Optional[int]
51+ limit: Optional[int]
5252 The maximum number of log events to return in the query.
53- boto3_session : boto3.Session(), optional
53+ boto3_session: boto3.Session(), optional
5454 Boto3 Session. The default boto3 session will be used if boto3_session receive None.
5555
5656 Returns
@@ -79,15 +79,19 @@ def start_query(
7979 _logger .debug ("start_timestamp: %s" , start_timestamp )
8080 _logger .debug ("end_timestamp: %s" , end_timestamp )
8181
82- _validate_args (start_timestamp = start_timestamp , end_timestamp = end_timestamp )
82+ _validate_args (
83+ start_timestamp = start_timestamp ,
84+ end_timestamp = end_timestamp ,
85+ )
8386 args : Dict [str , Any ] = {
84- "logGroupNames " : log_group_names ,
87+ "logGroupIdentifiers " : log_group_names ,
8588 "startTime" : start_timestamp ,
8689 "endTime" : end_timestamp ,
8790 "queryString" : query ,
8891 }
8992 if limit is not None :
9093 args ["limit" ] = limit
94+
9195 client_logs = _utils .client (service_name = "logs" , session = boto3_session )
9296 response = client_logs .start_query (** args )
9397 return response ["queryId" ]
@@ -159,8 +163,8 @@ def run_query(
159163 ----------
160164 query : str
161165 The query string.
162- log_group_names : str
163- The list of log groups to be queried. You can include up to 20 log groups.
166+ log_group_names: List[ str]
167+ The list of log group names or ARNs to be queried. You can include up to 50 log groups.
164168 start_time : datetime.datetime
165169 The beginning of the time range to query.
166170 end_time : datetime.datetime
@@ -210,17 +214,17 @@ def read_logs(
210214
211215 Parameters
212216 ----------
213- query : str
217+ query: str
214218 The query string.
215- log_group_names : str
216- The list of log groups to be queried. You can include up to 20 log groups.
217- start_time : datetime.datetime
219+ log_group_names: List[ str]
220+ The list of log group names or ARNs to be queried. You can include up to 50 log groups.
221+ start_time: datetime.datetime
218222 The beginning of the time range to query.
219- end_time : datetime.datetime
223+ end_time: datetime.datetime
220224 The end of the time range to query.
221- limit : Optional[int]
225+ limit: Optional[int]
222226 The maximum number of log events to return in the query.
223- boto3_session : boto3.Session(), optional
227+ boto3_session: boto3.Session(), optional
224228 Boto3 Session. The default boto3 session will be used if boto3_session receive None.
225229
226230 Returns
@@ -384,15 +388,15 @@ def filter_log_events(
384388
385389 Note
386390 ----
387- Cannot call filter_log_events with both log_stream_names and log_stream_name_prefix.
391+ Cannot call `` filter_log_events`` with both `` log_stream_names`` and `` log_stream_name_prefix`` .
388392
389393 Parameters
390394 ----------
391- log_group_name : str
395+ log_group_name: str
392396 The name of the log group.
393- log_stream_name_prefix : str
397+ log_stream_name_prefix: str, optional
394398 Filters the results to include only events from log streams that have names starting with this prefix.
395- log_stream_names: List[str]
399+ log_stream_names: List[str], optional
396400 Filters the results to only logs from the log streams in this list.
397401 filter_pattern : str
398402 The filter pattern to use. If not provided, all the events are matched.
@@ -432,7 +436,7 @@ def filter_log_events(
432436 """
433437 if log_stream_name_prefix and log_stream_names :
434438 raise exceptions .InvalidArgumentCombination (
435- "Cannot call filter_log_events with both log_stream_names and log_stream_name_prefix"
439+ "Cannot call ` filter_log_events` with both ` log_stream_names` and ` log_stream_name_prefix` "
436440 )
437441 _logger .debug ("log_group_name: %s" , log_group_name )
438442
0 commit comments