您可以通过ListResourceGroupMachineGroups获取指定Resource Group下面的机器组列表
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
pai:ListResourceGroupMachineGroups |
list |
*全部资源
|
无 | 无 |
请求语法
GET /api/v1/resources/{ResourceGroupID}/machinegroups HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ResourceGroupID |
string |
否 |
资源组 ID,每一个资源组都有全局唯一的资源组 ID。可以通过资源组 ID 来获取资源组的信息。 |
rgf0zhfqn1d4ity2 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Name |
string |
否 |
机器组名称。 |
test |
| CreatorID |
string |
否 |
机器组创建者的 UserId。 |
1612285282502326 |
| PaymentType |
string |
否 |
付费类型。 |
PREPAY |
| PaymentDurationUnit |
string |
否 |
机器组计费时间单位。 |
Month |
| PaymentDuration |
string |
否 |
付费时长。当 PaymentDurationUnit 取值为 Month 时,取值:1、2、3、4、5、6、7、8、9、12、24、36、48、60。 |
1 |
| EcsSpec |
string |
否 |
Ecs 规格。 |
ecs.c6.large |
| PageNumber |
integer |
否 |
页码。 |
2 |
| PageSize |
integer |
否 |
分页大小 |
10 |
| Order |
string |
否 |
排序方式。
|
DESC |
| SortBy |
string |
否 |
排序字段 |
GmtCreatedTime |
| Status |
string |
否 |
实例状态。 Creating:创建中 Ready:运行中 Expiring: 即将过期 Expired: 已过期 Stopping:停止中 Stopped:已停止 |
Ready |
| OrderInstanceId |
string |
否 |
购买的实例 ID。 |
236553689400333 |
| MachineGroupIDs |
string |
否 |
机器组 ID,多个 ID 通过逗号隔开。 |
mg105ecqwfe49hwb |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| MachineGroups |
array |
机器组列表。 |
|
| MachineGroup |
机器组。 |
||
| TotalCount |
string |
机器组总数。 |
4 |
| RequestId |
string |
请求 ID。 |
E7C42CC7-2E85-508A-84F4-923B605FD10F |
示例
正常返回示例
JSON格式
{
"MachineGroups": [
{
"Status": "Success",
"EcsCount": 1,
"GmtStartedTime": "2023-06-22T00:00:00Z",
"ResourceGroupID": "rgf0zhfqn1d4ity2",
"GmtCreatedTime": "2023-06-22T00:00:00Z",
"CreatorID": "1612285282502324",
"ReasonMessage": "“”",
"PaymentDurationUnit": "Monthly",
"EcsSpec": "ecs.c6.large",
"SupportedDrivers": [
"470.199.02"
],
"PaymentDuration": "2",
"ReasonCode": "“”",
"GmtModifiedTime": "2023-06-22T00:00:00Z",
"DiskCapacity": 0,
"GmtExpiredTime": "2023-08-22T00:00:00Z\n",
"OrderInstanceId": "“”",
"DefaultDriver": "470.199.02",
"MachineGroupID": "mg1",
"PaymentType": "PREPAY",
"DiskPL": "",
"Cpu": 0,
"Gpu": 0,
"GpuMemory": 0,
"GpuType": "",
"Memory": 0,
"ResourceType": "",
"AllocatableCpu": 0,
"AllocatableMemory": 0,
"SystemReservedCpu": 0,
"SystemReservedMemory": 0
}
],
"TotalCount": "4",
"RequestId": "E7C42CC7-2E85-508A-84F4-923B605FD10F"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。