tencent cloud

Feedback

ModifyDnsRecord

Last updated: 2022-12-09 16:06:47
This document is currently invalid. Please refer to the documentation page of the product.

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-09-01.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
DnsRecordId Yes String The record ID.
ZoneId Yes String The site ID.
DnsRecordType No String The DNS record type. Values:
  • A: Point a domain name to an IPv4 address, such as 8.8.8.8.
  • AAAA: Point a domain name to an IPv6 address.
  • MX: It is used for email servers. The record value and priority parameters are provided by email service providers. If there are multiple MX records, the lower the priority value, the higher the priority.
  • CNAME: Point a domain name to another domain name that can be resolved to an IP address.
  • TXT: Identify and describe a domain name. It is usually used for domain verification and as SPF records (for anti-spam).
  • NS: If you need to authorize a subdomain name to another DNS service provider for DNS resolution, you need to add an NS record. You cannot add an NS record for a root domain name.
  • CAA: Specify CAs to issue certificates for sites.
  • SRV: Identify a service used by a server. It is commonly used in Microsoft directory management.
  • DnsRecordName No String The record name, which consists of the host record and site name. Note that the original configuration will be used if this field is not specified.
    Content No String The record content. Note that the original configuration will be used if this field is not specified.
    TTL No Integer TTL (in seconds). The smaller the value, the faster the record changes take effect. Default value: 300. Note that the original configuration will be used if this field is not specified.
    Priority No Integer Specifies a value in the range 1–50 when you make changes to the MX records. A smaller value indicates higher priority. Note that the default value 0 will be used if this field is not specified.
    Mode No String The proxy mode. Values:
  • dns_only: Only DNS
  • proxied: Proxied
  • The original configuration will apply if this field is not specified.

    3. Output Parameters

    Parameter Name Type Description
    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": 1,
        "DnsRecordName": "a.example.com",
        "ZoneId": "zone-20hyebgyfsko",
        "Content": "1.1.1.1",
        "Mode": "dns_only",
        "TTL": 600,
        "DnsRecordType": "A",
        "DnsRecordId": "record-21q7frcpseaw"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "015c3e96-2bfd-4171-a25a-a8956a2ad6c0"
        }
    }
    

    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.ConflictRecord It conflicts with existing records.
    InvalidParameterValue.InvalidDNSContent Incorrect DNS record
    InvalidParameterValue.InvalidDNSName Incorrect DNS CNAME
    InvalidParameterValue.InvalidDomainStatus Invalid domain name. Please check the status.
    InvalidParameterValue.InvalidProxyName Incorrect DNS proxied domain name.
    InvalidParameterValue.InvalidProxyOrigin Incorrect DNS proxy
    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