All Products
Search
Document Center

CloudOps Orchestration Service:ACS-ECS-ScheduleToExecuteTemplate

Last Updated:Dec 17, 2024

Template name

ACS-ECS-ScheduleToExecuteTemplate

Execute Now

Template description

Executes a specific template as scheduled.

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Type

Required

Default value

Limit

timerTrigger

The type of the scheduled task.

Json

Yes

templateName

The template name.

String

Yes

templateParameters

The parameters that trigger the execution template.

Json

Yes

OOSAssumeRole

The Resource Access Management (RAM) role that is assumed by CloudOps Orchestration Service (OOS).

String

No

OOSServiceRole

Output parameters

None

Permission policy that is required to execute the template

{
    "Version": "1",
    "Statement": []
}

References

For more information, see ACS-ECS-ScheduleToExecuteTemplate.yml at GitHub.

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: Schedules to execute specified template
  zh-cn: the description in Chinese
  name-en: ACS-ECS-ScheduleToExecuteTemplate
  zh-cn: the description in Chinese
  categories:
    - time_trigger
Parameters:
  timerTrigger:
    Type: Json
    Label:
      en: TimerTrigger
      zh-cn: the description in Chinese
    AssociationProperty: ALIYUN::OOS::Component::TimerTrigger
    AssociationPropertyMetadata:
      MinuteInterval: 30
  templateName:
    Type: String
    Label:
      en: TemplateName
      zh-cn: the description in Chinese
    AssociationProperty: TemplateName
  templateParameters:
    Label:
      en: TemplateParemeters
      zh-cn: the description in Chinese
    Type: Json
    AssociationProperty: TemplateParameter
    AssociationPropertyMetadata:
      TemplateName: templateName
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: the description in Chinese
    Type: String
    Default: OOSServiceRole
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: timerTrigger
    Action: 'ACS::TimerTrigger'
    Description:
      en: Triggers a task as scheduled by specifying type and expression
      zh-cn: the description in Chinese
    Properties:
      Type:
        'Fn::Select':
          - type
          - '{{timerTrigger}}'
      Expression:
        'Fn::Select':
          - expression
          - '{{timerTrigger}}'
      EndDate:
        'Fn::Select':
          - endDate
          - '{{ timerTrigger }}'
      TimeZone:
        'Fn::Select':
          - timeZone
          - '{{ timerTrigger }}'
  - Name: executeTemplate
    Action: 'ACS::Template'
    Description:
      en: Execute template
      zh-cn: the description in Chinese
    Properties:
      TemplateName: '{{ templateName }}'
      Parameters: '{{ templateParameters }}'