DATASOURCE::ECS::AutoSnapshotPolicies is used to query automatic snapshot policies.
Syntax
{
"Type": "DATASOURCE::ECS::AutoSnapshotPolicies",
"Properties": {
"ResourceGroupId": String,
"AutoSnapshotPolicyId": String,
"Tags": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ResourceGroupId | String | No | Yes | The ID of the resource group. | None. |
AutoSnapshotPolicyId | String | No | Yes | The ID of the automatic snapshot policy. | None. |
Tags | List | No | Yes | The tags of the automatic snapshot policy. | You can add up to 20 tags.
For more information, see Tags properties. |
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Key | String | Yes | No | The key of the tag. | The tag key must be 1 to 128 characters in length, and cannot contain http:// or https:// . The tag key cannot start with aliyun or acs: .
|
Value | String | No | No | The value of the tag. | The tag value can be up to 128 characters in length, and cannot contain http:// or https:// . The tag value cannot start with aliyun or acs: .
|
Return values (Fn::GetAtt)
- AutoSnapshotPolicyIds: the IDs of the automatic snapshot policies.
- AutoSnapshotPolicies: details of the automatic snapshot policies.
Property | Type | Description | Constraint |
---|---|---|---|
AutoSnapshotPolicyIds | List | The IDs of the automatic snapshot policies. | None. |
AutoSnapshotPolicies | List | Details of the automatic snapshot policies. | None. |
TimePoints | String | The hours of a day at which automatic snapshots are created. | The time is displayed in UTC+8.
Valid values: 0 to 23. The values specify a total of 24 hours from 00:00:00 to 23:00:00. Unit: hours. For example, the value |
Status | String | The state of the automatic snapshot policy. | Valid values:
|
AutoSnapshotPolicyName | String | The name of the automatic snapshot policy. | None. |
AutoSnapshotPolicyId | String | The ID of the automatic snapshot policy. | None. |
RetentionDays | Number | The retention period of the automatic snapshot policy. | Valid values:
Unit: days. |
DiskNums | Number | The number of cloud disks to which the automatic snapshot policy is applied. | None. |
RepeatWeekdays | String | The days of a week on which automatic snapshots are created. | Valid values: 1 to 7.
Unit: days. Cycle: week. For example, the value |
VolumeNums | Number | The number of extended volumes to which the automatic snapshot policy is applied. | None. |
ResourceGroupId | String | The ID of the resource group. | None. |
Tags | List | The tags of the automatic snapshot policy. | None. |
Examples
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"AutoSnapshotPolicies1": {
"Type": "DATASOURCE::ECS::AutoSnapshotPolicies",
"Properties": {
"AutoSnapshotPolicyId": "sp-bp1acz3malct92k6****"
}
}
},
"Outputs": {
"AutoSnapshotPolicyIds": {
"Value": {
"Fn::GetAtt": [
"AutoSnapshotPolicies1",
"AutoSnapshotPolicyIds"
]
}
},
"AutoSnapshotPolicies": {
"Value": {
"Fn::GetAtt": [
"AutoSnapshotPolicies1",
"AutoSnapshotPolicies"
]
}
}
}
}