create_domain_access_grant_for_organization
async
¶
create_domain_access_grant_for_organization(
domain_id: DomainId,
name: str,
principal: OrganizationAccessGrantPrincipal,
permission: OrganizationGrantPermission,
*,
config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateDomainAccessGrantForOrganizationOutput
Creates an AccessGrant that authorizes a principal to administer an organization domain.
Parameters:
-
domain_id(DomainId) –The ID of the organization domain to create the grant on.
-
name(str) –A name that identifies the access grant.
-
principal(OrganizationAccessGrantPrincipal) –The principal receiving the grant.
-
permission(OrganizationGrantPermission) –The permission to grant.
-
tags(Optional[TagMap], default:None) –The tags to associate with the access grant.
-
client_token(Optional[ClientToken], default:None) –Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
Raises:
-
AccessDeniedException–The caller is not authorized to perform this action.
-
ConflictException–The operation could not be completed because of a conflict with the current state of the resource.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceQuotaExceededException–A service quota was exceeded.
-
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:
Create an organization domain access grant The following example grants an Identity Center user administrative access to an organization domain. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> await client.create_domain_access_grant_for_organization(domain_id='d-1a2b3c4d5e', name='org-domain-admin', principal={'principalType': 'IDC_USER', 'principalId': '94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f'}, permission='ADMIN', tags={'Team': 'observability'}, client_token='3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73')
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | |