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

  • HOME
  • 提供API一覧
  • associateIpAddress

associateIpAddress

処理概要

IPアドレスを取得

 

注意事項

・networkidはPublicFrontSegmentのidを指定してください。

 

リクエスト

・リクエストパラメータ

 

Parameter Name Description Required
networkid The network this IP address should be associated to. true

 

 

・リクエストサンプル

$ ./kick_api.sh command=associateIpAddress networkid=dfab0cf8-c56f-437c-9816-14e47d127235

 

レスポンス

・レスポンスボディ

Response Name Description
id public IP address id
account the account the public IP address is associated with
allocated date the public IP address was acquired
associatednetworkid the ID of the Network associated with the IP address
associatednetworkname the name of the Network associated with the IP address
domain the domain the public IP address is associated with
domainid the domain ID the public IP address is associated with
fordisplay is public ip for display to the regular user
forvirtualnetwork the virtual network for the IP address
ipaddress public IP address
isportable is public IP portable across the zones
issourcenat true if the IP address is a source nat address, false otherwise
isstaticnat true if this ip is for static nat, false otherwise
issystem true if this ip is system ip (was allocated as a part of deployVm or createLbRule)
networkid the ID of the Network where ip belongs to
physicalnetworkid the physical network this belongs to
project the project name of the address
projectid the project id of the ipaddress
purpose purpose of the IP address. In Acton this value is not null for Ips with isSystem=true, and can have either StaticNat or LB value
state State of the ip address. Can be: Allocatin, Allocated and Releasing
virtualmachinedisplayname virutal machine display name the ip address is assigned to (not null only for static nat Ip)
virtualmachineid virutal machine id the ip address is assigned to (not null only for static nat Ip)
virtualmachinename virutal machine name the ip address is assigned to (not null only for static nat Ip)
vlanid the ID of the VLAN associated with the IP address. This parameter is visible to ROOT admins only
vlanname the VLAN associated with the IP address
vmipaddress virutal machine (dnat) ip address (not null only for static nat Ip)
vpcid VPC the ip belongs to
zoneid the ID of the zone the public IP address belongs to
zonename the name of the zone the public IP address belongs to
tags(*) the list of resource tags associated with ip address
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
jobid the ID of the latest async job acting on this object
jobstatus the current status of the latest async job acting on this object

 

・レスポンスサンプル

【API実行結果】
<?xml version=”1.0″ encoding=”UTF-8″?>
<associateipaddressresponse cloud-stack-version=”4.3.0.2″>
<id>6a8cb891-ea10-47b0-96c4-f851eeb3b652</id>
<jobid>9153e752-61ca-4369-8ff2-23300b1e2b95</jobid>
</associateipaddressresponse>

 

【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.address.AssociateIPAddrCmd</cmd>
<jobstatus>1</jobstatus>
<jobprocstatus>0</jobprocstatus>
<jobresultcode>0</jobresultcode>
<jobresulttype>object</jobresulttype>
<jobresult>
<ipaddress>
<id>6a8cb891-ea10-47b0-96c4-f851eeb3b652</id>
<ipaddress>27.XXX.XXX.121</ipaddress>
<allocated>2016-09-22T21:32:42+0900</allocated>
<zoneid>7d4b9647-356d-49a8-8e1a-28862b9c9082</zoneid>
<zonename>jp2-east03</zonename>
<issourcenat>false</issourcenat>
<account>xxxx</account>
<domainid>57edb9da-0279-45f0-842a-d768c4ed0d47</domainid>
<domain>MXXXXXXXX</domain>
<forvirtualnetwork>true</forvirtualnetwork>
<isstaticnat>false</isstaticnat>
<issystem>false</issystem>
<associatednetworkid>dfab0cf8-c56f-437c-9816-14e47d127235</associatednetworkid>
<associatednetworkname>PublicFrontSegment</associatednetworkname>
<networkid>426089e7-12ba-4247-8c0b-5f6d29b52aef</networkid>
<state>Allocating</state>
<physicalnetworkid>2f96be3f-fb92-4c1a-882a-e9c6462ea3d3</physicalnetworkid>
<isportable>false</isportable>
</ipaddress>
</jobresult>
<created>2016-09-22T21:32:42+0900</created>
<jobid>9153e752-61ca-4369-8ff2-23300b1e2b95</jobid>
</queryasyncjobresultresponse>

提供API一覧

2022/07/06 2022/07/06