ALIYUN::APIG::PluginAttachment

更新时间:
复制 MD 格式

ALIYUN::APIG::PluginAttachment类型用于绑定插件。

语法

{
  "Type": "ALIYUN::APIG::PluginAttachment",
  "Properties": {
    "PluginInfo": Map,
    "AttachResourceIds": List,
    "AttachResourceId": String,
    "AttachResourceType": String,
    "EnvironmentId": String,
    "Enable": Boolean
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

PluginInfo

Map

是

是

插件与网关实例关联的信息。

更多信息,请参见PluginInfo属性。

AttachResourceIds

List

否

是

插件绑定的资源ID列表。

最多支持配置10组资源ID。

AttachResourceId

String

否

否

插件绑定的资源ID。

无

AttachResourceType

String

否

否

插件绑定的资源类型。

无

EnvironmentId

String

否

否

环境 id。

无

Enable

Boolean

否

是

是否启用此插件。

默认值为 false。

PluginInfo语法

"PluginInfo": {
  "PluginConfig": String,
  "GatewayId": String,
  "PluginId": String
}

PluginInfo属性

属性名称

类型

必须

允许更新

描述

约束

GatewayId

String

是

否

网关ID。

无

PluginId

String

是

否

插件ID。

无

PluginConfig

String

否

是

插件与网关实例关联的信息。

此参数的值必须使用Base64编码进行传输。

返回值

Fn::GetAtt

  • AttachResourceIds:插件绑定的资源ID列表。

  • AttachResourceParentIds:插件绑定的父资源ID列表。

  • PluginClassInfo:插件类型。

  • EnvironmentId:环境ID。

  • PluginAttachmentId:插件绑定ID。

  • Enable:是否启用此插件。

  • PluginInfo:插件与网关实例关联的信息。

  • AttachResourceNames:插件绑定的资源名称列表。

  • AttachResourceId:插件绑定的资源ID。

  • AttachResourceType:插件绑定的资源类型。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  GatewayId:
    AssociationProperty: ALIYUN::APIG::Gateway::GatewayId
    Type: String
Resources:
  ExtensionResource:
    Type: ALIYUN::APIG::PluginAttachment
    Properties:
      AttachResourceIds:
        - Ref: GatewayId
      PluginInfo:
        PluginId: pl-xxxxxxx
        GatewayId:
          Ref: GatewayId
      AttachResourceId: gw-xxxxxxx
      AttachResourceType: Gateway
Outputs:
  AttachResourceIds:
    Description: The list of resource IDs to be attached by the plugin.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AttachResourceIds
  AttachResourceParentIds:
    Description: The list of parent IDs for resources to be attached by the plugin.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AttachResourceParentIds
  PluginClassInfo:
    Description: The type of the plugin.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PluginClassInfo
  EnvironmentId:
    Description: The ID of the environment.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EnvironmentId
  PluginAttachmentId:
    Description: The ID of plugin attachment.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PluginAttachmentId
  Enable:
    Description: Whether to enable this plugin.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Enable
  PluginInfo:
    Description: The information about the association of plugin with gateway instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PluginInfo
  AttachResourceNames:
    Description: The list of resource names to be attached by the plugin.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AttachResourceNames
  AttachResourceId:
    Description: The resource ID to be attached by the plugin.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AttachResourceId
  AttachResourceType:
    Description: The type of the resource to be attached by the plugin.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AttachResourceType
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GatewayId": {
      "AssociationProperty": "ALIYUN::APIG::Gateway::GatewayId",
      "Type": "String"
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::APIG::PluginAttachment",
      "Properties": {
        "AttachResourceIds": [
          {
            "Ref": "GatewayId"
          }
        ],
        "PluginInfo": {
          "PluginId": "pl-xxxxxxx",
          "GatewayId": {
            "Ref": "GatewayId"
          }
        },
        "AttachResourceId": "gw-xxxxxxx",
        "AttachResourceType": "Gateway"
      }
    }
  },
  "Outputs": {
    "AttachResourceIds": {
      "Description": "The list of resource IDs to be attached by the plugin.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceIds"
        ]
      }
    },
    "AttachResourceParentIds": {
      "Description": "The list of parent IDs for resources to be attached by the plugin.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceParentIds"
        ]
      }
    },
    "PluginClassInfo": {
      "Description": "The type of the plugin.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PluginClassInfo"
        ]
      }
    },
    "EnvironmentId": {
      "Description": "The ID of the environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EnvironmentId"
        ]
      }
    },
    "PluginAttachmentId": {
      "Description": "The ID of plugin attachment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PluginAttachmentId"
        ]
      }
    },
    "Enable": {
      "Description": "Whether to enable this plugin.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Enable"
        ]
      }
    },
    "PluginInfo": {
      "Description": "The information about the association of plugin with gateway instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PluginInfo"
        ]
      }
    },
    "AttachResourceNames": {
      "Description": "The list of resource names to be attached by the plugin.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceNames"
        ]
      }
    },
    "AttachResourceId": {
      "Description": "The resource ID to be attached by the plugin.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceId"
        ]
      }
    },
    "AttachResourceType": {
      "Description": "The type of the resource to be attached by the plugin.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceType"
        ]
      }
    }
  }
}