Todos os produtos
Search
Central de documentação

CloudOps Orchestration Service:ACS-ECS-ScheduleToBulkyCreateSnapshot

Última atualização: Jun 28, 2026

Nome do modelo

ACS-ECS-ScheduleToBulkyCreateSnapshot Criação agendada de snapshots em lote

Executar agora

Descrição do modelo

Crie snapshots de vários discos simultaneamente conforme agendamento.

Tipo de modelo

Automatizado

Proprietário

Alibaba Cloud

Parâmetros de entrada

Parâmetro

Descrição

Tipo

Obrigatório

Valor padrão

Limite

timerTrigger

Agendamento da tarefa.

Json

Sim

diskIds

IDs dos discos para criação de snapshots.

List

Sim

regionId

ID da região.

String

Não

{{ ACS::RegionId }}

retentionDays

Período de retenção dos snapshots.

Number

Não

0

tags

Tags para adicionar aos snapshots.

Json

Não

[]

rateControl

Configurações de controle de taxa para execução simultânea.

Json

Não

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

OOSAssumeRole

Função do RAM que o OOS assume.

String

Não

OOSServiceRole

Parâmetros de saída

Parâmetro

Descrição

Tipo

createdSnapshotIds

List

Política de permissões necessária para executar o modelo

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

Detalhes

Para obter mais informações, consulte ACS-ECS-ScheduleToBulkyCreateSnapshot.yml no GitHub.

Conteúdo do modelo

FormatVersion: OOS-2019-06-01
Description:
  en: Schedules the batch creation of snapshots.
  name-en: ACS-ECS-ScheduleToBulkyCreateSnapshot
Parameters:
  regionId:
    Label:
      en: Region ID
    Type: String
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  timerTrigger:
    Type: Json
    Label:
      en: Schedule
    AssociationProperty: ALIYUN::OOS::Component::TimerTrigger
    AssociationPropertyMetadata:
      MinuteInterval: 30
  diskIds:
    Label:
      en: Disk IDs
    AssociationProperty: ALIYUN::ECS::Disk::DiskId
    AssociationPropertyMetadata:
      RegionId: regionId
    Type: List
  retentionDays:
    Label:
      en: Retention Period (Days)
    Description:
      en: The retention period of the snapshots, in days. After the retention period expires, the snapshots are automatically released. A value of 0 indicates that the snapshots are not automatically released.
    Type: Number
    MaxValue: 65536
    MinValue: 0
    Default: 0
  tags:
    Label:
      en: Snapshot Tags
    Type: Json
    AssociationProperty: Tags
    AssociationPropertyMetadata:
      ShowSystem: false
    Default: []
  rateControl:
    Label:
      en: Concurrency Control
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: RAM Role for OOS
    Type: String
    Default: OOSServiceRole
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: timerTrigger
    Action: ACS::TimerTrigger
    Description:
      en: Triggers the task on a schedule.
    Properties:
      Type:
        Fn::Select:
          - type
          - '{{timerTrigger}}'
      Expression:
        Fn::Select:
          - expression
          - '{{timerTrigger}}'
      StartDate:
        Fn::Select:
          - startDate
          - '{{ timerTrigger }}'
      EndDate:
        Fn::Select:
          - endDate
          - '{{ timerTrigger }}'
      TimeZone:
        Fn::Select:
          - timeZone
          - '{{ timerTrigger }}'
  - Name: createSnapshot
    Action: ACS::ECS::CreateSnapshot
    Description:
      en: Creates a snapshot for a disk.
    Properties:
      regionId: '{{ regionId }}'
      diskId: '{{ ACS::TaskLoopItem }}'
      retentionDays:
        Fn::If:
          - Fn::Equals:
              - '{{ retentionDays }}'
              - 0
          - ''
          - '{{ retentionDays }}'
      tags: '{{ tags }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ diskIds }}'
      Outputs:
        snapshotIds:
          AggregateType: Fn::ListJoin
          AggregateField: snapshotId
Outputs:
  createdSnapshotIds:
    Type: List
    Value: '{{ createSnapshot.snapshotIds }}'