Queries a list of data protection rules.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bdrc:DescribeRules |
none |
*All Resource
|
None | None |
Request syntax
GET /api/v1/rules HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
No |
The resource type. |
ACS::ECS::Instance |
| NextToken |
string |
No |
Specifies whether a next query token exists. Valid values: If NextToken is empty, no more results exist. If NextToken is returned, the value indicates the token for the next query. |
cae**********699 |
| MaxResults |
integer |
No |
The maximum number of entries per page for a paged query. Maximum value: 50. Default value: 10. |
10 |
| ResourceCategoryId |
string |
No |
The resource category ID. |
rc-000***123 |
| ResourceRegionId |
string |
No |
The region ID of the resource. |
cn-hangzhou |
| ResourceOwnerIds |
array |
No |
||
|
integer |
No |
123***7890 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
BaseResponse<ListResult |
||
| Data |
object |
The returned data. |
|
| Content |
array<object> |
The collection of records returned in this request. |
|
|
object |
|||
| RuleId |
string |
The unique ID of the rule. |
rule-bp11ggd8wr762 |
| ProductType |
string |
The product type to which the rule applies. |
ecs |
| ResourceType |
string |
The resource type to which the rule applies. |
ACS::ECS::Instance |
| RuleTemplate |
string |
The rule template. |
ecs-backup |
| CheckStatus |
string |
The check status. Valid values: NOT_CHECKED (Not checked), PASSED (Passed), FAILED (Failed), CHECKING (Checking), and CHECK_FAILED (Check failed). |
PASSED |
| CheckTime |
integer |
The UNIX timestamp that indicates when the check was performed. |
1704157635 |
| TotalResourceCount |
integer |
The total number of resources that were checked. |
1 |
| RiskyResourceCount |
integer |
The number of at-risk resources. |
0 |
| CheckFailedResourceCount |
integer |
The number of resources for which the check failed. |
0 |
| NextToken |
string |
The position from which the current call starts reading. An empty value indicates that all data has been read. |
0975951c75d7b41464c8d08ae17043ca |
| MaxResults |
integer |
The maximum number of records returned in this request. |
10 |
| TotalCount |
integer |
The total number of records that match the request conditions. This parameter is optional and may not be returned by default. |
42 |
| RequestId |
string |
The unique identifier of the request. |
86DEBAC9-AB6A-59AB-9E5C-A540E579ECC9 |
Examples
Success response
JSON format
{
"Data": {
"Content": [
{
"RuleId": "rule-bp11ggd8wr762",
"ProductType": "ecs",
"ResourceType": "ACS::ECS::Instance",
"RuleTemplate": "ecs-backup",
"CheckStatus": "PASSED",
"CheckTime": 1704157635,
"TotalResourceCount": 1,
"RiskyResourceCount": 0,
"CheckFailedResourceCount": 0
}
],
"NextToken": "0975951c75d7b41464c8d08ae17043ca",
"MaxResults": 10,
"TotalCount": 42
},
"RequestId": "86DEBAC9-AB6A-59AB-9E5C-A540E579ECC9"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.