All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ENS::Snapshot

最終更新日:Apr 10, 2024

ALIYUN::ENS::Snapshot is used to create a snapshot.

Syntax

{
  "Type": "ALIYUN::ENS::Snapshot",
  "Properties": {
    "Description": String,
    "EnsRegionId": String,
    "SnapshotName": String,
    "DiskId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Description

String

No

Yes

The description of the snapshot.

The description must be 2 to 256 characters in length, and cannot start with http:// or https://.

EnsRegionId

String

Yes

No

The ID of the Edge Node Service (ENS) node.

None.

SnapshotName

String

No

Yes

The snapshot name.

The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).

DiskId

String

Yes

No

The ID of the cloud disk.

None.

Return values

Fn::GetAtt

SnapShotId: the snapshot ID.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Description:
        AssociationProperty: TextArea
        Description:
          en: 'The description of the snapshot. The description must be 2 to 256 characters
            in length and cannot start with http:// or https://.
    
            By default, this parameter is left empty.'
        Required: false
        Type: String
      DiskId:
        Description:
          en: The ID of the cloud disk.
        Required: true
        Type: String
      EnsRegionId:
        Description:
          en: The ID of the edge node.
        Required: true
        Type: String
      SnapshotName:
        Description:
          en: The name of the snapshot. The name must be 2 to 128 characters in length.
            It must start with a letter and cannot start with http:// or https://. It
            can contain letters, digits, colons (:), underscores (_), and hyphens (-).
        Required: false
        Type: String
    Resources:
      Snapshot:
        Properties:
          Description:
            Ref: Description
          DiskId:
            Ref: DiskId
          EnsRegionId:
            Ref: EnsRegionId
          SnapshotName:
            Ref: SnapshotName
        Type: ALIYUN::ENS::Snapshot
    Outputs:
      SnapShotId:
        Description: The ID of the snapshot.
        Value:
          Fn::GetAtt:
          - Snapshot
          - SnapShotId
                            
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Description": {
          "AssociationProperty": "TextArea",
          "Type": "String",
          "Description": {
            "en": "The description of the snapshot. The description must be 2 to 256 characters in length and cannot start with http:// or https://.\nBy default, this parameter is left empty."
          },
          "Required": false
        },
        "EnsRegionId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the edge node."
          },
          "Required": true
        },
        "SnapshotName": {
          "Type": "String",
          "Description": {
            "en": "The name of the snapshot. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-)."
          },
          "Required": false
        },
        "DiskId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the cloud disk."
          },
          "Required": true
        }
      },
      "Resources": {
        "Snapshot": {
          "Type": "ALIYUN::ENS::Snapshot",
          "Properties": {
            "Description": {
              "Ref": "Description"
            },
            "EnsRegionId": {
              "Ref": "EnsRegionId"
            },
            "SnapshotName": {
              "Ref": "SnapshotName"
            },
            "DiskId": {
              "Ref": "DiskId"
            }
          }
        }
      },
      "Outputs": {
        "SnapShotId": {
          "Description": "The ID of the snapshot.",
          "Value": {
            "Fn::GetAtt": [
              "Snapshot",
              "SnapShotId"
            ]
          }
        }
      }
    }