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 |
否 |
否 |
应用的类型。 |
取值:
|
|
AppVersion |
Integer |
否 |
是 |
应用的版本。 |
取值:
|
|
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."
}
}
}该文章对您有帮助吗?