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

  • HOME
  • 提供API一覧
  • addIpToNic

addIpToNic

処理概要

NICにセカンダリIPアドレス(IPv4)を割り当て

 

注意事項

・引数 ipaddress を指定しない場合は利用可能なIPアドレスの中からシステムが自動割り当て

 

リクエスト

・リクエストパラメータ

Parameter Name Description Required
nicid the ID of the nic to which you want to assign private IP true
ipaddress Secondary IP Address false

 

・リクエストサンプル

$ ./kick_api.sh command=addIpToNic nicid=ce79ea87-c9b2-4942-ab9c-728ef5f11db4 ipaddress=192.168.4.24

 

レスポンス

・レスポンスボディ

Response Name Description
id the ID of the secondary private IP addr
ipaddress Secondary IP address
networkid the ID of the network
nicid the ID of the nic
virtualmachineid the ID of the vm

 

・レスポンスサンプル

【API実行結果】

<?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.vm.AddIpToVmNicCmd</cmd>
<jobstatus>1</jobstatus>
<jobprocstatus>0</jobprocstatus>
<jobresultcode>0</jobresultcode>
<jobresulttype>object</jobresulttype>
<jobresult>
<nicsecondaryip>
<id>e2a57430-9490-4989-ac2f-f8fbd222466e</id>
<ipaddress>192.168.4.24</ipaddress>
<nicid>ce79ea87-c9b2-4942-ab9c-728ef5f11db4</nicid>
<networkid>19a2e758-163f-40a8-b977-1932dcbe2bc3</networkid>
</nicsecondaryip>
</jobresult>
<created>2016-09-25T19:03:53+0900</created>
<jobid>814d9e3b-88d5-4987-a3fa-00b9c829a46d</jobid>
</queryasyncjobresultresponse>

提供API一覧

2024/04/23 2024/04/23