GetPluginAttachment

Updated at:

Retrieves the details of a plugin attachment.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

apig:GetPluginAttachment

get

*All Resource

*

None None

Request syntax

GET /v1/plugin-attachments/{pluginAttachmentId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

pluginAttachmentId

string

No

The plugin attachment ID.

pa-cvl541em1hkk7n8vq810

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

The response body.

requestId

string

The request ID.

C61E30D3-579A-5B43-994E-31E02EDC9129

code

string

The status code.

Ok

message

string

The response message.

success

data

object

The response data.

pluginAttachmentId

string

The plugin attachment ID.

pa-d05f1tmm1hku195dd8j0

parentResourceInfo ParentResourceInfo

The parent resource to which the plugin is attached.

resourceInfos

array

A list of attached resources.

ResourceInfo

An attached resource.

environmentInfo EnvironmentInfo

Details of the environment.

pluginConfig

string

The Base64-encoded original plugin configuration.

cHJlcGVuZDoKLSByb2xlOiBzeXN0ZW0KICBjb250ZW50OiDor7fkvb/nlKjoi7Hor63lm57nrZTpl67popgKYXBwZW5kOgotIHJvbGU6IHVzZXIKICBjb250ZW50OiDmr4/mrKHlm57nrZTlrozpl67popjvvIzlsJ3or5Xov5vooYzlj43pl64K

enable

boolean

Indicates whether the plugin attachment is enabled.

true

pluginId

string

The plugin ID.

pl-cvo8ub6m1hkvgv03r3k0

pluginClassInfo PluginClassInfo

Details of the plugin type.

gatewayInfo GatewayInfo

Details of the gateway.

Examples

Success response

JSON format

{
  "requestId": "C61E30D3-579A-5B43-994E-31E02EDC9129",
  "code": "Ok",
  "message": "success",
  "data": {
    "pluginAttachmentId": "pa-d05f1tmm1hku195dd8j0",
    "parentResourceInfo": {
      "resourceType": "Gateway",
      "apiInfo": {
        "httpApiId": "api-xxx",
        "name": "test",
        "basePath": "/v1",
        "description": "测试专用API",
        "versionInfo": {
          "enable": true,
          "scheme": "Query",
          "headerName": "my-version",
          "queryName": "myVersion",
          "version": "v1"
        },
        "ingressInfo": {
          "sourceId": "src-xxx",
          "ingressClass": "mse",
          "watchNamespace": "default",
          "environmentInfo": {
            "environmentId": "env-xxx"
          },
          "k8sClusterInfo": {
            "clusterId": "ca435c77cba1547cca9311957bcxxxxxx"
          },
          "overrideIngressIp": true
        },
        "type": "Rest",
        "resourceGroupId": "rg-xxx",
        "enableAuth": false,
        "authConfig": {
          "authType": "Jwt",
          "authMode": "NoAuth"
        },
        "gatewayId": "gw-cpv4sqdl****",
        "modelCategory": "Text",
        "protocols": [
          "HTTP"
        ],
        "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",
              "gatewayEdition": "MultiTenantServerless"
            },
            "deployStatus": "Deployed",
            "subDomains": [
              {
                "domainId": "d-xxx",
                "name": "www.example.com",
                "protocol": "HTTP",
                "networkType": "Internet"
              }
            ]
          }
        ],
        "aiProtocols": [
          "OpenAI/v1"
        ],
        "deployConfigs": [
          {
            "environmentId": "env-xxx",
            "backendScene": "SingleService",
            "autoDeploy": true,
            "gatewayId": "gw-xx",
            "routeBackend": {
              "scene": "Single",
              "services": [
                {
                  "serviceId": "service-cq2bmmdlhtgj***",
                  "name": "item-service",
                  "protocol": "HTTP",
                  "port": 0,
                  "weight": 49,
                  "version": "v1"
                }
              ]
            },
            "gatewayInfo": {
              "gatewayId": "gw-cq7og15lhtgi6qasrj60",
              "name": "apitest-gw",
              "vpcInfo": {
                "vpcId": "vpc-uf664nyle5kh***",
                "name": "商品中心预发环境专有网络"
              },
              "engineVersion": "2.0.7",
              "gatewayEdition": "MultiTenantServerless"
            },
            "mock": {
              "enable": false,
              "responseCode": 200,
              "responseContent": "Mock测试"
            },
            "gatewayType": "API",
            "customDomainIds": [
              "d-xxx"
            ],
            "envDomainIds": [
              "d-xxx"
            ],
            "serviceConfigs": [
              {
                "serviceId": "svc-xxx",
                "weight": 100,
                "modelNamePattern": "qwen-*",
                "modelName": "qwen-max",
                "intentCode": "INQUIRY",
                "match": {
                  "default": true,
                  "conditions": [
                    {
                      "type": "Query",
                      "key": "color",
                      "value": "gray",
                      "operator": "equal"
                    }
                  ]
                },
                "port": 80,
                "protocol": "HTTP",
                "gatewayServiceId": "gw-svc-abc123",
                "name": "Qwen-Max-Service",
                "version": "V2",
                "multiServiceRouteStrategy": "ByWeight",
                "observabilityRouteConfig": {
                  "mode": "LeastBusy",
                  "rateLimit": 0.8,
                  "queueSize": 100
                }
              }
            ],
            "policyConfigs": [
              {}
            ],
            "customDomainInfos": [
              {
                "domainId": "d-cshee6dlhtgk******",
                "name": "hello-server.com",
                "protocol": "HTTP"
              }
            ],
            "envDomainInfos": [
              {
                "domainId": "d-env-xxx",
                "name": "api.example.com",
                "protocol": "HTTPS"
              }
            ],
            "subDomains": [
              {
                "domainId": "d-csmn42um******",
                "name": "test",
                "protocol": "HTTP",
                "networkType": "Intranet"
              }
            ],
            "builtinRouteNames": [
              "[\"chat\",\"completions\"]"
            ]
          }
        ],
        "deployCntMap": {
          "key": {
            "deployedCnt": 3,
            "cnt": 0
          }
        },
        "agentProtocols": [
          "DashScope"
        ]
      }
    },
    "resourceInfos": [
      {
        "resourceType": "HttpApi",
        "resourceId": "api-1nsu2d****",
        "resourceName": "test1023",
        "resourceVersion": "1.0.0"
      }
    ],
    "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"
    },
    "pluginConfig": "cHJlcGVuZDoKLSByb2xlOiBzeXN0ZW0KICBjb250ZW50OiDor7fkvb/nlKjoi7Hor63lm57nrZTpl67popgKYXBwZW5kOgotIHJvbGU6IHVzZXIKICBjb250ZW50OiDmr4/mrKHlm57nrZTlrozpl67popjvvIzlsJ3or5Xov5vooYzlj43pl64K",
    "enable": true,
    "pluginId": "pl-cvo8ub6m1hkvgv03r3k0",
    "pluginClassInfo": {
      "pluginClassId": "cls-xxx",
      "type": "AI",
      "mode": "Wasm",
      "name": "ai-security-guard",
      "alias": "AI安全护栏",
      "description": "AI请求内容安全检测插件",
      "source": "HigressOfficial",
      "version": "1.0.0",
      "versionDescription": "初始版本",
      "executeStage": "AUTHN",
      "executePriority": 100,
      "configExample": "{\"checkRequest\":true}",
      "imageName": "higress-registry.tencentcloudcr.com/ai-security-guard",
      "wasmLanguage": "Rust",
      "supportedMinGatewayVersion": "2.1.11",
      "wasmUrl": "https://...",
      "innerPlugin": false
    },
    "gatewayInfo": {
      "gatewayId": "gw-cq7og15lhtgi6qasrj60",
      "name": "apitest-gw",
      "vpcInfo": {
        "vpcId": "vpc-uf664nyle5kh***",
        "name": "商品中心预发环境专有网络"
      },
      "engineVersion": "2.0.7",
      "gatewayEdition": "MultiTenantServerless"
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.