1.阿里云
随着家庭宽带普及,通过设置IPv6网络,每个设备都能获得独特的IPv6地址。这为实现家庭设备作为服务器的效果提供了可能性。然而,由于设备分配的IPv6地址是动态变化的,需要通过一些方法将动态的IPv6地址绑定到固定的域名上,以便通过外部网络直接访问家庭设备。本文将探讨如何利用阿里云DDNS动态解析IPv6地址的方法。

一、域名注册

首先,需要拥有一个自己的域名,即独特的网址。在阿里云的域名服务中购买域名,建议选择一些非主流后缀如.xyz,价格较为便宜,一年只需大约十块钱。

二、添加域名解析

通过阿里云控制台进入域名管理,添加AAAA记录,填写主机记录值为所需域名(多台电脑,可以前缀区分),记录值可以随意填写(后面解析工具会自动写入)。完成解析记录的添加。

三、获取阿里云域名的AccessKeys

在阿里云控制台右上角点击头像,进入AccessKey页面,启用AccessKey并记下AccessKey ID和密码。

四、动态解析

1.安装阿里云动态解析工具

选择合适的工具,确保支持IPv6。提供一个Windows平台可用的项目链接,如此处

2.编写动态解析脚本(推荐)

安装阿里云SDK和其他第三方库,如下所示:

pip install aliyun-python-sdk-core-v3
pip install aliyun-python-sdk-domain
pip install aliyun-python-sdk-alidns
pip install requests

 

获取AccessKeyId和AccessSecret,下载源码,根据注释修改配置。

from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.acs_exception.exceptions import ClientException
from aliyunsdkcore.acs_exception.exceptions import ServerException
from aliyunsdkalidns.request.v20150109.DescribeSubDomainRecordsRequest import DescribeSubDomainRecordsRequest
from aliyunsdkalidns.request.v20150109.DescribeDomainRecordsRequest import DescribeDomainRecordsRequest
import requests
from urllib.request import urlopen
import json
import socket
import sys

ipv4_flag = 0  # 是否开启ipv4im ddns解析,1为开启,0为关闭
ipv6_flag = 1  # 是否开启ipv6 ddns解析,1为开启,0为关闭
accessKeyId = sys.argv[1]  # 将accessKeyId改成自己的accessKeyId
accessSecret = sys.argv[2]  # 将accessSecret改成自己的accessSecret
domain = "yys.pub"  # 你的主域名
name_ipv4 = sys.argv[3]  # 要进行ipv4 ddns解析的主机记录,即前缀
name_ipv6 = sys.argv[3]  # 要进行ipv6 ddns解析的主机记录,即前缀 [此处对应的是阿里云解析中的 主机记录 应填写 www 或 @ 等。填写www解析后的域名为www.xxx.com;填写@解析后为主域名xxx.com]


client = AcsClient(accessKeyId, accessSecret, 'cn-hangzhou')

def update(RecordId, RR, Type, Value):  # 修改域名解析记录
    from aliyunsdkalidns.request.v20150109.UpdateDomainRecordRequest import UpdateDomainRecordRequest
    request = UpdateDomainRecordRequest()
    request.set_accept_format('json')
    request.set_RecordId(RecordId)
    request.set_RR(RR)
    request.set_Type(Type)
    request.set_Value(Value)
    response = client.do_action_with_exception(request)


def add(DomainName, RR, Type, Value):  # 添加新的域名解析记录
    from aliyunsdkalidns.request.v20150109.AddDomainRecordRequest import AddDomainRecordRequest
    request = AddDomainRecordRequest()
    request.set_accept_format('json')
    request.set_DomainName(DomainName)
    request.set_RR(RR)  # https://blog.zeruns.tech
    request.set_Type(Type)
    request.set_Value(Value)    
    response = client.do_action_with_exception(request)



if ipv4_flag == 1:
    request = DescribeSubDomainRecordsRequest()
    request.set_accept_format('json')
    request.set_DomainName(domain)
    request.set_SubDomain(name_ipv4 + '.' + domain)
    request.set_Type("A")
    response = client.do_action_with_exception(request)  # 获取域名解析记录列表
    domain_list = json.loads(response)  # 将返回的JSON数据转化为Python能识别的

    ip = urlopen('https://api-ipv4.ip.sb/ip').read()  # 使用IP.SB的接口获取ipv4地址
    ipv4 = str(ip, encoding='utf-8')
    print("获取到IPv4地址:%s" % ipv4)

    if domain_list['TotalCount'] == 0:
        add(domain, name_ipv4, "A", ipv4)
        print("新建域名解析成功")
    elif domain_list['TotalCount'] == 1:
        if domain_list['DomainRecords']['Record'][0]['Value'].strip() != ipv4.strip():
            update(domain_list['DomainRecords']['Record'][0]['RecordId'], name_ipv4, "A", ipv4)
            print("修改域名解析成功")
        else:  # https://blog.zeruns.tech
            print("IPv4地址没变")
    elif domain_list['TotalCount'] > 1:
        from aliyunsdkalidns.request.v20150109.DeleteSubDomainRecordsRequest import DeleteSubDomainRecordsRequest
        request = DeleteSubDomainRecordsRequest()
        request.set_accept_format('json')
        request.set_DomainName(domain)  # https://blog.zeruns.tech
        request.set_RR(name_ipv4)
        request.set_Type("A") 
        response = client.do_action_with_exception(request)
        add(domain, name_ipv4, "A", ipv4)
        print("修改域名解析成功")


def get_system_name():
    import platform
    try:
        system_name = platform.system()
        return system_name
    except Exception as e:
        print(f"Error: {e}")
        return ''
    
def get_ipv6_address(start_str='2409'):
    # Linux
    if get_system_name() == 'Linux':
        import re
        import os
        print("linux系统")
        text = os.popen('ifconfig').read()
        r_list = re.compile('inet6 (%s\\S+)  prefixlen 64' % start_str, re.S).findall(text)
        # print(r_list)
        if r_list:
            return r_list[0]
        else:
            return None
    else:
        print("windows系统")
        try:
            # 获取主机名
            host_name = socket.gethostname()
            # 获取主机的所有 IP 地址
            ip_addresses = [ip[4][0] for ip in socket.getaddrinfo(host_name, None, socket.AF_INET6) if str(ip[4][0]).startswith(start_str)]
            # 返回最后一个匹配的 IPv6 地址
            return ip_addresses[-1] if ip_addresses else None
        except Exception as e:
            print(f"获取IPv6地址时发生错误:{e}")
            return None


if ipv6_flag == 1:
    request = DescribeSubDomainRecordsRequest()
    request.set_accept_format('json')
    request.set_DomainName(domain)
    request.set_SubDomain(name_ipv6 + '.' + domain)
    request.set_Type("AAAA")
    response = client.do_action_with_exception(request)  # 获取域名解析记录列表
    domain_list = json.loads(response)  # 将返回的JSON数据转化为Python能识别的
    # 获取并打印本机的具有公网 IPv6 地址
    ipv6 = get_ipv6_address()
    if ipv6:
        print(f"IPv6 地址: {ipv6}")
    else:
        print("无法获取IPv6地址。")
        
        ip = urlopen('https://api-ipv6.ip.sb/ip').read()  # 使用IP.SB的接口获取ipv6地址
        ipv6 = str(ip, encoding='utf-8')
        # ipv6 = ""
    print("获取到IPv6地址:%s" % ipv6)

    if domain_list['TotalCount'] == 0:
        add(domain, name_ipv6, "AAAA", ipv6)
        print("新建域名解析成功")
    elif domain_list['TotalCount'] == 1:
        if domain_list['DomainRecords']['Record'][0]['Value'].strip() != ipv6.strip():
            update(domain_list['DomainRecords']['Record'][0]['RecordId'], name_ipv6, "AAAA", ipv6)
            print("修改域名解析成功")
        else:  # https://blog.zeruns.tech
            print("IPv6地址没变")
    elif domain_list['TotalCount'] > 1:
        from aliyunsdkalidns.request.v20150109.DeleteSubDomainRecordsRequest import DeleteSubDomainRecordsRequest
        request = DeleteSubDomainRecordsRequest()
        request.set_accept_format('json')
        request.set_DomainName(domain)
        request.set_RR(name_ipv6)  # https://blog.zeruns.tech
        request.set_Type("AAAA") 
        response = client.do_action_with_exception(request)
        add(domain, name_ipv6, "AAAA", ipv6)
        print("修改域名解析成功")

使用nodejs

npm install @alicloud/pop-core
npm install axios
const Core = require('@alicloud/pop-core');
const axios = require('axios');

const accessKeyId = '';
const accessKeySecret = '';
const domain = 'yys.com';
const nameIPv4 = 'www';
const nameIPv6 = 'www';
const ipv4_flag = 0; // 是否开启 IPv4 DDNS 解析,1为开启,0为关闭
const ipv6_flag = 1; // 是否开启 IPv6 DDNS 解析,1为开启,0为关闭

const client = new Core({
    accessKeyId,
    accessKeySecret,
    endpoint: 'https://alidns.aliyuncs.com',
    apiVersion: '2015-01-09',
  });
  
  const getIpAddress = async (version) => {
    try {
        const response = await axios.get(`https://api-ipv${version}.ip.sb/ip`);
        // console.log(response);
        return response.data.trim();
    } catch (error) {
        console.error('获取IP地址时出错:', error.message);
        process.exit(1); 
        // throw error; // 继续抛出异常,让调用者知道发生了错误
    }
};

  const updateDNS = async (RecordId, RR, Type, Value) => {
    const params = {
        DomainName: domain,
        RecordId,
        RR,
        Type,
        Value,
    };

    try {
        const result = await client.request('UpdateDomainRecord', params);
        console.log('DNS记录更新成功。', result);
    } catch (err) {
        console.error('更新DNS记录时出错:', err);
    }
};


  

  const addDNS = async (DomainName, RR, Type, Value) => {
    const params = {
      DomainName,
      RR,
      Type,
      Value,
    };
  
    try {
      await client.request('AddDomainRecord', params);
      console.log('新建DNS记录成功。');
    } catch (err) {
      console.error('新建DNS记录时出错:', err);
    }
  };
  
  // 创建一个异步函数来包裹主要逻辑
  const main = async () => {
    // 获取 IPv4 地址
    if (ipv4_flag === 1) {
      const ipv4 = await getIpAddress(4);
      console.log(`获取到IPv4地址:${ipv4}`);
  
      const subDomainRecords = await client.request('DescribeSubDomainRecords', {
        DomainName: domain,
        SubDomain: `${nameIPv4}.${domain}`,
        Type: 'A',
      });
  
      if (subDomainRecords.TotalCount === 0) {
        await addDNS(domain, nameIPv4, 'A', ipv4);
      } else if (subDomainRecords.TotalCount === 1) {
        const existingValue = subDomainRecords.DomainRecords.Record[0].Value;
        if (existingValue.trim() !== ipv4.trim()) {
          await updateDNS(subDomainRecords.DomainRecords.Record[0].RecordId, nameIPv4, 'A', ipv4);
        } else {
          console.log('IPv4地址没有变化。');
        }
      } else if (subDomainRecords.TotalCount > 1) {
        await client.request('DeleteSubDomainRecords', {
          DomainName: domain,
          RR: nameIPv4,
          Type: 'A',
        });
        await addDNS(domain, nameIPv4, 'A', ipv4);
      }
    }
  
    // 获取 IPv6 地址
    if (ipv6_flag === 1) {
      const ipv6 = await getIpAddress(6);
      console.log(`${nameIPv6}.${domain}获取到IPv6地址:${ipv6}`);
      const subDomainRecords = await client.request('DescribeSubDomainRecords', {
        DomainName: domain,
        SubDomain: `${nameIPv6}.${domain}`,
        Type: 'AAAA',
      });
  
      if (subDomainRecords.TotalCount === 0) {
        await addDNS(domain, nameIPv6, 'AAAA', ipv6);
      } else if (subDomainRecords.TotalCount === 1) {
        const existingValue = subDomainRecords.DomainRecords.Record[0].Value;
        if (existingValue.trim() !== ipv6.trim()) {
          await updateDNS(subDomainRecords.DomainRecords.Record[0].RecordId, nameIPv6, 'AAAA', ipv6);
        } else {
          console.log('IPv6地址没有变化。');
        }
      } else if (subDomainRecords.TotalCount > 1) {
        await client.request('DeleteSubDomainRecords', {
          DomainName: domain,
          RR: nameIPv6,
          Type: 'AAAA',
        });
        await addDNS(domain, nameIPv6, 'AAAA', ipv6);
      }
    }
  };
  
  // 调用主要逻辑函数
  main();

五、设置定时任务

使用系统的定时任务功能,定期执行脚本,确保动态解析的持续性。

六、运行脚本

确保脚本可以正常运行,检查是否成功获取IPv4和IPv6地址,并更新解析记录。

结论

通过以上步骤,即可实现阿里云DDNS的动态解析,使家庭设备能够通过域名直接访问。这种方法不仅方便,还能解决IPv6动态地址变化的问题,为家庭网络提供更多可能性。希望本文对你实现IPv6动态解析有所帮助。

 

2.腾讯云

腾讯云IPV6 DDNS python
文档地址:https://cloud.tencent.com/document/api/1427/56157

pip install tencentcloud-sdk-python -i https://pypi.tuna.tsinghua.edu.cn/simple
import json
from tencentcloud.common import credential
from tencentcloud.common.profile.client_profile import ClientProfile
from tencentcloud.common.profile.http_profile import HttpProfile
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.dnspod.v20210323 import dnspod_client, models
import requests
from urllib.request import urlopen
import json
import socket
import sys


def update_dns_record(client, domain, sub_domain, record_type, value):
    try:
        # 检查记录是否存在
        describe_req = models.DescribeRecordListRequest()
        describe_params = {
            "Domain": domain,
            "SubDomain": sub_domain
        }
        describe_req.from_json_string(json.dumps(describe_params))
        describe_resp = client.DescribeRecordList(describe_req)
        record_list = json.loads(describe_resp.to_json_string())
        # print(record_list)
        if record_list["RecordCountInfo"]["ListCount"] > 0:
            RecordId = ''
            this_value = ''
            for i in record_list["RecordList"]:
                # print(i['Name'],i )
                if i['Name'] == sub_domain:
                    print(i)
                    RecordId = i.get('RecordId')
                    this_value = i.get("Value")
                    break
                # Name
            if  this_value == value:
                print("ip无变化,无需更新")
                return True
            # print(RecordId)
            # 更新现有记录
            update_req = models.ModifyRecordRequest()
            update_params = {
                # "Version":"2021-03-23",
                # "Action":"ModifyRecord",
                "TTL": 600,
                "Domain": domain,
                "RecordId": RecordId,
                "SubDomain": sub_domain,
                "RecordType": record_type,
                "Value": value,
                "RecordLine": "默认"  # 添加 RecordLine 参数
            }
            update_req.from_json_string(json.dumps(update_params))
            update_resp = client.ModifyRecord(update_req)
            # print(update_params)
            print(update_resp.to_json_string())
            print("解析成功,最终结果可能列表找不到,但是有")
    
        else:
            # 如果记录不存在,则添加新记录
            add_req = models.CreateRecordRequest()
            add_params = {
                "Domain": domain,
                "SubDomain": sub_domain,
                "RecordType": record_type,
                "Value": value,
                "RecordLine": "默认"  # 添加 RecordLine 参数
            }
            add_req.from_json_string(json.dumps(add_params))
            add_resp = client.CreateRecord(add_req)
            print(add_resp.to_json_string())

    except TencentCloudSDKException as err:
        print(err)


def get_ipv4_address():
    try:
        ip = urlopen('https://api-ipv4.ip.sb/ip').read()
        return str(ip, encoding='utf-8')
    except Exception as e:
        print(f"获取IPv4地址时发生错误:{e}")
        return None

# 腾讯云DNS配置
secret_id = sys.argv[1] # 替换为你实际的腾讯云API SecretId
secret_key = sys.argv[2]  # 替换为你实际的腾讯云API SecretKey
print(secret_id, secret_key)
domain_client = "dnspod.tencentcloudapi.com"  # 腾讯云DNS API的终端

# 初始化腾讯云DNS客户端
cred = credential.Credential(secret_id, secret_key)
http_profile = HttpProfile()
http_profile.endpoint = domain_client
client_profile = ClientProfile()
client_profile.httpProfile = http_profile
dns_client = dnspod_client.DnspodClient(cred, "", client_profile)
# print(dns_client)
ipv4_flag = 0  # 是否启用IPv4 DDNS解析,1为启用,0为禁用
ipv6_flag = 1  # 是否启用IPv6 DDNS解析,1为启用,0为禁用
domain = "yys.zone"  # 你的主域名
name_ipv4 = sys.argv[3]  # 进行IPv4 DDNS解析的主机记录,即前缀
name_ipv6 = sys.argv[3]  # 进行IPv6 DDNS解析的主机记录,即前缀


if ipv4_flag == 1:
    # ipv4 = '192.168.31.1'
    ipv4 = get_ipv4_address()
    update_dns_record(dns_client, domain, name_ipv4, "A", ipv4)


def get_system_name():
    import platform
    try:
        system_name = platform.system()
        return system_name
    except Exception as e:
        print(f"Error: {e}")
        return ''

def get_ipv6_address(start_str='2409'):
    # Linux
    if get_system_name() == 'Linux':
        import re
        import os
        print("linux系统")
        text = os.popen('ifconfig').read()
        r_list = re.compile('inet6 (%s\S+)  prefixlen 64' % start_str, re.S).findall(text)
        # print(r_list)
        if r_list:
            return r_list[0]
        else:
            return None
    else:
        print("windows系统")
        try:
            # 获取主机名
            host_name = socket.gethostname()
            # 获取主机的所有 IP 地址
            ip_addresses = [ip[4][0] for ip in socket.getaddrinfo(host_name, None, socket.AF_INET6) if str(
                ip[4][0]).startswith(start_str)]
            # 返回最后一个匹配的 IPv6 地址
            return ip_addresses[-1] if ip_addresses else None
        except Exception as e:
            print(f"获取IPv6地址时发生错误:{e}")
            return None


if ipv6_flag == 1:


    # 获取并打印本机的具有公网 IPv6 地址
    ipv6 = get_ipv6_address()
    if ipv6:
        print(f"IPv6 地址: {ipv6}")
    else:
        print("无法获取IPv6地址。")

        ip = requests.get('https://api-ipv6.ip.sb/ip').content.decode('utf-8')
        ipv6 = str(ip)
    print("获取到IPv6地址:%s" % ipv6)
    update_dns_record(dns_client, domain, name_ipv6, "AAAA", ipv6)

1. 接口描述

接口请求域名: dnspod.tencentcloudapi.com 。

修改记录

推荐使用 API Explorer

点击调试

API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
Action String 公共参数,本接口取值:ModifyRecord。
Version String 公共参数,本接口取值:2021-03-23。
Region String 公共参数,本接口不需要传递此参数。
Domain String 域名
示例值:dnspod.cn
RecordType String 记录类型,通过 API 记录类型获得,大写英文,比如:A 。
示例值:A
RecordLine String 记录线路,通过 API 记录线路获得,中文,比如:默认。
示例值:默认
Value String 记录值,如 IP : 200.200.200.200, CNAME : cname.dnspod.com., MX : mail.dnspod.com.。
示例值:200.200.200.200
RecordId Integer 记录 ID 。可以通过接口DescribeRecordList查到所有的解析记录列表以及对应的RecordId
示例值:162
DomainId Integer 域名 ID 。参数 DomainId 优先级比参数 Domain 高,如果传递参数 DomainId 将忽略参数 Domain 。可以通过接口DescribeDomainList查到所有的Domain以及DomainId
示例值:1923
SubDomain String 主机记录,如 www,如果不传,默认为 @。
示例值:www
RecordLineId String 线路的 ID,通过 API 记录线路获得,英文字符串,比如:10=1。参数RecordLineId优先级高于RecordLine,如果同时传递二者,优先使用RecordLineId参数。
示例值:10=1
MX Integer MX 优先级,当记录类型是 MX 时有效,范围1-20,MX 记录时必选。
示例值:10
TTL Integer TTL,范围1-604800,不同等级域名最小值不同。
示例值:600
Weight Integer 权重信息,0到100的整数。仅企业 VIP 域名可用,0 表示关闭,不传该参数,表示不设置权重信息。
示例值:20
Status String 记录初始状态,取值范围为 ENABLE 和 DISABLE 。默认为 ENABLE ,如果传入 DISABLE,解析不会生效,也不会验证负载均衡的限制。
示例值:ENABLE
Remark String 记录的备注信息。传空删除备注。
示例值:这是备注

3. 输出参数

参数名称 类型 描述
RecordId Integer 记录ID
示例值:162
RequestId String 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 添加记录

输入示例

 

POST / HTTP/1.1
Host: dnspod.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyRecord
<公共请求参数>

{
    "Domain": "dnspod.site",
    "DomainId": 62,
    "SubDomain": "bbbb",
    "RecordType": "A",
    "RecordLine": "默认",
    "RecordLineId": "0",
    "Value": "129.23.32.32",
    "MX": 0,
    "TTL": 600,
    "Weight": 10,
    "Status": "DISABLE",
    "RecordId": 162
}

 

输出示例

 

{
    "Response": {
        "RequestId": "ab4f1426-ea15-42ea-8183-dc1b44151166",
        "RecordId": 162
    }
}

 

5. 开发者资源

腾讯云 API 平台

腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。

API Inspector

用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 描述
FailedOperation 操作失败。
FailedOperation.DomainIsLocked 锁定域名不能进行此操作。
FailedOperation.DomainIsSpam 封禁域名不能进行此操作。
FailedOperation.FrequencyLimit 您操作过于频繁,请稍后重试
FailedOperation.LoginAreaNotAllowed 账号异地登录,请求被拒绝。
FailedOperation.LoginFailed 登录失败,请检查账号和密码是否正确。
FailedOperation.UnknowError 操作未响应,请稍后重试。
InvalidParameter.AccountIsBanned 您的账号已被系统封禁,如果您有任何疑问请与我们联系。
InvalidParameter.CustomMessage 自定义错误信息。
InvalidParameter.DnssecAddCnameError 该域名开启了 DNSSEC,不允许添加 @ 子域名 CNAME、显性 URL 或者隐性 URL 记录。
InvalidParameter.DomainIdInvalid 域名编号不正确。
InvalidParameter.DomainInvalid 域名不正确,请输入主域名,如 dnspod.cn。
InvalidParameter.DomainIsAliaser 此域名是其它域名的别名。
InvalidParameter.DomainNotAllowedModifyRecords 处于生效中/失效中的域名,不允许变更解析记录。
InvalidParameter.DomainNotBeian 该域名未备案,无法添加 URL 记录。
InvalidParameter.DomainRecordExist 记录已经存在,无需再次添加。
InvalidParameter.EmailNotVerified 抱歉,您的账户还没有通过邮箱验证。
InvalidParameter.InvalidWeight 权重不合法。请输入0~100的整数。
InvalidParameter.LoginTokenIdError Token 的 ID 不正确。
InvalidParameter.LoginTokenNotExists 传入的 Token 不存在。
InvalidParameter.LoginTokenValidateFailed Token 验证失败。
InvalidParameter.MobileNotVerified 抱歉,您的账户还没有通过手机验证。
InvalidParameter.MxInvalid MX优先级不正确。
InvalidParameter.OperateFailed 操作失败,请稍后再试。
InvalidParameter.RecordIdInvalid 记录编号错误。
InvalidParameter.RecordLineInvalid 记录线路不正确。
InvalidParameter.RecordTypeInvalid 记录类型不正确。
InvalidParameter.RecordValueInvalid 记录的值不正确。
InvalidParameter.RecordValueLengthInvalid 解析记录值过长。
InvalidParameter.RequestIpLimited 您的IP非法,请求被拒绝。
InvalidParameter.SubdomainInvalid 子域名不正确。
InvalidParameter.UnrealNameUser 未实名认证用户,请先完成实名认证再操作。
InvalidParameter.UrlValueIllegal 很抱歉,您要添加的URL的内容不符合DNSPod解析服务条款,URL添加/启用失败,如需帮助请联系技术支持。
InvalidParameter.UserNotExists 用户不存在。
InvalidParameterValue.DomainNotExists 当前域名有误,请返回重新操作。
InvalidParameterValue.UserIdInvalid 用户编号不正确。
LimitExceeded.AAAACountLimit AAAA记录数量超出限制。
LimitExceeded.AtNsRecordLimit @的NS记录只能设置为默认线路。
LimitExceeded.FailedLoginLimitExceeded 登录失败次数过多已被系统封禁。
LimitExceeded.HiddenUrlExceeded 该域名使用的套餐不支持隐性URL转发或数量已达上限,如需要使用,请去商城购买。
LimitExceeded.NsCountLimit NS记录数量超出限制。
LimitExceeded.RecordTtlLimit 记录的TTL值超出了限制。
LimitExceeded.SrvCountLimit SRV记录数量超出限制。
LimitExceeded.SubdomainLevelLimit 子域名级数超出限制。
LimitExceeded.SubdomainRollLimit 子域名负载均衡数量超出限制。
LimitExceeded.SubdomainWcardLimit 泛解析级数超出限制。
LimitExceeded.UrlCountLimit 该域名的显性URL转发数量已达上限,如需继续使用,请去商城购买。
OperationDenied.DomainOwnerAllowedOnly 仅域名所有者可进行此操作。
OperationDenied.IPInBlacklistNotAllowed 抱歉,不允许添加黑名单中的IP。
OperationDenied.NoPermissionToOperateDomain 当前域名无权限,请返回域名列表。
OperationDenied.NotAdmin 您不是管理用户。
OperationDenied.NotAgent 您不是代理用户。
OperationDenied.NotManagedUser 不是您名下用户。
RequestLimitExceeded.RequestLimitExceeded API请求次数超出限制。