ALIYUN::ARMS::EnvCustomJob类型用于创建环境的自定义Job。
语法
{
"Type": "ALIYUN::ARMS::EnvCustomJob",
"Properties": {
"ConfigYaml": String,
"EnvironmentId": String,
"EnvCustomJobName": String,
"AliyunLang": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
ConfigYaml |
String |
是 |
是 |
自定义作业的YAML配置字符串。 |
无 |
|
EnvCustomJobName |
String |
是 |
否 |
自定义作业的名称。 |
无 |
|
EnvironmentId |
String |
是 |
否 |
环境实例的ID。 |
无 |
|
AliyunLang |
String |
否 |
否 |
语言。 |
有效值: zh和en。默认值:zh。 |
返回值
Fn::GetAtt
-
EnvironmentId:环境实例的ID。
-
EnvCustomJobName:自定义作业的名称。
-
ConfigYaml:自定义作业的YAML配置字符串。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
EnvironmentId:
Type: String
Description:
en: The ID of the environment instance.
zh: 环境实例的ID。
Required: true
EnvCustomJobName:
Type: String
Description:
en: The name of the custom job.
zh: 自定义作业的名称。
Required: true
ConfigYaml:
Type: String
Description:
en: The YAML configuration string of the custom job.
zh: 自定义作业的YAML配置字符串。
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::ARMS::EnvCustomJob
Properties:
EnvironmentId:
Ref: EnvironmentId
EnvCustomJobName:
Ref: EnvCustomJobName
ConfigYaml:
Ref: ConfigYaml
Outputs:
EnvironmentId:
Description:
en: The ID of the environment instance.
zh: 环境实例的ID。
Value:
Fn::GetAtt:
- ExtensionResource
- EnvironmentId
EnvCustomJobName:
Description:
en: The name of the custom job.
zh: 自定义作业的名称。
Value:
Fn::GetAtt:
- ExtensionResource
- EnvCustomJobName
ConfigYaml:
Description:
en: The YAML configuration string of the custom job.
zh: 自定义作业的YAML配置字符串。
Value:
Fn::GetAtt:
- ExtensionResource
- ConfigYaml
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EnvironmentId": {
"Type": "String",
"Description": {
"en": "The ID of the environment instance.",
"zh": "环境实例的ID。"
},
"Required": true
},
"EnvCustomJobName": {
"Type": "String",
"Description": {
"en": "The name of the custom job.",
"zh": "自定义作业的名称。"
},
"Required": true
},
"ConfigYaml": {
"Type": "String",
"Description": {
"en": "The YAML configuration string of the custom job.",
"zh": "自定义作业的YAML配置字符串。"
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ARMS::EnvCustomJob",
"Properties": {
"EnvironmentId": {
"Ref": "EnvironmentId"
},
"EnvCustomJobName": {
"Ref": "EnvCustomJobName"
},
"ConfigYaml": {
"Ref": "ConfigYaml"
}
}
}
},
"Outputs": {
"EnvironmentId": {
"Description": {
"en": "The ID of the environment instance.",
"zh": "环境实例的ID。"
},
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvironmentId"
]
}
},
"EnvCustomJobName": {
"Description": {
"en": "The name of the custom job.",
"zh": "自定义作业的名称。"
},
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvCustomJobName"
]
}
},
"ConfigYaml": {
"Description": {
"en": "The YAML configuration string of the custom job.",
"zh": "自定义作业的YAML配置字符串。"
},
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ConfigYaml"
]
}
}
}
}
该文章对您有帮助吗?