Description
You can call this operation to create a plug-in.
- This operation is intended for API providers.
- There is a limit on the maximum number of plug-ins of the same type that each user can create. This limit varies with the plug-in type.
- In the near future, you will be able to use API Gateway to create plug-ins that provide advanced functions.
- After a plug-in is bound to an API, it takes effect immediately.
Request parameters
Name | Type | Required | Description |
---|---|---|---|
Action | String | Yes | The operation that you want to perform. Set this value to CreatePlugin. |
PluginName | String | Yes | The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore (). |
PluginType | String | Yes | The type of the plug-in. Valid values:
|
PluginData | String | Yes | The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported. |
Description | String | No | The description of the plug-in, which cannot exceed 200 characters. |
Response parameters
Name | Type | Description |
RequestId | String | The request ID |
PluginId | String | The generated plug-in ID |
Examples
Sample request
http://apigateway.cn-qingdao.aliyuncs.com/?Action=CreatePlugin
&PluginName=NewCors
&PluginType=cors
&PluginData="Plugin definition"
&Description="createPlugin"
&<Common request parameters>
Sample responses
XML
format
<CreatePluginResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
<PluginId>285bb759342649a1b70c2093a772e087</PluginId>
</CreatePluginResponse>
JSON
format
{
"RequestId":"EF924FE4-2EDD-4CD3-89EC-34E4708574E7",
"PluginId" :"1f3bde29b43d4d53989248327ff737f2"
}