- HOME
- 提供API一覧
- createLoadBalancerRule
createLoadBalancerRule
処理概要
標準ロードバランサーの設定を追加
注意事項
・なし
リクエスト
・リクエストパラメータ
Parameter Name | Description | Required |
algorithm | load balancer algorithm (source, roundrobin, leastconn) | true |
name | name of the load balancer rule | true |
privateport | the private port of the private IP address/virtual machine where the network traffic will be load balanced to | true |
publicport | the public port from where the network traffic will be load balanced from | true |
publicipid | public IP address ID from where the network traffic will be load balanced from | true |
・リクエストサンプル
$ ./kick_api.sh command=createLoadBalancerRule algorithm=source name=test1 privateport=1000 publicport=1002 publicipid=23897133-7ec2-4719-abec-a1990c183be0
レスポンス
・レスポンスボディ
Response Name | Description |
id | the load balancer rule ID |
account | the account of the load balancer rule |
algorithm | the load balancer algorithm (source, roundrobin, leastconn) |
cidrlist | the cidr list to forward traffic from |
description | the description of the load balancer |
domain | the domain of the load balancer rule |
domainid | the domain ID of the load balancer rule |
fordisplay | is rule for display to the regular user |
name | the name of the load balancer |
networkid | the id of the guest network the lb rule belongs to |
privateport | the private port |
project | the project name of the load balancer |
projectid | the project id of the load balancer |
protocol | the protocol of the loadbalanacer rule |
publicip | the public ip address |
publicipid | the public ip address id |
publicport | the public port |
state | the state of the rule |
zoneid | the id of the zone the rule belongs to |
tags(*) | the list of resource tags associated with load balancer |
account | the account associated with the tag |
customer | customer associated with the tag |
domain | the domain associated with the tag |
domainid | the ID of the domain associated with the tag |
key | tag key name |
project | the project name where tag belongs to |
projectid | the project id the tag belongs to |
resourceid | id of the resource |
resourcetype | resource type |
value | tag value |
・レスポンスサンプル
【API実行結果】
<?xml version=”1.0″ encoding=”UTF-8″?>
<createloadbalancerruleresponse cloud-stack-version=”4.3.0.2″>
<id>26781a9c-0c12-4899-90f5-d5d3aa84afe7</id>
<jobid>9c3e194d-a139-4e16-ae12-ac83775e026a</jobid>
</createloadbalancerruleresponse>
【queryAsyncJobResultでの確認結果】
<?xml version=”1.0″ encoding=”UTF-8″?>
<queryasyncjobresultresponse cloud-stack-version=”4.3.0.2″>
<accountid>d344caf5-24dc-4194-ac5f-2d78d5e38039</accountid>
<userid>0212ea46-0529-4250-9e3e-bcb03c114002</userid>
<cmd>org.apache.cloudstack.api.command.user.loadbalancer.CreateLoadBalancerRuleCmd</cmd>
<jobstatus>1</jobstatus>
<jobprocstatus>0</jobprocstatus>
<jobresultcode>0</jobresultcode>
<jobresulttype>object</jobresulttype>
<jobresult>
<loadbalancer>
<id>26781a9c-0c12-4899-90f5-d5d3aa84afe7</id>
<name>test1</name>
<publicipid>23897133-7ec2-4719-abec-a1990c183be0</publicipid>
<publicip>27.89.251.16</publicip>
<publicport>1002</publicport>
<privateport>1000</privateport>
<algorithm>source</algorithm>
<networkid>dfab0cf8-c56f-437c-9816-14e47d127235</networkid>
<cidrlist/>
<account>kenshou02</account>
<domainid>57edb9da-0279-45f0-842a-d768c4ed0d47</domainid>
<domain>M00000002</domain>
<state>Add</state>
<zoneid>7d4b9647-356d-49a8-8e1a-28862b9c9082</zoneid>
</loadbalancer>
</jobresult>
<created>2016-09-21T20:54:33+0900</created>
<jobid>9c3e194d-a139-4e16-ae12-ac83775e026a</jobid>
</queryasyncjobresultresponse>