Updated on 2024-08-09 GMT+08:00

Querying Flavors of Cloud Phone Servers

Function

This API is used to query flavors of cloud phone servers.

URI

GET /v1/{project_id}/cloud-phone/server-models

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

product_type

No

Integer

Product type.

  • 0: cloud phone

  • 1: cloud mobile game

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling an Identity and Access Management (IAM) API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Specifies the request ID, which is unique.

server_models

Array of ServerModel objects

Specifies flavors of cloud phone servers.

Table 5 ServerModel

Parameter

Type

Description

server_model_name

String

Specifies the flavor of the cloud phone server. The flavor can contain a maximum of 64 bytes.

server_type

String

Specifies the model of the Cloud Phone server, for example, Hi1616. The value can contain a maximum of 32 bytes.

cpu

Integer

Specifies the number of CPU cores of the cloud phone server.

memory

Integer

Specifies the memory size (GB) of the cloud phone server.

extend_spec

extend_spec object

Specifies the attribute description of the Cloud Phone server. The value can contain a maximum of 512 bytes.

product_type

Integer

Product type.

  • 0: cloud phone

  • 1: cloud mobile game

free_size

Integer

Free disk quota of the server, in GiB.

Table 6 extend_spec

Parameter

Type

Description

cpu

String

Specifies the CPU type of the cloud phone server.

memory

String

Specifies the memory type of the cloud phone server.

disk

String

Specifies the disk type of the cloud phone server.

network_interface

String

Specifies the network type of the cloud phone server.

gpu

String

Specifies the GPU type of the cloud phone server.

bms_flavor

String

Specifies the Bare Metal Server (BMS) flavor of the cloud phone server.

gpu_count

Integer

Specifies the GPU quantity of the cloud phone server.

numa_count

Integer

Specifies the non-uniform memory access (NUMA) quantity of the cloud phone server.

Example Requests

Querying flavors of cloud phone servers

GET https://{CPH Endpoint}/v1/{project_id}/cloud-phone/server-models

Example Responses

Status code: 200

OK

{
  "request_id" : "4d4aefaa7b1d4a2bb5637e9d5631342f",
  "server_models" : [ {
    "server_model_name" : "physical.rx1.xlarge",
    "server_type" : "Hi1616",
    "cpu" : 64,
    "memory" : 256,
    "extend_spec" : {
      "cpu" : "Hi1616(2*32Core*2.4GHz)",
      "memory" : "DDR4 RAM",
      "disk" : "2*1.2T SAS + 800G SSD",
      "network_interface" : "2 x 2*10GE",
      "gpu" : "3*WX5100",
      "bms_flavor" : "physical.rg1.xlarge.cph.ondemand",
      "gpu_count" : 3,
      "numa_count" : 4
    },
    "product_type" : 0,
    "free_size" : 0
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.