All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::APIG::Plugin

Last Updated:Dec 27, 2024

ALIYUN::APIG::Plugin is used to create a plug-in.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

GatewayId

String

Yes

No

The ID of the Cloud-native API Gateway instance.

None.

PluginClassId

String

Yes

No

The ID of the plug-in class.

None.

Return values

Fn::GetAtt

  • PluginClassId: the ID of the plug-in class.

  • GatewayName: the name of the Cloud-native API Gateway instance.

  • GatewayId: the ID of the Cloud-native API Gateway instance.

  • PluginId: the ID of the plug-in.

Examples

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"
        ]
      }
    }
  }
}