ALIYUN::OOS::DeployRevision

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

修订类型。

取值:

  • GitRepo

  • Oss

  • EcsImage

  • DockerImage

  • Command

返回值

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"
        ]
      }
    }
  }
}