createDomainForOrganization

Creates an organization-scoped domain for the caller's AWS Organization. Only the organization's management account can call this operation.

Samples

// The following example creates an organization scoped domain from the organization s management
// account, configures it with an Identity Center instance, and supplies an IAM role in the management account
// for domain access. Payloads are shown as JSON on the wire they are CBOR encoded.
val resp = cloudWatchOmniClient.createDomainForOrganization {
    name = "prod-observability-org"
    identityProviders = listOf<IdentityProvider>(
        IdentityProvider.fromValue("IDC")
    )
    identityProviderConfiguration = IdentityProviderConfiguration {
        identityCenterConfiguration = IdentityCenterConfiguration {
            identityCenterInstanceArn = "arn:aws:sso:::instance/ssoins-1234567890abcdef"
        }
    }
    domainAccessRoleArn = "arn:aws:iam::123456789012:role/CloudWatchOrganizationDomainAccessRole"
    tags = mapOf<String, String>(
        "Team" to "observability"
    )
    clientToken = "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73"
}