All Products
Search
Document Center

API Gateway:CreateDomain

Last Updated:Dec 17, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Creates a domain name.

Operation description

Create Domain.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
apig:CreateDomaincreate
*Domain
acs:apig:{#regionId}:{#accountId}:domain/*
    none
none

Request syntax

POST /v1/domains HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request body.

namestringYes

The domain name.

abc.com
protocolstringYes

The protocol type supported by the domain name.

  • HTTP: Only HTTP is supported.
  • HTTPS: Only HTTPS is supported.
HTTP
forceHttpsbooleanNo

Specifies whether to enable forcible HTTPS redirection.

false
mTLSEnabledbooleanNo

Specifies whether to enable mutual authentication.

certIdentifierstringNo

The certificate ID.

1ef1da5f-38ed-69b3-****-037781890265
caCertIdentifierstringNo

The CA certificate ID.

1ef1da5f-38ed-69b3-****-037781890265
clientCACertstringNo

The client CA certificate.

-----BEGIN CERTIFICATE----- MIIFBTCCAu2gAwIBAgIUORLpYPGSFD1YOP6PMbE7Wd/mpTQwDQYJKoZIhvcNAQEL BQAwE************************************************2VwVOJ2gqX3 YuGaxvIbDy0iQJ1GMerPRyzJTeVEtdIKT29u0PdFRr4KZWom35qX7G4= -----END CERTIFICATE-----
http2OptionstringNo

The HTTP/2 configuration.

Valid values:

  • GlobalConfig
  • Close
  • Open
Open
tlsMaxstringNo

The maximum version of the TLS protocol. Up to TLS 1.3 is supported.

TLS1.3
tlsMinstringNo

The minimum version of the TLS protocol. Down to TLS 1.0 is supported.

TLS1.0
resourceGroupIdstringNorg-aekzoiafjtr7zyq
tlsCipherSuitesConfigTlsCipherSuitesConfigNo

The cipher suite configuration.

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

requestIdstring

The request ID, which is used to trace the API call link.

0C2D1C68-0D93-5561-8EE6-FDB7BF067A30
dataobject

The response data.

domainIdstring

The ID of the domain name.

d-cpu1aullhtgkidg7sa4g
codestring

The status code returned.

Ok
messagestring

The response message returned.

success

Examples

Sample success responses

JSONformat

{
  "requestId": "0C2D1C68-0D93-5561-8EE6-FDB7BF067A30",
  "data": {
    "domainId": "d-cpu1aullhtgkidg7sa4g"
  },
  "code": "Ok",
  "message": "success"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-04-25The internal configuration of the API is changed, but the call is not affectedView Change Details
2025-02-27The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-11-28The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-11-20The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-09-23The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-07-25The internal configuration of the API is changed, but the call is not affectedView Change Details