获取专属计算集群资源 - ShowResourceClusters
功能介绍
用户可以查询已经申请的专属计算集群资源。
调用方法
请参见如何调用API。
调试
您可以在API Explorer中调试该接口。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
可以在URI中增加service_type参数,来过滤查询结果。
例如:/v1/{project_id}/dcc/resource_clusters?service_type={service_type}
参数 | 参数类型 | 是否必选 | 描述 |
|---|---|---|---|
service_type | String | 否 | 集群服务类型。 取值范围:“ecs”或“bms”。 |
请求参数
无
响应参数
参数 | 参数类型 | 描述 |
|---|---|---|
dedicated_cluster | Array of objects | 已开通的资源列表。 详情请参见表4。 |
参数 | 参数类型 | 描述 |
|---|---|---|
project_id | String | 项目ID。 |
availability_zone | String | 可用区。 |
host_total | Integer | 主机数量。 |
host_type | String | 主机规格编码。 |
service_type | String | 集群服务类型。 取值范围:“ecs”或“bms”。 |
host_properties | Object | 主机规格信息。字段结构说明请参见表5。 |
vcpus_used | Integer | 已用vcpu个数。 |
vcpus_total | Integer | 总的vcpu个数。 |
memory_mb_used | Integer | 已用内存。 |
memory_mb_total | Integer | 总内存。 |
flavors | Array of strings | 支持的flavor列表。 |
instance_total | Integer | 运行的计算实例总数。 |
请求示例
GET https://{Endpoint}/v1/056f7ec7e100d3d32f81c014630b5648/dcc/resource_clusters?service_type=ecs 响应示例
{
"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
}
]
} 返回值
请参见状态码。

