2) Apache Cloudstack ™ API
AffinityGroup
createAffinityGroup
async true, Creates an affinity/anti-affinity group
Parameters | ||
---|---|---|
Name | Type | Description |
account | string | an account for the affinity group. Must be used with domainId. |
description | string | optional description of the affinity group |
domainid | uuid | domainId of the account owning the affinity group |
name | string | name of the affinity group |
projectid | uuid | create affinity group for project |
type | string | Type of the affinity group from the available affinity/anti-affinity group types |
Response | ||
account | string | the account owning the affinity group |
description | string | the description of the affinity group |
domain | string | the domain name of the affinity group |
domainid | string | the domain ID of the affinity group |
id | string | the ID of the affinity group |
jobid | string | the UUID of the latest async job acting on this object |
jobstatus | integer | the current status of the latest async job acting on this object |
name | string | the name of the affinity group |
project | string | the project name of the affinity group |
projectid | string | the project ID of the affinity group |
type | string | the type of the affinity group |
virtualmachineIds | list | virtual machine IDs associated with this affinity group |
deleteAffinityGroup
async true, Deletes affinity group
Parameters | ||
---|---|---|
Name | Type | Description |
account | string | the account of the affinity group. Must be specified with domain ID |
domainid | uuid | the domain ID of account owning the affinity group |
id | uuid | The ID of the affinity group. Mutually exclusive with name parameter |
name | string | The name of the affinity group. Mutually exclusive with ID parameter |
projectid | uuid | the project of the affinity group |
Response | ||
displaytext | string | any text associated with the success or failure |
jobid | string | the UUID of the latest async job acting on this object |
jobstatus | integer | the current status of the latest async job acting on this object |
success | boolean | true if operation is executed successfully |
listAffinityGroups
async false, Lists affinity groups
Parameters | ||
---|---|---|
Name | Type | Description |
account | string | list resources by account. Must be used with the domainId parameter. |
domainid | uuid | list only resources belonging to the domain specified |
id | uuid | list the affinity group by the ID provided |
isrecursive | boolean | defaults to false, but if true, lists all resources from the parent specified by the domainId till l |
keyword | string | List by keyword |
listall | boolean | If set to false, list only resources belonging to the command’s caller; if set to true – list resour |
name | string | lists affinity groups by name |
page | integer | |
pagesize | integer | |
projectid | uuid | list objects by project |
type | string | lists affinity groups by type |
virtualmachineid | uuid | lists affinity groups by virtual machine ID |
Response | ||
account | string | the account owning the affinity group |
description | string | the description of the affinity group |
domain | string | the domain name of the affinity group |
domainid | string | the domain ID of the affinity group |
id | string | the ID of the affinity group |
jobid | string | the UUID of the latest async job acting on this object |
jobstatus | integer | the current status of the latest async job acting on this object |
name | string | the name of the affinity group |
project | string | the project name of the affinity group |
projectid | string | the project ID of the affinity group |
type | string | the type of the affinity group |
virtualmachineIds | list | virtual machine IDs associated with this affinity group |
listAffinityGroupTypes
async false, Lists affinity group types available
Parameters | ||
---|---|---|
Name | Type | Description |
keyword | string | List by keyword |
page | integer | |
pagesize | integer | |
Response | ||
jobid | string | the UUID of the latest async job acting on this object |
jobstatus | integer | the current status of the latest async job acting on this object |
type | string | the type of the affinity group |
updateVMAffinityGroup
async true, Updates the affinity/anti-affinity group associations of a virtual machine. The VM has to be stopped and restarted for the new properties to take effect.
Parameters | ||
---|---|---|
Name | Type | Description |
affinitygroupids | list | comma separated list of affinity groups id that are going to be applied to the virtual machine. Shou |
affinitygroupnames | list | comma separated list of affinity groups names that are going to be applied to the virtual machine. S |
id | uuid | The ID of the virtual machine |
Response | ||
account | string | the account associated with the virtual machine |
affinitygroup | set | list of affinity groups associated with the virtual machine |
cpunumber | integer | the number of cpu this virtual machine is running with |
cpuspeed | integer | the speed of each cpu |
cpuused | string | the amount of the vm’s CPU currently used |
created | date | the date when this virtual machine was created |
details | map | Vm details in key/value pairs. |
diskioread | long | the read (io) of disk on the vm |
diskiowrite | long | the write (io) of disk on the vm |
diskkbsread | long | the read (bytes) of disk on the vm |
diskkbswrite | long | the write (bytes) of disk on the vm |
diskofferingid | string | the ID of the disk offering of the virtual machine |
diskofferingname | string | the name of the disk offering of the virtual machine |
displayname | string | user generated name. The name of the virtual machine is returned if no displayname exists. |
displayvm | boolean | an optional field whether to the display the vm to the end user or not. |
domain | string | the name of the domain in which the virtual machine exists |
domainid | string | the ID of the domain in which the virtual machine exists |
forvirtualnetwork | boolean | the virtual network for the service offering |
group | string | the group name of the virtual machine |
groupid | string | the group ID of the virtual machine |
guestosid | string | Os type ID of the virtual machine |
haenable | boolean | true if high-availability is enabled, false otherwise |
hostid | string | the ID of the host for the virtual machine |
hostname | string | the name of the host for the virtual machine |
hypervisor | string | the hypervisor on which the template runs |
id | string | the ID of the virtual machine |
instancename | string | instance name of the user vm; this parameter is returned to the ROOT admin only |
isdynamicallyscalable | boolean | true if vm contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory. |
isodisplaytext | string | an alternate display text of the ISO attached to the virtual machine |
isoid | string | the ID of the ISO attached to the virtual machine |
isoname | string | the name of the ISO attached to the virtual machine |
jobid | string | the UUID of the latest async job acting on this object |
jobstatus | integer | the current status of the latest async job acting on this object |
keypair | string | ssh key-pair |
memory | integer | the memory allocated for the virtual machine |
memoryintfreekbs | long | the internal memory thats free in vm |
memorykbs | long | the memory used by the vm |
memorytargetkbs | long | the target memory in vm |
name | string | the name of the virtual machine |
networkkbsread | long | the incoming network traffic on the vm |
networkkbswrite | long | the outgoing network traffic on the host |
nic | set | the list of nics associated with vm |
ostypeid | string | OS type id of the vm |
password | string | the password (if exists) of the virtual machine |
passwordenabled | boolean | true if the password rest feature is enabled, false otherwise |
project | string | the project name of the vm |
projectid | string | the project id of the vm |
publicip | string | public IP address id associated with vm via Static nat rule |
publicipid | string | public IP address id associated with vm via Static nat rule |
rootdeviceid | long | device ID of the root volume |
rootdevicetype | string | device type of the root volume |
securitygroup | set | list of security groups associated with the virtual machine |
serviceofferingid | string | the ID of the service offering of the virtual machine |
serviceofferingname | string | the name of the service offering of the virtual machine |
servicestate | string | State of the Service from LB rule |
state | string | the state of the virtual machine |
tags | set | the list of resource tags associated |
templatedisplaytext | string | an alternate display text of the template for the virtual machine |
templateid | string | the ID of the template for the virtual machine. A -1 is returned if the virtual machine was created |
templatename | string | the name of the template for the virtual machine |
userid | string | the user’s ID who deployed the virtual machine |
username | string | the user’s name who deployed the virtual machine |
vgpu | string | the vgpu type used by the virtual machine |
zoneid | string | the ID of the availablility zone for the virtual machine |
zonename | string | the name of the availability zone for the virtual machine |