You can call this operation to create a private zone.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddZone

The operation that you want to perform. Set the value to AddZone.

Lang String No en

The language of the specific content returned in the response.

ZoneName String No demo.com

The name of the private zone.

UserClientIp String No 1.1.1.1

The IP address of the client.

ProxyPattern String No ZONE
  • Specifies whether to perform recursive resolution when a queried subdomain name is not recorded in the private zone. Valid values: ZONE: no
  • RECORD: yes
ResourceGroupId String No rg-resourcegroupid1

The ID of the resource group.

Response parameters

Parameter Type Example Description
RequestId String 46973D4C-E3E4-4ABA-9190-9A9DE406C7E

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

ZoneId String AgIDE1MQ_151

The ID of the private zone that was created.

ZoneName String demo.com

The name of the private zone that was created.

Examples

Sample requests

  1. http://pvtz.aliyuncs.com/?Action=AddZone&ZoneName=demo.com&<Common request parameters>

Sample success responses

XML format

  1. <AddZoneResponse> <ZoneName>demo.com</ZoneName> <RequestId>0C9959BE-3A6A-4803-8DCE-973B42ACD599</RequestId> <ZoneId>AgIDE1MA_150</ZoneId></AddZoneResponse>

JSON format

  1. {“ZoneName”: demo.com”,“RequestId”: 46973D4C-E3E4-4ABA-9190-9A9DE406C7EE”,“ZoneId”: AgIDE1MQ_151”}

Error codes

For a list of error codes, visit the API Error Center.