All Products
Search
Document Center

Microservices Engine:GetPlugins

Last Updated:Nov 13, 2024

Obtains plug-ins.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
mse:GetPluginsget
  • Gateway
    acs:mse:{#regionId}:{#accountId}:instance/{#GatewayUniqueId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
GatewayUniqueIdstringYes

The ID of the gateway.

gw-0adf3ad751284cc69fcf9669fba*****
CategoryintegerNo

The type of the plug-in. Valid values:

  • 0: custom
  • 1: permission authorization
  • 2: security protection
  • 3: transmission protocol
  • 4: traffic control
  • 5: traffic observation
1
EnableOnlybooleanNo

Specifies whether to enable the plug-in.

true
NamestringNo

The name of the plug-in.

key-auth
AcceptLanguagestringNo

The language of the response. Valid values:

zh: Chinese en: English

zh

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

RequestIdstring

The ID of the request.

03A3E2F4-6804-5663-9D5D-2EC47A1*****
Successboolean

Indicates whether the request was successful.

true
Codeinteger

The returned code.

200
ErrorCodestring

The error code returned if the request failed.

500
HttpStatusCodeinteger

The HTTP status code returned.

200
Messagestring

The message returned.

success
DynamicCodestring

The dynamic part in the error message.

code
DynamicMessagestring

The dynamic error message.

message
Dataarray<object>

The data entries returned.

Dataobject

The information about the plug-in.

Idlong

The ID of the plug-in.

1
PrimaryUserstring

The ID of the creator.

123
Categoryinteger

The type of the plug-in. Valid values:

0: custom

1: permission authorization

2: security protection

3: transmission protocol

4: traffic control

5: traffic observation

0
Namestring

The name of the plug-in.

key-auth
Versionstring

The version of the plug-in.

v1
Summarystring

The summary of the plug-in.

This is a plug-in.
Phaseinteger

The execution stage of the plug-in.

  • 0: default stage
  • 1: authorization stage
  • 2: authentication stage
  • 3: statistics stage
1
Priorityinteger

The execution priority of the plug-in. A larger value indicates a higher priority.

1
ConfigCheckstring

The information about the plug-in configuration used for checking.

\# The configuration includes the fields required for checking, such as name, age, and friends. Sample configuration: name: John age: 18 friends: - David - Anne
WasmLanginteger

The WebAssembly language. Valid values:

  • 0: C++
  • 1: TinyGo
  • 2: Rust
  • 3: AssemblyScript
  • 4: Zig
0
PublishStateinteger

The publish status.

1
WasmFilestring

The URL of the Object Storage Service (OSS) bucket that stores the WebAssembly plug-in.

https://mse-shared-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/cfg/import/1917515******/gw-0adf3ad751284cc69fcf9669fba*****/2022/11/02/4d390496-2c17-4b42-a479-f9068ba****/16673573***5.wasm
Statusstring

Indicates whether the plug-in is enabled.

  • 0: disabled
  • 1: enabled
1

Examples

Sample success responses

JSONformat

{
  "RequestId": "03A3E2F4-6804-5663-9D5D-2EC47A1*****\n",
  "Success": true,
  "Code": 200,
  "ErrorCode": "500",
  "HttpStatusCode": 200,
  "Message": "success",
  "DynamicCode": "code",
  "DynamicMessage": "message",
  "Data": [
    {
      "Id": 1,
      "PrimaryUser": "123",
      "Category": 0,
      "Name": "key-auth",
      "Version": "v1",
      "Summary": "This is a plug-in.\n",
      "Phase": 1,
      "Priority": 1,
      "ConfigCheck": "\\# The configuration includes the fields required for checking, such as name, age, and friends. Sample configuration: name: John age: 18 friends: - David - Anne\n",
      "WasmLang": 0,
      "PublishState": 1,
      "WasmFile": "https://mse-shared-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/cfg/import/1917515******/gw-0adf3ad751284cc69fcf9669fba*****/2022/11/02/4d390496-2c17-4b42-a479-f9068ba****/16673573***5.wasm",
      "Status": "1",
      "Mode": 0,
      "MaxVersion": "1.0.0",
      "NewVersionPublishingFlag": false
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400duplicatedClusterAliasNameduplicated cluster alias nameThe instance name is duplicate. User another name.
400illegalRequestillegal request:%sInvalid request: %s
403NoPermissionYou are not authorized to perform this operation:%sYou do not have the permission to use this interface:%s
404clusterNotFoundcluster not foundThe cluster is not found.
500systemErrorsystem errorAn error occurred on the system. Try again later.

For a list of error codes, visit the Service error codes.