API 管理策略API Management policies

本部分提供以下 API 管理策略的参考。This section provides a reference for the following API Management policies. 有关添加和配置策略的信息,请参阅 API 管理中的策略For information on adding and configuring policies, see Policies in API Management.

策略是一项强大的系统功能,允许发布者通过配置更改 API 的行为。Policies are a powerful capability of the system that allow the publisher to change the behavior of the API through configuration. 策略是一组语句,在请求或响应 API 时按顺序执行。Policies are a collection of Statements that are executed sequentially on the request or response of an API. 常用的语句包括从 XML 到 JSON 的格式转换,并调用速率限制来限制从一名开发人员传入的调用量。Popular Statements include format conversion from XML to JSON and call rate limiting to restrict the amount of incoming calls from a developer. 许多策略开箱即用。Many more policies are available out of the box.

在任何 API 管理策略中,策略表达式可以用作属性值或文本值,除非该策略另外指定。Policy expressions can be used as attribute values or text values in any of the API Management policies, unless the policy specifies otherwise. 某些策略(如控制流设置变量策略)基于策略表达式。Some policies such as the Control flow and Set variable policies are based on policy expressions. 有关详细信息,请参阅高级策略策略表达式For more information, see Advanced policies and Policy expressions.

策略Policies

后续步骤Next steps

有关如何使用策略的详细信息,请参阅:For more information working with policies, see: