Importa um serviço para um gateway do Microservices Engine (MSE).
Sintaxe
{
"Type": "ALIYUN::MSE::GatewayService",
"Properties": {
"GatewayUniqueId": String,
"Name": String,
"SourceType": String,
"DnsServerList": List,
"FcVersion": String,
"FcAlias": String,
"FcServiceName": String,
"GroupName": String,
"Ips": List,
"Namespace": String,
"ServicePort": Integer,
"SaeAppId": String,
"SourceId": Integer,
"ServiceProtocol": String,
"TlsSetting": Map
}
}
Propriedades
|
Nome da propriedade |
Tipo |
Obrigatório |
Atualização permitida |
Descrição |
Restrições |
|
GatewayUniqueId |
String |
Sim |
Não |
ID exclusivo do gateway. |
Nenhuma |
|
Name |
String |
Sim |
Não |
Nome do serviço. |
Nenhuma |
|
SourceType |
String |
Sim |
Não |
Tipo de origem do serviço. |
Valores válidos:
|
|
DnsServerList |
List |
Não |
Não |
Servidores DNS. |
Nenhuma |
|
FcVersion |
String |
Não |
Não |
Versão do serviço FC. |
Aplica-se apenas quando SourceType está definido como FC. |
|
FcAlias |
String |
Não |
Não |
Alias do serviço FC. |
Aplica-se apenas quando SourceType está definido como FC. |
|
FcServiceName |
String |
Não |
Não |
Nome do serviço FC. |
Aplica-se apenas quando SourceType está definido como FC. |
|
GroupName |
String |
Não |
Não |
Grupo do serviço. |
Nenhuma |
|
Ips |
List |
Não |
Não |
Endereços IP. |
Nenhuma |
|
Namespace |
String |
Não |
Não |
Namespace. |
Nenhuma |
|
ServicePort |
Integer |
Não |
Não |
Número da porta do serviço. |
Nenhuma |
|
SaeAppId |
String |
Não |
Não |
ID do aplicativo SAE. |
Nenhuma |
|
SourceId |
Integer |
Não |
Não |
ID da origem do serviço. |
Usado ao adicionar um serviço de uma origem específica. |
|
ServiceProtocol |
String |
Não |
Não |
Protocolo do serviço. |
Valores válidos:
|
|
TlsSetting |
Map |
Não |
Não |
Configurações TLS. |
Valores:
Exemplo:
|
Valores de retorno
Fn::GetAtt
ServiceId: ID do serviço de gateway.
Name: nome do serviço.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SourceType:
Type: String
Description:
en: |
Type of service source. Valid values:
- MSE: MSE-NACOS
- K8s: ACK container service
- VIP: Fixed address
- DNS: DNS domain name
- FC: Function Compute
- EDAS: EDAS
- MSE_ZK: MSE-Zookeeper
- SAE: SAE
AllowedValues:
- MSE
- K8s
- VIP
- DNS
- FC
- EDAS
- MSE_ZK
- SAE
Required: true
Name:
Type: String
Description:
en: Name of the service.
Required: true
GatewayUniqueId:
Type: String
Description:
en: Unique identifier of the gateway.
Required: true
Resources:
GatewayService:
Type: ALIYUN::MSE::GatewayService
Properties:
SourceType:
Ref: SourceType
Name:
Ref: Name
GatewayUniqueId:
Ref: GatewayUniqueId
Outputs:
ServiceId:
Description: The ID of the gateway service.
Value:
Fn::GetAtt:
- GatewayService
- ServiceId
Name:
Description: The name of the service.
Value:
Fn::GetAtt:
- GatewayService
- Name
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SourceType": {
"Type": "String",
"Description": {
"en": "Type of service source. Valid values:\n- MSE: MSE-NACOS\n- K8s: ACK container service\n- VIP: Fixed address\n- DNS: DNS domain name\n- FC: Function Compute\n- EDAS: EDAS\n- MSE_ZK: MSE-Zookeeper\n- SAE: SAE\n"
},
"AllowedValues": [
"MSE",
"K8s",
"VIP",
"DNS",
"FC",
"EDAS",
"MSE_ZK",
"SAE"
],
"Required": true
},
"Name": {
"Type": "String",
"Description": {
"en": "Name of the service."
},
"Required": true
},
"GatewayUniqueId": {
"Type": "String",
"Description": {
"en": "Unique identifier of the gateway."
},
"Required": true
}
},
"Resources": {
"GatewayService": {
"Type": "ALIYUN::MSE::GatewayService",
"Properties": {
"SourceType": {
"Ref": "SourceType"
},
"Name": {
"Ref": "Name"
},
"GatewayUniqueId": {
"Ref": "GatewayUniqueId"
}
}
}
},
"Outputs": {
"ServiceId": {
"Description": "The ID of the gateway service.",
"Value": {
"Fn::GetAtt": [
"GatewayService",
"ServiceId"
]
}
},
"Name": {
"Description": "The name of the service.",
"Value": {
"Fn::GetAtt": [
"GatewayService",
"Name"
]
}
}
}
}