全部产品
Search
文档中心

CloudOps Orchestration Service:ACS-ECS-BulkyCreateSnapshot

更新时间:Dec 21, 2025

Nama Template

ACS-ECS-BulkyCreateSnapshot

Eksekusi Sekarang

Deskripsi Template

Membuat snapshot untuk beberapa disk sekaligus.

Tipe Template

Otomatis

Pemilik

Alibaba Cloud

Parameter Permintaan

Parameter

Deskripsi

Tipe

Diperlukan

Nilai Default

Batasan

diskIds

Disk ID

List

Ya

regionId

ID wilayah.

String

Tidak

{{ ACS::RegionId }}

retentionDays

Jangka waktu penyimpanan snapshot.

Angka

Tidak

0

tags

Tag dari snapshot.

Json

Tidak

[]

rateControl

Rasio konkurensi eksekusi tugas

Json

Tidak

{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}

OOSAssumeRole

Peran Resource Access Management (RAM) yang diasumsikan oleh CloudOps Orchestration Service (OOS).

String

Tidak

""

Parameter Output

Parameter

Deskripsi

Tipe

createdSnapshotIds

List

Kebijakan Izin yang Diperlukan untuk Menjalankan Template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:CreateSnapshot",
                "ecs:DescribeDisks",
                "ecs:DescribeInstances",
                "ecs:DescribeSnapshots"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Rincian

Untuk informasi lebih lanjut, lihat ACS-ECS-BulkyCreateSnapshot.yml di GitHub.

Konten Template

FormatVersion: OOS-2019-06-01
Description:
  en: Bulky create snapshot
  zh-cn: Creates snapshots for multiple disks.
  name-en: ACS-ECS-BulkyCreateSnapshot
  name-zh-cn: Create Snapshots for Multiple Disks
  categories:
    - data_backup
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
      zh-cn: Region ID
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  diskIds:
    Label:
      en: DiskIds
      zh-cn: Disk IDs
    Type: List
    AssociationProperty: ALIYUN::ECS::Disk::DiskId
    AssociationPropertyMetadata:
      RegionId: regionId
  retentionDays:
    Label:
      en: RetentionDays
      zh-cn: Snapshot Retention Period
    Description:
      en: The unit is days. Snapshots are automatically released after the retention period expires. The default value is 0, which means the snapshot is never automatically released.
      zh-cn: The unit is days. Snapshots are automatically released after the retention period expires. A value of 0 means that the snapshot is never automatically released.
    Type: Number
    MaxValue: 65536
    MinValue: 0
    Default: 0
  tags:
    Label:
      en: Tags
      zh-cn: Snapshot Tags
    Type: Json
    AssociationProperty: Tags
    AssociationPropertyMetadata:
      ShowSystem: false
    Default: []
  rateControl:
    Label:
      en: RateControl
      zh-cn: Task Execution Concurrency
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: RAM Role Assumed by OOS
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: createSnapshot
    Action: 'ACS::ECS::CreateSnapshot'
    Description:
      en: Create a snapshot for a cloud disk
      zh-cn: Creates a snapshot for a disk.
    Properties:
      regionId: '{{ regionId }}'
      diskId: '{{ ACS::TaskLoopItem }}'
      tags: '{{ tags }}'
      retentionDays:
        Fn::If:
          - Fn::Equals:
            - '{{ retentionDays }}'
            - 0
          - ''
          - '{{ retentionDays }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ diskIds }}'
      Outputs:
        snapshotIds:
          AggregateType: 'Fn::ListJoin'
          AggregateField: snapshotId
Outputs:
  createdSnapshotIds:
    Type: List
    Value: '{{ createSnapshot.snapshotIds }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - diskIds
          - retentionDays
          - tags
        Label:
          default:
            zh-cn: Configuration Parameters
            en: Configure Parameters
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Advanced Options
            en: Control Options