Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::APIG::PluginAttachment

Última atualização: Jun 27, 2026

O recurso ALIYUN::APIG::PluginAttachment vincula um plugin a um recurso do Cloud-native API Gateway.

Sintaxe

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

Propriedades

Nome da propriedade

Tipo

Obrigatório

Permite atualizações

Descrição

Restrição

PluginInfo

Map

Sim

Sim

Detalhes do plugin para a instância do Cloud-native API Gateway.

Propriedades de PluginInfo

AttachResourceIds

List

Não

Sim

IDs dos recursos para vinculação do plugin.

Especifique até 10 IDs de recursos.

AttachResourceId

String

Não

Não

ID do recurso para vinculação do plugin.

Nenhuma.

AttachResourceType

String

Não

Não

Tipo do recurso para vinculação do plugin.

Nenhuma.

EnvironmentId

String

Não

Não

ID do ambiente.

Nenhuma.

Enable

Boolean

Não

Sim

Indica se o plugin deve ser ativado.

Valor padrão: false.

Sintaxe de PluginInfo

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

Propriedades de PluginInfo

Nome da propriedade

Tipo

Obrigatório

Permite atualizações

Descrição

Restrição

GatewayId

String

Sim

Não

ID do gateway.

Nenhuma.

PluginId

String

Sim

Não

ID do plugin.

Nenhuma.

PluginConfig

String

Não

Sim

Detalhes da associação do plugin à instância do gateway.

O valor deve estar codificado em Base64.

Valores de retorno

Fn::GetAtt

  • AttachResourceIds: IDs dos recursos vinculados ao plugin.

  • AttachResourceParentIds: IDs dos recursos pai vinculados ao plugin.

  • PluginClassInfo: tipo do plugin.

  • EnvironmentId: ID do ambiente.

  • PluginAttachmentId: ID do vínculo do plugin.

  • Enable: indica se o plugin está ativado.

  • PluginInfo: detalhes do plugin vinculado à instância do Cloud-native API Gateway.

  • AttachResourceNames: nomes dos recursos vinculados ao plugin.

  • AttachResourceId: ID do recurso vinculado ao plugin.

  • AttachResourceType: tipo do recurso vinculado ao plugin.

Exemplos

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