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
3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 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 | |