Plugins are advanced feature configurations provided by API Gateway. You can create configuration items such as IP access control through plugins and then bind the plugins to APIs for them to take effect.
Plugins have the following advantages over traditional configuration items:
- Feature configuration is decoupled from API configuration. One plugin can be bound to multiple APIs under different services.
- Hot update is supported for configurations. After a plugin is bound to an API, it can take effect without releasing the service.
Step 1. Create a plugin
- Log in to the API Gateway console.
- Click Plugin in the left sidebar to open the plugin list page.
- Click Create in the upper-left corner of the page to create a plugin.
Step 2. Bind an API and make the plugin effective
- Select the just created plugin in the list and click Bind API in the Operation column.
- In the Bind API pop-up window, select the service, environment, and the API to which the plugin needs to be bound.
- Click OK to bind the plugin to the API. At this time, the configuration of the plugin has taken effect for the API.
Step 3. View the plugins bound to an API
- Click Service in the left sidebar.
- In the service list, click the name of the target service.
- In the API list, click the name of the target API to enter the API details page.
- On the API details page, select the tab of Plugin management to view the information of the plugins bound to the target API.
Supported Plugin Type
API Gateway currently only supports the IP access control plugin and will offer more plugins such as traffic throttling, circuit breaker, and parameter conversion in the future.
- An API only allows one plugin of the same type to be bound to it.
- Plugins are region-specific and can be bound to APIs only in the same region. Cross-region binding is not supported.
- APIs can be bound to plugins only after they are released in the corresponding environment. Unreleased APIs cannot be bound.
- The deactivation of APIs does not affect their binding relationships with plugins, and the plugins will still take effect after the APIs are re-released in the environment.
- Plugins support hot updates, and all binding and unbinding operations can take effect without re-releasing the service.
- After APIs are deleted, their binding relationships with plugins will also be deleted.