ListPluginAttachments - 获取插件挂载列表

获取插件挂载列表

调试

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

授权信息

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

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
apig:ListPluginAttachmentsnone
*全部资源
*

请求语法

GET /v1/plugin-attachments HTTP/1.1

请求参数

名称类型必填描述示例值
attachResourceIdstring

挂载资源 ID

hr-cv2h58em1hkg7c6vt43g
attachResourceTypestring

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

枚举值:
  • GatewayDomainGatewayDomain
  • GatewayGateway
  • GatewayRouteGatewayRoute
  • HttpApiHttpApi
  • OperationOperation
GatewayRoute
environmentIdstring

环境 ID。

env-crlnqhtlhtgqflkqislg
pluginIdstring

插件 ID

pl-ct8181um1hkiqns9f6e0
gatewayIdstring

网关 ID。

gw-cr79f75lhtgme744084g
pageNumberinteger

页码,默认 1

1
pageSizeinteger

分页大小

10
attachResourceTypesstring

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

GatewayRoute
withParentResourceboolean

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

false

返回参数

名称类型描述示例值
object

Schema of Response

requestIdstring

Id of the request

9640D776-794A-5077-9184-A247CA4B45C1
codestring

响应状态码。

Ok
messagestring

响应消息。

success
dataobject

响应数据。

pageNumberinteger

页码。

1
pageSizeinteger

分页大小。

10
totalSizeinteger

总数量。

10
itemsarray<object>

Item 详情。

itemsobject

结果对象

pluginAttachmentIdstring

插件挂载 ID。

pa-d0j9t5em1hkncrlo51mg
parentResourceInfoParentResourceInfo

父级资源信息

resourceInfosarray

挂载资源信息。

itemResourceInfo

挂载资源信息。

environmentInfoEnvironmentInfo

环境信息。

enableboolean

是否启用。

true
pluginIdstring

插件 ID

pl-cvu6r4um1hko3b3ti0a0
pluginConfigstring

插件配置原文的 base64 内容

bGltaXRfYnlfaGVhZGVyOiB4LWFwaS1rZXkKbGltaXRfa2V5czoKLSBrZXk6IGV4YW1wbGUta2V5LWEKICBxdWVyeV9wZXJfc2Vjb25kOiAxMAotIGtleTogZXhhbXBsZS1rZXktYgogIHF1ZXJ5X3Blcl9zZWNvbmQ6IDEK
pluginClassInfoPluginClassInfo

插件类型信息

attachResourceTypestring

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

GatewayRoute

示例

正常返回示例

JSON格式

{
  "requestId": "9640D776-794A-5077-9184-A247CA4B45C1",
  "code": "Ok",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "pageSize": 10,
    "totalSize": 10,
    "items": [
      {
        "pluginAttachmentId": "pa-d0j9t5em1hkncrlo51mg",
        "parentResourceInfo": {
          "resourceType": "Gateway",
          "apiInfo": {
            "httpApiId": "api-xxx",
            "name": "test",
            "protocols": [
              "HTTP"
            ],
            "basePath": "/v1",
            "description": "测试专用API",
            "versionInfo": {
              "enable": true,
              "scheme": "Query",
              "headerName": "my-version",
              "queryName": "myVersion",
              "version": "v1"
            },
            "environments": [
              {
                "environmentId": "env-xxx",
                "backendScene": "SingleService",
                "backendType": "Service",
                "serviceConfigs": [
                  {
                    "gatewayServiceId": "gs-xxx",
                    "name": "demo-service",
                    "protocol": "HTTP",
                    "port": 8080,
                    "weight": 100,
                    "version": "v1",
                    "match": {
                      "default": true,
                      "conditions": [
                        {
                          "type": "Query",
                          "key": "color",
                          "value": "gray",
                          "operator": "equal"
                        }
                      ]
                    },
                    "serviceId": "svc-xxx"
                  }
                ],
                "customDomains": [
                  {
                    "domainId": "d-xxx",
                    "name": "www.example.com",
                    "protocol": "HTTP"
                  }
                ],
                "name": "test",
                "alias": "test",
                "gatewayInfo": {
                  "gatewayId": "gw-xxx",
                  "name": "test"
                },
                "deployStatus": "Deployed",
                "subDomains": [
                  {
                    "domainId": "d-xxx",
                    "name": "www.example.com",
                    "protocol": "HTTP",
                    "networkType": "Internet"
                  }
                ]
              }
            ],
            "ingressInfo": {
              "sourceId": "src-xxx",
              "ingressClass": "mse",
              "watchNamespace": "default",
              "environmentInfo": {
                "environmentId": "env-xxx"
              },
              "k8sClusterInfo": {
                "clusterId": "ca435c77cba1547cca9311957bcxxxxxx"
              },
              "overrideIngressIp": true
            },
            "type": "Rest",
            "resourceGroupId": "rg-xxx",
            "aiProtocols": [
              "OpenAI/v1"
            ],
            "deployConfigs": [
              {
                "customDomainIds": [
                  "d-xxx"
                ],
                "environmentId": "env-xxx",
                "backendScene": "SingleService",
                "serviceConfigs": [
                  {
                    "serviceId": "svc-xxx",
                    "weight": 100,
                    "modelNamePattern": "qwen-*",
                    "modelName": "qwen-max"
                  }
                ],
                "policyConfigs": [
                  {
                    "type": "AiFallback",
                    "enable": true,
                    "aiFallbackConfig": {
                      "serviceConfigs": [
                        {
                          "serviceId": "",
                          "targetModelName": ""
                        }
                      ]
                    }
                  }
                ],
                "autoDeploy": true,
                "gatewayId": "gw-xx",
                "routeBackend": {
                  "scene": "Single",
                  "services": [
                    {
                      "serviceId": "service-cq2bmmdlhtgj***",
                      "name": "item-service",
                      "protocol": "HTTP",
                      "port": 0,
                      "weight": 49,
                      "version": "v1"
                    }
                  ]
                },
                "customDomainInfos": [
                  {
                    "domainId": "d-cshee6dlhtgkf4muio3g",
                    "name": "hello-server.com",
                    "protocol": "HTTP"
                  }
                ],
                "subDomains": [
                  {
                    "domainId": "d-csmn42um1hksudfk9eng",
                    "name": "test",
                    "protocol": "HTTP",
                    "networkType": "Intranet"
                  }
                ],
                "gatewayInfo": {
                  "gatewayId": "gw-cq7og15lhtgi6qasrj60",
                  "name": "apitest-gw",
                  "vpcInfo": {
                    "vpcId": "vpc-uf664nyle5kh***",
                    "name": "商品中心预发环境专有网络"
                  },
                  "engineVersion": "2.0.7"
                },
                "mock": {
                  "enable": false,
                  "responseCode": 200,
                  "responseContent": "Mock测试"
                },
                "gatewayType": "API"
              }
            ],
            "enabelAuth": true,
            "authConfig": {
              "authType": "Jwt",
              "authMode": "NoAuth"
            },
            "deployCntMap": {
              "key": {
                "deployedCnt": 3,
                "Cnt": 5
              }
            },
            "gatewayId": "gw-cpv4sqdl****"
          }
        },
        "resourceInfos": [
          {
            "resourceType": "HttpApi",
            "resourceId": "api-1nsu2d****",
            "resourceName": "test1023",
            "resourceVersion": "1.0.0"
          }
        ],
        "environmentInfo": {
          "environmentId": "env-cq7l5s5lhtgi6qasrdc0",
          "name": "test",
          "alias": "测试环境",
          "description": "这是xxxxx项目测试环境",
          "gatewayInfo": {
            "gatewayId": "gw-cq7og15lhtgi6qasrj60",
            "name": "apitest-gw",
            "vpcInfo": {
              "vpcId": "vpc-uf664nyle5kh***",
              "name": "商品中心预发环境专有网络"
            },
            "engineVersion": "2.0.7"
          },
          "subDomainInfos": [
            {
              "domainId": "d-cpudb0llhtgl2djvq2sg",
              "name": "abc.com",
              "protocol": "HTTP",
              "networkType": "Intranet"
            }
          ],
          "default": false,
          "createTimestamp": 1721116090326,
          "updateTimestamp": 1721116090326,
          "resourceGroupId": "rg-xxxx"
        },
        "enable": true,
        "pluginId": "pl-cvu6r4um1hko3b3ti0a0",
        "pluginConfig": "bGltaXRfYnlfaGVhZGVyOiB4LWFwaS1rZXkKbGltaXRfa2V5czoKLSBrZXk6IGV4YW1wbGUta2V5LWEKICBxdWVyeV9wZXJfc2Vjb25kOiAxMAotIGtleTogZXhhbXBsZS1rZXktYgogIHF1ZXJ5X3Blcl9zZWNvbmQ6IDEK",
        "pluginClassInfo": {
          "pluginClassId": "",
          "type": "",
          "mode": "",
          "name": "",
          "alias": "",
          "description": "",
          "source": "",
          "version": "",
          "versionDescription": "",
          "executeStage": "",
          "executePriority": 0,
          "configExample": "",
          "imageName": "",
          "wasmLanguage": "",
          "supportedMinGatewayVersion": "",
          "wasmUrl": "",
          "innerPlugin": true
        },
        "attachResourceType": "GatewayRoute"
      }
    ]
  }
}

错误码

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