Method: apps.domainMappings.create

Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, seeAuthorizedDomains.ListAuthorizedDomains.

HTTP request

POST https://appengine.googleapis.com/v1/{parent=apps/*}/domainMappings

The URL usesgRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Name of the parent Application resource. Example:apps/myapp.

Authorization requires the followingIAM permission on the specified resourceparent:

  • appengine.applications.update

Query parameters

Parameters
overrideStrategy

enum (DomainOverrideStrategy)

Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.

Request body

The request body contains an instance ofDomainMapping.

Response body

If successful, the response body contains a newly created instance ofOperation.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see theAuthentication Overview.

DomainOverrideStrategy

Override strategy for mutating an existing mapping.

Enums
UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGYStrategy unspecified. Defaults toSTRICT.
STRICTOverrides not allowed. If a mapping already exists for the specified domain, the request will return an ALREADY_EXISTS (409).
OVERRIDEOverrides allowed. If a mapping already exists for the specified domain, the request will overwrite it. Note that this might stop another Google product from serving. For example, if the domain is mapped to another App Engine application, that app will no longer serve from that domain.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-06-16 UTC.