ListResources
Lists 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 ID of the workspace. To get the workspace ID, see ListWorkspaces.
|
123 |
| PageNumber |
integer |
No |
The page number. The value must be greater than or equal to 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Default value: 20. |
20 |
| ProductTypes |
string |
No |
Deprecated. This parameter is deprecated. Use the |
MaxCompute |
| GroupName |
string |
No |
The name of the resource group. To get the resource group name, see ListResources. |
group |
| ResourceName |
string |
No |
The resource name. The name must meet the following requirements:
|
resource |
| Option |
string |
No |
The option to query resources. Valid values:
|
ListResourceByWorkspace |
| Verbose |
boolean |
No |
Specifies whether to return detailed information. The detailed information includes the
|
true |
| ResourceTypes |
string |
No |
The resource types. Valid values:
|
MaxCompute |
| QuotaIds |
string |
No |
A comma-separated list of quota IDs. This operation returns only the resources that are associated with all the specified quota IDs. Note
This parameter is available only for resources whose |
quota-k******da,quota-cd******w |
| Labels |
string |
No |
A comma-separated list of labels. This operation returns only the resources that have all the specified labels. This parameter is available only for resources whose |
system.supported.dsw=true,system.supported.dlc=true |
| VerboseFields |
string |
No |
A comma-separated list of fields that you want to return. Valid values:
|
Quota,IsDefault |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. |
||
| RequestId |
string |
The request ID. |
1e195c5116124202371861018d5bde |
| Resources |
array<object> |
The list of resources. |
|
|
array<object> |
Details of a resource. |
||
| Id |
string |
The resource ID. |
123 |
| Name |
string |
The resource name. |
ResourceName |
| ProductType |
string |
Deprecated. This parameter is deprecated and will be removed in a future release. Use the |
MaxCompute |
| EnvType |
string |
The environment type. Valid values:
|
prod |
| WorkspaceId |
string |
The ID of the workspace to which the resource belongs. |
123 |
| IsDefault |
boolean |
Indicates whether the resource is the default resource of its type. Each resource type has only one default resource. Valid values:
|
true |
| Quotas |
array<object> |
The list of quotas. |
|
|
array<object> |
Details of a quota. |
||
| Name |
string |
The quota name. |
QuotaName |
| ProductCode |
string |
The product code. Valid values:
|
MaxCompute_isolate |
| QuotaType |
string |
The quota type. Valid values:
|
MaxCompute |
| Mode |
string |
The billing method. Valid values:
|
isolate |
| Specs |
array<object> |
The list of specifications. |
{\"cu\":\"11500\",\"minCu\":\"2300\",\"parentId\":\"0\"} |
|
object |
The details of a specification. |
||
| Name |
string |
The specification name. |
cu |
| Value |
string |
The specification value. |
11500 |
| CardType |
string |
The card type. Valid values:
|
CPU |
| Id |
string |
The quota ID. |
123 |
| DisplayName |
string |
The display name of the quota. |
默认后付费Quota |
| Spec |
object |
The resource specifications. |
对于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 displayed in UTC and is formatted in ISO 8601. |
2021-01-21T17:12:35.232Z |
| Executor |
object |
Deprecated. This parameter is no longer used. |
|
| OwnerId |
string |
Deprecated. This parameter is no longer used. |
110973******7793 |
| Encryption |
object |
The encryption details. This parameter is valid only for MaxCompute resources. |
|
| Enabled |
boolean |
Indicates whether encryption is enabled. |
false |
| Algorithm |
string |
The encryption algorithm. |
AESCTR |
| Key |
string |
The encryption key. |
DEFAULT |
| ResourceType |
string |
The type of the resource. Valid values:
|
MaxCompute |
| Labels |
array<object> |
The list of labels. |
|
|
object |
Details of a label. |
||
| Key |
string |
The key of the label. |
system.supported.dsw |
| Value |
string |
The value of the label. |
true |
| TotalCount |
integer |
The total number of entries that match the filter criteria. |
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.