Queries 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.1Request parameters
Parameter | Type | Required | Description | Example |
ResourceType | string | No | The resource type. | ACS::ECS::Instance |
ResourceId | string | No | The resource ID. For example, when the resource to be queried is an instance, this parameter can be interpreted as InstanceId. | i-0003***110 |
FailedRuleTemplate | string | No | The filter for rules that failed the scoring. | rule-000c***yc9 |
NextToken | string | No | The pagination token. If more entries are to be returned on the next page, a pagination token is returned. Note If this parameter returns data, it indicates that there is a next page. You can use the returned NextToken as a request parameter to obtain the next page of data, until it returns Null, indicating that all data has been obtained. | cae**********699 |
MaxResults | integer | No | The number of entries to return on each page. The maximum value is 100. If you do not set this parameter or set it to a value less than 10, the default value is 10. If you set this parameter to a value that is greater than 100, the default value is 100. | 10 |
SortBy | string | No | The sort method. | protectionScore |
SortOrder | string | No |
| ASC |
StorageClass | string | No | ARCHIVE | |
DataRedundancyType | string | No | LRS | |
ResourceCategoryId | string | No | rc-000***123 | |
ResourceRegionId | string | No | cn-hangzhou | |
ResourceArn | string | No | acs:ecs:cn-hangzhou:123***7890:instance/i-123***7890 |
Response parameters
Parameter | Type | Description | Example |
object | |||
| Data | object | The returned data. | |
| Content | array<object> | The collection of records returned by this request. | |
object | |||
ResourceArn | string | The resource ARN, which is globally unique. | acs:ecs:cn-hangzhou:xxxxxxxx:instance/xxxxx |
ProductType | string | The cloud product type. | ecs |
ResourceType | string | The resource type. | ACS::ECS::Instance |
ResourceId | string | The unique identifier of the resource. | i-xxxxxxxx |
ResourceName | string | The name of the resource. | test server |
RegionId | string | The region. | cn-hangzhou |
ZoneId | string | The zone. | cn-hangzhou-i |
VpcId | string | The VPC ID. | vpc-xxxxxxxx |
VSwitchId | string | The vSwitch ID. | vsw-xxxxxxxx |
CreateTime | integer | The time when the resource was created. | 1697798340 |
Status | string | The status of the resource. | Running |
TotalDataSize | integer | The data size. | 0 |
StandardDataSize | integer | The standard type data size. | 0 |
IaDataSize | integer | The infrequent access type data size. | 0 |
ArchiveDataSize | integer | The archive type data size. | 0 |
ColdArchiveDataSize | integer | The Cold Archive type data size. | 0 |
EnableCheck | boolean | Indicates whether data protection scoring evaluation is enabled. | 0 |
ProtectionScore | integer | The resource protection score. | 0 |
ProtectionScoreUpdatedTime | integer | The time when the score was updated. | 0 |
RiskCount | integer | The number of check items with threats. | 0 |
CheckFailedCount | integer | The number of failed check items. | 0 |
StorageClass | string | The data storage type. | |
DataRedundancyType | string | The data redundancy type. | |
NextToken | string | Indicates the position where the current call returns data. An empty value indicates that all data has been read. | fb836242f4225fa0f0e0257362dfc6dd |
MaxResults | integer | The maximum number of records returned by this request. | 100 |
TotalCount | integer | The total number of data records under the current request conditions. This parameter is optional and may not be returned by default. | 149 |
RequestId | string | The unique ID of the request. | 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": "",
"DataRedundancyType": ""
}
],
"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.