ALIYUN::FC::Version类型用于发布版本。

语法

{
  "Type": "ALIYUN::FC::Version",
  "Properties": {
    "ServiceName": String,
    "Description": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
ServiceName String 函数计算服务名称
Description String 版本描述信息

返回值

Fn::GetAtt

  • VersionId:版本ID。
  • ServiceName:函数计算服务名称。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      Version:
        Type: ALIYUN::FC::Version
        Properties:
          ServiceName: TestService
    Outputs:
      VersionId:
        Description: The version ID
        Value:
          Fn::GetAtt:
            - Version
            - VersionId
      ServiceName:
        Description: The service name
        Value:
          Fn::GetAtt:
            - Version
            - ServiceName
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "Version": {
          "Type": "ALIYUN::FC::Version",
          "Properties": {
            "ServiceName": "TestService"
          }
        }
      },
      "Outputs": {
        "VersionId": {
          "Description": "The version ID",
          "Value": {
            "Fn::GetAtt": [
              "Version",
              "VersionId"
            ]
          }
        },
        "ServiceName": {
          "Description": "The service name",
          "Value": {
            "Fn::GetAtt": [
              "Version",
              "ServiceName"
            ]
          }
        }
      }
    }