tencent cloud

Feedback

ModifyRecordBatch

Last updated: 2023-04-27 15:39:09

1. API Description

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

This API is used to bulk modify 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: ModifyRecordBatch.
Version Yes String Common Params. The value used for this API: 2021-03-23.
Region No String Common Params. This parameter is not required for this API.
RecordIdList.N Yes Array of Integer Array of record IDs. You can view all DNS records and their IDs via the DescribeRecordList API.
Change Yes String The field to be modified. Valid values: sub_domain, record_type, area, value, mx, ttl, status.
ChangeTo Yes String The value to be changed to, which is required and subject to the change field.
Value No String The record value to be changed to, which is required only if the change field is record_type.
MX No String MX record priority, which is required only if the Change field is mx.

3. Output Parameters

Parameter Name Type Description
JobId Integer Bulk task ID
DetailList Array of ModifyRecordBatchDetail See modifyRecordBatchDetail.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Bulk modifying DNS records

This example shows you how to bulk modify DNS records.

Input Example

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

{
    "RecordIdList": [
        101,
        102
    ],
    "Change": "record_type",
    "ChangeTo": "MX",
    "Value": "test.aaaaaaa.com",
    "MX": "23"
}

Output Example

{
    "Response": {
        "RequestId": "ab4f1426-ea15-42ea-8183-dc1b44151166",
        "DetailList": [
            {
                "RecordList": [
                    {
                        "RecordLine": "Default",
                        "TTL": 600,
                        "MX": 21,
                        "RecordId": 178,
                        "SubDomain": "test",
                        "RecordType": "MX",
                        "Value": "test.aaaaaaa.com.",
                        "Enabled": 1,
                        "Status": "waiting",
                        "ErrMsg": null,
                        "Id": 0,
                        "Operation": "edit"
                    }
                ],
                "DomainId": 49,
                "Domain": "dnsapi1.cn",
                "ErrMsg": null,
                "Status": "waiting",
                "Operation": null,
                "DomainGrade": "DP_FREE",
                "Id": 0
            }
        ],
        "JobId": 67
    }
}

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
FailedOperation The operation failed.
FailedOperation.DomainIsLocked You cannot perform this operation on a locked domain.
FailedOperation.DomainIsSpam You cannot perform this operation on a banned domain.
FailedOperation.UnknowError The operation has no response. Try again later.
InvalidParameter.BatchRecordModifyActionError Failed to bulk modify records. Cause: Internal error.
InvalidParameter.BatchRecordModifyActionInvalidValue The record value is invalid.
InvalidParameter.BatchRecordReplaceActionError Failed to bulk replace records. Cause: Internal error.
InvalidParameter.BatchTaskCountLimit The number of tasks exceeds the upper limit.
InvalidParameter.DomainIdInvalid The domain number is incorrect.
InvalidParameter.DomainInvalid The domain is incorrect. Enter a top-level domain such as dnspod.cn.
InvalidParameter.DomainIsAliaser This domain is an alias of another domain.
InvalidParameter.DomainsEmpty No domains have been submitted.
InvalidParameter.JobGreaterThanLimit The number of tasks exceeds the upper limit.
InvalidParameter.MxInvalid The MX priority is incorrect.
InvalidParameter.ParamsIllegal The parameter is invalid, so the request was rejected.
InvalidParameter.ParamsMissing The parameter is incorrect.
InvalidParameter.RecordTypeInvalid The record type is incorrect.
InvalidParameter.RecordValueInvalid The record value is incorrect.
InvalidParameter.RecordValueLengthInvalid The DNS record value is too long.
InvalidParameter.RecordsEmpty No records have been submitted.
InvalidParameterValue.DomainNotExists The current domain is incorrect. Return to the previous step and try again.
OperationDenied.IPInBlacklistNotAllowed Sorry, you cannot add a blocked IP.
RequestLimitExceeded.BatchTaskLimit Too many tasks have been added for your IP. Try again later.
RequestLimitExceeded.CreateDomainLimit A great number of domains have been added under your account in a short period of time. Control the frequency of adding domains.
RequestLimitExceeded.RequestLimitExceeded The number of API requests exceeds the limit.