Query resources
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bdrc:DescribeResources |
none |
*All Resource
|
None | None |
Request syntax
GET /api/v1/resources HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
No |
The resource type. |
ACS::ECS::Instance |
| ResourceId |
string |
No |
The resource ID. For example, for an instance, this is the instance ID. |
i-0003***110 |
| FailedRuleTemplate |
string |
No |
A filter for rules that failed the scoring. |
rule-000c***yc9 |
| NextToken |
string |
No |
The pagination token. The service returns a token if the response is truncated. To retrieve the next page of results, include this token in your next request. If no token is returned, all results have been retrieved. |
cae**********699 |
| MaxResults |
integer |
No |
The page size. Default: 10. Maximum: 100. Values less than 10 are set to 10, and values greater than 100 are set to 100. |
10 |
| SortBy |
string |
No |
The sort key. |
protectionScore |
| SortOrder |
string |
No |
The sort order. Valid values:
|
ASC |
| StorageClass |
string |
No |
The storage class. |
ARCHIVE |
| DataRedundancyType |
string |
No |
The data redundancy type. |
LRS |
| ResourceCategoryId |
string |
No |
The ID of the resource category. |
rc-000***123 |
| ResourceRegionId |
string |
No |
The resource region ID. |
cn-hangzhou |
| ResourceArn |
string |
No |
The Resource ARN. |
acs:ecs:cn-hangzhou:123***7890:instance/i-123***7890 |
| ResourceOwnerIds |
array |
No |
A list of resource owner IDs. Use this parameter for cross-account scenarios. If you omit this parameter, the service returns data for the current account by default. |
[123***7890] |
|
integer |
No |
The resource owner ID. |
123***7890 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
BaseResponse<ListResult |
||
| Data |
object |
The response data. |
|
| Content |
array<object> |
The list of returned resources. |
|
|
object |
|||
| ResourceArn |
string |
The unique resource ARN. |
acs:ecs:cn-hangzhou:xxxxxxxx:instance/xxxxx |
| ProductType |
string |
The type of the cloud service. |
ecs |
| ResourceType |
string |
The resource type. |
ACS::ECS::Instance |
| ResourceId |
string |
The resource ID. |
i-xxxxxxxx |
| ResourceName |
string |
The name of the resource. |
test server |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| ZoneId |
string |
The zone ID. |
cn-hangzhou-i |
| VpcId |
string |
The VPC ID. |
vpc-xxxxxxxx |
| VSwitchId |
string |
The vSwitch ID. |
vsw-xxxxxxxx |
| CreateTime |
integer |
The UNIX timestamp that indicates when the resource was created. |
1697798340 |
| Status |
string |
The resource status. |
Running |
| TotalDataSize |
integer |
The total amount of data. |
0 |
| StandardDataSize |
integer |
The amount of data in the Standard storage class. |
0 |
| IaDataSize |
integer |
The amount of data in the Infrequent Access (IA) storage class. |
0 |
| ArchiveDataSize |
integer |
The amount of data in the Archive storage class. |
0 |
| ColdArchiveDataSize |
integer |
The amount of data in the Cold Archive storage class. |
0 |
| EnableCheck |
boolean |
Indicates whether data protection scoring is enabled for the resource. |
0 |
| ProtectionScore |
integer |
The data protection score of the resource. |
0 |
| ProtectionScoreUpdatedTime |
integer |
The UNIX timestamp that indicates when the score was last updated. |
0 |
| RiskCount |
integer |
The number of check items with potential risks. |
0 |
| CheckFailedCount |
integer |
The number of failed check items. |
0 |
| StorageClass |
string |
The storage class of the resource. |
STANDARD |
| DataRedundancyType |
string |
The data redundancy type. |
LRS |
| ResourceOwnerId |
integer |
The resource owner ID. |
123***7890 |
| NextToken |
string |
The pagination token to retrieve the next page of results. If this parameter is empty, all results have been returned. |
fb836242f4225fa0f0e0257362dfc6dd |
| MaxResults |
integer |
The maximum number of resources to return on each page. |
100 |
| TotalCount |
integer |
The total number of resources that match the query criteria. This parameter is optional and is not returned by default. |
149 |
| RequestId |
string |
The request ID. |
700683DE-0154-56D4-8D76-3B7A2C2C7DF9 |
Examples
Success response
JSON format
{
"Data": {
"Content": [
{
"ResourceArn": "acs:ecs:cn-hangzhou:xxxxxxxx:instance/xxxxx\n",
"ProductType": "ecs",
"ResourceType": "ACS::ECS::Instance\n",
"ResourceId": "i-xxxxxxxx\n",
"ResourceName": "test server",
"RegionId": "cn-hangzhou",
"ZoneId": "cn-hangzhou-i",
"VpcId": "vpc-xxxxxxxx",
"VSwitchId": "vsw-xxxxxxxx",
"CreateTime": 1697798340,
"Status": "Running",
"TotalDataSize": 0,
"StandardDataSize": 0,
"IaDataSize": 0,
"ArchiveDataSize": 0,
"ColdArchiveDataSize": 0,
"EnableCheck": true,
"ProtectionScore": 0,
"ProtectionScoreUpdatedTime": 0,
"RiskCount": 0,
"CheckFailedCount": 0,
"StorageClass": "STANDARD",
"DataRedundancyType": "LRS",
"ResourceOwnerId": 0
}
],
"NextToken": "fb836242f4225fa0f0e0257362dfc6dd",
"MaxResults": 100,
"TotalCount": 149
},
"RequestId": "700683DE-0154-56D4-8D76-3B7A2C2C7DF9"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.