Cria um serviço de backend para o API Gateway.
Sintaxe
{
"Type": "ALIYUN::ApiGateway::Backend",
"Properties": {
"BackendName": String,
"BackendType": String,
"Description": String,
"Tags": List
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
BackendName |
String |
Sim |
Sim |
Nome do serviço de backend. |
Nenhuma. |
|
BackendType |
String |
Sim |
Não |
Tipo do serviço de backend. |
Valores válidos:
|
|
Description |
String |
Não |
Sim |
Descrição do serviço de backend. |
Nenhuma. |
|
Tags |
List |
Não |
Sim |
Tags do recurso. |
Para obter mais informações, consulte Propriedades de Tags. |
Sintaxe de Tags
"Tags": [
{
"Value": String,
"Key": String
}
]
Propriedades de Tags
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
Key |
String |
Sim |
Não |
Chave da tag. |
Nenhuma. |
|
Value |
String |
Sim |
Não |
Valor da tag. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
BackendId: ID do serviço de backend.
Exemplos
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"
]
}
}
}
}