Domain name for API request: teo.intl.tencentcloudapi.com.
You can use this API to batch modify DNS records.
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: ModifyDnsRecords. |
| Version | Yes | String | Common Params. The value used for this API: 2022-09-01. |
| Region | No | String | Common Params. This parameter is not required. |
| ZoneId | Yes | String | Zone ID. |
| DnsRecords.N | No | Array of DnsRecord | DNS record modification data list. Up to 100 records can be modified at a time. |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
For the selected site with ZoneId zone-225qgrnvbi9w, change the DNS record with record ID record-3d5dg39c to the record name eo-test1.com, record type CNAME, and record content eo-test1.c4games.com.eo.dnse2.com. Change the DNS record with record ID record-gkd9gyrv to the record name eo-test2.com, record type A, and record content 1.2.3.4.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyDnsRecords
<Common request parameters>
{
"DnsRecords": [
{
"RecordId": "record-3d5dg39c",
"Name": "eo-test1.com",
"Type": "CNAME",
"Content": "eo-test1.c4games.com.eo.dnse2.com"
},
{
"RecordId": "record-gkd9gyrv",
"Name": "eo-test2.com",
"Type": "A",
"Content": "1.2.3.4"
}
],
"ZoneId": "zone-20hzkd4rdmy0"
}
{
"Response": {
"RequestId": "d08bed0d-15bf-4d65-ab56-906aee0c845"
}
}
For the selected site with ZoneId zone-225qgrnvbi9w, change the record weight of the DNS record with record ID record-3d5dg39c to 40, and change the record weight of the DNS record with record ID record-gkd9gyrv to 60.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyDnsRecords
<Common request parameters>
{
"DnsRecords": [
{
"RecordId": "record-3d5dg39c",
"Weight": 40
},
{
"RecordId": "record-gkd9gyrv",
"Weight": 60
}
],
"ZoneId": "zone-20hzkd4rdmy0"
}
{
"Response": {
"RequestId": "d08bed0d-15bf-4d65-ab56-906aee0c845"
}
}
This example shows you how to change the resolution route of the DNS record with record ID record-3d5dg39c to Beijing (CN.BJ) and its record content to eo-test1.c4games.com.eo.dnse2.com, and change the resolution route of the DNS record with record ID record-gkd9gyrv to Fujian (CN.FJ) and its record content to eo-test2.c4games.com.eo.dnse2.com under the site with ZoneId zone-225qgrnvbi9w.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyDnsRecords
<Common request parameters>
{
"DnsRecords": [
{
"RecordId": "record-3d5dg39c",
"Location": "CN.BJ",
"Content": "eo-test1.c4games.com.eo.dnse2.com"
},
{
"RecordId": "record-gkd9gyrv",
"Location": "CN.FJ",
"Content": "eo-test2.c4games.com.eo.dnse2.com"
}
],
"ZoneId": "zone-20hzkd4rdmy0"
}
{
"Response": {
"RequestId": "d08bed0d-15bf-4d65-ab56-906aee0c845"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
There is no error code related to the API business logic. For other error codes, please see Common Error Codes.
피드백