调用ListResourceGroups查看指定类型的资源组列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListResourceGroups |
系统规定参数。取值:ListResourceGroups。 |
ResourceGroupType | Integer | 是 | 3 |
需要查看的资源组类型ID。取值如下:
当取值表示引擎时,查看的资源组列表为购买该类型引擎时创建的资源组列表。 |
Keyword | String | 否 | abc |
关键字。用于模糊查询资源组名称和资源组标识。 |
BizExtKey | String | 否 | default |
资源组的类别。取值如下:
|
ResourceManagerResourceGroupId | String | 否 | rg-acfmzbn7pti3zfa |
资源组ID。 |
Tags | Array | 否 |
标签。 |
|
Key | String | 否 | Env |
标签键。 |
Value | String | 否 | Test |
标签值。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
HttpStatusCode | Integer | 200 |
HTTP状态码。 |
RequestId | String | 0bc1411515937635973**** |
请求ID。用于定位日志,排查问题。 |
Success | Boolean | true |
请求是否成功。 |
Data | Array of Data |
资源组列表。 |
|
Status | Integer | 0 |
资源组的状态。取值如下:
|
UpdateTime | String | Jul 9, 2018 2:43:37 PM |
最近一次更新资源组的时间。 |
IsDefault | Boolean | true |
是否为默认资源组。取值如下:
|
Cluster | String | AY18G |
集群的名称。该参数仅对于MaxCompute和PAI资源组类型生效。 |
EnableKp | Boolean | false |
是否使用Kp(关键人)访问。取值如下:
|
ResourceGroupType | String | 3 |
资源组的类型。取值如下:
|
CreateTime | String | Jul 9, 2018 2:43:37 PM |
创建集群的时间。格式示例为Jul 9, 2018 2:43:37 PM。 |
Identifier | String | e1815577-2f4e-4c5e-b29**** |
资源组的标识。 |
Mode | String | SHARE |
资源组的类型。取值如下:
|
BizExtKey | String | default |
资源组的类别。取值如下:
|
Sequence | Integer | 300 |
序列字段。用于将已创建的资源组按照创建的序号从小到大升序排序。 |
Specs | Map |
资源组的详细信息。{}中显示的内容为资源组的详细信息。 |
|
Name | String | abc |
资源组的名称。 |
Id | Long | 1234567 |
资源组的ID。 |
TenantId | Long | 1234567 |
租户ID。 |
ResourceManagerResourceGroupId | String | rg-acfmzbn7pti3zfa |
资源组ID。 |
Tags | Array of Tag |
标签。 |
|
Key | String | Env |
标签键。 |
Value | String | Test |
标签值。 |
示例
请求示例
http(s)://[Endpoint]/?Action=ListResourceGroups
&ResourceGroupType=3
&Keyword=abc
&BizExtKey=default
&ResourceManagerResourceGroupId=rg-acfmzbn7pti3zfa
&Tags=[{"Key":"Env","Value":"Test"}]
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
200
0bc1411515937635973****
true
0
Jul 9, 2018 2:43:37 PM
true
AY18G
false
3
Jul 9, 2018 2:43:37 PM
e1815577-2f4e-4c5e-b29****
SHARE
default
300
abc
1234567
1234567
rg-acfmzbn7pti3zfa
Env
Test
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"HttpStatusCode" : 200,
"RequestId" : "0bc1411515937635973****",
"Success" : true,
"Data" : [ {
"Status" : 0,
"UpdateTime" : "Jul 9, 2018 2:43:37 PM",
"IsDefault" : true,
"Cluster" : "AY18G",
"EnableKp" : false,
"ResourceGroupType" : "3",
"CreateTime" : "Jul 9, 2018 2:43:37 PM",
"Identifier" : "e1815577-2f4e-4c5e-b29****",
"Mode" : "SHARE",
"BizExtKey" : "default",
"Sequence" : 300,
"Name" : "abc",
"Id" : 1234567,
"TenantId" : 1234567,
"ResourceManagerResourceGroupId" : "rg-acfmzbn7pti3zfa",
"Tags" : [ {
"Key" : "Env",
"Value" : "Test"
} ]
} ]
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Invalid.Tenant.ConnectionNotExists | The connection does not exist. | 数据源不存在。 |
400 | Invalid.Tenant.ProjectNotExists | The project does not exist. | 项目不存在。 |
400 | Invalid.Tenant.UserNotInProject | The user is not in the project. | 用户不在项目中。 |
403 | Invalid.Tenant.UserIsNotProjectOwnerOrAdmin | The user is not a project administrator or owner. | 用户不是项目负责人或者项目管理员。 |
403 | Invalid.Tenant.UserNotInTenant | The user is not in tenant. | 用户不在租户中。 |
访问错误中心查看更多错误码。
内容没看懂? 不太想学习?想快速解决? 有偿解决: 联系专家
阿里云企业补贴进行中: 马上申请
腾讯云限时活动1折起,即将结束: 马上收藏
同尘科技为腾讯云授权服务中心。
购买腾讯云产品享受折上折,更有现金返利:同意关联,立享优惠
转转请注明出处:https://www.yunxiaoer.com/171000.html