调用ListResourceGroups查看资源组列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListResourceGroups |
要执行的操作。 |
RegionId | String | 是 | cn-shanghai |
地域ID。 |
ResourceGroupType | Integer | 是 | 3 |
资源组的类型,包括0(DataWorks)、2(MaxCompute)、3(PAI)、4(数据集成)、7(调度)和8(AppStudio)。 |
Keyword | String | 否 | abc |
关键字。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Data | Array of Data |
资源组列表。 |
|
BizExtKey | String | default |
资源组的扩展字段。 |
Cluster | String | AY18G |
集群的名称。 |
CreateTime | String | Jul 9, 2018 2:43:37 PM |
创建集群的时间。 |
EnableKp | Boolean | false |
是否使用Kp访问。 |
Id | Long | 1234567 |
资源组的ID。 |
Identifier | String | e1815577-2f4e-4c5e-b29**** |
资源组的标识。 |
IsDefault | Boolean | true |
是否为默认资源组。 |
Mode | String | SHARE |
资源组的类型:预付费(独享)为ISOLATE、后付费(共享)为SHARE、开发者版本为DEVELOP。 |
Name | String | abc |
资源组的名称。 |
ResourceGroupType | String | PAI |
资源组的类型。 |
Sequence | Integer | 300 |
序列。 |
Specs | Map | {} |
资源组的详细信息。 |
Status | Integer | 0 |
资源组的状态。 |
TenantId | Long | 1234567 |
租户ID。 |
UpdateTime | String | Jul 9, 2018 2:43:37 PM |
最后更新时间。 |
HttpStatusCode | Integer | 200 |
HTTP状态码。 |
RequestId | String | 0bc1411515937635973**** |
请求ID。 |
Success | Boolean | true |
请求是否成功。 |
示例
请求示例
http(s)://[Endpoint]/?Action=ListResourceGroups
&RegionId=cn-shanghai
&ResourceGroupType=3
&<公共请求参数>
正常返回示例
XML
格式
<RequestId>0bc1411515937635973****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
<IsDefault>true</IsDefault>
<Status>0</Status>
<Mode>SHARE</Mode>
<CreateTime>Jul 9, 2018 2:43:37 PM</CreateTime>
<Cluster>AY18G</Cluster>
<Sequence>300</Sequence>
<ResourceGroupType>PAI</ResourceGroupType>
<Name>abc</Name>
<TenantId>1234567</TenantId>
<Identifier>e1815577-2f4e-4c5e-b29****</Identifier>
<EnableKp>false</EnableKp>
<BizExtKey>default</BizExtKey>
<UpdateTime>Jul 9, 2018 2:43:37 PM</UpdateTime>
<Id>1234567</Id>
<Specs>{}</Specs>
</Data>
<Success>true</Success>
JSON
格式
{
"RequestId": "0bc1411515937635973****",
"HttpStatusCode": 200,
"Data": {
"IsDefault": true,
"Status": 0,
"Mode": "SHARE",
"CreateTime": "Jul 9, 2018 2:43:37 PM",
"Cluster": "AY18G",
"Sequence": 300,
"ResourceGroupType": "PAI",
"Name": "abc",
"TenantId": 1234567,
"Identifier": "e1815577-2f4e-4c5e-b29****",
"EnableKp": false,
"BizExtKey": "default",
"UpdateTime": "Jul 9, 2018 2:43:37 PM",
"Id": 1234567,
"Specs": "{}"
},
"Success": true
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Invalid.Tenant.ConnectionNotExists | The connection does not exist. | 数据源不存在。 |
400 | Invalid.Tenant.ProjectNotExists | The project does not exist. | 项目不存在。 |
403 | Invalid.Tenant.UserIsNotProjectOwnerOrAdmin | The user is not a project administrator or owner. | 用户不是项目负责人或者项目管理员。 |
400 | Invalid.Tenant.UserNotInProject | The user is not in the project. | 用户不在项目中。 |
403 | Invalid.Tenant.UserNotInTenant | The user is not in tenant. | 用户不在租户中。 |
访问错误中心查看更多错误码。