tencent cloud

Feedback

ModifyDnsRecord

Last updated: 2022-09-01 15:05:24

1. API Description

Domain name for API request: teo.tencentcloudapi.com.

This API is used to modify DNS records.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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: ModifyDnsRecord.
Version Yes String Common Params. The value used for this API: 2022-01-06.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Id Yes String Record ID
ZoneId Yes String Site ID
Type No String Record type
Name No String Record name
Content No String Record content
Ttl No Integer
Priority No Integer Priority
Mode No String Proxy mode

3. Output Parameters

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
Cname String CNAME address
Note: This field may return null, indicating that no valid value can be obtained.
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
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Modifying a DNS record

Input Example

POST / HTTP/1.1
Host: teo.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyDnsRecord
<Common request parameters>

{
    "Priority": 0,
    "Name": "xx",
    "ZoneId": "xx",
    "Content": "xx",
    "Mode": "xx",
    "Ttl": 0,
    "Type": "xx",
    "Id": "xx"
}

Output Example

{
    "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"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

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.InvalidDNSContent Incorrect DNS record
InvalidParameterValue.InvalidDNSName Incorrect DNS CNAME
InvalidParameterValue.RecordAlreadyExists This record already exists.
InvalidParameterValue.RecordNotAllowed This record cannot be added.
OperationDenied Operation denied.
ResourceInUse The resource is occupied.
ResourceNotFound The resource doesn’t exist.
UnauthorizedOperation.CamUnauthorized CAM is not authorized.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support