KDDIクラウドプラットフォームサービス ナレッジサイト

  • HOME
  • 提供API一覧
  • createFirewallRule

createFirewallRule

処理概要

ファイアーウォールルールを作成

 

注意事項

・なし

 

リクエスト

・リクエストパラメータ

Parameter Name Description Required
ipaddressid the IP address id of the port forwarding rule true
protocol the protocol for the firewall rule. Valid values are TCP/UDP/ICMP. true
cidrlist the CIDR list to forward traffic from true
startport the starting port of firewall rule true
endport the ending port of firewall rule true
icmpcode error code for this icmp message false
icmptype type of the ICMP message being sent false

 

・リクエストサンプル

$ ./kick_api.sh command=createFirewallRule ipaddressid=d1621c88-4c52-43db-a590-3a0e09398db5 protocol=TCP cidrlist=172.22.128.0/24 startport=1001 endport=2001

 

 

レスポンス

・レスポンスボディ

Response Name Description
id the ID of the firewall rule
cidrlist the cidr list to forward traffic from
endport the ending port of firewall rule’s port range
fordisplay is rule for display to the regular user
icmpcode error code for this icmp message
icmptype type of the icmp message being sent
ipaddress the public ip address for the firewall rule
ipaddressid the public ip address id for the firewall rule
networkid the network id of the firewall rule
protocol the protocol of the firewall rule
startport the starting port of firewall rule’s port range
state the state of the rule
tags(*) the list of resource tags associated with the rule
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″?>
<createfirewallruleresponse cloud-stack-version=”4.3.0.2″>
<id>ddb31910-83fe-4086-af56-d4d39ffe67c6</id>
<jobid>d8b003ae-d6b6-4e8e-a659-e296b1eead90</jobid>
</createfirewallruleresponse>

 

【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.firewall.CreateFirewallRuleCmd</cmd>
<jobstatus>1</jobstatus>
<jobprocstatus>0</jobprocstatus>
<jobresultcode>0</jobresultcode>
<jobresulttype>object</jobresulttype>
<jobresult>
<firewallrule>
<id>ddb31910-83fe-4086-af56-d4d39ffe67c6</id>
<protocol>tcp</protocol>
<startport>1001</startport>
<endport>2000</endport>
<ipaddressid>d1621c88-4c52-43db-a590-3a0e09398db5</ipaddressid>
<networkid>dfab0cf8-c56f-437c-9816-14e47d127235</networkid>
<ipaddress>27.XXX.XXX.8</ipaddress>
<state>Active</state>
<cidrlist>172.22.128.0/24</cidrlist>
</firewallrule>
</jobresult>
<created>2016-07-21T19:33:11+0900</created>
<jobid>d8b003ae-d6b6-4e8e-a659-e296b1eead90</jobid>
</queryasyncjobresultresponse>

提供API一覧

2022/07/06 2022/07/06