ALIYUN::MSE::PluginConfig类型用于创建插件配置。
语法
{
"Type": "ALIYUN::MSE::PluginConfig",
"Properties": {
"ConfigLevel": Integer,
"Enable": Boolean,
"GatewayUniqueId": String,
"PluginId": Integer,
"Config": String,
"ResourceIdList": List
}
}属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ConfigLevel | Integer | 是 | 否 | 插件应用范围。 | 取值:
|
Enable | Boolean | 是 | 是 | 是否开启插件。 | 无 |
GatewayUniqueId | String | 是 | 否 | 网关唯一 ID。 | 无 |
PluginId | Integer | 是 | 否 | 网关插件 ID。 | 无 |
Config | String | 否 | 是 | 插件配置。 | Wasm 插件配置内容是 YAML 格式,Lua 插件配置内容是 Lua 代码。 |
ResourceIdList | List | 否 | 是 | 域名 ID/路由 ID 列表。 | 最多支持100组ID配置。 |
返回值
Fn::GetAtt
PluginConfigId:插件配置 ID。
示例
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 config.
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 config.",
"Value": {
"Fn::GetAtt": [
"PluginConfig",
"PluginConfigId"
]
}
}
}
}
该文章对您有帮助吗?