All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::AutoSnapshotPolicy

更新時間:Sep 13, 2024

DATASOURCE::ECS::AutoSnapshotPolicy is used to query an automatic snapshot policy.

Syntax

{
  "Type": "DATASOURCE::ECS::AutoSnapshotPolicy",
  "Properties": {
    "AutoSnapshotPolicyId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

AutoSnapshotPolicyId

String

Yes

Yes

The ID of the automatic snapshot policy.

None.

Return values

Fn::GetAtt

  • TimePoints: the points in time at which the automatic snapshots are created.

  • VolumeNums: the number of extended volumes to which the automatic snapshot policy is applied.

  • ResourceGroupId: the ID of the resource group.

  • CreateTime: the creation time.

  • RetentionDays: the retention periods of the automatic snapshots.

  • RepeatWeekdays: the days of the week on which the automatic snapshots are created.

  • AutoSnapshotPolicyName: the name of the automatic snapshot policy.

  • DiskNums: the number of cloud disks to which the automatic snapshot policy is applied.

  • Tags: the tag keys and tag values of the automatic snapshot policy.

Examples

  • YAML format

    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
    
  • JSON format

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