创建内网DNS记录集
接口名 | URI | 请求方法 | ||||
创建内网DNS记录集 | /v1/dns_recordset/create/ | POST | ||||
参数列表 | ||||||
参数名 | 类型 | 是否必选 | 参数位置 | 描述 | ||
region_id | String | 是 | body | 资源池ID, 例:100054c04xxx | ||
dns_zone_id | String | 是 | body | 内网DNS ID,例:28e44313-6a53-4600-a6d4-4xxx | ||
name | String | 是 | body | 主机名称,主机记录指域名前缀,例:example.com | ||
type | String | 是 | body | 记录的类型,例:A | ||
ttl | Number | 是 | body | 解析记录在本地DNS服务器的缓存时间,单位秒 例:300 | ||
record_value | String | 是 | body | 记录对应的值,格式为json格式字符串,例:'["192.168.0.2", "192.168.0.5", "192.168.0.3", "192.168.0.4"]' | ||
description | String | 否 | body | 描述 | ||
返回参数: | ||||||
参数名 | 类型 | 描述 | ||||
code | Number | 状态码(200为成功,400为异常) | ||||
current_count | Number | 当前返回结果数量 | ||||
total_count | Number | 总数量 | ||||
errcode | String | 错误码( SUCCESS为成功, FAILED为失败) | ||||
errstatus | Number | 错误状态(0为正常,其他为异常) | ||||
msg | String | 请求结果消息 | ||||
next | String | 返回结果下一页(可忽略) | ||||
previous | String | 返回结果上一页(可忽略) | ||||
results | Array/Object | 返回内容 | ||||
results内容: | ||||||
参数名 | 类型 | 描述 | ||||
status | String | 状态 | ||||
update_time | String | 更新时间,格式为UTC时间 | ||||
create_date | String | 创建时间,格式为UTC时间 | ||||
description | String | 描述 | ||||
name | String | 名称 | ||||
id | String | id | ||||
project_id_ecs | String | 企业项目id | ||||
请求示例 | ||||||
HTTP Body: { "region_id": "100054c04xxx", "dns_zone_id": " 28e44313-6a53-4600-a6d4-4xxx", "name": " example.com", "type": " A", "ttl": "300", "record_value": "[\"192.168.0.2\",\"192.168.0.5\"]" } | ||||||
返回示例 | ||||||
{ "code": 200, "current_count": 1, "total_count": 1, "errstatus": 0, "results": [ { "status": "ACTIVE", "update_time": "2022-01-10T01:32:00Z", "create_date": "2022-01-10T01:32:00Z", "description": "description", "name": "test_create_zone", "id": "28e44313-6a53-4600-a6d4-4xxx", "project_id_ecs": "0" } ], "errcode": "SUCCESS", "next": null, "msg": "dns zone create success", "logmark": "1641807118764012072", "previous": null } |