ALIYUN::OOS::DeployRevision类型用于创建部署物。
语法
{
"Type": "ALIYUN::OOS::DeployRevision",
"Properties": {
"ApplicationName": String,
"Description": String,
"Hooks": Map,
"Location": Map,
"RevisionType": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ApplicationName | String | 是 | 否 | 应用名称。 | 无 |
Description | String | 否 | 否 | 修订的描述。 | 无 |
Hooks | Map | 否 | 否 | 待部署的Hook 配置。 | 无 |
Location | Map | 否 | 否 | 待部署代码的位置 | 无 |
RevisionType | String | 否 | 否 | 修订类型。 | 取值:
|
返回值
Fn::GetAtt
RevisionId:部署物 ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ApplicationName:
Type: String
Description:
en: The name of the application.
Required: true
RevisionType:
Type: String
Description:
en: The type of the revision.
AllowedValues:
- GitRepo
- Oss
- EcsImage
- DockerImage
- Command
Required: false
Resources:
DeployRevision:
Type: ALIYUN::OOS::DeployRevision
Properties:
ApplicationName:
Ref: ApplicationName
RevisionType:
Ref: RevisionType
Outputs:
RevisionId:
Description: The ID of the revision.
Value:
Fn::GetAtt:
- DeployRevision
- RevisionId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ApplicationName": {
"Type": "String",
"Description": {
"en": "The name of the application."
},
"Required": true
},
"RevisionType": {
"Type": "String",
"Description": {
"en": "The type of the revision."
},
"AllowedValues": [
"GitRepo",
"Oss",
"EcsImage",
"DockerImage",
"Command"
],
"Required": false
}
},
"Resources": {
"DeployRevision": {
"Type": "ALIYUN::OOS::DeployRevision",
"Properties": {
"ApplicationName": {
"Ref": "ApplicationName"
},
"RevisionType": {
"Ref": "RevisionType"
}
}
}
},
"Outputs": {
"RevisionId": {
"Description": "The ID of the revision.",
"Value": {
"Fn::GetAtt": [
"DeployRevision",
"RevisionId"
]
}
}
}
}
该文章对您有帮助吗?