Lists the resources associated with a workspace.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paiworkspace:ListResources |
list |
*All Resource
|
None | None |
Request syntax
GET /api/v1/resources HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
No |
The workspace ID. For more information about how to obtain a workspace ID, see ListWorkspaces.
|
123 |
| PageNumber |
integer |
No |
The page number of the resource list. The value starts from 1. The default value is 1. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page for a paged query. The default value is 20. |
20 |
| ProductTypes |
string |
No |
This field is deprecated and will be unpublished. Use the ResourceType field instead. |
MaxCompute |
| GroupName |
string |
No |
The name of the resource group. For more information about how to obtain the name of a resource group, see ListResources. |
group |
| ResourceName |
string |
No |
The resource name. The format is as follows:
|
resource |
| Option |
string |
No |
The option. Valid values:
|
ListResourceByWorkspace |
| Verbose |
boolean |
No |
Specifies whether to display detailed information. The detailed information includes the Quotas field. Valid values:
|
true |
| ResourceTypes |
string |
No |
The list of resource types. Valid values:
|
MaxCompute |
| QuotaIds |
string |
No |
A collection of QuotaIds, separated by commas. Only resources that have all these QuotaIds are returned. Note
Currently, you can filter only resources for which ResourceTypes is set to ACS using this parameter. |
quota-k******da,quota-cd******w |
| Labels |
string |
No |
A collection of tag filter conditions, separated by commas. Only resources that meet all these tag conditions are returned. Currently, you can filter only resources for which ProductType is set to ACS using this parameter. |
system.supported.dsw=true,system.supported.dlc=true |
| VerboseFields |
string |
No |
A comma-separated collection that specifies the fields to return. The following fields are supported:
|
Quota,IsDefault |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| RequestId |
string |
The request ID. |
1e195c5116124202371861018d5bde |
| Resources |
array<object> |
The list of resources. |
|
|
array<object> |
The resource information. |
||
| Id |
string |
The resource ID. |
123 |
| Name |
string |
The resource name. |
ResourceName |
| ProductType |
string |
This field is deprecated and will be unpublished. Use the ResourceType field instead. |
MaxCompute |
| EnvType |
string |
The environment type. Valid values:
|
prod |
| WorkspaceId |
string |
The ID of the workspace to which the resource belongs. |
123 |
| IsDefault |
boolean |
Specifies whether the resource is the default resource. Each resource type has a default resource. Valid values:
|
true |
| Quotas |
array<object> |
The list of quotas. |
|
|
array<object> |
The quota information. |
||
| Name |
string |
The quota name. |
QuotaName |
| ProductCode |
string |
The product name. Valid values:
|
MaxCompute_isolate |
| QuotaType |
string |
The resource quota type. Valid values:
|
MaxCompute |
| Mode |
string |
The billing method. Valid values:
|
isolate |
| Specs |
array<object> |
The list of specification descriptions. |
{\"cu\":\"11500\",\"minCu\":\"2300\",\"parentId\":\"0\"} |
|
object |
The specification description. |
||
| Name |
string |
The specification name. |
cu |
| Value |
string |
The specification description. |
11500 |
| CardType |
string |
The card type. Valid values:
|
CPU |
| Id |
string |
The resource quota ID. |
123 |
| DisplayName |
string |
The alias of the resource quota. |
默认后付费Quota |
| Spec |
object |
The specification description. |
对于MaxCompute {"Endpoint": "odps.alibaba-inc.com", "Project": "mignshi"} |
| GroupName |
string |
The name of the resource group. The name must be unique within an Alibaba Cloud account. |
groupName |
| GmtCreateTime |
string |
The time when the resource was created. The time is in UTC and follows the ISO 8601 standard. |
2021-01-21T17:12:35.232Z |
| Executor |
object |
This field is invalid and deprecated. |
|
| OwnerId |
string |
This field is invalid and deprecated. |
110973******7793 |
| Encryption |
object |
The encryption information. This parameter is valid only for MaxCompute resources. |
|
| Enabled |
boolean |
Specifies whether encryption is enabled. |
false |
| Algorithm |
string |
The encryption algorithm. |
AESCTR |
| Key |
string |
The primary key for encryption. |
DEFAULT |
| ResourceType |
string |
The resource type. Valid values:
|
MaxCompute |
| Labels |
array<object> |
The collection of tags. |
|
|
object |
The tag. |
||
| Key |
string |
The key of the tag. |
system.supported.dsw |
| Value |
string |
The value of the tag. |
true |
| TotalCount |
integer |
The number of resources that meet the filter conditions. |
2 |
Examples
Success response
JSON format
{
"RequestId": "1e195c5116124202371861018d5bde",
"Resources": [
{
"Id": "123",
"Name": "ResourceName",
"ProductType": "MaxCompute",
"EnvType": "prod",
"WorkspaceId": "123",
"IsDefault": true,
"Quotas": [
{
"Name": "QuotaName",
"ProductCode": "MaxCompute_isolate",
"QuotaType": "MaxCompute",
"Mode": "isolate",
"Specs": [
{
"Name": "cu",
"Value": "11500"
}
],
"CardType": "CPU",
"Id": "123",
"DisplayName": "默认后付费Quota"
}
],
"Spec": {
"test": "test",
"test2": 1
},
"GroupName": "groupName",
"GmtCreateTime": "2021-01-21T17:12:35.232Z",
"Executor": {
"OwnerId": "110973******7793"
},
"Encryption": {
"Enabled": false,
"Algorithm": "AESCTR",
"Key": "DEFAULT"
},
"ResourceType": "MaxCompute",
"Labels": [
{
"Key": "system.supported.dsw",
"Value": "true"
}
]
}
],
"TotalCount": 2
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.