ALIYUN::ApiGateway::Backend

ALIYUN::ApiGateway::Backend类型用于创建后端服务。

语法

{
  "Type": "ALIYUN::ApiGateway::Backend",
  "Properties": {
    "BackendName": String,
    "BackendType": String,
    "Description": String,
    "Tags": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

BackendName

String

后端服务名称。

BackendType

String

后端服务类型。

取值:

  • HTTP

  • VPC

  • FC_EVENT

  • FC_EVENT_V3

  • FC_HTTP

  • FC_HTTP_V3

  • OSS

  • MOCK

Description

String

描述信息。

Tags

List

标签。

更多信息,请参考Tags属性

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

Value

String

标签值。

返回值

Fn::GetAtt

BackendId:后端服务 ID

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  BackendName:
    Type: String
    Description:
      en: The name of the backend service.
    Required: true
  BackendType:
    Type: String
    Description:
      en: 'The type the backend service. Allowed values: HTTP, VPC, FC_EVENT, FC_EVENT_V3, FC_HTTP, FC_HTTP_V3, OSS, MOCK'
    AllowedValues:
      - HTTP
      - VPC
      - FC_EVENT
      - FC_EVENT_V3
      - FC_HTTP
      - FC_HTTP_V3
      - OSS
      - MOCK
    Required: true
Resources:
  Backend:
    Type: ALIYUN::ApiGateway::Backend
    Properties:
      BackendName:
        Ref: BackendName
      BackendType:
        Ref: BackendType
Outputs:
  BackendId:
    Description: The ID of the backend service.
    Value:
      Fn::GetAtt:
        - Backend
        - BackendId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "BackendName": {
      "Type": "String",
      "Description": {
        "en": "The name of the backend service."
      },
      "Required": true
    },
    "BackendType": {
      "Type": "String",
      "Description": {
        "en": "The type the backend service. Allowed values: HTTP, VPC, FC_EVENT, FC_EVENT_V3, FC_HTTP, FC_HTTP_V3, OSS, MOCK"
      },
      "AllowedValues": [
        "HTTP",
        "VPC",
        "FC_EVENT",
        "FC_EVENT_V3",
        "FC_HTTP",
        "FC_HTTP_V3",
        "OSS",
        "MOCK"
      ],
      "Required": true
    }
  },
  "Resources": {
    "Backend": {
      "Type": "ALIYUN::ApiGateway::Backend",
      "Properties": {
        "BackendName": {
          "Ref": "BackendName"
        },
        "BackendType": {
          "Ref": "BackendType"
        }
      }
    }
  },
  "Outputs": {
    "BackendId": {
      "Description": "The ID of the backend service.",
      "Value": {
        "Fn::GetAtt": [
          "Backend",
          "BackendId"
        ]
      }
    }
  }
}