ALIYUN::APIG::Plugin

ALIYUN::APIG::Plugin类型用于创建插件。

语法

{
  "Type": "ALIYUN::APIG::Plugin",
  "Properties": {
    "GatewayId": String,
    "PluginClassId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

GatewayId

String

云原生 API 网关 ID。

PluginClassId

String

插件类的ID。

返回值

Fn::GetAtt

  • PluginClassId:插件类的ID。

  • GatewayName:云原生 API 网关名称。

  • GatewayId:云原生 API 网关 ID。

  • PluginId:插件ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  PluginClassId:
    Type: String
    Description:
      en: The ID of the plugin class.
    Required: true
  GatewayId:
    Type: String
    AssociationProperty: ALIYUN::APIG::Gateway::GatewayId
    Description:
      en: The ID of the Gateway.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::APIG::Plugin
    Properties:
      PluginClassId:
        Ref: PluginClassId
      GatewayId:
        Ref: GatewayId
Outputs:
  PluginClassId:
    Description: The ID of the plugin class.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PluginClassId
  GatewayName:
    Description: The name of the gateway.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GatewayName
  GatewayId:
    Description: The ID of the Gateway.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GatewayId
  PluginId:
    Description: The ID of the plugin.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PluginId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "PluginClassId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the plugin class."
      },
      "Required": true
    },
    "GatewayId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::APIG::Gateway::GatewayId",
      "Description": {
        "en": "The ID of the Gateway."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::APIG::Plugin",
      "Properties": {
        "PluginClassId": {
          "Ref": "PluginClassId"
        },
        "GatewayId": {
          "Ref": "GatewayId"
        }
      }
    }
  },
  "Outputs": {
    "PluginClassId": {
      "Description": "The ID of the plugin class.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PluginClassId"
        ]
      }
    },
    "GatewayName": {
      "Description": "The name of the gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GatewayName"
        ]
      }
    },
    "GatewayId": {
      "Description": "The ID of the Gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GatewayId"
        ]
      }
    },
    "PluginId": {
      "Description": "The ID of the plugin.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PluginId"
        ]
      }
    }
  }
}