All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::APIG::PluginAttachment

更新時間:Jan 07, 2025

ALIYUN::APIG::PluginAttachment is used to bind a plug-in.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

PluginInfo

Map

Yes

No

The information about the plug-in that you want to bind to the Cloud-native API Gateway instance.

For more information, see PluginInfo properties.

AttachResourceIds

List

No

Yes

The IDs of the resources to which you want to bind the plug-in.

You can specify up to 10 resource IDs.

AttachResourceId

String

No

No

The ID of the resource to which you want to bind the plug-in.

None.

AttachResourceType

String

No

No

The type of the resource to which you want to bind the plug-in.

None.

EnvironmentId

String

No

No

The ID of the environment.

None.

Enable

Boolean

No

Yes

Specifies whether to enable the plug-in.

Default value: false.

PluginInfo syntax

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

PluginInfo properties

Property

Type

Required

Editable

Description

Constraint

GatewayId

String

Yes

No

The ID of the Cloud-native API Gateway instance.

None.

PluginId

String

Yes

No

The ID of the plug-in.

None.

PluginConfig

String

No

Yes

The configurations of the plug-in that you want to bind to the Cloud-native API Gateway instance.

The value of this property must be encoded in Base64.

Return values

Fn::GetAtt

  • AttachResourceIds: the IDs of the resources to which the plug-in is bound.

  • AttachResourceParentIds: the IDs of the parent resources to which the plug-in is bound.

  • PluginClassInfo: the type of the plug-in.

  • EnvironmentId: the ID of the environment.

  • PluginAttachmentId: the ID of the plug-in binding.

  • Enable: indicates whether the plug-in is enabled.

  • PluginInfo: the information about the plug-in that is bound to the Cloud-native API Gateway instance.

  • AttachResourceNames: the names of the resources to which the plug-in is bound.

  • AttachResourceId: the ID of the resource to which the plug-in is bound.

  • AttachResourceType: the type of resource to which the plug-in is bound.

Examples

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 plug-in.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AttachResourceIds
  AttachResourceParentIds:
    Description: The list of parent IDs for resources to be attached by the plug-in.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AttachResourceParentIds
  PluginClassInfo:
    Description: The type of the plug-in.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PluginClassInfo
  EnvironmentId:
    Description: The ID of the environment.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EnvironmentId
  PluginAttachmentId:
    Description: The ID of plug-in attachment.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PluginAttachmentId
  Enable:
    Description: Whether to enable this plug-in.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Enable
  PluginInfo:
    Description: The information about the association of plug-in with gateway instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PluginInfo
  AttachResourceNames:
    Description: The list of resource names to be attached by the plug-in.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AttachResourceNames
  AttachResourceId:
    Description: The resource ID to be attached by the plug-in.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AttachResourceId
  AttachResourceType:
    Description: The type of the resource to be attached by the plug-in.
    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 plug-in.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceIds"
        ]
      }
    },
    "AttachResourceParentIds": {
      "Description": "The list of parent IDs for resources to be attached by the plug-in.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceParentIds"
        ]
      }
    },
    "PluginClassInfo": {
      "Description": "The type of the plug-in.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PluginClassInfo"
        ]
      }
    },
    "EnvironmentId": {
      "Description": "The ID of the environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EnvironmentId"
        ]
      }
    },
    "PluginAttachmentId": {
      "Description": "The ID of plug-in attachment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PluginAttachmentId"
        ]
      }
    },
    "Enable": {
      "Description": "Whether to enable this plug-in.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Enable"
        ]
      }
    },
    "PluginInfo": {
      "Description": "The information about the association of plug-in with gateway instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PluginInfo"
        ]
      }
    },
    "AttachResourceNames": {
      "Description": "The list of resource names to be attached by the plug-in.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceNames"
        ]
      }
    },
    "AttachResourceId": {
      "Description": "The resource ID to be attached by the plug-in.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceId"
        ]
      }
    },
    "AttachResourceType": {
      "Description": "The type of the resource to be attached by the plug-in.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AttachResourceType"
        ]
      }
    }
  }
}