GET /api/compute_resources
列出所有计算资源

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

排序项和顺序,例如 ‘id DESC’

Validations:

  • Must be a String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.

搜索字段

字段名 类型 可能的值
id
location
location_id
name
organization
organization_id
type

GET /api/compute_resources/:id
显示计算资源

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/compute_resources
创建计算资源

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

compute_resource
必填

Validations:

  • Must be a Hash

compute_resource[name]
必填

Validations:

  • Must be a String

compute_resource[provider]
选填 , 允许空值

提供者包括

Validations:

  • Must be a String

compute_resource[url]
选填 , 允许空值

Libvirt, oVirt and OpenStack 的 URL

Validations:

  • Must be a String

compute_resource[description]
选填 , 允许空值

Validations:

  • Must be a String

compute_resource[user]
选填 , 允许空值

oVirt、EC2、VMware、OpenStack 的用户名。EC2 的访问密钥。

Validations:

  • Must be a String

compute_resource[password]
选填 , 允许空值

oVirt、EC2、VMware、OpenStack 的密码。EC2 的访问密钥。

Validations:

  • Must be a String

compute_resource[datacenter]
选填 , 允许空值

用于 oVirt、VMware 数据库

Validations:

  • Must be a String

compute_resource[use_v4]
选填 , 允许空值

只用于 oVirt

Validations:

  • Must be one of: true, false, 1, 0.

compute_resource[ovirt_quota]
选填 , 允许空值

for oVirt only, ID or Name of quota to use

Validations:

  • Must be a String

compute_resource[public_key]
选填 , 允许空值

只用于 oVirt

Validations:

  • Must be a String

compute_resource[region]
选填 , 允许空值

for AzureRm eg. 'eastus' and for EC2 only. Use 'us-gov-west-1' for EC2 GovCloud region

Validations:

  • Must be a String

compute_resource[tenant]
选填 , 允许空值

for OpenStack and AzureRm only

Validations:

  • Must be a String

compute_resource[domain]
选填 , 允许空值

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_name]
选填 , 允许空值

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_id]
选填 , 允许空值

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[server]
选填 , 允许空值

用于 VMware

Validations:

  • Must be a String

compute_resource[set_console_password]
选填 , 允许空值

仅用于 Libvirt 和 VMware

Validations:

  • Must be one of: true, false, 1, 0.

compute_resource[display_type]
选填 , 允许空值

for Libvirt and oVirt only

Validations:

  • Must be one of: VNC, SPICE.

compute_resource[keyboard]
选填 , 允许空值

只用于 oVirt

Validations:

  • Must be one of: ar, de-ch, es, fo, fr-ca, hu, ja, mk, no, pt-br, sv, da, en-gb, et, fr, fr-ch, is, lt, nl, pl, ru, th, de, en-us, fi, fr-be, hr, it, lv, nl-be, pt, sl, tr.

compute_resource[caching_enabled]
选填 , 允许空值

启用缓存,仅适用于 VMware

Validations:

  • Must be one of: true, false, 1, 0.

compute_resource[project]
选填 , 允许空值

Project id for GCE only

Validations:

  • Must be a String

compute_resource[email]
选填 , 允许空值

Email for GCE only

Validations:

  • Must be a String

compute_resource[key_path]
选填 , 允许空值

Certificate path for GCE only

Validations:

  • Must be a String

compute_resource[zone]
选填 , 允许空值

for GCE only

Validations:

  • Must be a String

compute_resource[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

compute_resource[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type


PUT /api/compute_resources/:id
更新计算资源

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be a String

compute_resource
必填

Validations:

  • Must be a Hash

compute_resource[name]
选填

Validations:

  • Must be a String

compute_resource[provider]
选填 , 允许空值

提供者包括

Validations:

  • Must be a String

compute_resource[url]
选填 , 允许空值

Libvirt, oVirt and OpenStack 的 URL

Validations:

  • Must be a String

compute_resource[description]
选填 , 允许空值

Validations:

  • Must be a String

compute_resource[user]
选填 , 允许空值

oVirt、EC2、VMware、OpenStack 的用户名。EC2 的访问密钥。

Validations:

  • Must be a String

compute_resource[password]
选填 , 允许空值

oVirt、EC2、VMware、OpenStack 的密码。EC2 的访问密钥。

Validations:

  • Must be a String

compute_resource[datacenter]
选填 , 允许空值

用于 oVirt、VMware 数据库

Validations:

  • Must be a String

compute_resource[use_v4]
选填 , 允许空值

只用于 oVirt

Validations:

  • Must be one of: true, false, 1, 0.

compute_resource[ovirt_quota]
选填 , 允许空值

for oVirt only, ID or Name of quota to use

Validations:

  • Must be a String

compute_resource[public_key]
选填 , 允许空值

只用于 oVirt

Validations:

  • Must be a String

compute_resource[region]
选填 , 允许空值

for AzureRm eg. 'eastus' and for EC2 only. Use 'us-gov-west-1' for EC2 GovCloud region

Validations:

  • Must be a String

compute_resource[tenant]
选填 , 允许空值

for OpenStack and AzureRm only

Validations:

  • Must be a String

compute_resource[domain]
选填 , 允许空值

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_name]
选填 , 允许空值

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[project_domain_id]
选填 , 允许空值

for OpenStack (v3) only

Validations:

  • Must be a String

compute_resource[server]
选填 , 允许空值

用于 VMware

Validations:

  • Must be a String

compute_resource[set_console_password]
选填 , 允许空值

仅用于 Libvirt 和 VMware

Validations:

  • Must be one of: true, false, 1, 0.

compute_resource[display_type]
选填 , 允许空值

for Libvirt and oVirt only

Validations:

  • Must be one of: VNC, SPICE.

compute_resource[keyboard]
选填 , 允许空值

只用于 oVirt

Validations:

  • Must be one of: ar, de-ch, es, fo, fr-ca, hu, ja, mk, no, pt-br, sv, da, en-gb, et, fr, fr-ch, is, lt, nl, pl, ru, th, de, en-us, fi, fr-be, hr, it, lv, nl-be, pt, sl, tr.

compute_resource[caching_enabled]
选填 , 允许空值

启用缓存,仅适用于 VMware

Validations:

  • Must be one of: true, false, 1, 0.

compute_resource[project]
选填 , 允许空值

Project id for GCE only

Validations:

  • Must be a String

compute_resource[email]
选填 , 允许空值

Email for GCE only

Validations:

  • Must be a String

compute_resource[key_path]
选填 , 允许空值

Certificate path for GCE only

Validations:

  • Must be a String

compute_resource[zone]
选填 , 允许空值

for GCE only

Validations:

  • Must be a String

compute_resource[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

compute_resource[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type


DELETE /api/compute_resources/:id
删除计算资源

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compute_resources/:id/available_images
列出计算资源的所有可用映像

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compute_resources/:id/available_clusters
列出计算资源的所有可用集群

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compute_resources/:id/available_flavors
列出计算资源的所有可用风格

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compute_resources/:id/available_folders
列出计算资源的所有可用文件夹

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compute_resources/:id/available_zones
列出计算资源的所有可用区域

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compute_resources/:id/available_networks
列出计算资源的所有可用网络

GET /api/compute_resources/:id/available_clusters/:cluster_id/available_networks
列出计算资源集群的所有可用网络

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

cluster_id
选填

Validations:

  • Must be a String


GET /api/compute_resources/:id/available_clusters/:cluster_id/available_resource_pools
列出计算资源集群的资源池

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

cluster_id
必填

Validations:

  • Must be a String


GET /api/compute_resources/:id/storage_domains/:storage_domain_id
列出给定存储域的所有属性

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

storage_domain_id
必填

Validations:

  • Must be a String


GET /api/compute_resources/:id/available_storage_domains
列出计算资源的存储域

GET /api/compute_resources/:id/available_storage_domains/:storage_domain
列出给定存储域的所有属性

GET /api/compute_resources/:id/available_clusters/:cluster_id/available_storage_domains
列出计算资源的存储域

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

cluster_id
选填

Validations:

  • Must be a String

storage_domain
选填

Validations:

  • Must be a String


GET /api/compute_resources/:id/storage_pods/:storage_pod_id
列出给定存储 pod 的属性

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

storage_pod_id
必填

Validations:

  • Must be a String


GET /api/compute_resources/:id/available_storage_pods
列出计算资源的存储 pod

GET /api/compute_resources/:id/available_storage_pods/:storage_pod
列出给定存储 pod 的属性

GET /api/compute_resources/:id/available_clusters/:cluster_id/available_storage_pods
列出计算资源的存储 pod

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

cluster_id
选填

Validations:

  • Must be a String

storage_pod
选填

Validations:

  • Must be a String


GET /api/compute_resources/:id/available_security_groups
列出计算资源的可用安全组

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


PUT /api/compute_resources/:id/associate
将 VM 与主机关联

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


PUT /api/compute_resources/:id/refresh_cache
刷新计算资源缓存

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compute_resources/:id/available_virtual_machines
List available virtual machines for a compute resource

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


GET /api/compute_resources/:id/available_virtual_machines/:vm_id
Show a virtual machine

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

vm_id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


PUT /api/compute_resources/:id/available_virtual_machines/:vm_id/power
Power a Virtual Machine

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

vm_id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


DELETE /api/compute_resources/:id/available_virtual_machines/:vm_id
Delete a Virtual Machine

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

vm_id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.