Resolution Records Related Interfaces

DNS

  • API Reference
    • API function release records
    • API Service Domain Name
    • Appendix
    • Common Headers and Error Responses
    • General Description
    • Interface Overview
    • Overview
    • Private DNS Related Interfaces
      • Add resolution record
      • Associate VPC
      • Create a PrivateZone
      • Delete PrivateZone
      • Delete resolution record
      • Disassociate VPC
      • Modify resolution record
      • Query details of a PrivateZone
      • Query PrivateZone list
      • Query resolution record list
      • Set Resolution Record Status
    • Public DNS Related Interfaces
      • Domain Name Related Interfaces
      • Line Group Related Interfaces
      • Resolution Records Related Interfaces
  • FAQs
    • General FAQs
  • Function Release Records
  • Operation guide
    • Identity and access management
    • Local DNS service
      • Add Private Zone
      • Add resolution record
      • Associate VPC
      • Delete Private Zone
      • Resolver
    • Public DNS service
      • Add domain name
      • Add resolution
      • Enable Resolution Service
      • Line Grouping Function
      • Manage Resolution
      • Resolution Line Selection
      • Upgrade Domain Name to Enterprise Edition Operation Guide
    • Resolution Logging Management
  • Product Description
    • Application scenarios
    • Product advantages
    • Product functions
    • Product overview
    • Usage restrictions
  • Product pricing
  • Quick Start
    • Activate Service
    • Use Resolution Service
  • SDK
    • Golang-SDK
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Version history
    • Java-SDK
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
    • Python-SDK
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
  • Service Level Agreement (SLA)
    • Internal DNS Service Level Agreement SLA
    • Public DNS Service Level Agreement SLA
  • Typical Practices
    • Implement URL Forwarding via Nginx
    • Local IDC Interconnection with Cloud DNS Service via Resolver
    • Quickly Set Up Private Domain Name Resolution Service Using Terraform
All documents
menu
No results found, please re-enter

DNS

  • API Reference
    • API function release records
    • API Service Domain Name
    • Appendix
    • Common Headers and Error Responses
    • General Description
    • Interface Overview
    • Overview
    • Private DNS Related Interfaces
      • Add resolution record
      • Associate VPC
      • Create a PrivateZone
      • Delete PrivateZone
      • Delete resolution record
      • Disassociate VPC
      • Modify resolution record
      • Query details of a PrivateZone
      • Query PrivateZone list
      • Query resolution record list
      • Set Resolution Record Status
    • Public DNS Related Interfaces
      • Domain Name Related Interfaces
      • Line Group Related Interfaces
      • Resolution Records Related Interfaces
  • FAQs
    • General FAQs
  • Function Release Records
  • Operation guide
    • Identity and access management
    • Local DNS service
      • Add Private Zone
      • Add resolution record
      • Associate VPC
      • Delete Private Zone
      • Resolver
    • Public DNS service
      • Add domain name
      • Add resolution
      • Enable Resolution Service
      • Line Grouping Function
      • Manage Resolution
      • Resolution Line Selection
      • Upgrade Domain Name to Enterprise Edition Operation Guide
    • Resolution Logging Management
  • Product Description
    • Application scenarios
    • Product advantages
    • Product functions
    • Product overview
    • Usage restrictions
  • Product pricing
  • Quick Start
    • Activate Service
    • Use Resolution Service
  • SDK
    • Golang-SDK
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Version history
    • Java-SDK
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
    • Python-SDK
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
  • Service Level Agreement (SLA)
    • Internal DNS Service Level Agreement SLA
    • Public DNS Service Level Agreement SLA
  • Typical Practices
    • Implement URL Forwarding via Nginx
    • Local IDC Interconnection with Cloud DNS Service via Resolver
    • Quickly Set Up Private Domain Name Resolution Service Using Terraform
  • Document center
  • arrow
  • DNS
  • arrow
  • API Reference
  • arrow
  • Public DNS Related Interfaces
  • arrow
  • Resolution Records Related Interfaces
Table of contents on this page
  • Add resolution record
  • Query resolution record list
  • Modify resolution record
  • Modify resolution record status
  • Delete resolution record

Resolution Records Related Interfaces

Updated at:2025-11-11

Add resolution record

Description

Add resolution record

Request structure

Plain Text
1POST /v{version}/dns/zone/{zoneName}/record?clientToken={clientToken} HTTP/1.1
2Host: dns.baidubce.com
3Authorization: authorization string
4 {
5	"rr":rr,
6	"type":type,
7	"value":value,
8	"ttl":ttl,
9	"line":line,
10	"description":description,
11	"priority":priority
12 }

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
zoneName String Yes URL parameter Domain name.
clientToken String No Query Idempotence Token, an ASCII string with a maximum length of 64 bits.
rr String Yes RequestBody Host record, such as "www". The total length of the record value and zone name must not exceed 255 characters.
type String Yes RequestBody Resolution record types include: "A", "CNAME", "MX", "TXT", "NS", "AAAA", "SRV".
value String Yes RequestBody Record value examples include an IP: "192.168.1.1", a CNAME: "cname.baidu.com", an MX: "mail.baidu.com", or an SRV: priority, weight, port, and target address, separated by spaces. For example: "0 6 8080 vipserver.test.com".
ttl int No RequestBody The cache time of the resolution record on the local DNS server (unit: seconds). Defaults are 300 seconds for the basic version, 120 seconds for the discount version, and 1 second for the enterprise version. The value must be a positive integer.
line String No RequestBody Resolution line or line group name, defaulting to "default". For the basic version and discount version, available options include: default (default), China Telecom (ct), China Mobile (cmnet), China Unicom (cnc), Education Network (edu), Search Engine (Baidu) (search); for the enterprise version, line values refer to [LineName](DNS/API Reference/Appendix.md#LineName), and the enterprise version supports transmitting the line group name.
description String No RequestBody Description, with a maximum length of 255 characters.
priority int No RequestBody Priority of MX record, value range: [0, 50]. This parameter is required when the record type is MX.

Response headers

No special headers are required beyond the standard ones.

Response parameters

No response parameters are available.

Request example

Plain Text
1POST /v1/dns/zone/baidu.com/record?clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849 HTTP/1.1
2Host: dns.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2020-07-14T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5	"rr":"www",
6	"type":"A",
7	"value":"192.168.1.1",
8	"ttl":300,
9	"line":default,
10	"description":"desc"
11}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Tus, 14 Jul 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS

Query resolution record list

Description

Query resolution record list

Request structure

Plain Text
1GET /v{version}/dns/zone/{zoneName}/record?rr={rr}&id={id}&marker={marker}&maxKeys={maxKeys}   HTTP/1.1   
2Host: dns.baidubce.com      
3Authorization: authorization string       

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
zoneName String Yes URL parameter Domain name.
rr String No Query Host record, such as "www".
id String No Query Resolution record ID.
marker String No Query The starting position for the batch list query, which is a system-generated string.
maxKeys int No Query The maximum number of items per page, capped at 1,000. The default is 1,000.

Response headers

No special headers are required beyond the standard ones.

Response parameters

Parameter name Types Description
marker String Indicates the starting position of the query.
isTruncated boolean "True" means there is more data available, and "False" means this is the last page.
nextMarker String The marker value needed to retrieve the next page. This field does not appear if isTruncated is false.
maxKeys int The maximum number of items per page.
records List<[PublicRecord](DNS/API Reference/Appendix.md#PublicRecord)> A list containing the resolution records from the query results.

Request example

Plain Text
1GET /v1/dns/zone/baidu.com/record?rr=www&marker=1234&maxKeys=1000 HTTP/1.1   
2Host: dns.baidubce.com     
3Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2017 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

Response example

Plain Text
1 HTTP/1.1 200 OK     
2 x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
3 Date: Thu, 16 Mar 2017 06:29:48 GMT    
4 Content Type: application/json;charset=UTF 8     
5 Server: BWS  
6  
7{
8	"nextMarker": "5678",
9    "marker": "1234",
10    "maxKeys": 1000,
11    "isTruncated": true,
12    "records": [
13		{
14			"id":"1234",
15			"rr":"www",
16			"status":"running",
17			"type":"A",
18			"value":"192.168.1.1",
19			"ttl":300,
20			"line":default,
21			"description":"desc"
22		}
23    ]
24}

Modify resolution record

Description

Modify resolution record

Request structure

Plain Text
1PUT /v{version}/dns/zone/{zoneName}/record/{recordId}?clientToken={clientToken} HTTP/1.1
2Host: dns.baidubce.com
3Authorization: authorization string
4{
5	"rr":rr,
6	"type":type,
7	"value":value,
8	"ttl":ttl,
9	"description":description,
10	"priority":priority
11}

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
zoneName String Yes URL parameter Domain name.
recordId String Yes URL parameter Resolution record ID.
clientToken String No Query Idempotence Token, an ASCII string with a maximum length of 64 bits.
rr String Yes RequestBody Host record, such as "www". The total length of the record value and zone name must not exceed 255 characters.
type String Yes RequestBody Resolution record types include: "A", "CNAME", "MX", "TXT", "NS", "AAAA", "SRV".
value String Yes RequestBody Record value examples include an IP: "192.168.1.1", a CNAME: "cname.baidu.com", or an MX: "mail.baidu.com".
ttl int No RequestBody The cache time of the resolution record on the local DNS server (in seconds). For the basic version, the default is 300 seconds; for the discount version, it is 120 seconds; and for the enterprise version, it is 1 second. The value must be a positive integer.
description String No RequestBody Description, with a maximum length of 255 characters.
priority int No RequestBody Priority of MX record, value range: [0, 50]. This parameter is required when the record type is MX.

Response headers

No special headers are required beyond the standard ones.

Response parameters

No response parameters are available.

Request example

Plain Text
1PUT /v1/dns/zone/baidu.com/record/1234?clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849
2Host: dns.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5    "rr":"www",
6	"type":"A",
7	"value":"192.168.1.1",
8	"ttl": 120,                    
9	"description": "desc"
10}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Tus, 14 Jul 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS

Modify resolution record status

Description

Modify resolution record status

Request structure

Plain Text
1PUT /v{version}/dns/zone/{zoneName}/record/{recordId}?{action}clientToken={clientToken} HTTP/1.1
2Host: dns.baidubce.com
3Authorization: authorization string

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
zoneName String Yes URL parameter Domain name.
recordId String Yes URL parameter Resolution record ID.
action String Yes Query "Enable" or "Disable" indicates whether the resolution record is activated or deactivated, respectively.
clientToken String No Query Idempotence Token, an ASCII string with a maximum length of 64 bits.

Response headers

No special headers are required beyond the standard ones.

Response parameters

No response parameters are available.

Request example

Plain Text
1PUT /v1/dns/zone/baidu.com/record/1234?enable&clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849
2Host: dns.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Thu, 16 Mar 2017 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS

Delete resolution record

Description

Delete resolution record

Request structure

Plain Text
1DELETE /v{version}/dns/zone/{zoneName}/record/{recordId}?clientToken={clientToken} HTTP/1.1
2Host: dns.baidubce.com
3Authorization: authorization string

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
zoneName String Yes URL parameter Domain name.
recordId String Yes URL parameter Resolution record ID.
clientToken String No Query Idempotence Token, an ASCII string with a maximum length of 64 bits.

Response headers

No special headers are required beyond the standard ones.

Response parameters

No response parameters are available.

Request example

Plain Text
1DELETE /v1/dns/zone/baidu.com/record/1234?clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849 HTTP/1.1
2Host: dns.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Thu, 16 Mar 2017 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS

Previous
Line Group Related Interfaces
Next
FAQs