DATASOURCE::ECS::AutoSnapshotPolicies类型用于查询自动快照策略。

语法

{
  "Type": "DATASOURCE::ECS::AutoSnapshotPolicies",
  "Properties": {
    "ResourceGroupId": String,
    "AutoSnapshotPolicyId": String,
    "Tags": List
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
ResourceGroupId String 资源组ID。
AutoSnapshotPolicyId String 自动快照策略ID。
Tags List 自动快照策略的标签。 最多支持20个标签。

更多信息,请参见Tags属性

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称 类型 必须 允许更新 描述 约束
Key String 标签键。 长度为1~128个字符,不能以aliyunacs:开头,不能包含http://https://
Value String 标签值。 长度为0~128个字符,不能以aliyunacs:开头,不能包含http://https://

返回数据(Fn::GetAtt)

  • AutoSnapshotPolicyIds:自动快照策略ID列表。
  • AutoSnapshotPolicies:自动快照策略详情列表。
属性名称 类型 描述 约束
AutoSnapshotPolicyIds List 自动快照策略ID列表。
AutoSnapshotPolicies List 自动快照策略详情列表。
TimePoints String 自动快照的创建时间点。 使用UTC+8时间。

取值范围:0~23,代表00:00至23:00共24个时间点。

单位:小时。

取值示例:["1","3","5"],表示01:00、03:00、05:00创建自动快照。

Status String 自动快照策略的状态。 取值:
  • Normal:正常。
  • Expire:由于账号欠费无法使用该策略。
AutoSnapshotPolicyName String 自动快照策略的名称。
AutoSnapshotPolicyId String 自动快照策略ID。
RetentionDays Number 自动快照策略的保留时间。 取值:
  • -1:永久保存。
  • 1~65536:指定保存天数。

单位:天。

DiskNums Number 启用自动快照策略的云盘数量。
RepeatWeekdays String 自动快照的重复周期。 取值范围:1~7。

单位:天。

周期:星期。

取值示例:["1","3","5"],表示每周一、周三、周五重复创建自动快照。

VolumeNums Number 启用自动快照策略的拓展卷数量。
ResourceGroupId String 资源组ID。
Tags List 自动快照策略的标签。

示例

JSON格式

{
  "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"
        ]
      }
    }
  }
}