DATASOURCE::ECS::AutoSnapshotPolicies is used to query automatic snapshot policies.
Syntax
{
"Type": "DATASOURCE::ECS::AutoSnapshotPolicies",
"Properties": {
"ResourceGroupId": String,
"AutoSnapshotPolicyId": String,
"Tags": List,
"RefreshOptions": String
}
}
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. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Key | String | Yes | No | The tag key. | The tag key must be 1 to 128 characters in length, and cannot contain |
Value | String | No | No | The tag value. | The tag value can be up to 128 characters in length, and cannot contain |
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 points in time at which automatic snapshots are created. | The time is displayed in UTC+8. Valid values: 0 to 23. The values correspond to the 24 on-the-hour points in time from 00:00:00 to 23:00:00. Unit: hour. For example, a value of |
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 automatic snapshots. | Valid values:
Unit: day. |
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: day. Cycle: week. For example, a value of |
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"
]
}
}
}
}