createDomain

Creates a domain with identity provider configuration. Use GetDomain to retrieve the domain, UpdateDomain to change its configuration, and CreateSpace to add spaces within it.

Samples

// The following example creates an Identity Center domain and configures it with an Identity Center
// instance. The name must be 3 63 characters of lowercase letters, numbers, and hyphens, and the endpoint URLs
// are derived from it. Payloads are shown as JSON on the wire they are CBOR encoded.
val resp = cloudWatchOmniClient.createDomain {
    name = "prod-observability"
    identityProviders = listOf<IdentityProvider>(
        IdentityProvider.fromValue("IDC")
    )
    identityProviderConfiguration = IdentityProviderConfiguration {
        identityCenterConfiguration = IdentityCenterConfiguration {
            identityCenterInstanceArn = "arn:aws:sso:::instance/ssoins-1234567890abcdef"
        }
    }
    tags = mapOf<String, String>(
        "Team" to "observability"
    )
    clientToken = "3f2a9c1e-7b04-4d8a-9e15-6c2b8d0f4a73"
}