The POST /environments/{environmentId}/customDomains operation adds a new resource entity to the specified environment resource.

The request body must specify a value for the resource entity’s domainName property, and there cannot be an existing custom domain resource associated with the specified environment. If a custom domain resource already exists for this environment, the response returns a UNIQUENESS_VIOLATION error.