describe_log_streams
¶
describe_log_streams(
*,
config_overrides: Optional[CloudWatchLogsClientConfig] = 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/cloud_watch_logs.py
3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 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 | |