Cria uma configuração de plugin para um gateway do Microservices Engine (MSE).
Sintaxe
{
"Type": "ALIYUN::MSE::PluginConfig",
"Properties": {
"ConfigLevel": Integer,
"Enable": Boolean,
"GatewayUniqueId": String,
"PluginId": Integer,
"Config": String,
"ResourceIdList": List
}
}
Propriedades
|
Nome da propriedade |
Tipo |
Obrigatório |
Atualização permitida |
Descrição |
Restrições |
|
ConfigLevel |
Integer |
Sim |
Não |
Escopo de aplicação do plugin. |
Valores válidos:
|
|
Enable |
Boolean |
Sim |
Sim |
Indica se o plugin está ativado. |
Nenhuma |
|
GatewayUniqueId |
String |
Sim |
Não |
ID exclusivo do gateway. |
Nenhuma |
|
PluginId |
Integer |
Sim |
Não |
ID do plugin do gateway. |
Nenhuma |
|
Config |
String |
Não |
Sim |
Configuração do plugin. |
Plugins Wasm usam formato YAML; plugins Lua usam código Lua. |
|
ResourceIdList |
List |
Não |
Sim |
Lista de IDs de nome de domínio ou de rota. |
Limite: 100 IDs. |
Valor de retorno
Fn::GetAtt
PluginConfigId: ID da configuração do plugin.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ConfigLevel:
Type: Number
Description:
en: |-
The scope of the plugin application.
- 0: Global
- 1: Route
- 2: Domain
AllowedValues:
- 0
- 1
- 2
Required: true
GatewayUniqueId:
Type: String
Description:
en: The unique ID of the gateway.
Required: true
Enable:
Type: Boolean
Description:
en: Whether to enable the plugin.
Required: true
PluginId:
Type: Number
Description:
en: The ID of the gateway plugin.
Required: true
Resources:
PluginConfig:
Type: ALIYUN::MSE::PluginConfig
Properties:
ConfigLevel:
Ref: ConfigLevel
GatewayUniqueId:
Ref: GatewayUniqueId
Enable:
Ref: Enable
PluginId:
Ref: PluginId
Outputs:
PluginConfigId:
Description: The ID of the plugin configuration.
Value:
Fn::GetAtt:
- PluginConfig
- PluginConfigId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ConfigLevel": {
"Type": "Number",
"Description": {
"en": "The scope of the plugin application.\n- 0: Global\n- 1: Route\n- 2: Domain"
},
"AllowedValues": [
0,
1,
2
],
"Required": true
},
"GatewayUniqueId": {
"Type": "String",
"Description": {
"en": "The unique ID of the gateway."
},
"Required": true
},
"Enable": {
"Type": "Boolean",
"Description": {
"en": "Whether to enable the plugin."
},
"Required": true
},
"PluginId": {
"Type": "Number",
"Description": {
"en": "The ID of the gateway plugin."
},
"Required": true
}
},
"Resources": {
"PluginConfig": {
"Type": "ALIYUN::MSE::PluginConfig",
"Properties": {
"ConfigLevel": {
"Ref": "ConfigLevel"
},
"GatewayUniqueId": {
"Ref": "GatewayUniqueId"
},
"Enable": {
"Ref": "Enable"
},
"PluginId": {
"Ref": "PluginId"
}
}
}
},
"Outputs": {
"PluginConfigId": {
"Description": "The ID of the plugin configuration.",
"Value": {
"Fn::GetAtt": [
"PluginConfig",
"PluginConfigId"
]
}
}
}
}