ListPluginAttachments - 获取插件挂载列表

更新时间:
复制 MD 格式

获取插件挂载列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

apig:ListPluginAttachments

none

*全部资源

*

无 无

请求语法

GET /v1/plugin-attachments HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

attachResourceId

string

否

挂载资源 ID

hr-cv2h58em1hkg7c6vt43g

attachResourceType

string

否

插件挂载点类型,暂未启用

枚举值:

  • GatewayDomain :

    GatewayDomain

  • Gateway :

    Gateway

  • GatewayRoute :

    GatewayRoute

  • HttpApi :

    HttpApi

  • Operation :

    Operation

GatewayRoute

environmentId

string

否

环境 ID。

env-crlnqhtlhtgqflkqislg

pluginId

string

否

插件 ID

pl-ct8181um1hkiqns9f6e0

gatewayId

string

否

网关 ID。

gw-cr79f75lhtgme744084g

pageNumber

integer

否

页码,默认 1

1

pageSize

integer

否

分页大小

10

attachResourceTypes

string

否

挂载点类型,多个以逗号隔开

GatewayRoute

withParentResource

boolean

否

是否需要返回父级资源挂载。

重要 为 true 时必须配合 attachResourceTypes 单值一起使用,单值取自[GatewayRoute,Operation]

false

返回参数

名称

类型

描述

示例值

object

Schema of Response

code

string

响应状态码。

Ok

data

object

响应数据。

items

array<object>

Item 详情。

object

结果对象

attachResourceType

string

插件挂载资源类型,GatewayRoute、Gateway、GatewayDomain、HttpApi、Operation

GatewayRoute

enable

boolean

是否启用。

true

environmentInfo EnvironmentInfo

环境信息。

parentResourceInfo ParentResourceInfo

父级资源信息

pluginAttachmentId

string

插件挂载 ID。

pa-d0j9t5em1hkncrlo51mg

pluginClassInfo PluginClassInfo

插件类型信息

pluginConfig

string

插件配置原文的 base64 内容

bGltaXRfYnlfaGVhZGVyOiB4LWFwaS1rZXkKbGltaXRfa2V5czoKLSBrZXk6IGV4YW1wbGUta2V5LWEKICBxdWVyeV9wZXJfc2Vjb25kOiAxMAotIGtleTogZXhhbXBsZS1rZXktYgogIHF1ZXJ5X3Blcl9zZWNvbmQ6IDEK

pluginId

string

插件 ID

pl-cvu6r4um1hko3b3ti0a0

resourceInfos

array

挂载资源信息。

ResourceInfo

挂载资源信息。

pageNumber

integer

页码。

1

pageSize

integer

分页大小。

10

totalSize

integer

总数量。

10

message

string

响应消息。

success

requestId

string

Id of the request

9640D776-794A-5077-9184-A247CA4B45C1

示例

正常返回示例

JSON格式

{
  "code": "Ok",
  "data": {
    "items": [
      {
        "attachResourceType": "GatewayRoute",
        "enable": true,
        "environmentInfo": {
          "environmentId": "env-cq7l5s5lhtgi6qasrdc0",
          "name": "test",
          "alias": "测试环境",
          "description": "这是xxx的xx项目测试环境",
          "gatewayInfo": {
            "gatewayId": "gw-cq7og15lhtgi6qasrj60",
            "name": "apitest-gw",
            "vpcInfo": {
              "vpcId": "vpc-uf664nyle5kh***",
              "name": "商品中心预发环境专有网络"
            },
            "engineVersion": "2.0.7",
            "gatewayEdition": "MultiTenantServerless"
          },
          "subDomainInfos": [
            {
              "domainId": "d-cpudb0llhtgl2djvq2sg",
              "name": "abc.com",
              "protocol": "HTTP",
              "networkType": "Intranet"
            }
          ],
          "default": false,
          "createTimestamp": 1721116090326,
          "updateTimestamp": 1721116090326,
          "resourceGroupId": "rg-xxxx"
        },
        "parentResourceInfo": {
          "apiInfo": {
            "agentProtocols": [
              "DashScope"
            ],
            "aiProtocols": [
              "OpenAI/v1"
            ],
            "authConfig": {
              "authMode": "NoAuth",
              "authType": "Jwt"
            },
            "basePath": "/v1",
            "deployCntMap": {
              "key": {
                "cnt": 10,
                "deployedCnt": 3
              }
            },
            "deployConfigs": [
              {
                "autoDeploy": true,
                "backendScene": "SingleService",
                "builtinRouteNames": [
                  "[\"chat\",\"completions\"]"
                ],
                "customDomainIds": [
                  "d-xxx"
                ],
                "customDomainInfos": [
                  {
                    "domainId": "d-cshee6dlhtgk******",
                    "name": "hello-server.com",
                    "protocol": "HTTP"
                  }
                ],
                "enableSystemModels": true,
                "envDomainIds": [
                  "d-xxx"
                ],
                "envDomainInfos": [
                  {
                    "domainId": "d-env-xxx",
                    "name": "api.example.com",
                    "protocol": "HTTPS"
                  }
                ],
                "environmentId": "env-xxx",
                "gatewayId": "gw-xx",
                "gatewayInfo": {
                  "gatewayId": "gw-cq7og15lhtgi6qasrj60",
                  "name": "apitest-gw",
                  "vpcInfo": {
                    "vpcId": "vpc-uf664nyle5kh***",
                    "name": "商品中心预发环境专有网络"
                  },
                  "engineVersion": "2.0.7",
                  "gatewayEdition": "MultiTenantServerless"
                },
                "gatewayType": "API",
                "mock": {
                  "enable": false,
                  "responseCode": 200,
                  "responseContent": "Mock测试"
                },
                "policyConfigs": [
                  {
                    "type": "K8S",
                    "enable": false,
                    "semanticRouterConfig": {
                      "timeoutMillisecond": 2000
                    },
                    "aiFallbackConfig": {
                      "onlyRedirectUpstreamCode": true,
                      "serviceConfigs": [
                        {
                          "serviceId": "svc-bbb",
                          "name": "—",
                          "targetModelName": "qwen-max",
                          "passThroughModelName": false
                        }
                      ]
                    },
                    "aiSecurityGuardConfig": {
                      "bufferLimit": 1000,
                      "checkRequest": true,
                      "checkRequestImage": false,
                      "checkResponse": true,
                      "checkResponseImage": false,
                      "consumerConfigBindings": [
                        {
                          "matchType": "exact",
                          "name": "example-consumer",
                          "templateId": "apig_0123456789abcdef"
                        }
                      ],
                      "consumerRequestCheckService": [
                        {
                          "matchType": "exact",
                          "modalityType": "Text",
                          "name": "consumer-a",
                          "requestCheckService": "query_security_check",
                          "requestImageCheckService": "img_query_guard"
                        }
                      ],
                      "consumerResponseCheckService": [
                        {
                          "matchType": "exact",
                          "modalityType": "Text",
                          "name": "consumer-a\n",
                          "responseCheckService": "query_security_check",
                          "responseImageCheckService": "img_query_guard\n"
                        }
                      ],
                      "consumerRiskLevel": [
                        {
                          "level": "high",
                          "matchType": "exact",
                          "name": "consumer-a",
                          "type": "ContentModeration"
                        }
                      ],
                      "defaultGenerated": true,
                      "longTermEnabled": true,
                      "pluginStatus": {
                        "serviceHealthy": true,
                        "pluginId": "pi-xxx",
                        "errorLogs": [
                          {
                            "key": "[{\"timestamp\":\"2026-06-29T10:00:00Z\",\"message\":\"redis connection timeout\"}]"
                          }
                        ]
                      },
                      "requestCheckService": "query_security_check",
                      "requestImageCheckService": "img_query_guard",
                      "responseCheckService": "response_security_check",
                      "responseImageCheckService": "img_response_guard",
                      "riskAlertLevel": "high",
                      "riskConfig": [
                        {
                          "consumerRules": {
                            "matchType": "Exact",
                            "pattern": "consumer-a"
                          },
                          "level": "high",
                          "type": "ContentModeration"
                        }
                      ],
                      "serviceAddress": "https://green-cip-vpc.cn-shanghai.aliyuncs.com"
                    },
                    "aiTokenRateLimitConfig": {
                      "redisConfig": {
                        "host": "r-xxx.redis.rds.aliyuncs.com",
                        "port": 6379,
                        "username": "user",
                        "password": "pass",
                        "timeout": 5000,
                        "databaseNumber": 0
                      },
                      "pluginStatus": {
                        "serviceHealthy": true,
                        "pluginId": "pi-xxx",
                        "errorLogs": [
                          {
                            "key": "[{\"timestamp\":\"2026-06-29T10:00:00Z\",\"message\":\"redis connection timeout\"}]"
                          }
                        ]
                      },
                      "rules": [
                        {
                          "limitType": "Consumer",
                          "matchKey": "X-API-Key",
                          "matchType": "Exact",
                          "matchValue": "consumer-a",
                          "limitMode": "TokenPerMinute",
                          "limitValue": 1000
                        }
                      ],
                      "globalRules": [
                        {
                          "limitType": "Consumer",
                          "matchKey": "X-API-Key",
                          "matchType": "Exact",
                          "matchValue": "consumer-a",
                          "limitMode": "TokenPerMinute",
                          "limitValue": 1000
                        }
                      ],
                      "enableGlobalRules": true
                    },
                    "policyReference": {
                      "policyId": "pol-9f2exxx",
                      "policyAttachmentId": "pa-3c8ayyy"
                    },
                    "aiCacheConfig": {
                      "cacheTTL": 3600,
                      "redisConfig": {
                        "host": "r-xxx.redis.rds.aliyuncs.com",
                        "port": 6379,
                        "username": "user",
                        "password": "pass",
                        "timeout": 5000,
                        "databaseNumber": 0
                      },
                      "vectorConfig": {
                        "type": "dashvector",
                        "serviceHost": "vdb-xxx.dashvector.aliyuncs.com",
                        "apiKey": "sk-xxx",
                        "timeout": 5000,
                        "collectionId": "col-xxx",
                        "threshold": 0.95
                      },
                      "embeddingConfig": {
                        "type": "dashscope",
                        "serviceId": "svc-xxx",
                        "timeout": 5000,
                        "modelName": "text-embedding-v2"
                      },
                      "cacheKeyStrategy": "-",
                      "cacheMode": "exact",
                      "pluginStatus": {
                        "serviceHealthy": true,
                        "pluginId": "pi-xxx",
                        "errorLogs": [
                          {
                            "key": "[{\"timestamp\":\"2026-06-29T10:00:00Z\",\"message\":\"redis connection timeout\"}]"
                          }
                        ]
                      }
                    },
                    "aiNetworkSearchConfig": {
                      "needReference": true,
                      "referenceFormat": "参考来源:\\n%s",
                      "referenceLocation": "head",
                      "defaultLang": "zh-CN",
                      "defaultEnable": true,
                      "searchFrom": [
                        {
                          "type": "aliyunQuark",
                          "apiKey": "sk-xxx",
                          "count": 5,
                          "start": 0,
                          "timeoutMillisecond": 5000,
                          "optionArgs": {
                            "key": "{\"market\":\"zh-CN\"}"
                          },
                          "endpoint": "https://cloud-iqs.aliyuncs.com",
                          "contentMode": "summary",
                          "industry": "互联网",
                          "timeRange": "7d"
                        }
                      ],
                      "searchEngineConfig": {
                        "type": "aliyunQuark",
                        "apiKey": "sk-xxx",
                        "count": 5,
                        "start": 0,
                        "timeoutMillisecond": 5000,
                        "optionArgs": {
                          "key": "{\"market\":\"zh-CN\"}"
                        },
                        "endpoint": "https://cloud-iqs.aliyuncs.com",
                        "contentMode": "summary",
                        "industry": "互联网",
                        "timeRange": "7d"
                      },
                      "searchRewrite": {
                        "enable": true,
                        "serviceId": "svc-xxx",
                        "modelName": "qwen-max",
                        "timeoutMillisecond": 5000,
                        "maxCount": 3
                      }
                    },
                    "aiToolSelectionConfig": {
                      "enableConditions": {
                        "toolCountThreshold": 10
                      },
                      "toolReranking": {
                        "modelService": {
                          "serviceId": "svc-xxx\n",
                          "modelName": "gte-rerank-v2",
                          "timeoutMillisecond": 5000
                        },
                        "filteringMethod": "topN",
                        "topKPercent": 50,
                        "topNCount": 5,
                        "scoreThreshold": 0.5,
                        "fallbackStrategy": "skip"
                      },
                      "queryRewriting": {
                        "enabled": true,
                        "modelService": {
                          "serviceId": "svc-xxx",
                          "modelName": "gte-rerank-v2",
                          "timeoutMillisecond": 5000
                        },
                        "promptConfig": {
                          "type": "builtIn",
                          "customPrompt": "请将以下用户问题改写为..."
                        },
                        "maxOutputTokens": 50,
                        "triggerConditions": {
                          "messageCountThreshold": 1
                        },
                        "contextSelection": {
                          "type": "allMessages",
                          "value": 5
                        },
                        "fallbackStrategy": "skip"
                      }
                    },
                    "aiStatisticsConfig": {
                      "logRequestContent": true,
                      "logResponseContent": true,
                      "pathFieldConfigs": [
                        {
                          "path": "/v1/chat/completions",
                          "fieldPaths": {
                            "key": {
                              "fieldKey": "question",
                              "jsonPath": "messages.#.content",
                              "rule": "append",
                              "name": "问题内容",
                              "description": "用户输入的问题内容",
                              "source": "request_body",
                              "category": "conversation",
                              "io": "request",
                              "sensitive": false,
                              "recordEnabled": true
                            }
                          }
                        }
                      ]
                    }
                  }
                ],
                "restApiRouteMode": "ordinary",
                "routeBackend": {
                  "scene": "Single",
                  "enableSystemModels": true,
                  "services": [
                    {
                      "serviceId": "service-cq2bmmdlhtgj***",
                      "modelName": "qwen-plus",
                      "name": "item-service",
                      "protocol": "HTTP",
                      "port": 0,
                      "weight": 49,
                      "version": "v1",
                      "sourceType": "MSE_NACOS",
                      "groupName": "DEFAULT_GROUP",
                      "namespace": "public",
                      "httpDubboTranscoder": {
                        "dubboServiceName": "com.example.DemoService",
                        "dubboServiceVersion": "1.0.0",
                        "dubboServiceGroup": "DEV",
                        "methodMapList": [
                          {
                            "dubboMethodName": "sayName",
                            "httpMethod": "ALL_GET",
                            "methodPath": "/mytestzbk/sayhello",
                            "passThroughAllHeaders": "PASS_NOT",
                            "passThroughList": [
                              "[\"x-request-id\", \"x-tenant\"]"
                            ],
                            "paramMapsList": [
                              {
                                "extractKeySpec": "ALL_QUERY_PARAMETER",
                                "extractKey": "name",
                                "mappingType": "java.lang.String"
                              }
                            ]
                          }
                        ]
                      }
                    }
                  ]
                },
                "serviceConfigs": [
                  {
                    "capabilityTier": "standard",
                    "gatewayServiceId": "gw-svc-abc123",
                    "intentCode": "INQUIRY",
                    "match": {
                      "default": true,
                      "conditions": [
                        {
                          "type": "Query",
                          "key": "color",
                          "value": "gray",
                          "operator": "equal"
                        }
                      ]
                    },
                    "modelName": "qwen-max",
                    "modelNamePattern": "qwen-*",
                    "multiServiceRouteStrategy": "ByWeight",
                    "name": "Qwen-Max-Service",
                    "observabilityRouteConfig": {
                      "mode": "LeastBusy",
                      "queueSize": 100,
                      "rateLimit": 0.8
                    },
                    "port": 80,
                    "protocol": "HTTP",
                    "serviceId": "svc-xxx",
                    "version": "V2",
                    "weight": 100
                  }
                ],
                "subDomains": [
                  {
                    "domainId": "d-csmn42um******",
                    "name": "test",
                    "networkType": "Intranet",
                    "protocol": "HTTP"
                  }
                ],
                "systemModelTiers": [
                  "economy"
                ]
              }
            ],
            "description": "测试专用API",
            "enableAuth": true,
            "environments": [
              {
                "alias": "test",
                "backendScene": "SingleService",
                "backendType": "Service",
                "customDomains": [
                  {
                    "domainId": "d-xxx",
                    "name": "www.example.com",
                    "protocol": "HTTP"
                  }
                ],
                "deployStatus": "Deployed",
                "environmentId": "env-xxx",
                "gatewayInfo": {
                  "gatewayEdition": "MultiTenantServerless",
                  "gatewayId": "gw-xxx",
                  "name": "test"
                },
                "name": "test",
                "serviceConfigs": [
                  {
                    "gatewayServiceId": "gs-xxx",
                    "match": {
                      "default": true,
                      "conditions": [
                        {
                          "type": "Query",
                          "key": "color",
                          "value": "gray",
                          "operator": "equal"
                        }
                      ]
                    },
                    "name": "demo-service",
                    "port": "8080",
                    "protocol": "HTTP",
                    "serviceId": "svc-xxx",
                    "version": "v1",
                    "weight": 100
                  }
                ],
                "subDomains": [
                  {
                    "domainId": "d-xxx",
                    "name": "www.example.com",
                    "networkType": "Internet",
                    "protocol": "HTTP"
                  }
                ]
              }
            ],
            "gatewayId": "gw-cpv4sqdl****",
            "httpApiId": "api-xxx",
            "ingressInfo": {
              "environmentInfo": {
                "environmentId": "env-xxx"
              },
              "ingressClass": "mse",
              "k8sClusterInfo": {
                "clusterId": "ca435c77cba1547cca9311957bcxxxxxx"
              },
              "overrideIngressIp": true,
              "sourceId": "src-xxx",
              "watchNamespace": "default"
            },
            "modelCategory": "Text",
            "name": "test",
            "protocols": [
              "HTTP"
            ],
            "resourceGroupId": "rg-xxx",
            "type": "Rest",
            "versionInfo": {
              "enable": true,
              "headerName": "my-version",
              "queryName": "myVersion",
              "scheme": "Query",
              "version": "v1"
            }
          },
          "resourceType": "Gateway"
        },
        "pluginAttachmentId": "pa-d0j9t5em1hkncrlo51mg",
        "pluginClassInfo": {
          "alias": "AI安全护栏",
          "configExample": "{\"checkRequest\":true}",
          "description": "AI请求内容安全检测插件",
          "executePriority": 100,
          "executeStage": "AUTHN",
          "imageName": "higress-registry.tencentcloudcr.com/ai-security-guard",
          "innerPlugin": false,
          "mode": "Wasm",
          "name": "ai-security-guard",
          "pluginClassId": "cls-xxx",
          "source": "HigressOfficial",
          "supportedMinGatewayVersion": "2.1.11",
          "type": "AI",
          "version": "1.0.0",
          "versionDescription": "初始版本",
          "wasmLanguage": "Rust",
          "wasmUrl": "https://..."
        },
        "pluginConfig": "bGltaXRfYnlfaGVhZGVyOiB4LWFwaS1rZXkKbGltaXRfa2V5czoKLSBrZXk6IGV4YW1wbGUta2V5LWEKICBxdWVyeV9wZXJfc2Vjb25kOiAxMAotIGtleTogZXhhbXBsZS1rZXktYgogIHF1ZXJ5X3Blcl9zZWNvbmQ6IDEK",
        "pluginId": "pl-cvu6r4um1hko3b3ti0a0",
        "resourceInfos": [
          {
            "resourceId": "api-1nsu2d****",
            "resourceName": "test1023",
            "resourceType": "HttpApi",
            "resourceVersion": "1.0.0"
          }
        ]
      }
    ],
    "pageNumber": 1,
    "pageSize": 10,
    "totalSize": 10
  },
  "message": "success",
  "requestId": "9640D776-794A-5077-9184-A247CA4B45C1"
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情。