ALIYUN::SchedulerX::WorkFlow

更新时间:
复制 MD 格式

ALIYUN::SchedulerX::WorkFlow类型用于创建工作流。

语法

{
  "Type": "ALIYUN::SchedulerX::WorkFlow",
  "Properties": {
    "GroupId": String,
    "Namespace": String,
    "TimeType": Integer,
    "WorkflowName": String,
    "Description": String,
    "MaxConcurrency": Integer,
    "NamespaceSource": String,
    "Timezone": String,
    "TimeExpression": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

GroupId

String

应用组 ID。

Namespace

String

命名空间 ID。

TimeType

Integer

时间类型。

目前支持以下几种时间类型:

  • cron:1

  • api:100

WorkflowName

String

工作流名称。

Description

String

工作流描述。

MaxConcurrency

Integer

同时运行的工作流实例最大数量。

默认值为 1,即上次触发未完成时,即使到达运行时间也不会执行下一次触发。

NamespaceSource

String

需要特殊第三方。

TimeExpression

String

时间表达式。

根据所选时间类型进行设置。

- cron:填写标准 Cron 表达式,支持在线验证。

- api:无时间表达式。

Timezone

String

时区。

返回值

Fn::GetAtt

  • WorkFlowId:工作流 ID。

  • Description:工作流描述。

  • WorkflowName:工作流名称。

  • MaxConcurrency:同时运行的工作流实例最大数量,默认值为 1,即上次触发未完成时,即使到达运行时间也不会执行下一次触发。

  • TimeExpression:时间表达式,根据所选时间类型进行设置。

  • Namespace:命名空间 ID,可从控制台命名空间页面获取。

  • TimeType:时间类型。

  • GroupId:应用组 ID,可从控制台应用管理页面获取。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Description:
    AssociationProperty: TextArea
    Description:
      en: Workflow description.
    Required: false
    Type: String
  GroupId:
    Description:
      en: The application Group ID, which is obtained from the application management
        page of the console.
    Required: true
    Type: String
  MaxConcurrency:
    Description:
      en: The maximum number of workflow instances running at the same time. The default
        value is 1, that is, the last trigger is not completed, and the next trigger
        will not be performed even when the running time is reached.
    Required: false
    Type: Number
  Namespace:
    Description:
      en: The namespace ID, which is obtained from the namespace page in the console.
    Required: true
    Type: String
  NamespaceSource:
    Description:
      en: Special third parties are required.
    Required: false
    Type: String
  TimeExpression:
    Description:
      en: 'Time expression, which is set based on the selected time type.

        - cron: Fill in standard cron expressions to support online verification.

        - api: No time expression.'
    Required: false
    Type: String
  TimeType:
    AllowedValues:
      - 1
      - 100
    Description:
      en: 'Time type. Currently, the following time types are supported:

        - cron: 1

        - api: 100.'
    Required: true
    Type: Number
  Timezone:
    Description:
      en: Time Zone.
    Required: false
    Type: String
  WorkflowName:
    Description:
      en: Workflow Name.
    Required: true
    Type: String
Resources:
  ExtensionResource:
    Properties:
      Description:
        Ref: Description
      GroupId:
        Ref: GroupId
      MaxConcurrency:
        Ref: MaxConcurrency
      Namespace:
        Ref: Namespace
      NamespaceSource:
        Ref: NamespaceSource
      TimeExpression:
        Ref: TimeExpression
      TimeType:
        Ref: TimeType
      Timezone:
        Ref: Timezone
      WorkflowName:
        Ref: WorkflowName
    Type: ALIYUN::SchedulerX::WorkFlow
Outputs:
  Description:
    Description: Workflow description.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Description
  GroupId:
    Description: The application Group ID, which is obtained from the application
      management page of the console.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GroupId
  MaxConcurrency:
    Description: The maximum number of workflow instances running at the same time.
      The default value is 1, that is, the last trigger is not completed, and the
      next trigger will not be performed even when the running time is reached.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - MaxConcurrency
  Namespace:
    Description: The namespace ID, which is obtained from the namespace page in the
      console.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Namespace
  TimeExpression:
    Description: Time expression, which is set based on the selected time type.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TimeExpression
  TimeType:
    Description: Time type.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TimeType
  WorkFlowId:
    Description: workflow id.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - WorkFlowId
  WorkflowName:
    Description: Workflow Name.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - WorkflowName
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Timezone": {
      "Type": "String",
      "Description": {
        "en": "Time Zone."
      },
      "Required": false
    },
    "Description": {
      "Type": "String",
      "AssociationProperty": "TextArea",
      "Description": {
        "en": "Workflow description."
      },
      "Required": false
    },
    "WorkflowName": {
      "Type": "String",
      "Description": {
        "en": "Workflow Name."
      },
      "Required": true
    },
    "NamespaceSource": {
      "Type": "String",
      "Description": {
        "en": "Special third parties are required."
      },
      "Required": false
    },
    "MaxConcurrency": {
      "Type": "Number",
      "Description": {
        "en": "The maximum number of workflow instances running at the same time. The default value is 1, that is, the last trigger is not completed, and the next trigger will not be performed even when the running time is reached."
      },
      "Required": false
    },
    "TimeExpression": {
      "Type": "String",
      "Description": {
        "en": "Time expression, which is set based on the selected time type.\n- cron: Fill in standard cron expressions to support online verification.\n- api: No time expression."
      },
      "Required": false
    },
    "Namespace": {
      "Type": "String",
      "Description": {
        "en": "The namespace ID, which is obtained from the namespace page in the console."
      },
      "Required": true
    },
    "TimeType": {
      "Type": "Number",
      "Description": {
        "en": "Time type. Currently, the following time types are supported:\n- cron: 1\n- api: 100."
      },
      "AllowedValues": [
        1,
        100
      ],
      "Required": true
    },
    "GroupId": {
      "Type": "String",
      "Description": {
        "en": "The application Group ID, which is obtained from the application management page of the console."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::SchedulerX::WorkFlow",
      "Properties": {
        "Timezone": {
          "Ref": "Timezone"
        },
        "Description": {
          "Ref": "Description"
        },
        "WorkflowName": {
          "Ref": "WorkflowName"
        },
        "NamespaceSource": {
          "Ref": "NamespaceSource"
        },
        "MaxConcurrency": {
          "Ref": "MaxConcurrency"
        },
        "TimeExpression": {
          "Ref": "TimeExpression"
        },
        "Namespace": {
          "Ref": "Namespace"
        },
        "TimeType": {
          "Ref": "TimeType"
        },
        "GroupId": {
          "Ref": "GroupId"
        }
      }
    }
  },
  "Outputs": {
    "WorkFlowId": {
      "Description": "workflow id.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "WorkFlowId"
        ]
      }
    },
    "Description": {
      "Description": "Workflow description.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Description"
        ]
      }
    },
    "WorkflowName": {
      "Description": "Workflow Name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "WorkflowName"
        ]
      }
    },
    "MaxConcurrency": {
      "Description": "The maximum number of workflow instances running at the same time. The default value is 1, that is, the last trigger is not completed, and the next trigger will not be performed even when the running time is reached.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "MaxConcurrency"
        ]
      }
    },
    "TimeExpression": {
      "Description": "Time expression, which is set based on the selected time type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TimeExpression"
        ]
      }
    },
    "Namespace": {
      "Description": "The namespace ID, which is obtained from the namespace page in the console.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Namespace"
        ]
      }
    },
    "TimeType": {
      "Description": "Time type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TimeType"
        ]
      }
    },
    "GroupId": {
      "Description": "The application Group ID, which is obtained from the application management page of the console.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GroupId"
        ]
      }
    }
  }
}