MENU
レコード作成 - DNS API v1.0
Description
ドメインに対し1レコード作成する
Request URL
Designate API v1.0 POST /v1/domains/(uuid: domain_id)/records
Request Paramters
Parameter | Value | Style | Type | Description |
---|---|---|---|---|
X-Auth-Token | - | header | string | Userトークン |
name | - | plain | string | レコード名 |
type | [A/AAAA/MX/CNAME/TXT/SRV/NS/PTR] | plain | string | レコードタイプ |
data | - | plain | string | レコード値 |
priority | - | plain | int | 優先度。MX/SRVレコード必須 |
ttl(Optional) | [60~2147483647] | plain | int | TTL(秒) |
description(Optional) | - | plain | string | 備考 |
gslb_region(Optional) | [JP/US/SG/AUTO(自動割当)] | plain | string | GSLBリージョンコード。GSLBレコードの場合gslb_region、weight、checkいずれかを入力 |
gslb_weight(Optional) | [0~255] | plain | int | GSLB優先度、GSLBレコードの場合gslb_region、weight、checkいずれかを入力 |
gslb_check(Optional) | [0:OFF/PortNo.] | plain | int | GSLBヘルスチェックポート、GSLBレコードの場合gslb_region、weight、checkいずれかを入力 |
Response Paramters
Parameter | Value | Style | Type | Description |
---|---|---|---|---|
domain_id | - | plain | UUID | ドメインID |
id | - | plain | string | レコードID |
name | - | plain | string | レコード名 |
type | [A/AAAA/MX/CNAME/TXT/SRV/NS/PTR] | plain | string | レコードタイプ |
created_at | - | plain | string | 作成日 |
updated_at | - | plain | string | 更新日 |
ttl | - | plain | int | TTL(秒) |
data | - | plain | string | レコードデータ |
priority | - | plain | string | 優先度 |
description | - | plain | string | 備考 |
gslb_region | [JP/US/SG] | plain | string | GSLBリージョンコード |
gslb_weight | [0~255] | plain | int | GSLB優先度 |
gslb_check | [0:OFF/PortNo.] | plain | int | GSLBヘルスチェックポート |
Request Json
{ "name": "www.example.com.", "type": "A", "data": "192.0.2.3", "gslb_check": 1, "gslb_region": "JP", "gslb_weight": 250 }
Normal response codes
200 - OK
Error response codes
400 Invalid Object
401 Access Denied
404 Not Found
409 Duplicate Record
Example
※エンドポイントURLにつきましては、お客様環境によって異なりますので、コントロールパネルにてご確認の上ご利用ください。
- REQ
curl --include https://dns-service.tyo1.conoha.io/v1/domains/89acac79-38e7-497d-807c-a011e1310438/records \ -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140" \ -d { "name": "www.example.com.", "type": "A", "data": "192.0.2.3", "gslb_check": 1, "gslb_region": "JP", "gslb_weight": 250 }
- RES
HTTP/1.1 200 OK Content-Type: application/json Content-Length: 399 Location: http://localhost:9001/v1/domains/89acac79-38e7-497d-807c-a011e1310438/records/2e32e609-3a4f-45ba-bdef-e50eacd345ad Date: Fri, 02 Nov 2012 19:56:26 GMT { "id": "2e32e609-3a4f-45ba-bdef-e50eacd345ad", "name": "www.example.com.", "type": "A", "created_at": "2012-11-02T19:56:26.366792", "updated_at": null, "domain_id": "89acac79-38e7-497d-807c-a011e1310438", "ttl": null, "data": "192.0.2.3", "gslb_check": 1, "gslb_region": "JP", "gslb_weight": 250 }