createDomainAccessGrantForOrganization

Creates an AccessGrant that authorizes a principal to administer an organization domain.

Samples

// 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.
val resp = cloudWatchOmniClient.createDomainAccessGrantForOrganization {
    domainId = "d-1a2b3c4d5e"
    name = "org-domain-admin"
    principal = OrganizationAccessGrantPrincipal {
        principalType = OrganizationGrantPrincipalType.fromValue("IDC_USER")
        principalId = "94b6c7d8-1a2b-4c3d-9e4f-5a6b7c8d9e0f"
    }
    permission = OrganizationGrantPermission.fromValue("ADMIN")
    tags = mapOf<String, String>(
        "Team" to "observability"
    )
    clientToken = "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73"
}