Updated on 2025-12-19 GMT+08:00

Querying DCC Resources

Function

This API is used to query the DCC resources you have obtained.

Calling Method

For details, see Calling APIs.

Debugging

You can debug this API in API Explorer.

Authorization

An account has required permissions to call all APIs by default. To call this API as an IAM user, the IAM user must be granted the required permissions. For details, see Permissions and Supported Actions.

URI

GET /v1/{project_id}/dcc/resource_clusters

Table 1 describes the parameters.

Table 1 URI parameter

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.

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}

Table 2 Query parameter

Parameter

Type

Mandatory

Description

service_type

String

No

Specifies the cluster service type.

The value can be ecs or bms.

Request Parameters

None

Response Parameters

Table 3 Response parameter

Parameter

Type

Description

dedicated_cluster

Array of objects

Specifies the provisioned .

For details, see Table 4.

Table 4 dedicated_cluster field description

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. For details about the field structure, see Table 5.

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.

Table 5 host_properties field description

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 Request

Querying the obtained resources whose service_type is ecs
GET https://{Endpoint}/v1/056f7ec7e100d3d32f81c014630b5648/dcc/resource_clusters?service_type=ecs

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",
            "service_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.