list_omni_slos
async
¶
list_omni_slos(
space_id: SpaceId,
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
filter_criteria: Optional[SloFilterCriteria] = None,
sort_by: Optional[SloSortField] = None,
sort_order: Optional[SloSortOrder] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[int] = None,
) -> ListOmniSlosOutput
Lists the SLOs in a space, with their current state, optionally filtered and sorted, with pagination. Each item reports the measurement taken when its state last changed.
Parameters:
-
space_id(SpaceId) –The unique ID of the space.
-
filter_criteria(Optional[SloFilterCriteria], default:None) –Filters that narrow which SLOs are returned. All members are optional; the names, namePrefix and ids filters are mutually exclusive.
-
sort_by(Optional[SloSortField], default:None) –The field to sort results by. Defaults to NAME.
-
sort_order(Optional[SloSortOrder], default:None) –The order in which to sort results.
-
next_token(Optional[NextToken], default:None) –A token to retrieve the next page of results.
-
max_results(Optional[int], default:None) –The maximum number of SLOs to return per page. Defaults to 50.
Raises:
-
AccessDeniedException–The caller is not authorized to perform this action.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The specified resource does not exist.
-
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 SLOs that need attention The following example lists the SLOs in a space whose state is WARNING or CRITICAL, sorted by state with CRITICAL first, two to a page. The response holds a nextToken, so more SLOs match. Each item reports the measurement taken when its state last changed. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> await client.list_omni_slos(space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d', filter_criteria={'stateValue': ['WARNING', 'CRITICAL']}, sort_by='STATE', sort_order='DESC', max_results=2)
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 | |