You need to enable JavaScript to run this app.
文档中心
文档控制台
注册
TrafficRoute DNS 套件

TrafficRoute DNS 套件

复制全文
下载 pdf
API 参考
公共错误码
复制全文
下载 pdf
公共错误码

响应状态码

API 请求成功时,HTTP 响应状态码是 200。

API 请求失败时,会出现以下任意一个情况:

  • HTTP 响应状态码是 4xx 或 5xx。
  • 响应正文的 ResponseMetadata 结构体包含 Error 字段。

如果响应出现异常,响应正文的内容如下。此时您可根据 Error 结构体中的 CodeNCodeMessage 等提示信息排查问题原因。

分类 Code CodeN Message HTTP 响应状态码 MessageCN
服务内部错误 ErrInternalServer 500100 server internal error 500 服务内部错误
公共类型校验错误 ErrParsingParams 400100 parsing params error 400 解析请求失败
^^ ErrParamInvalid 400102 validation fail: %s 400 参数校验失败
^^ ErrDBDuplicated 400103 duplicated: %s 409 数据库条目重复
^^ ErrDBNotFound 400104 record not found :%s 400 数据库条目未找到
^^ ErrZoneNotFound 400105 zone not found 400 未找到域名
^^ ErrQuotaExceeded 400109 %s exceeds quota %d 400 %s超出限额%d
^^ ErrRegionNotSupport 400177 %s service of %s not supported 400 当前地域%s不支持%s服务
记录操作校验 ErrHostCanNotBeEmpty 400130 host can't be empty, use @ instead 400 主机记录不能为空
^^ ErrSearchParamMissingParams 400131 request param: rr or type or value or line cannot be empty 400 记录查询条件缺失
^^ ErrPageSizeNotValid 400132 page size must be less than 500 when search 400 分页查找的记录数量不能大于500
^^ ErrSpecNotValid 400135 record %s not valid when creating record 400 参数不符合功能版本规格限制
数据统计校验 ErrNamesNotMatch 400140 domain name and zone name do not match 400 域名与子域名不匹配
域名 ErrNoVPCSpecified 400170 at least one vpc should be specified 400 未关联VPC
^^ ErrSubnetVPCBindLimit 400172 zone in subnet mode should bind only one vpc 400 智能解析开启时只能关联一个VPC
^^ ErrSubnetVPCChange 400173 zone in subnet mode is not allowed to change vpc bind 400 智能解析开启时不支持变更VPC
^^ ErrChangeSubnetMode 400175 subnetMode is not allowed to change 400 智能解析模式不支持变更
^^ ErrLoadBalance 400181 load balance not enabled 400 权重未打开
^^ ErrWeightDisabled 400182 weight disabled for zone 400 无法操作权重
账号、服务开通 ErrServiceNotOpened 400190 this account service not opened 400 账号未开通服务
^^ ErrServiceOverdueSuspend 400192 this account service has been overdue and suspend 400 账号已欠费关停
^^ ErrServiceAlreadyOpened 400194 this account service already opened 400 重复开通服务
^^ ErrAccountInArrears 400195 this account in arrears, you cannot open this service. Please recharge your account 400 您的账户已欠费,无法开通此服务!请前往账户充值

API 请求成功的响应示例

{
    "ResponseMetadata": {
        "RequestId": "2021121414470101022524314706F82E05",
        "Action": "ListRecordAttributes",
        "Version": "2022-06-01",
        "Service": "private_zone",
        "Region": "cn-north-1"
    },
    "Result": {
        "TTLs": [
            600,
            1800,
            3600,
            43200,
            86400
        ],
        "Types": [
            "A",
            "AAAA",
            "CNAME",
            "TXT",
            "MX",
            "PTR"
        ]
    }
}

API 请求失败的响应示例

{
    "ResponseMetadata": {
        "RequestId": "202309122013038DC42E3586A8FE0054C6",
        "Action": "QueryPrivateZone",
        "Version": "2022-06-01",
        "Service": "private_zone",
        "Region": "cn-north-1",
        "Error": {
            "CodeN": 400105,
            "Code": "ErrZoneNotFound",
            "Message": "zone not found",
            "MessageCN": "未找到域名"
        }
    }
}
最近更新时间:2024.06.28 10:16:50
这个页面对您有帮助吗?
有用
有用
无用
无用