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

  • HOME
  • 提供API一覧
  • addNicToVirtualMachine

addNicToVirtualMachine

処理概要

仮想サーバにNICを追加

 

注意事項

・なし

 

リクエスト

・リクエストパラメータ

Parameter Name Description Required
networkid Network ID true
virtualmachineid Virtual Machine ID true

 

・リクエストサンプル

$ ./kick_api.sh command=addNicToVirtualMachine networkid=6107e980-3327-4b2b-988f-b18f9332a108 virtualmachineid=14aa749d-bd33-4a55-a441-e1d4126f2633

 

レスポンス

・レスポンスボディ

Response Name Description
id the ID of the virtual machine
account the account associated with the virtual machine
cpunumber the number of cpu this virtual machine is running with
cpuspeed the speed of each cpu
cpuused the amount of the vm’s CPU currently used
created the date when this virtual machine was created
details Vm details in key/value pairs.
diskioread the read (io) of disk on the vm
diskiowrite the write (io) of disk on the vm
diskkbsread the read (bytes) of disk on the vm
diskkbswrite the write (bytes) of disk on the vm
diskofferingid the ID of the disk offering of the virtual machine
diskofferingname the name of the disk offering of the virtual machine
displayname user generated name. The name of the virtual machine is returned if no displayname exists.
displayvm an optional field whether to the display the vm to the end user or not.
domain the name of the domain in which the virtual machine exists
domainid the ID of the domain in which the virtual machine exists
forvirtualnetwork the virtual network for the service offering
group the group name of the virtual machine
groupid the group ID of the virtual machine
guestosid Os type ID of the virtual machine
haenable true if high-availability is enabled, false otherwise
hostid the ID of the host for the virtual machine
hostname the name of the host for the virtual machine
hypervisor the hypervisor on which the template runs
instancename instance name of the user vm; this parameter is returned to the ROOT admin only
isdynamicallyscalable true if vm contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory.
isodisplaytext an alternate display text of the ISO attached to the virtual machine
isoid the ID of the ISO attached to the virtual machine
isoname the name of the ISO attached to the virtual machine
keypair ssh key-pair
memory the memory allocated for the virtual machine
name the name of the virtual machine
networkkbsread the incoming network traffic on the vm
networkkbswrite the outgoing network traffic on the host
ostypeid OS type id of the vm
password the password (if exists) of the virtual machine
passwordenabled true if the password rest feature is enabled, false otherwise
project the project name of the vm
projectid the project id of the vm
publicip public IP address id associated with vm via Static nat rule
publicipid public IP address id associated with vm via Static nat rule
rootdeviceid device ID of the root volume
rootdevicetype device type of the root volume
serviceofferingid the ID of the service offering of the virtual machine
serviceofferingname the name of the service offering of the virtual machine
servicestate State of the Service from LB rule
state the state of the virtual machine
templatedisplaytext an alternate display text of the template for the virtual machine
templateid the ID of the template for the virtual machine. A -1 is returned if the virtual machine was created from an ISO file.
templatename the name of the template for the virtual machine
userid the user’s ID who deployed the virtual machine
username the user’s name who deployed the virtual machine
vgpu the vgpu type used by the virtual machine
zoneid the ID of the availablility zone for the virtual machine
zonename the name of the availability zone for the virtual machine
affinitygroup(*) list of affinity groups associated with the virtual machine
id the ID of the affinity group
account the account owning the affinity group
description the description of the affinity group
domain the domain name of the affinity group
domainid the domain ID of the affinity group
name the name of the affinity group
project the project name of the affinity group
projectid the project ID of the affinity group
type the type of the affinity group
virtualmachineIds virtual machine IDs associated with this affinity group
nic(*) the list of nics associated with vm
id the ID of the nic
broadcasturi the broadcast uri of the nic
deviceid device id for the network when plugged into the virtual machine
gateway the gateway of the nic
ip6address the IPv6 address of network
ip6cidr the cidr of IPv6 network
ip6gateway the gateway of IPv6 network
ipaddress the ip address of the nic
isdefault true if nic is default, false otherwise
isolationuri the isolation uri of the nic
macaddress true if nic is default, false otherwise
netmask the netmask of the nic
networkid the ID of the corresponding network
networkname the name of the corresponding network
nsxlogicalswitch Id of the NSX Logical Switch (if NSX based), null otherwise
nsxlogicalswitchport Id of the NSX Logical Switch Port (if NSX based), null otherwise
secondaryip the Secondary ipv4 addr of nic
traffictype the traffic type of the nic
type the type of the nic
virtualmachineid Id of the vm to which the nic belongs
securitygroup(*) list of security groups associated with the virtual machine
id the ID of the security group
account the account owning the security group
description the description of the security group
domain the domain name of the security group
domainid the domain ID of the security group
name the name of the security group
project the project name of the group
projectid the project id of the group
virtualmachinecount the number of virtualmachines associated with this securitygroup
virtualmachineids the list of virtualmachine ids associated with this securitygroup
egressrule(*) the list of egress rules associated with the security group
account account owning the security group rule
cidr the CIDR notation for the base IP address of the security group rule
endport the ending IP of the security group rule
icmpcode the code for the ICMP message response
icmptype the type of the ICMP message response
protocol the protocol of the security group rule
ruleid the id of the security group rule
securitygroupname security group name
startport the starting IP of the security group rule
tags(*) the list of resource tags associated with the rule
ingressrule(*) the list of ingress rules associated with the security group
account account owning the security group rule
cidr the CIDR notation for the base IP address of the security group rule
endport the ending IP of the security group rule
icmpcode the code for the ICMP message response
icmptype the type of the ICMP message response
protocol the protocol of the security group rule
ruleid the id of the security group rule
securitygroupname security group name
startport the starting IP of the security group rule
tags(*) the list of resource tags associated with 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
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
tags(*) the list of resource tags associated with vm
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

 

・レスポンスサンプル

【コマンド実行結果】
<addnictovirtualmachineresponse cloud-stack-version=”4.3.0.2″>
<jobid>840ae740-d728-467e-9c82-4ad216c6731d</jobid>
</addnictovirtualmachineresponse>

 

【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.vm.AddNicToVMCmd</cmd>
<jobstatus>1</jobstatus>
<jobprocstatus>0</jobprocstatus>
<jobresultcode>0</jobresultcode>
<jobresulttype>object</jobresulttype>
<jobresult>
<virtualmachine>
<id>14aa749d-bd33-4a55-a441-e1d4126f2633</id>
<name>v-TEST01-MXXXXXXXX</name>
<displayname>v-TEST01-MXXXXXXXX</displayname>
<account>xxxx</account>
<domainid>57edb9da-0279-45f0-842a-d768c4ed0d47</domainid>
<domain>M00000002</domain>
<created>2016-08-22T20:45:29+0900</created>
<state>Running</state>
<haenable>true</haenable>
<zoneid>7d4b9647-356d-49a8-8e1a-28862b9c9082</zoneid>
<zonename>jp2-east03</zonename>
<guestosid>9e4fd456-c234-11e4-a399-2c600c06bb24</guestosid>
<nic>
<id>6b69409f-341c-48f0-a6cc-6b58a0e15de0</id>
<networkid>6107e980-3327-4b2b-988f-b18f9332a108</networkid>
<networkname>IntraFrontSegment</networkname>
<netmask>255.255.255.0</netmask>
<gateway>192.168.2.1</gateway>
<ipaddress>192.168.2.113</ipaddress>
<isolationuri>vlan://1202</isolationuri>
<broadcasturi>vlan://1202</broadcasturi>
<traffictype>Guest</traffictype>
<type>Shared</type>
<isdefault>false</isdefault>
<macaddress>06:cd:7a:00:0a:ca</macaddress>
</nic>
<nic>
<id>680ddde2-c5ea-480e-90de-43ecad3d8076</id>
<networkid>36f4ce53-44f2-4fd9-bb7c-b382dd5a2959</networkid>
<networkname>MonitoringNetwork</networkname>
<netmask>255.255.255.224</netmask>
<gateway>198.18.52.33</gateway>
<ipaddress>198.18.52.37</ipaddress>
<isolationuri>vlan://3052</isolationuri>
<broadcasturi>vlan://3052</broadcasturi>
<traffictype>Guest</traffictype>
<type>Shared</type>
<isdefault>false</isdefault>
<macaddress>06:17:a0:00:09:48</macaddress>
</nic>
<nic>
<id>8a65f6c4-6f66-4f66-a590-104cf9465da5</id>
<networkid>dfab0cf8-c56f-437c-9816-14e47d127235</networkid>
<networkname>PublicFrontSegment</networkname>
<netmask>255.255.255.0</netmask>
<gateway>10.1.1.1</gateway>
<ipaddress>10.1.1.163</ipaddress>
<isolationuri>vlan://2860</isolationuri>
<broadcasturi>vlan://2860</broadcasturi>
<traffictype>Guest</traffictype>
<type>Isolated</type>
<isdefault>true</isdefault>
<macaddress>02:00:6f:d2:00:4e</macaddress>
</nic>
<hypervisor>VMware</hypervisor>
<displayvm>true</displayvm>
<isdynamicallyscalable>true</isdynamicallyscalable>
</virtualmachine>
</jobresult>
<created>2016-09-22T15:15:59+0900</created>
<jobid>840ae740-d728-467e-9c82-4ad216c6731d</jobid>
</queryasyncjobresultresponse>

提供API一覧

2024/09/15 2024/09/15