ALIYUN::SchedulerX::AppGroup

更新时间:
复制为 MD 格式

ALIYUN::SchedulerX::AppGroup类型用于创建应用分组。

语法

{
  "Type": "ALIYUN::SchedulerX::AppGroup",
  "Properties": {
    "AppName": String,
    "GroupId": String,
    "Namespace": String,
    "AppVersion": Integer,
    "AppKey": String,
    "AppType": Integer,
    "Description": String,
    "EnableLog": Boolean,
    "MonitorContacts": List,
    "MaxJobs": Integer,
    "MonitorConfig": Map,
    "NamespaceName": String,
    "NamespaceSource": String,
    "NotificationPolicyName": String,
    "ScheduleBusyWorkers": Boolean
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

AppName

String

应用名称。

GroupId

String

应用组的组ID。

Namespace

String

应用组的命名空间。

AppKey

String

应用密钥。

AppType

Integer

应用的类型。

取值:

  • 1

  • 2

AppVersion

Integer

应用的版本。

取值:

  • 1

  • 2

Description

String

应用组的描述。

EnableLog

Boolean

是否启用日志。

MaxJobs

Integer

任务的最大数量。

MonitorConfig

Map

JSON格式的监控配置。

MonitorContacts

List

JSON格式的监控联系人。

长度最大值为100。

NamespaceName

String

命名空间的名称。

NamespaceSource

String

任务的命名空间来源。

NotificationPolicyName

String

通知策略名称。

ScheduleBusyWorkers

Boolean

是否调度繁忙的worker。

返回值

Fn::GetAtt

AppGroupId:应用组的组ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  AppName:
    Type: String
    Description:
      en: The application name.
    Required: true
  Namespace:
    Type: String
    Description:
      en: The namespace of the application group.
    Required: true
  NamespaceSource:
    Type: String
    Description:
      en: The namespace source of the job.
    Default: Null
    Required: false
  GroupId:
    Type: String
    Description:
      en: The group ID of the application group.
    Required: true
  Description:
    Type: String
    Description:
      en: The description of the application group.
    AssociationProperty: TextArea
    Default: Null
    Required: false
  MaxJobs:
    Type: Number
    Description:
      en: The maximum number of jobs.
    Default: Null
    Required: false
  NamespaceName:
    Type: String
    Description:
      en: The name of the namespace.
    Default: Null
    Required: false
  AppKey:
    Type: String
    Description:
      en: The application key.
    Default: Null
    Required: false
  MonitorConfig:
    Description:
      en: The monitor configuration in JSON format.
    Required: false
    Default: Null
    Type: Json
  MonitorContacts:
    Description:
      en: The monitor contacts in JSON format.
    Required: false
    Default: Null
    Type: Json
    MaxLength: 100
  ScheduleBusyWorkers:
    Type: Boolean
    Description:
      en: Whether to schedule busy workers.
    Default: Null
    Required: false
  EnableLog:
    Type: Boolean
    Description:
      en: Whether to enable log.
    Default: Null
    Required: false
  AppType:
    Type: Number
    Description:
      en: The type of the application.
    AllowedValues:
      - 1
      - 2
    Default: Null
    Required: false
  AppVersion:
    Type: Number
    Description:
      en: The version of the application.
    AllowedValues:
      - 1
      - 2
    Default: Null
    Required: false
  NotificationPolicyName:
    Type: String
    Description:
      en: The notification policy name.
    Default: Null
    Required: false
Resources:
  AppGroup:
    Type: ALIYUN::SchedulerX::AppGroup
    Properties:
      AppName:
        Ref: AppName
      Namespace:
        Ref: Namespace
      NamespaceSource:
        Ref: NamespaceSource
      GroupId:
        Ref: GroupId
      Description:
        Ref: Description
      MaxJobs:
        Ref: MaxJobs
      NamespaceName:
        Ref: NamespaceName
      AppKey:
        Ref: AppKey
      MonitorConfig:
        Ref: MonitorConfig
      MonitorContacts:
        Ref: MonitorContacts
      ScheduleBusyWorkers:
        Ref: ScheduleBusyWorkers
      EnableLog:
        Ref: EnableLog
      AppType:
        Ref: AppType
      AppVersion:
        Ref: AppVersion
      NotificationPolicyName:
        Ref: NotificationPolicyName
Outputs:
  AppGroupId:
    Value:
      Fn::GetAtt:
        - AppGroup
        - AppGroupId
    Description: The group ID of the application group.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "AppName": {
      "Type": "String",
      "Description": {
        "en": "The application name."
      },
      "Required": true
    },
    "Namespace": {
      "Type": "String",
      "Description": {
        "en": "The namespace of the application group."
      },
      "Required": true
    },
    "NamespaceSource": {
      "Type": "String",
      "Description": {
        "en": "The namespace source of the job."
      },
      "Default": null,
      "Required": false
    },
    "GroupId": {
      "Type": "String",
      "Description": {
        "en": "The group ID of the application group."
      },
      "Required": true
    },
    "Description": {
      "Type": "String",
      "Description": {
        "en": "The description of the application group."
      },
      "AssociationProperty": "TextArea",
      "Default": null,
      "Required": false
    },
    "MaxJobs": {
      "Type": "Number",
      "Description": {
        "en": "The maximum number of jobs."
      },
      "Default": null,
      "Required": false
    },
    "NamespaceName": {
      "Type": "String",
      "Description": {
        "en": "The name of the namespace."
      },
      "Default": null,
      "Required": false
    },
    "AppKey": {
      "Type": "String",
      "Description": {
        "en": "The application key."
      },
      "Default": null,
      "Required": false
    },
    "MonitorConfig": {
      "Description": {
        "en": "The monitor configuration in JSON format."
      },
      "Required": false,
      "Default": null,
      "Type": "Json"
    },
    "MonitorContacts": {
      "Description": {
        "en": "The monitor contacts in JSON format."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "MaxLength": 100
    },
    "ScheduleBusyWorkers": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to schedule busy workers."
      },
      "Default": null,
      "Required": false
    },
    "EnableLog": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to enable log."
      },
      "Default": null,
      "Required": false
    },
    "AppType": {
      "Type": "Number",
      "Description": {
        "en": "The type of the application."
      },
      "AllowedValues": [
        1,
        2
      ],
      "Default": null,
      "Required": false
    },
    "AppVersion": {
      "Type": "Number",
      "Description": {
        "en": "The version of the application."
      },
      "AllowedValues": [
        1,
        2
      ],
      "Default": null,
      "Required": false
    },
    "NotificationPolicyName": {
      "Type": "String",
      "Description": {
        "en": "The notification policy name."
      },
      "Default": null,
      "Required": false
    }
  },
  "Resources": {
    "AppGroup": {
      "Type": "ALIYUN::SchedulerX::AppGroup",
      "Properties": {
        "AppName": {
          "Ref": "AppName"
        },
        "Namespace": {
          "Ref": "Namespace"
        },
        "NamespaceSource": {
          "Ref": "NamespaceSource"
        },
        "GroupId": {
          "Ref": "GroupId"
        },
        "Description": {
          "Ref": "Description"
        },
        "MaxJobs": {
          "Ref": "MaxJobs"
        },
        "NamespaceName": {
          "Ref": "NamespaceName"
        },
        "AppKey": {
          "Ref": "AppKey"
        },
        "MonitorConfig": {
          "Ref": "MonitorConfig"
        },
        "MonitorContacts": {
          "Ref": "MonitorContacts"
        },
        "ScheduleBusyWorkers": {
          "Ref": "ScheduleBusyWorkers"
        },
        "EnableLog": {
          "Ref": "EnableLog"
        },
        "AppType": {
          "Ref": "AppType"
        },
        "AppVersion": {
          "Ref": "AppVersion"
        },
        "NotificationPolicyName": {
          "Ref": "NotificationPolicyName"
        }
      }
    }
  },
  "Outputs": {
    "AppGroupId": {
      "Value": {
        "Fn::GetAtt": [
          "AppGroup",
          "AppGroupId"
        ]
      },
      "Description": "The group ID of the application group."
    }
  }
}