查询资源组详情
接口功能介绍
获取指定的资源组详情。
URI
GET /v4/cwai/group/groupDetail
路径参数 无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例值 | 下级对象 |
---|---|---|---|---|---|
resourceGroupID | 是 | String | 资源组唯一ID | asdfdd44-3a45-11ee-b1cf-525400c96778 |
请求参数
请求header参数
参数 | 是否必填 | 参数类型 | 说明 | 示例值 | 下级对象 |
---|---|---|---|---|---|
userID | 是 | String | 用户ID | 8a122a-xxx-f34d13e73 | |
regionID | 是 | String | 区域的唯一ID | xxx-xxx-yyyzzz |
请求体body参数
无
响应参数
参数 | 是否必填 | 参数类型 | 说明 | 示例值 | 下级对象 |
---|---|---|---|---|---|
statusCode | 是 | Integer | 请求成功(800)或者失败(900) | 800 | |
errorCode | 否 | String | 错误代码 | Cwai.Api.xxxx | |
message | 否 | String | 错误信息的英文描述 | Invalid Request | |
returnObj | 否 | Object | 返回创建队列信息 | returnObj |
表returnObj
参数
是否必填
参数类型
说明
示例值
下级对象
resourceGroupName
是
String
资源组名称
cluster-demo
resourceGroupID
是
String
资源组唯一ID
asdfdd44-3a45-11ee-b1cf-525400c96778
resourceType
是
String
资源类型,取值:[machine=裸金属,ecs=云主机]
machine
azName
是
String
可用区名称
az1
regionID
是
String
区域唯一ID
81f7728662dd11ec547210155d307d5b
vpcID
是
String
VPC唯一ID
vpc-omaaojibt
securityGroupID
是
String
资源组安全组ID
sg-0ok87y5zt2
comment
是
String
资源组描述
ebmSubnetName
是
String
ebm虚机子网名称
test-subnet01
vpcName
是
String
主网卡网络名称
vpc-test
imageName
是
String
物理机镜像名称
CentOS
deviceTypeNum
是
Array of Objects
物理机节点类型和数量
deviceTypeNum
status
是
String
资源组状态,取值:
creating:资源组创建中
running:资源组运行中
failedCreate:资源组创建失败
deleted:资源组已删除
failedDelete:资源组删除失败
running
message
是
String
备注
表deviceTypeNum
参数 | 是否必填 | 参数类型 | 说明 | 示例值 | 下级对象 |
---|---|---|---|---|---|
deviceType | 是 | String | 资源组节点类型 | ecs.c5.xlarge | |
count | 是 | Integer | 物理机数量 | 1 |
请求示例
GET https://cwai-global.ctapi.ctyun.cn/v4/cwai/group/groupDetail?resourceGroupID=asdfdd44-3a45-11ee-b1cf-525400c96778
Content-Type:application/json
regionID:81f7728662dd11ec810800155d307d5b
请求头header
{
"userID":"8a122a-xxx-f34d13e73"
}
请求体body
无
响应示例
HTTP/1.1 200 OK
Content-Type:application/json
{
"statusCode": 800,
"returnObj": {
"resourceGroupName": "cluster-demo",
"resourceGroupID": "asdfdd44-3a45-11ee-b1cf-525400c96778",
"resourceType": "machine",
"azName": "az1",
"regionID" : "81f7728662dd11ec547210155d307d5b",
"vpcID": "vpc-omaaojibt",
"securityGroupID": "sg-0ok87y5zt2",
"comment": "",
"ebmSubnetName": "",
"vpcName": "",
"imageName": "CentOS",
"deviceTypeNum": [
{
"nodeTypes": "physical.t17.large",
"count": 1
}],
"status": "deletefail",
"message": "释放子网失败"
}
}
错误参数返回示例
HTTP/1.1200 OK
Content-Type:application/json
{
"statusCode":900,
"errorCode":"Cwai.Api.BadRequest",
"message":"***",
}
内部服务错误返回示例
TTP/1.1200 OK
Content-Type:application/json
{
"statusCode":900,
"errorCode":"Cwai.Api.InternalServerError",
"message":"***",
}
状态码
状态码 | 描述 |
---|---|
200 | 表示请求成功 |
错误码
错误码 | 描述 |
---|---|
Cwai.Api.BadRequest | 错误请求 |
Cwai.Api.NotFound | 资源不存在 |
Cwai.Api.StatusUnauthorized | 状态未授权 |
Cwai.Api.InternalServerError | 内部错误 |