list_access_grants
async
¶
list_access_grants(
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = 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.
>>> await 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/async_cloud_watch_omni.py
3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 | |