Domain name for API request: teo.tencentcloudapi.com.
This API is used to create a DNS record.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: CreateDnsRecord. |
Version | Yes | String | Common Params. The value used for this API: 2022-01-06. |
Region | No | String | Common Params. This parameter is not required for this API. |
ZoneId | Yes | String | Site ID |
Type | Yes | String | Record type |
Name | Yes | String | Record name |
Content | Yes | String | Record content |
Mode | Yes | String | Proxy mode. Valid values: dns_only , cdn_only , and secure_cdn . |
Ttl | No | Integer | |
Priority | No | Integer | Priority |
Parameter Name | Type | Description |
---|---|---|
Id | String | Record ID |
Type | String | Record type |
Name | String | Record name |
Content | String | Record content |
Ttl | Integer | |
Priority | Integer | Priority |
Mode | String | Proxy mode |
Status | String | Resolution status. Valid values:active : Activatedpending : Not activated |
Locked | Boolean | Whether the DNS record is locked |
CreatedOn | Timestamp ISO8601 | Creation time |
ModifiedOn | Timestamp ISO8601 | Modification time |
ZoneId | String | Site ID |
ZoneName | String | Site name |
Cname | String | CNAME address Note: This field may return null , indicating that no valid value can be obtained. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: teo.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateDnsRecord
<Common request parameters>
{
"Priority": 0,
"Name": "xx",
"ZoneId": "xx",
"Content": "xx",
"Mode": "xx",
"Ttl": 0,
"Type": "xx"
}
{
"Response": {
"Status": "xx",
"Priority": 0,
"Locked": true,
"Name": "xx",
"CreatedOn": "2020-09-22T00:00:00+00:00",
"ZoneId": "xx",
"Content": "xx",
"Cname": "xx",
"RequestId": "xx",
"Ttl": 0,
"ModifiedOn": "2020-09-22T00:00:00+00:00",
"Mode": "xx",
"Type": "xx",
"Id": "xx",
"ZoneName": "xx"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InvalidParameterValue.ConflictRecord | It conflicts with existing records. |
InvalidParameterValue.ConflictWithDNSSEC | DNS records conflict with DNSSEC. |
InvalidParameterValue.ConflictWithLBRecord | This DNS record conflicts with CLB records. |
InvalidParameterValue.ConflictWithNSRecord | This DNS record conflicts with NS records. |
InvalidParameterValue.InvalidDNSContent | Incorrect DNS record |
InvalidParameterValue.InvalidDNSName | Incorrect DNS CNAME |
InvalidParameterValue.InvalidProxyName | Incorrect DNS proxied domain name. |
InvalidParameterValue.InvalidProxyOrigin | Incorrect DNS proxy |
InvalidParameterValue.RecordAlreadyExists | This record already exists. |
InvalidParameterValue.RecordNotAllowed | This record cannot be added. |
OperationDenied | Operation denied. |
OperationDenied.DomainNoICP | The domain name doesn't have an ICP filing number. |
ResourceNotFound | The resource doesn’t exist. |
UnauthorizedOperation.CamUnauthorized | CAM is not authorized. |
Was this page helpful?