ALIYUN::ApiGateway::Backend类型用于创建后端服务。
语法
{
"Type": "ALIYUN::ApiGateway::Backend",
"Properties": {
"BackendName": String,
"BackendType": String,
"Description": String,
"Tags": List
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
BackendName | String | 是 | 是 | 后端服务名称。 | 无 |
BackendType | String | 是 | 否 | 后端服务类型。 | 取值:
|
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"
]
}
}
}
}
该文章对您有帮助吗?