DATASOURCE::ECS::AutoSnapshotPolicy类型用于查询单个自动快照策略。
语法
{
"Type": "DATASOURCE::ECS::AutoSnapshotPolicy",
"Properties": {
"AutoSnapshotPolicyId": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
AutoSnapshotPolicyId | String | 是 | 是 | 自动快照策略 ID。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
返回值
Fn::GetAtt
TimePoints:指定自动快照的创建时间点。
VolumeNums:启用该策略的拓展卷数量。
ResourceGroupId:资源组 ID。
CreateTime:创建时间。
RetentionDays:指定自动快照的保留时间。
RepeatWeekdays:指定自动快照的重复日期。
AutoSnapshotPolicyName:自动快照策略的名称。
DiskNums:启用该策略的云盘数量。
Tags:自动快照策略的标签键值集合。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
AutoSnapshotPolicyId:
Type: String
Description:
en: The name of the automatic snapshot policy.
Required: true
Resources:
ExtensionDataSource:
Type: DATASOURCE::ECS::AutoSnapshotPolicy
Properties:
AutoSnapshotPolicyId:
Ref: AutoSnapshotPolicyId
Outputs:
TimePoints:
Description: The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
Value:
Fn::GetAtt:
- ExtensionDataSource
- TimePoints
VolumeNums:
Description: The number of extended volumes to which the automatic snapshot policy is applied.
Value:
Fn::GetAtt:
- ExtensionDataSource
- VolumeNums
TargetCopyRegions:
Description: ''
Value:
Fn::GetAtt:
- ExtensionDataSource
- TargetCopyRegions
ResourceGroupId:
Description: The ID of the resource group.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ResourceGroupId
EnableCrossRegionCopy:
Description: ''
Value:
Fn::GetAtt:
- ExtensionDataSource
- EnableCrossRegionCopy
CreateTime:
Description: The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
Value:
Fn::GetAtt:
- ExtensionDataSource
- CreateTime
RetentionDays:
Description: |-
The retention period of the automatic snapshot. Unit: days. Valid values:
- -1: The automatic snapshot is retained until it is deleted.
- 1 to 65536: The automatic snapshot is retained for the specified number of days.
Value:
Fn::GetAtt:
- ExtensionDataSource
- RetentionDays
RepeatWeekdays:
Description: 'The days of the week on which to create automatic snapshots. Valid values: 1 to 7, which correspond to the days of the week. 1 indicates Monday. One or more days can be specified.'
Value:
Fn::GetAtt:
- ExtensionDataSource
- RepeatWeekdays
AutoSnapshotPolicyName:
Description: Name of the automatic snapshot policy.
Value:
Fn::GetAtt:
- ExtensionDataSource
- AutoSnapshotPolicyName
DiskNums:
Description: Number of cloud disks with this policy enabled.
Value:
Fn::GetAtt:
- ExtensionDataSource
- DiskNums
Tags:
Description: The tags of the automatic snapshot policy.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Tags
CopiedSnapshotsRetentionDays:
Description: ''
Value:
Fn::GetAtt:
- ExtensionDataSource
- CopiedSnapshotsRetentionDays
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"AutoSnapshotPolicyId": {
"Type": "String",
"Description": {
"en": "The name of the automatic snapshot policy."
},
"Required": true
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::ECS::AutoSnapshotPolicy",
"Properties": {
"AutoSnapshotPolicyId": {
"Ref": "AutoSnapshotPolicyId"
}
}
}
},
"Outputs": {
"TimePoints": {
"Description": "The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"TimePoints"
]
}
},
"VolumeNums": {
"Description": "The number of extended volumes to which the automatic snapshot policy is applied.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"VolumeNums"
]
}
},
"TargetCopyRegions": {
"Description": "",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"TargetCopyRegions"
]
}
},
"ResourceGroupId": {
"Description": "The ID of the resource group.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ResourceGroupId"
]
}
},
"EnableCrossRegionCopy": {
"Description": "",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"EnableCrossRegionCopy"
]
}
},
"CreateTime": {
"Description": "The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CreateTime"
]
}
},
"RetentionDays": {
"Description": "The retention period of the automatic snapshot. Unit: days. Valid values:\n- -1: The automatic snapshot is retained until it is deleted.\n- 1 to 65536: The automatic snapshot is retained for the specified number of days.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"RetentionDays"
]
}
},
"RepeatWeekdays": {
"Description": "The days of the week on which to create automatic snapshots. Valid values: 1 to 7, which correspond to the days of the week. 1 indicates Monday. One or more days can be specified.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"RepeatWeekdays"
]
}
},
"AutoSnapshotPolicyName": {
"Description": "Name of the automatic snapshot policy.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"AutoSnapshotPolicyName"
]
}
},
"DiskNums": {
"Description": "Number of cloud disks with this policy enabled.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"DiskNums"
]
}
},
"Tags": {
"Description": "The tags of the automatic snapshot policy.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Tags"
]
}
},
"CopiedSnapshotsRetentionDays": {
"Description": "",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CopiedSnapshotsRetentionDays"
]
}
}
}
}
该文章对您有帮助吗?