GET /api/compute_resources/:compute_resource_id/images
列出運算資源的所有映像檔

GET /api/operatingsystems/:operatingsystem_id/images
列出作業系統的所有映像檔

GET /api/architectures/:architecture_id/images
列出架構的所有映像檔

示例

GET /api/compute_resources/980190962/images
200
{
  "total": 2,
  "subtotal": 2,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "operatingsystem_id": 309172073,
      "operatingsystem_name": "centos 5.3",
      "compute_resource_id": 980190962,
      "compute_resource_name": "bigcompute",
      "architecture_id": 501905019,
      "architecture_name": "x86_64",
      "uuid": "string-of-uuid",
      "username": "root",
      "created_at": "2019-11-07 08:38:40 UTC",
      "updated_at": "2019-11-07 08:38:40 UTC",
      "id": 980190962,
      "name": "centos-1"
    },
    {
      "operatingsystem_id": 309172073,
      "operatingsystem_name": "centos 5.3",
      "compute_resource_id": 980190962,
      "compute_resource_name": "bigcompute",
      "architecture_id": 501905019,
      "architecture_name": "x86_64",
      "uuid": "MyString2",
      "username": "MyString",
      "created_at": "2019-11-07 08:38:40 UTC",
      "updated_at": "2019-11-07 08:38:40 UTC",
      "id": 298486374,
      "name": "centos-2"
    }
  ]
}

參數

參數名字 描述
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_id
選填

運算資源的 ID

Validations:

  • Must be a String

architecture_id
選填

架構的 ID

Validations:

  • Must be a String

operatingsystem_id
選填

作業系統 ID

Validations:

  • Must be a String

search
選填

篩選結果

Validations:

  • Must be a String

order
選填

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
選填

頁數,從 1 開始

Validations:

  • Must be a number.

per_page
選填

每頁要傳回的結果數量

Validations:

  • Must be a number.

Search fields

Field name 類型 Possible values
architecture integer
compute_resource string
name string
operatingsystem integer
user_data true, false
username string

GET /api/compute_resources/:compute_resource_id/images/:id
顯示映像檔

GET /api/operatingsystems/:operatingsystem_id/images/:id
顯示映像檔

GET /api/architectures/:architecture_id/images/:id
顯示映像檔

示例

GET /api/compute_resources/980190962/images/980190962
200
{
  "operatingsystem_id": 309172073,
  "operatingsystem_name": "centos 5.3",
  "compute_resource_id": 980190962,
  "compute_resource_name": "bigcompute",
  "architecture_id": 501905019,
  "architecture_name": "x86_64",
  "uuid": "string-of-uuid",
  "username": "root",
  "created_at": "2019-11-07 08:38:40 UTC",
  "updated_at": "2019-11-07 08:38:40 UTC",
  "id": 980190962,
  "name": "centos-1"
}

參數

參數名字 描述
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.

compute_resource_id
選填

運算資源的 ID

Validations:

  • Must be a String

architecture_id
選填

架構的 ID

Validations:

  • Must be a String

operatingsystem_id
選填

作業系統 ID

Validations:

  • Must be a String


POST /api/compute_resources/:compute_resource_id/images
建立映像檔

示例

POST /api/compute_resources/980190962/images
{
  "image": {
    "name": "TestImage",
    "username": "ec2-user",
    "uuid": "abcdef",
    "password": "password",
    "operatingsystem_id": 309172073,
    "compute_resource_id": 928692541,
    "architecture_id": 331892513,
    "user_data": true
  }
}
201
{
  "operatingsystem_id": 309172073,
  "operatingsystem_name": "centos 5.3",
  "compute_resource_id": 980190962,
  "compute_resource_name": "bigcompute",
  "architecture_id": 331892513,
  "architecture_name": "sparc",
  "uuid": "abcdef",
  "username": "ec2-user",
  "created_at": "2019-11-07 08:38:41 UTC",
  "updated_at": "2019-11-07 08:38:41 UTC",
  "id": 980190963,
  "name": "TestImage"
}

參數

參數名字 描述
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_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.

image
必填

Validations:

  • Must be a Hash

image[name]
必填

Validations:

  • Must be a String

image[username]
必填

Validations:

  • Must be a String

image[uuid]
必填

Template ID in the compute resource

Validations:

  • Must be a String

image[password]
選填 , 允許空值

Validations:

  • Must be a String

image[compute_resource_id]
選填 , 允許空值

運算資源的 ID

Validations:

  • Must be a String

image[architecture_id]
選填 , 允許空值

架構的 ID

Validations:

  • Must be a String

image[operatingsystem_id]
選填 , 允許空值

作業系統 ID

Validations:

  • Must be a String

image[user_data]
選填 , 允許空值

不管映像檔是否支援使用者資料

Validations:

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


PUT /api/compute_resources/:compute_resource_id/images/:id
更新映像檔

示例

PUT /api/compute_resources/980190962/images/980190962
{
  "image": {}
}
200
{
  "operatingsystem_id": 309172073,
  "operatingsystem_name": "centos 5.3",
  "compute_resource_id": 980190962,
  "compute_resource_name": "bigcompute",
  "architecture_id": 501905019,
  "architecture_name": "x86_64",
  "uuid": "string-of-uuid",
  "username": "root",
  "created_at": "2019-11-07 08:38:40 UTC",
  "updated_at": "2019-11-07 08:38:40 UTC",
  "id": 980190962,
  "name": "centos-1"
}

參數

參數名字 描述
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_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.

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.

image
必填

Validations:

  • Must be a Hash

image[name]
選填

Validations:

  • Must be a String

image[username]
選填

Validations:

  • Must be a String

image[uuid]
選填

Template ID in the compute resource

Validations:

  • Must be a String

image[password]
選填 , 允許空值

Validations:

  • Must be a String

image[compute_resource_id]
選填 , 允許空值

運算資源的 ID

Validations:

  • Must be a String

image[architecture_id]
選填 , 允許空值

架構的 ID

Validations:

  • Must be a String

image[operatingsystem_id]
選填 , 允許空值

作業系統 ID

Validations:

  • Must be a String

image[user_data]
選填 , 允許空值

不管映像檔是否支援使用者資料

Validations:

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


DELETE /api/compute_resources/:compute_resource_id/images/:id
刪除映像檔

示例

DELETE /api/compute_resources/980190962/images/980190962
{
  "image": {}
}
200
{
  "id": 980190962,
  "operatingsystem_id": 309172073,
  "compute_resource_id": 980190962,
  "architecture_id": 501905019,
  "uuid": "string-of-uuid",
  "username": "root",
  "name": "centos-1",
  "created_at": "2019-11-07T08:38:40.931Z",
  "updated_at": "2019-11-07T08:38:40.931Z",
  "iam_role": null,
  "user_data": false,
  "password": null
}

參數

參數名字 描述
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_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.

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.