MENU
POOL追加(バランシング指定) - Network API v2.0
Description
- LB用サブネットへ割り当てる必要があります。
Request URL
Network API v2.0 POST /v2.0/lb/pools
Request Paramters
Parameter | Value | Style | Description |
---|---|---|---|
X-Auth-Token | Userトークン | header | トークンID |
name | Pool name | plain | プール名 |
protocol | protocol | plain | TCP |
subnet_id | subnet id | plain | LB用のサブネットを指定します。事前に作成しておいて下さい(https://www.conoha.jp/docs/neutron-add_subnet_for_lb.html) |
lb_method | lb method | plain | ROUND_ROBIN or LEAST_CONNECTIONS |
Request Json
{ "pool": { "lb_method": "ROUND_ROBIN", "protocol": "TCP", "name": "Example pool", "subnet_id": "1981f108-3c48-48d2-b908-30f7d28532c9" } }
Normal response codes
201
Error response codes
POOLに指定できるサブネット以外のsubnet_idを指定した場合は以下のエラーが表示されます
404 {"NeutronError": {"message": "No eligible backend for pool aae2e4db-71a1-4b8a-900b-4abbe94d3aa6", "type": "NoEligibleBackend", "detail": ""}}
POOL数の制限に達している場合は以下のエラーが表示されます
400 {"badRequest":{"message":"Maximum number of pool for vip subnet allowed (10) exceeded","code":400}}
Example
※エンドポイントURLにつきましては、お客様環境によって異なりますので、コントロールパネルにてご確認の上ご利用ください。
- REQ
curl -i -X POST \ -H "Accept: application/json" \ -H "X-Auth-Token: 0925897a3d4543218ff0dcd2bb378a8e" \ -d '{"pool": {"lb_method": "ROUND_ROBIN", "protocol": "TCP", "name": "pool-test-150223-01", "subnet_id": "9c27f83a-ba6d-4e0e-b004-e34422e207a6"}}' \ https://networking.tyo1.conoha.io/v2.0/lb/pools
- RES
HTTP/1.1 201 Created Server: openresty/1.7.10.1 Date: Fri, 08 May 2015 09:13:29 GMT Content-Type: application/json Content-Length: 412 Connection: keep-alive { "pool": { "status": "PENDING_CREATE", "lb_method": "ROUND_ROBIN", "protocol": "TCP", "description": "", "health_monitors": [], "members": [], "status_description": null, "id": "b9e3bc41-d76c-4c93-9337-39f056b6a9ef", "vip_id": null, "name": "pool-test-150223-01", "admin_state_up": true, "subnet_id": "9c27f83a-ba6d-4e0e-b004-e34422e207a6", "tenant_id": "22394afc818d471ca2f0308c06ae7460", "health_monitors_status": [], "provider": "lvs_dsr" } }