Queries one or more policies.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hbr:DescribePoliciesV2 |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NextToken |
string |
No |
The token required to retrieve the next page of policies. |
caeba0bbb2be03f84eb48b699f0a |
| MaxResults |
integer |
No |
The number of results per query. Valid values: 10 to 100. Default value: 10. |
10 |
| PolicyId |
string |
No |
The policy ID. |
po-000************2l6 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
DescribePoliciesResponse |
||
| Policies |
array<object> |
The list of policies. |
|
|
array<object> |
The policy details. |
||
| CreatedTime |
integer |
The creation time. UNIX timestamp, in seconds. |
1650248136 |
| UpdatedTime |
integer |
The update time. UNIX timestamp, in seconds. |
1662080404 |
| PolicyId |
string |
The policy ID. |
po-000************bkz |
| PolicyName |
string |
The policy name. |
Daily backup + geo-redundancy backup |
| PolicyDescription |
string |
The policy description. |
Back up every day at 10:00 AM and replicate to Shanghai |
| Rules |
array<object> |
The list of policy rules. |
|
|
array<object> |
The policy rule details. |
||
| RuleId |
string |
The rule ID. |
rule-000************f1e |
| RuleType |
string |
The rule type. Each policy must have at least one BACKUP rule and exactly one TRANSITION rule. Valid values:
|
BACKUP |
| Schedule |
string |
This parameter is required only when RuleType is set to BACKUP. The backup schedule. Optional format:
|
I|1648647166|P1D |
| BackupType |
string |
This parameter is required only when RuleType is set to BACKUP. The backup type. The value is COMPLETE, which indicates a full backup. |
COMPLETE |
| VaultId |
string |
This parameter is required only when RuleType is set to BACKUP. The backup vault ID. |
v-000**************kgm |
| ReplicationRegionId |
string |
This parameter is required only when RuleType is set to REPLICATION. The destination region ID for replication. |
cn-shanghai |
| Retention |
integer |
This parameter is required only when RuleType is set to TRANSITION or REPLICATION.
|
7 |
| RetentionRules |
array<object> |
This parameter is required only when RuleType is set to TRANSITION. The list of special retention rules. |
|
|
object |
The special retention rule. |
||
| AdvancedRetentionType |
string |
The type of the special retention rule. Valid values:
|
YEARLY |
| WhichSnapshot |
integer |
The backup to which the rule applies. Currently, only the first backup is supported. The value is 1. |
1 |
| Retention |
integer |
The special retention period of the backup. Minimum value: 1. Unit: days. |
730 |
| ArchiveDays |
integer |
This parameter is required only when RuleType is set to TRANSITION. The number of days after which the backup is converted to archive storage. Unit: days. |
30 |
| KeepLatestSnapshots |
integer |
Specifies whether to retain at least one backup version. Valid values:
|
1 |
| DataSourceFilters |
array<object> |
This parameter is required only when RuleType is set to TAG. The data source filter rules. |
|
|
object |
|||
| SourceType |
string |
The data source type. Valid values:
|
UDM_ECS |
DataSourceIds
deprecated
|
array |
Deprecated. |
Deprecated. |
deprecated
|
string |
Deprecated. |
Deprecated |
| TagFilters |
array<object> |
This parameter is required only when RuleType is set to TAG. The resource tag filter rules. |
|
|
object |
|||
| Key |
string |
The tag key. |
env |
| Value |
string |
The tag value. An empty value indicates any value. |
prod |
| Operator |
string |
The tag matching rule. Valid values:
|
EQUAL |
| Immutable |
boolean |
This parameter is valid only when PolicyType is set to UDM_ECS_ONLY. Specifies whether to enable backup locking. |
true |
| PolicyBindingCount |
integer |
The number of data sources bound to the policy. |
5 |
| PolicyType |
string |
The policy type. Valid values:
|
STANDARD |
| BusinessStatus |
string |
The user business status. |
ACTIVE |
| NextToken |
string |
The token required to retrieve the next page of policies. |
caeba0bbb2be03f84eb48b699f0a |
| MaxResults |
integer |
The number of results per query. Valid values: 10 to 100. Default value: 10. |
10 |
| TotalCount |
integer |
The total number of records. |
12 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Code |
string |
The response code. 200 indicates success. |
200 |
| Message |
string |
The returned message. The value "successful" is returned for a successful request. An error message is returned for a failed request. |
successful |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Examples
Success response
JSON format
{
"Policies": [
{
"CreatedTime": 1650248136,
"UpdatedTime": 1662080404,
"PolicyId": "po-000************bkz",
"PolicyName": "Daily backup + offsite backup",
"PolicyDescription": "Data is backed up at 10:00:00 every day and replicated to the China (Shanghai) region.",
"Rules": [
{
"RuleId": "rule-000************f1e",
"RuleType": "BACKUP",
"Schedule": "I|1648647166|P1D",
"BackupType": "COMPLETE",
"VaultId": "v-000**************kgm",
"ReplicationRegionId": "cn-shanghai",
"Retention": 7,
"RetentionRules": [
{
"AdvancedRetentionType": "YEARLY",
"WhichSnapshot": 1,
"Retention": 730
}
],
"ArchiveDays": 30,
"KeepLatestSnapshots": 1,
"DataSourceFilters": [
{
"SourceType": "UDM_ECS",
"DataSourceIds": [
"Deprecated"
]
}
],
"TagFilters": [
{
"Key": "env",
"Value": "prod",
"Operator": "EQUAL"
}
],
"Immutable": true
}
],
"PolicyBindingCount": 5,
"PolicyType": "STANDARD",
"BusinessStatus": "ACTIVE"
}
],
"NextToken": "caeba0bbb2be03f84eb48b699f0a",
"MaxResults": 10,
"TotalCount": 12,
"Success": true,
"Code": "200",
"Message": "successful",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.