Description
ヘルスモニタを作成します。
Request URL
Network API v2.0 POST /v2.0/lb/health_monitors |
Request Json
{ “health_monitor”:{ “type”:”プロトコル“, “delay”:監視間隔, “url_path”:”チェック先のパス(HTTPプロトコルの場合のみ)“, “expected_codes”:”期待するレスポンスのステータスコード(HTTPプロトコルの場合のみ)“ } } |
Request Paramters
Parameter | Value | Style | Description |
---|---|---|---|
X-Auth-Token | Userトークン | header | トークンID |
type | PING TCP HTTP |
plain | プロトコルの種類を指定します。 |
delay | 5 ~ 10 | plain | ヘルスチェック(監視)間隔を指定します。 ※5~10秒の範囲内で指定可能 |
url_path (Optional) | / | plain | チェック先のパスを指定します。 ※HTTPプロトコルの場合のみ |
expected_codes (Optional) | 200 200,201,204 200-204 |
plain | 期待するレスポンスのステータスコードを指定します。 ※HTTPプロトコルの場合のみ |
Response
Normal response codes
201 |
Example
Request
curl -i -X POST \]
-H “Accept: application/json” \ -H “Content-Type: application/json” \ -H “X-Auth-Token: トークンID” \ -d ‘{“health_monitor”:{“type”:”プロトコル“,”delay”:”監視間隔“}}’ \ https://networking.odc01.eva-clouds.com/v2.0/lb/health_monitors |
Response
HTTP/1.1 201 Created Date: Mon, 11 Jul 2016 03:36:38 GMT Server: Apache Content-Length: 276 Content-Type: application/json { |