list_access_grants
¶
list_access_grants(
*,
config_overrides: Optional[CloudWatchOmniClientConfig] = None,
domain_id: Optional[DomainId] = None,
space_id: Optional[SpaceId] = None,
principal_id: Optional[PrincipalId] = None,
principal_type: Optional[AccessGrantPrincipalType] = None,
permission: Optional[AccessGrantPermission] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[int] = None,
) -> ListAccessGrantsOutput
Returns AccessGrants, with optional filtering by domain, space, principal, or permission. A grant is returned only when it matches every filter supplied. With no filters, returns the grants for the current account and Region.
Parameters:
-
domain_id(Optional[DomainId], default:None) –Filter by domain ID.
-
space_id(Optional[SpaceId], default:None) –Filter by space ID.
-
principal_id(Optional[PrincipalId], default:None) –Filter by principal ID.
-
principal_type(Optional[AccessGrantPrincipalType], default:None) –Filter by principal type.
-
permission(Optional[AccessGrantPermission], default:None) –Filter by permission level.
-
next_token(Optional[NextToken], default:None) –A token to retrieve the next page of results. Supply the same filters used on the request that returned it. Tokens expire after 24 hours.
-
max_results(Optional[int], default:None) –The maximum number of access grants to return per page. Defaults to 100. A page can contain fewer results than this value even when more results remain; continue while nextToken is present.
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 access grants in a space The following example lists the first page of access grants in a space and returns a nextToken to retrieve the next page. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> client.list_access_grants(domain_id='d-1a2b3c4d5e', space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d', max_results=50)
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 | |