describe_log_streams
async
¶
describe_log_streams(
*,
config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
log_group_name: Optional[LogGroupName] = None,
log_group_identifier: Optional[LogGroupIdentifier] = None,
log_stream_name_prefix: Optional[LogStreamName] = None,
order_by: Optional[OrderBy] = None,
descending: Optional[Descending] = None,
next_token: Optional[NextToken] = None,
limit: Optional[DescribeLimit] = None,
) -> DescribeLogStreamsResponse
Lists the log streams for the specified log group. You can list all the log streams or filter the results by prefix. You can also control how the results are ordered.
You can specify the log group to search by using either logGroupIdentifier or logGroupName. You must include one of these two parameters, but you can't include both.
This operation has a limit of 25 transactions per second, after which transactions are throttled.
If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view data from the linked source accounts. For more information, see CloudWatch cross-account observability.
Parameters:
-
log_group_name(Optional[LogGroupName], default:None) –The name of the log group.
You must include either
logGroupIdentifierorlogGroupName, but not both. -
log_group_identifier(Optional[LogGroupIdentifier], default:None) –Specify either the name or ARN of the log group to view. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.
You must include either
logGroupIdentifierorlogGroupName, but not both. -
log_stream_name_prefix(Optional[LogStreamName], default:None) –The prefix to match.
If
orderByisLastEventTime, you cannot specify this parameter. -
order_by(Optional[OrderBy], default:None) –If the value is
LogStreamName, the results are ordered by log stream name. If the value isLastEventTime, the results are ordered by the event time. The default value isLogStreamName.If you order the results by event time, you cannot specify the
logStreamNamePrefixparameter.lastEventTimestamprepresents the time of the most recent log event in the log stream in CloudWatch Logs. This number is expressed as the number of milliseconds afterJan 1, 1970 00:00:00 UTC.lastEventTimestampupdates on an eventual consistency basis. It typically updates in less than an hour from ingestion, but in rare situations might take longer. -
descending(Optional[Descending], default:None) –If the value is true, results are returned in descending order. If the value is to false, results are returned in ascending order. The default value is false.
-
next_token(Optional[NextToken], default:None) –The token for the next set of items to return. (You received this token from a previous call.)
-
limit(Optional[DescribeLimit], default:None) –The maximum number of items returned. If you don't specify a value, the default is up to 50 items.
Raises:
-
InvalidParameterException–A parameter is specified incorrectly.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceUnavailableException–The service cannot complete the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudwatch_logs/_services/async_cloud_watch_logs.py
3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 | |