Querying DCC Resources
Function
This API is used to query the DCC resources that you have obtained.
URI
GET /v1/{project_id}/dcc/resource_clusters
Table 1 describes the parameters.
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
project_id |
String |
Yes |
Specifies the project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
You can add the service_type parameter to the URI to filter the query result.
For example: /v1/{project_id}/dcc/resource_clusters?service_type={service_type}
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
service_type |
String |
No |
Specifies the cluster service type. The value can be ecs or bms. |
Example Request
GET https://{Endpoint}/v1/056f7ec7e100d3d32f81c014630b5648/dcc/resource_clusters?service_type=ecs
Response Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
dedicated_cluster |
Array of objects |
Specifies the provisioned . For details, see Table 3. |
|
Parameter |
Type |
Description |
|---|---|---|
|
project_id |
String |
Specifies the project ID. |
|
availability_zone |
String |
Specifies the AZ. |
|
host_total |
Integer |
Specifies the number of hosts. |
|
host_type |
String |
Specifies the host specifications code. |
|
service_type |
String |
Specifies the cluster service type. The value can be ecs or bms. |
|
host_properties |
Object |
Specifies the host specifications. |
|
vcpus_used |
Integer |
Specifies the number of used vCPUs. |
|
vcpus_total |
Integer |
Specifies the total number of vCPUs. |
|
memory_mb_used |
Integer |
Specifies the used memory size. |
|
memory_mb_total |
Integer |
Specifies the total memory size. |
|
flavors |
Array of strings |
Specifies the supported flavors. |
|
instance_total |
Integer |
Specifies the total number of running compute instances. |
|
Parameter |
Type |
Description |
|---|---|---|
|
cpu_cores |
Integer |
Specifies the number of cores. |
|
memory_mb |
Integer |
Specifies the memory size. |
|
cpu_speed |
String |
Specifies the CPU frequency. |
Example response
{
"dedicated_cluster": [
{
"project_id": "056f7ec7e100d3d32f81c014630b5648",
"availability_zone": "kvmxen.dc1",
"host_total": 1,
"host_type": "dec_IOoptimizedS2",
"service_type": "ecs",
"host_properties": {
"cpu_cores": 216,
"memory_mb": 264192,
"cpu_speed": "2.5"
},
"vcpus_used": 1,
"vcpus_total": 96,
"memory_mb_used": 2048,
"memory_mb_total": 264192,
"flavors": [
"s2.2xlarge.2",
"s2.2xlarge.4",
"s2.4xlarge.2",
"s2.4xlarge.4",
"s2.8xlarge.2",
"s2.8xlarge.4",
"s2.large.2",
"s2.large.4",
"s2.medium.2",
"s2.medium.4",
"s2.xlarge.2",
"s2.xlarge.4"
],
"instance_total": 1
},
{
"project_id": "056f7ec7e100d3d32f81c014630b5648",
"availability_zone": "kvmxen.dc1",
"host_total": 3,
"host_type": "dec_IOoptimizedS2",
"hypervisor_type": "ecs",
"host_properties": {
"cpu_cores": 108,
"memory_mb": 264192,
"cpu_speed": "2.5"
},
"vcpus_used": 24,
"vcpus_total": 134,
"memory_mb_used": 53248,
"memory_mb_total": 792576,
"flavors": [
"s2.2xlarge.2",
"s2.2xlarge.4",
"s2.4xlarge.2",
"s2.4xlarge.4",
"s2.8xlarge.2",
"s2.8xlarge.4",
"s2.large.2",
"s2.large.4",
"s2.medium.2",
"s2.medium.4",
"s2.xlarge.2",
"s2.xlarge.4"
],
"instance_total": 23
}
]
}
Status Code
See Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.