5. What are Policies
• Encapsulate common API management
functions
• Access control, Protection,
Transformation, Caching, …
• Chained together into a pipeline
• Mutate request/response context or change
API behavior
• Applied at a variety of scopes
• Set in the inbound and outbound directions
• Can be triggered on error
http://aka.ms/apimpolicyexamples
6. How policies are executed - Scopes
global
product
api
operation
to backend
from backend
from caller
to caller
GET /foo/bar HTTP/1.1
Host: api.constoso.com
Key: 0123456789
0123456789
/foo
/bar
Effective
Policy
7. Policy
Expressions
• C# “snippets” used with policies
• Read-only access to the request context
• Can use a cureted set of .NET types
• Dynamically configure and conditionally
execute policies
• Can also be used on Name Values
11. What can I do with the Extension?
• List API Management Instances
• Import APIs from Open API definition
• Import API from App Services
• Define Policies
• Test APIs
• Manage Gateways
• Manage Name Values (including create)
• Manage Products (Add/Remove APIs)
12. What can’t I do with the Extension?
• Create empty APIs
• Create APIs from other definitions
• Manage subscriptions
• Create new products
• Create new gateways
14. Takeaways
• VS Code extension is quite powerful
• It streamlines your development experience
• Can help you extract existing configuration
• It’s opensource, so you can improve it too!