list_observations
async
¶
list_observations(
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
filters: Optional[ObservationFilters] = None,
max_results: Optional[int] = None,
next_token: Optional[PaginationToken] = None,
observation_ids: Optional[ObservationIdList] = None,
) -> ListObservationsOutput
This operation is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change. Lists observations matching the given filters.
Parameters:
-
filters(Optional[ObservationFilters], default:None) –Criteria restricting which observations are returned.
-
max_results(Optional[int], default:None) –The maximum number of observations to return in a single page. Valid range is 1 to 100. When omitted, the service defaults to 50.
-
next_token(Optional[PaginationToken], default:None) –Pagination token from a previous response, to retrieve the next page.
-
observation_ids(Optional[ObservationIdList], default:None) –Optional batch-get filter. When set, observations are fetched by ID under the caller's account. Pagination still applies: maxResults bounds the returned observations per page; nextToken cursors through the input ID list. An ID that does not exist, or that the caller is not permitted to read, is omitted from items; compare the IDs you requested against the IDs returned across all pages to find them. observationIds is mutually exclusive with filters: passing filters alongside observationIds returns a ValidationException. Use a follow-up ListObservations call without observationIds for filtered queries.
Raises:
-
AccessDeniedException–The caller is not authorized to perform this action.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ThrottlingException–The request was throttled due to exceeding the allowed request rate.
-
ValidationException–A parameter is specified incorrectly.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
List the most severe open observations The following example lists observations, filtered to the HIGH severity in the ACTIVE status, most recently updated first. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> await client.list_observations(filters={'status': ['ACTIVE'], 'severity': ['HIGH']}, max_results=50)
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 | |