Managing Rate Limiting Policies¶
ESB API Controller (apictl) allows the following actions on rate limiting Policies.
- Get rate limiting policies in an environment.
- Delete rate limiting policies from an environment.
- Export rate limiting policies from an environment.
- Import rate limiting policies to an environment.
Get rate limiting policies in an environment¶
Get rate limiting policies operation allows users to list the available rate limiting policies. It also allows the user to filter the rate limiting policies by rate limiting policy levels like Application, Subscription, Advanced, and Custom.
Follow the instructions below to display a list of rate limiting API Policies in an environment using apictl:
- Make sure that the MWARE ESB is started and that the relevant version of apictl is set up.
For more information, see Download and Initialize the apictl. - Log in to the MWARE ESB in the environment by following the instructions in Login to an Environment.
-
Run the corresponding apictl command below to get (list) rate limiting Policies in an environment.
-
Command
apictl get policies rate-limiting -e <environment-name> -q <query>
apictl get policies rate-limiting --environment <environment> -q <query>
apictl get policies rate-limiting --environment <environment> -q <query> --all
Info
Flags
-q, --query
- This allows the user to filter out rate limiting policies by type-e, --environment string
- Environment to be searched--format string
- Pretty-print rate limiting policies using Go Templates. Use"{{ jsonPretty . }}"
to list all fields-h, --help
- Help for rate-limitingExample
apictl get policies rate-limiting -e prod -q type:sub
-
Delete a rate limiting policies from an environment¶
Follow the instructions below to delete a rate limiting policy in an environment using apictl:
- Make sure that the MWARE ESB is started and that the corresponding version of apictl is set up.
For more information, see Download and Initialize the apictl. - Log in to the MWARE ESB in the environment by following the instructions in Login to an Environment.
-
Run the corresponding apictl command below to delete a common API Policy in an environment.
-
Command
apictl delete policy rate-limiting -n <rate limiting policy name> -v <rate limiting policy version> -e <environment>
apictl delete policy rate-limiting --name <rate limiting name> --version <rate limiting policy version> --environment <environment>
Info
Flags:
- Required :
-e, --environment string
- Environment from which the Throttling Policy should be deleted-h, --help
- Help for rate-limiting-n, --name string
- Name of the Throttling Policy to be deleted-t, --type string
- Type of the Throttling Policies to be exported (sub,app,custom,advanced)
Example
apictl delete policy rate-limiting -n Gold -e dev --type sub
apictl delete policy rate-limiting -n AppPolicy -e prod --type app
apictl delete policy rate-limiting -n TestPolicy -e dev --type advanced
apictl delete policy rate-limiting -n CustomPolicy -e prod --type custom
Note
All the 2 flags (--name (-n) and --environment (-e)) are mandatory.
- Required :
-
Export/Import rate limiting policies¶
For more details on exporting and importing rate limiting policies, see the document on migrating rate limiting policies.
Top