华为云用户手册

  • 响应示例 状态码: 200 删除单个Record Set响应。 { "id" : "2c9eb155587228570158722b6ac30007", "name" : "www.example.com.", "description" : "This is an example record set.", "type" : "A", "ttl" : 300, "status" : "PENDING_DELETE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587228570158722b6ac30007" }, "zone_id" : "2c9eb155587194ec01587224c9f90149", "zone_name" : "example.com.", "create_at" : "2016-11-17T12:03:17.827", "update_at" : "2016-11-17T12:56:03.827", "default" : false, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 tags Array of tagValues objects 标签列表。 表4 tagValues 参数 参数类型 描述 key String 键。最大长度127个unicode字符。 key不能为空。(搜索时不对此参数做校验) values Array of strings 值列表。每个值最大长度255个unicode字符。为系统保留字符。如果里面的value是以开头时,表示按照*后面的值全模糊匹配。如果values缺失,则表示匹配任意值。value之间为或的关系。
  • URI GET /v2/{project_id}/{resource_type}/tags 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 resource_type 是 String 资源的类型:DNS-public_zone,DNS-private_zone,DNS-public_recordset,DNS-private_recordset,DNS-ptr_record。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 line_id String 解析线路ID。 name String 解析线路名称。 ip_segments Array of strings IP地址段。 created_at String 创建时间。 updated_at String 更新时间。 status String 资源状态。 description String 自定义线路的描述信息。
  • 请求示例 创建一个自定义线路,设置IP地址段为 "1.1.1.1-1.1.1.1", "1.1.1.2-1.1.1.3"。。 POST https://{endpoint}/v2.1/customlines { "name" : "customline", "ip_segments" : [ "1.1.1.1-1.1.1.1", "1.1.1.2-1.1.1.3" ], "description" : "123" }
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表2 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 解析线路名称。 长度限制为1-80个字符,只允许包含中文、字母、数字、'-'、'_'、'.'字符。 租户内,解析线路名称是唯一的。 ip_segments 是 Array of strings IP地址段。 以“-”分隔,小IP地址在前,大IP地址在后。IP段之间不能有交叉。当只有一个IP时,填写IP1-IP1。 目前只支持IPV4。 最多支持50个。 description 否 String 自定义线路的描述信息。长度不超过255个字符。 默认值为空。
  • 响应示例 状态码: 200 创建单个自定义线路请求对象。 { "line_id" : "custom_2ce45ef669fc87870169fcbada7a0007", "name" : "customline", "ip_segments" : [ "1.1.1.1-1.1.1.1", "1.1.1.2-1.1.1.3" ], "status" : "PENDING_CREATE", "created_at" : "2019-04-10T12:03:17.827", "updated_at" : null, "description" : "123" }
  • Token认证 Token的有效期为24小时,需要使用一个Token鉴权时,可以先缓存起来,避免频繁调用。 Token在计算机系统中代表令牌(临时)的意思,拥有Token就代表拥有某种权限。Token认证就是在调用API的时候将Token加到请求消息头中,从而通过身份认证,获得操作API的权限。Token可通过调用获取用户Token接口获取。 调用本服务API需要项目级别的Token,即调用获取用户Token接口时,请求body中auth.scope的取值需要选择project,如下所示。 { "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "name": "username", //IAM用户名 "password": "********", //IAM用户密码 "domain": { "name": "domainname" //IAM用户所属账号名 } } } }, "scope": { "project": { "name": "xxxxxxxx" //项目名称 } } } } 获取Token 后,再调用其他接口时,您需要在请求消息头中添加“X-Auth-Token”,其值即为Token。例如Token值为“ABCDEFJ....”,则调用接口时将“X-Auth-Token: ABCDEFJ....”加到请求消息头即可,如下所示。 1 2 3 POST https://iam.cn-north-1.myhuaweicloud.com/v3/auth/projects Content-Type: application/json X-Auth-Token: ABCDEFJ.... 您还可以通过这个视频教程了解如何使用Token认证:https://bbs.huaweicloud.com/videos/101333。
  • AK/SK认证 AK/SK签名认证方式仅支持消息体大小在12MB以内,12MB以上的请求请使用Token认证。 AK/SK认证就是使用AK/SK对请求进行签名,在请求时将签名信息添加到消息头,从而通过身份认证。 AK(Access Key ID):访问密钥ID。与私有访问密钥关联的唯一标识符;访问密钥ID和私有访问密钥一起使用,对请求进行加密签名。 SK(Secret Access Key):私有访问密钥。与访问密钥ID结合使用,对请求进行加密签名,可标识发送方,并防止请求被修改。 使用AK/SK认证时,您可以基于签名算法使用AK/SK对请求进行签名,也可以使用专门的签名SDK对请求进行签名。详细的签名方法和SDK使用方法请参见API签名指南。 签名SDK只提供签名功能,与服务提供的SDK不同,使用时请注意。
  • URI GET /v2/nameservers 表1 Query参数 参数 是否必选 参数类型 描述 type 否 String 待查询名称服务器的类型。 取值范围: public, private。 如果为空,表示查询所有类型的名称服务器。 如果为public,表示查询公网的名称服务器。 如果为private,表示查询内网的名称服务器。 搜索模式精确搜索。 默认值为空。 region 否 String 待查询的region ID。 当查询公网的名称服务器时,此处不填。 搜索模式精确搜索。 默认值为空。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 nameservers Array of NameServersResp objects name server列表对象。 表4 NameServersResp 参数 参数类型 描述 type String 待查询名称服务器的类型。 取值范围: public, private。 如果为空,表示查询所有类型的名称服务器。 如果为public,表示查询公网的名称服务器。 如果为private,表示查询内网的名称服务器。 region String 待查询的region ID。 当查询公网的名称服务器时,此处不填。 ns_records Array of ns_records objects 名称服务器列表。 表5 ns_records 参数 参数类型 描述 hostname String 主机名。 当为内网名称服务器时,此值为空。 address String 名称服务器地址。 当为公网名称服务器时,此值为空。 priority Integer 优先级。 示例: 如果priority的值为“1”,表示会第一个采用该域名服务器进行解析。
  • 响应示例 状态码: 200 查询名称服务器列表响应。 { "nameservers" : [ { "region" : null, "type" : "public", "ns_records" : [ { "hostname" : "ns1.huawei.com.", "priority" : 1 }, { "hostname" : "ns2.huawei.com.", "priority" : 2 } ] }, { "region" : "xxx", "type" : "private", "ns_records" : [ { "priority" : 1, "address" : "100.125.1.0" }, { "priority" : 2, "address" : "100.125.1.1" } ] } ] }
  • URI GET /v2/zones 表1 Query参数 参数 是否必选 参数类型 描述 type 否 String 待查询的zone的类型。 取值范围:public 搜索模式默认为模糊搜索。 默认值为空。 limit 否 Integer 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 marker 否 String 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 offset 否 Integer 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 tags 否 String 资源标签。 取值格式:key1,value1|key2,value2 多个标签之间用"|"分开,每个标签的键值用英文逗号","相隔。 多个标签之间为“与”的关系。 关于资源标签,请参见添加资源标签。 搜索模式为精确搜索。如果资源标签值value是以开头时,则按照后面的值全模糊匹配。 默认值为空。 name 否 String zone名称。 搜索模式默认为模糊搜索。 status 否 String 资源状态。 search_mode 否 String 查询条件搜索模式。 取值范围: like:模糊搜索 equal:精确搜索 enterprise_project_id 否 String 域名关联的企业项目ID,长度不超过36个字符。 默认值为0。
  • 响应示例 状态码: 200 查询公网Zone的列表响应。 { "links" : { "self" : "https://Endpoint/v2/zones?type=public&limit=10", "next" : "https://Endpoint/v2/zones?type=public&limit=10&marker=2c9eb155587194ec01587224c9f90149" }, "zones" : [ { "id" : "2c9eb155587194ec01587224c9f90149", "name" : "example.com.", "description" : "This is an example zone.", "email" : "xx@example.com", "ttl" : 300, "serial" : 0, "masters" : [ ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149" }, "pool_id" : "00000000570e54ee01570e9939b20019", "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "zone_type" : "public", "created_at" : "2016-11-17T11:56:03.439", "updated_at" : "2016-11-17T11:56:05.528", "record_num" : 2 }, { "id" : "2c9eb155587228570158722996c50001", "name" : "example.org.", "description" : "This is an example zone.", "email" : "xx@example.org", "ttl" : 300, "serial" : 0, "masters" : [ ], "status" : "PENDING_CREATE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587228570158722996c50001" }, "pool_id" : "00000000570e54ee01570e9939b20019", "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "zone_type" : "public", "created_at" : "2016-11-17T12:01:17.996", "updated_at" : "2016-11-17T12:01:18.528", "record_num" : 2 } ], "metadata" : { "total_count" : 2 } }
  • URI GET /v2/zones 表1 Query参数 参数 是否必选 参数类型 描述 type 是 String 待查询的zone的类型。 取值范围:private。 缺省值:private limit 否 Integer 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 marker 否 String 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 offset 否 Integer 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 tags 否 String 资源标签。 name 否 String zone名称。 status 否 String 资源状态。 search_mode 否 String 查询条件搜索模式。 取值范围: like:模糊搜索 equal:精确搜索 enterprise_project_id 否 String 域名关联的企业项目ID,长度不超过36个字符。 默认值为0。
  • 响应示例 状态码: 200 查询内网Zone列表响应。 { "links" : { "self" : "https://Endpoint/v2/zones?type=private&limit=10", "next" : "https://Endpoint/v2/zones?type=private&limit=10&marker=ff8080825b8fc86c015b94bc6f8712c3" }, "zones" : [ { "id" : "ff8080825b8fc86c015b94bc6f8712c3", "name" : "example.com.", "description" : "This is an example zone.", "email" : "xx@example.com", "ttl" : 300, "serial" : 0, "masters" : [ ], "tags" : [ ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/ff8080825b8fc86c015b94bc6f8712c3" }, "pool_id" : "ff8080825ab738f4015ab7513298010e", "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "zone_type" : "private", "created_at" : "2017-04-22T08:17:08.997", "updated_at" : "2017-04-22T08:17:09.997", "record_num" : 2, "proxy_pattern" : "AUTHORITY", "routers" : [ { "status" : "ACTIVE", "router_id" : "19664294-0bf6-4271-ad3a-94b8c79c6558", "router_region" : "xx" }, { "status" : "ACTIVE", "router_id" : "f0791650-db8c-4a20-8a44-a06c6e24b15b", "router_region" : "xx" } ], "enterprise_project_id" : 0 }, { "id" : "ff8080825b95142f015b951f87280029", "name" : "example.org.", "description" : "This is an example zone.", "email" : "xx@example.org", "ttl" : 300, "serial" : 0, "masters" : [ ], "tags" : [ ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/ff8080825b95142f015b951f87280029" }, "pool_id" : "ff8080825ab738f4015ab7513298010e", "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "zone_type" : "private", "created_at" : "2017-04-22T08:17:08.997", "updated_at" : "2017-04-22T08:17:09.997", "record_num" : 2, "proxy_pattern" : "AUTHORITY", "routers" : [ { "status" : "ACTIVE", "router_id" : "19664294-0bf6-4271-ad3a-94b8c79c6558", "router_region" : "xx" }, { "status" : "ACTIVE", "router_id" : "f0791650-db8c-4a20-8a44-a06c6e24b15b", "router_region" : "xx" } ], "enterprise_project_id" : 0 } ], "metadata" : { "total_count" : 2 } }
  • 响应示例 状态码: 200 查询租户Record Set资源列表。 { "links" : { "self" : "https://Endpoint/v2.1/recordsets", "next" : "https://Endpoint/v2.1/recordsets?id=&limit=10&marker=2c9eb155587194ec01587224c9f9014a" }, "recordsets" : [ { "id" : "2c9eb155587194ec01587224c9f9014a", "name" : "example.com.", "type" : "SOA", "ttl" : 300, "records" : [ "ns1.hotrot.de. xx.example.com. (1 7200 900 1209600 300)" ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2.1/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587194ec01587224c9f9014a" }, "alias_target" : null, "zone_id" : "2c9eb155587194ec01587224c9f90149", "zone_name" : "example.com.", "created_at" : "2016-11-17T11:56:03.439", "updated_at" : "2016-11-17T11:56:06.439", "default" : true, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "line" : "default_view", "weight" : 1, "health_check_id" : null }, { "id" : "2c9eb155587194ec01587224c9f9014c", "name" : "example.com.", "type" : "NS", "ttl" : 172800, "records" : [ "ns2.hotrot.de.", "ns1.hotrot.de." ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2.1/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587194ec01587224c9f9014c" }, "alias_target" : null, "zone_id" : "2c9eb155587194ec01587224c9f90149", "zone_name" : "example.com.", "created_at" : "2016-11-17T11:56:03.439", "updated_at" : "2016-11-17T11:56:06.439", "default" : true, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "line" : "default_view", "weight" : 1, "health_check_id" : null }, { "id" : "2c9eb155587228570158722996ca0002", "name" : "example.org.", "type" : "SOA", "ttl" : 300, "records" : [ "ns1.hotrot.de. xx.example.org. (1 7200 900 1209600 300)" ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2.1/zones/2c9eb155587228570158722996c50001/recordsets/2c9eb155587228570158722996ca0002" }, "alias_target" : null, "zone_id" : "2c9eb155587228570158722996c50001", "zone_name" : "example.org.", "created_at" : "2016-11-17T12:01:17.996", "updated_at" : "2016-11-17T12:56:06.439", "default" : true, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "line" : "xxx", "weight" : 1, "health_check_id" : null }, { "id" : "2c9eb155587228570158722996ca0004", "name" : "example.org.", "type" : "NS", "ttl" : 172800, "records" : [ "ns2.hotrot.de.", "ns1.hotrot.de." ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2.1/zones/2c9eb155587228570158722996c50001/recordsets/2c9eb155587228570158722996ca0004" }, "alias_target" : null, "zone_id" : "2c9eb155587228570158722996c50001", "zone_name" : "example.org.", "created_at" : "2016-11-17T12:01:17.996", "updated_at" : "2016-11-17T12:56:06.439", "default" : false, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "line" : "xxx", "weight" : 1, "health_check_id" : null }, { "id" : "2c9eb155587228570158722b6ac30007", "name" : "www.example.com.", "description" : "This is an example record set.", "type" : "A", "ttl" : 300, "records" : [ "abc.bcd.com." ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2.1/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587228570158722b6ac30007" }, "alias_target" : { "resource_type" : "cloudsite", "resource_domain_name" : "2018122216193840mjysxoqn.cname.ysjianzhan.cn." }, "zone_id" : "2c9eb155587194ec01587224c9f90149", "zone_name" : "example.com.", "created_at" : "2016-11-17T12:03:17.827", "updated_at" : "2016-11-17T12:56:06.439", "default" : false, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "line" : "default_view", "weight" : 1, "health_check_id" : null } ], "metadata" : { "total_count" : 5 } }
  • URI GET /v2.1/recordsets 表1 Query参数 参数 是否必选 参数类型 描述 zone_type 否 String 待查询的Record Set的域名类型。 取值范围:public 搜索模式默认为模糊搜索。 默认值为public。 marker 否 String 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 limit 否 Integer 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 offset 否 Integer 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 line_id 否 String 解析线路ID。 tags 否 String 资源标签。 取值格式:key1,value1|key2,value2 多个标签之间用"|"分开,每个标签的键值用英文逗号","相隔。 status 否 String 待查询的Record Set的状态。取值范围:ACTIVE、ERROR、DISABLE、FREEZE、PENDING_CREATE、PENDING_UPDATE、PENDING_DELETE type 否 String 待查询的Record Set的记录集类型。 取值范围:A、CNAME、MX、AAAA、TXT、SRV、NS、CAA name 否 String 待查询的Record Set的域名中包含此name。 搜索模式默认为模糊搜索。 默认值为空。 id 否 String 待查询的Record Set的id包含此id。 搜索模式默认为模糊搜索。 默认值为空。 records 否 String 待查询的Record Set的值中包含此records。 搜索模式默认为模糊搜索。 默认值为空。 sort_key 否 String 查询结果中Record Set列表的排序字段。 取值范围: name:域名 type:记录集类型 默认值为空,表示不排序。 sort_dir 否 String 查询结果中Record Set列表的排序方式。 取值范围: desc:降序排序 asc:升序排序 默认值为空,表示不排序。 health_check_id 否 String 健康检查ID。 搜索模式默认为模糊搜索。 默认值为空。 search_mode 否 String 查询条件搜索模式。 取值范围: like:模糊搜索 equal:精确搜索
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 id String zone的ID,uuid形式的一个资源标识。 name String zone名称。 description String 对zone的描述信息。 email String 管理该zone的管理员邮箱。 zone_type String zone类型,公网(public)。 ttl Integer 该zone下SOA记录中的ttl值。 serial Integer 该zone下SOA记录中用于标识zone文件变更的序列值,用于主从节点同步。 status String 资源状态。 record_num Integer 该zone下的recordset个数。 pool_id String 托管该zone的pool,由系统分配。 project_id String zone所属的项目ID。 created_at String 创建时间。 updated_at String 更新时间。 links pageLink object 指向当前资源或者其他资源的链接。当查询需要分页时,需要包含一个next链接指向下一页。 masters Array of strings 主从模式中,从DNS服务器用以获取DNS信息。目前暂未使用。 表5 pageLink 参数 参数类型 描述 self String 当前资源的链接。 next String 下一页资源的链接。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 code String 错误码 最小长度:8 最大长度:36 message String 错误描述 最小长度:2 最大长度:512 状态码: 500 表7 响应Body参数 参数 参数类型 描述 code String 错误码 最小长度:8 最大长度:36 message String 错误描述 最小长度:2 最大长度:512
  • 响应示例 状态码: 200 更新公网Zone状态响应。 { "id" : "2c9eb155587194ec01587224c9f90149", "name" : "example.com.", "description" : "This is an example zone.", "email" : "xx@example.com", "ttl" : 300, "serial" : 0, "masters" : [ ], "status" : "DISABLE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149" }, "pool_id" : "00000000570e54ee01570e9939b20019", "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "zone_type" : "public", "created_at" : "2016-11-17T11:56:03.439", "updated_at" : "2016-11-17T11:56:05.528", "record_num" : 2 }
  • URI GET /v2/recordsets 表1 Query参数 参数 是否必选 参数类型 描述 zone_type 否 String 待查询的Record Set的域名类型。 取值范围:public、private 如果为空,表示查询公网类型的Record Set。 如果为public,表示查询公网类型的Record Set。 如果为private,表示查询内网类型的Record Set。 搜索模式默认为模糊搜索。 默认值为public。 marker 否 String 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 search_mode 否 String 查询条件搜索模式。 取值范围: like:模糊搜索 equal:精确搜索 limit 否 Integer 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 offset 否 Integer 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 tags 否 String 资源标签。 取值格式:key1,value1|key2,value2 多个标签之间用"|"分开,每个标签的键值用英文逗号","相隔。 status 否 String 待查询的Record Set的状态。取值范围:ACTIVE、ERROR、DISABLE、FREEZE、PENDING_CREATE、PENDING_UPDATE、PENDING_DELETE type 否 String 待查询的Record Set的记录集类型。公网域名场景的记录类型: A、AAAA、MX、CNAME、TXT、NS、SRV、CAA。内网域名场景的记录类型: A、AAAA、MX、CNAME、TXT、SRV。 name 否 String 待查询的Record Set的域名中包含此name。 搜索模式默认为模糊搜索。 默认值为空。 id 否 String 待查询的Record Set的id包含此id。 搜索模式默认为模糊搜索。 默认值为空。 records 否 String 待查询的Record Set的值中包含此records。 搜索模式默认为模糊搜索。 默认值为空。 sort_key 否 String 查询结果中Record Set列表的排序字段。 取值范围: name:域名 type:记录集类型 默认值为空,表示不排序。 sort_dir 否 String 查询结果中Record Set列表的排序方式。 取值范围: desc:降序排序 asc:升序排序 默认值为空,表示不排序。
  • 响应示例 状态码: 200 查询租户Record Set资源列表响应。 { "links" : { "self" : "https://Endpoint/v2/recordsets", "next" : "https://Endpoint/v2/recordsets?id=&limit=10&marker=2c9eb155587194ec01587224c9f9014a" }, "recordsets" : [ { "id" : "2c9eb155587194ec01587224c9f9014a", "name" : "example.com.", "type" : "SOA", "ttl" : 300, "records" : [ "ns1.hotrot.de. xx.example.com. (1 7200 900 1209600 300)" ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587194ec01587224c9f9014a" }, "zone_id" : "2c9eb155587194ec01587224c9f90149", "zone_name" : "example.com.", "create_at" : "2016-11-17T11:56:03.439", "update_at" : "2016-11-17T11:56:03.827", "default" : true, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c" }, { "id" : "2c9eb155587194ec01587224c9f9014c", "name" : "example.com.", "type" : "NS", "ttl" : 172800, "records" : [ "ns2.hotrot.de.", "ns1.hotrot.de." ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587194ec01587224c9f9014c" }, "zone_id" : "2c9eb155587194ec01587224c9f90149", "zone_name" : "example.com.", "create_at" : "2016-11-17T11:56:03.439", "update_at" : "2016-11-17T11:56:03.827", "default" : true, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c" }, { "id" : "2c9eb155587228570158722996ca0002", "name" : "example.org.", "type" : "SOA", "ttl" : 300, "records" : [ "ns1.hotrot.de. xx.example.org. (1 7200 900 1209600 300)" ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587228570158722996c50001/recordsets/2c9eb155587228570158722996ca0002" }, "zone_id" : "2c9eb155587228570158722996c50001", "zone_name" : "example.org.", "create_at" : "2016-11-17T12:01:17.996", "update_at" : "2016-11-17T12:56:03.827", "default" : true, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c" }, { "id" : "2c9eb155587228570158722996ca0004", "name" : "example.org.", "type" : "NS", "ttl" : 172800, "records" : [ "ns2.hotrot.de.", "ns1.hotrot.de." ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587228570158722996c50001/recordsets/2c9eb155587228570158722996ca0004" }, "zone_id" : "2c9eb155587228570158722996c50001", "zone_name" : "example.org.", "create_at" : "2016-11-17T12:01:17.996", "update_at" : "2016-11-17T12:56:03.827", "default" : true, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c" }, { "id" : "2c9eb155587228570158722b6ac30007", "name" : "www.example.com.", "description" : "This is an example record set.", "type" : "A", "ttl" : 300, "records" : [ "192.168.10.2", "192.168.10.1" ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587228570158722b6ac30007" }, "zone_id" : "2c9eb155587194ec01587224c9f90149", "zone_name" : "example.com.", "create_at" : "2016-11-17T12:03:17.827", "update_at" : "2016-11-17T12:56:03.827", "default" : false, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c" } ], "metadata" : { "total_count" : 5 } }
  • 请求示例 创建一个解析A类型的解析记录,设置TTL为3600秒,线路类型为"default_view",解析记录值为"192.168.10.1", "192.168.10.2",权重为1。 POST https://{endpoint}/v2.1/zones/{zone_id}/recordsets { "name" : "www.example.com.", "description" : "This is an example record set.", "type" : "A", "ttl" : 3600, "records" : [ "192.168.10.1", "192.168.10.2" ], "line" : "default_view", "weight" : 1, "tags" : [ { "key" : "key1", "value" : "value1" } ] }
  • 响应示例 状态码: 200 创建单个Record Set响应。 { "id" : "2c9eb155587228570158722b6ac30007", "name" : "www.example.com.", "description" : "This is an example record set.", "type" : "A", "ttl" : 300, "records" : [ "192.168.10.1", "192.168.10.2" ], "status" : "PENDING_CREATE", "links" : { "self" : "https://Endpoint/v2.1/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587228570158722b6ac30007" }, "zone_id" : "2c9eb155587194ec01587224c9f90149", "zone_name" : "example.com.", "created_at" : "2016-11-17T12:03:17.827", "updated_at" : null, "default" : false, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "line" : "default_view", "weight" : 1, "health_check_id" : null }
  • 响应参数 状态码: 200 表6 响应Body参数 参数 参数类型 描述 id String Record Set的ID。 name String Record Set的名称。 description String Record Set的描述信息。 zone_id String 托管该记录的zone_id。 zone_name String 托管该记录的zone_name。 type String 记录类型。 取值范围:A、AAAA、MX、CNAME、TXT、NS、SRV、CAA。 ttl Integer 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 records Array of strings 域名解析后的值。 created_at String 创建时间。 updated_at String 更新时间。 status String 资源状态。 default Boolean 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 project_id String 该Record Set所属的项目ID。 links pageLink object 指向当前资源或者其他资源的链接。当查询需要分页时,需要包含一个next链接指向下一页。 line String 解析线路ID。 weight Integer 解析记录的权重。 health_check_id String 健康检查ID。 alias_target alias_target object 别名记录。 表7 pageLink 参数 参数类型 描述 self String 当前资源的链接。 next String 下一页资源的链接。 表8 alias_target 参数 参数类型 描述 resource_type String 资源服务类型,支持别名记录的服务。取值: cloudsite:云速建站 waf: Web应用防火墙 resource_domain_name String 对应服务下的域名,由各服务提供。
  • 响应示例 状态码: 200 删除单个Record Set响应。 { "id" : "2c9eb155587228570158722b6ac30007", "name" : "www.example.com.", "description" : "This is an example record set.", "type" : "A", "ttl" : 300, "status" : "PENDING_DELETE", "links" : { "self" : "https://Endpoint/v2.1/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587228570158722b6ac30007" }, "alias_target" : null, "zone_id" : "2c9eb155587194ec01587224c9f90149", "zone_name" : "example.com.", "created_at" : "2016-11-17T12:03:17.827", "updated_at" : "2016-11-17T12:56:06.439", "default" : false, "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "line" : "default_view", "weight" : 1, "health_check_id" : null }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 id String Record Set的ID。 name String Record Set的名称。 description String Record Set的描述信息。 zone_id String 托管该记录的zone_id。 zone_name String 托管该记录的zone_name。 type String 记录类型。 ttl Integer 解析记录在本地DNS服务器的缓存时间,缓存时间越长更新生效越慢,以秒为单位。 records Array of strings 域名解析后的值。 created_at String 创建时间。 updated_at String 更新时间。 status String 资源状态。 default Boolean 标识是否由系统默认生成,系统默认生成的Record Set不能删除。 project_id String 该Record Set所属的项目ID。 links pageLink object 指向当前资源或者其他资源的链接。当查询需要分页时,需要包含一个next链接指向下一页。 line String 解析线路ID。 weight Integer 解析记录的权重。 health_check_id String 健康检查ID。 alias_target alias_target object 别名信息。 表4 pageLink 参数 参数类型 描述 self String 当前资源的链接。 next String 下一页资源的链接。 表5 alias_target 参数 参数类型 描述 resource_type String 资源服务类型,支持别名记录的服务。取值: cloudsite:云速建站 waf:Web应用防火墙 resource_domain_name String 对应服务下的域名,由各服务提供。
  • 响应示例 状态码: 200 查询PTR列表响应 { "links" : { "self" : "https://Endpoint/v2/reverse/floatingips", "next" : "https://Endpoint/v2/zones?id=&limit=10&marker=region_id:c5504932-bf23-4171-b655-b87a6bc59334" }, "metadata" : { "total_count" : 1 }, "floatingips" : [ { "id" : "region_id:c5504932-bf23-4171-b655-b87a6bc59334", "ptrdname" : "www.example.com.", "description" : "Description for this PTR record", "address" : "10.154.52.138", "action" : "NONE", "ttl" : 300, "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/reverse/floatingips/region_id:c5504932-bf23-4171-b655-b87a6bc59334" } } ] }
  • URI GET /v2/reverse/floatingips 表1 Query参数 参数 是否必选 参数类型 描述 marker 否 String 分页查询起始的资源ID,为空时为查询第一页。 默认值为空。 limit 否 Integer 每页返回的资源个数。 取值范围:0~500 取值一般为10,20,50。默认值为500。 offset 否 Integer 分页查询起始偏移量,表示从偏移量的下一个资源开始查询。 取值范围:0~2147483647 默认值为0。 当前设置marker不为空时,以marker为分页起始标识。 enterprise_project_id 否 String 反向解析关联的企业项目ID,长度不超过36个字符。 默认值为0。 tags 否 String 资源标签。 取值格式:key1,value1|key2,value2 多个标签之间用"|"分开,每个标签的键值用英文逗号","相隔。 status 否 String 资源状态。
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 recordset_ids 是 Array of strings Record Set ID列表。最多支持100个。
共100000条