API
  • History
  • Introduction
  • API Category
  • Making API Requests
    • Request Structure
    • Common Params
    • Signature v3
    • Signature
    • Responses
  • Site APIs
    • CreateZone
    • DescribeIdentifications
    • ModifyZone
    • DeleteZone
    • ModifyZoneStatus
    • CheckCnameStatus
    • IdentifyZone
    • DescribeZones
    • VerifyOwnership
    • ExportZoneConfig
    • ImportZoneConfig
    • DescribeZoneConfigImportResult
  • Acceleration Domain Management APIs
    • CreateAccelerationDomain
    • DescribeAccelerationDomains
    • ModifyAccelerationDomain
    • ModifyAccelerationDomainStatuses
    • DeleteAccelerationDomains
    • CreateSharedCNAME
    • BindSharedCNAME
    • DeleteSharedCNAME
  • Site Acceleration Configuration APIs
    • CreateRule
    • DeleteRules
    • DescribeHostsSetting
    • DescribeRules
    • DescribeRulesSetting
    • DescribeZoneSetting
    • ModifyRule
    • ModifyZoneSetting
  • Edge Function APIs
    • CreateFunction
    • DescribeFunctions
    • ModifyFunction
    • CreateFunctionRule
    • DeleteFunction
    • DescribeFunctionRules
    • ModifyFunctionRule
    • ModifyFunctionRulePriority
    • DeleteFunctionRules
    • DescribeFunctionRuntimeEnvironment
    • HandleFunctionRuntimeEnvironment
  • Alias Domain APIs
    • CreateAliasDomain
    • DescribeAliasDomains
    • ModifyAliasDomain
    • ModifyAliasDomainStatus
    • DeleteAliasDomain
  • Security Configuration APIs
    • CreateSecurityIPGroup
    • DescribeSecurityIPGroup
    • ModifySecurityIPGroup
    • DeleteSecurityIPGroup
    • DescribeOriginProtection
    • DescribeSecurityTemplateBindings
    • ModifySecurityPolicy
    • BindSecurityTemplateToEntity
    • DescribeSecurityIPGroupInfo
  • Layer 4 Application Proxy APIs
    • CreateL4Proxy
    • ModifyL4Proxy
    • ModifyL4ProxyStatus
    • DescribeL4Proxy
    • DeleteL4Proxy
    • CreateL4ProxyRules
    • ModifyL4ProxyRules
    • ModifyL4ProxyRulesStatus
    • DescribeL4ProxyRules
    • DeleteL4ProxyRules
    • CreateApplicationProxy
    • ModifyApplicationProxy
    • ModifyApplicationProxyStatus
    • DescribeApplicationProxies
    • DeleteApplicationProxy
    • CreateApplicationProxyRule
    • ModifyApplicationProxyRule
    • ModifyApplicationProxyRuleStatus
    • DeleteApplicationProxyRule
  • Content Management APIs
    • CreatePurgeTask
    • DescribePurgeTasks
    • CreatePrefetchTask
    • DescribePrefetchTasks
    • DescribeContentQuota
  • Data Analysis APIs
    • DescribeDDoSAttackData
    • DescribeDDoSAttackEvent
    • DescribeDDoSAttackTopData
    • DescribeOverviewL7Data
    • DescribeTimingL4Data
    • DescribeTimingL7AnalysisData
    • DescribeTopL7AnalysisData
    • DescribeTimingL7CacheData
    • DescribeTopL7CacheData
  • Log Service APIs
    • DownloadL7Logs
    • DownloadL4Logs
    • CreateCLSIndex
    • CreateRealtimeLogDeliveryTask
    • ModifyRealtimeLogDeliveryTask
    • DeleteRealtimeLogDeliveryTask
    • DescribeRealtimeLogDeliveryTasks
  • Billing APIs
    • CreatePlan
    • UpgradePlan
    • RenewPlan
    • ModifyPlan
    • IncreasePlanQuota
    • DestroyPlan
    • CreatePlanForZone
    • BindZoneToPlan
    • DescribeBillingData
    • DescribeAvailablePlans
  • Certificate APIs
    • DescribeDefaultCertificates
    • ModifyHostsCertificate
  • Load Balancing APIs
    • CreateOriginGroup
    • ModifyOriginGroup
    • DeleteOriginGroup
    • DescribeOriginGroup
    • CreateLoadBalancer
    • ModifyLoadBalancer
    • DeleteLoadBalancer
    • DescribeLoadBalancerList
    • DescribeOriginGroupHealthStatus
  • Custom Response Page APIs
    • CreateCustomizeErrorPage
    • DescribeCustomErrorPages
    • ModifyCustomErrorPage
    • DeleteCustomErrorPage
  • DNS Record APIs
    • CreateDnsRecord
    • DeleteDnsRecords
    • DescribeDnsRecords
    • ModifyDnsRecordsStatus
    • ModifyDnsRecords
  • Diagnostic Tool APIs
    • DescribeIPRegion
  • Version Management APIs
    • CreateConfigGroupVersion
    • DeployConfigGroupVersion
    • DescribeConfigGroupVersionDetail
    • DescribeConfigGroupVersions
    • DescribeDeployHistory
    • DescribeEnvironments
  • Data Types
  • Error Codes
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

ModifyDnsRecords

1. API Description

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

You can use this interface to batch 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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: ModifyDnsRecords.
VersionYesStringCommon Params. The value used for this API: 2022-09-01.
RegionNoStringCommon Params. This parameter is not required.
ZoneIdYesStringSite ID.
DnsRecords.NNoArray of DnsRecordList of DNS record modification data, with a maximum of 100 modifications at a time.

3. Output Parameters

Parameter NameTypeDescription
RequestIdStringThe 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.

4. Example

Example1 Batch modify DNS records for specified record IDs.

Under the site with ZoneId zone-225qgrnvbi9w, change the record name of the DNS record with record ID record-3d5dg39c to eo-test1.com, change the record type to CNAME, and change the record content to eo-test1.c4games.com.eo.dnse2.com; change the record name of the DNS record with record ID record-gkd9gyrv to eo-test2.com, change the record type to A, and change the record content to 1.2.3.4.

Input Example

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

Output Example

{
    "Response": {
        "RequestId": "d08bed0d-15bf-4d65-ab56-906aee0c845"
    }
}

Example2 Batch modify the record weight of DNS records for specified record IDs.

Under the site with ZoneId zone-225qgrnvbi9w, change the record weight of the DNS record with record ID record-3d5dg39c to 40; change the record weight of the DNS record with record ID record-gkd9gyrv to 60.

Input Example

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

Output Example

{
    "Response": {
        "RequestId": "d08bed0d-15bf-4d65-ab56-906aee0c845"
    }
}

Example3 Batch modify the resolution line and record content of DNS records for specified record IDs.

Under the site with ZoneId zone-225qgrnvbi9w, change the resolution line of the DNS record with record ID record-3d5dg39c to Beijing (CN.BJ), and change the record content to eo-test1.c4games.com.eo.dnse2.com; change the resolution line of the DNS record with record ID record-gkd9gyrv to Fujian (CN.FJ), and change the record content to eo-test2.c4games.com.eo.dnse2.com.

Input Example

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

Output Example

{
    "Response": {
        "RequestId": "d08bed0d-15bf-4d65-ab56-906aee0c845"
    }
}

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

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.