├── LICENSE ├── README.md ├── SECURITY.md ├── examples ├── Add correlation id to inbound request.policy.xml ├── Authenticate using Managed Identity to access Event Hub.xml ├── Authenticate using Managed Identity to access Service Bus.xml ├── Authenticate using Managed Identity to access Storage Account.xml ├── Authorize requests using external authorizer.policy.xml ├── Back-end API redundancy.policy.xml ├── Backend OAuth2 Authentication With Cache.policy.xml ├── Call out to an HTTP endpoint and cache the response.policy.xml ├── Create HMAC SHA256-Signed JWT.policy.xml ├── DELETE a from to blobStorage account.xml ├── Decrypt AES Data using policy expressions.xml ├── Encrypt data using expressions.policy.xml ├── Extract value from XML.xml ├── Extracting multiple values from xml documents.policy.xml ├── Filter on IP Address when using Application Gateway.policy.xml ├── Filter response content based on product name.policy.xml ├── Forward Azure Event Grid Event.xml ├── Forward gateway hostname to backend for generating correct urls in responses.policy.xml ├── GET a file from blobStorage account.xml ├── Generate Azure Relay Token.policy.xml ├── Generate Shared Access Signature and forward request to Azure storage.policy.xml ├── Get OAuth2 access token from AAD and forward it to the backend.policy.xml ├── Get OAuth2 access token from AAD using client id and certificate using key vault manage identity.xml ├── Get X-CSRF token from SAP gateway using send request.policy.xml ├── Handle Power Query access request to custom API.policy.xml ├── List all inbound headers.policy.xml ├── Log errors to Stackify.policy.xml ├── Look up Key Vault certificate using Managed Service Identity and call backend.policy.xml ├── Look up Key Vault secret using Managed Service Identity.policy.xml ├── Loopback request for service at same API Management service.xml ├── Mask async calls as synchronous.policy.xml ├── PUT a file to blobStorage account.xml ├── Parse a JWT token using expressions.xml ├── Perform basic authentication.policy.xml ├── Pre-authorize requests based on HTTP method with validate-jwt.policy.xml ├── Query CosmosDB.policy.xml ├── README.md ├── Random load balancer simpler.policy.xml ├── Random load balancer.policy.xml ├── Replay request on error.policy.xml ├── Request OAuth2 access token from SAP using AAD JWT token.xml ├── Request OAuth2 access token from SuccessFactors using AAD JWT token.xml ├── Return HTTP 405 if the HTTP Method of the request is not defined.xml ├── Return a blob URL signed with a user delegation SAS token.xml ├── Route requests based on size.policy.xml ├── Route requests to regional backend instances.xml ├── Send request context information to the backend service.policy.xml ├── Set cache duration using response cache control header.policy.xml ├── Trigger Azure Data Factory Pipeline With Parameters.policy.xml ├── Trigger Azure Data Factory Pipeline.policy.xml ├── Use custom error messages for jwt-validate policy with on-error handler.policy.xml └── oauth-proxy │ ├── oauth-proxy-callback.xml │ ├── oauth-proxy-construct-authorization-redirect-fragment.xml │ ├── oauth-proxy-session-fragment.xml │ ├── oauth-proxy-sign-in.xml │ ├── oauth-proxy-sign-out.xml │ ├── oauth-proxy-slide-session-fragment.xml │ ├── oauth-proxy-token-endpoint-fragment.xml │ ├── oauth-proxy-validate-token-fragment.xml │ └── readme.md ├── media └── vscode-snippets │ ├── apim-vscode-snippets-1.png │ ├── apim-vscode-snippets-2.png │ └── apim-vscode-snippets-3.png ├── policy-expressions └── README.md └── vscode-snippets └── xml.json /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/README.md -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/SECURITY.md -------------------------------------------------------------------------------- /examples/Add correlation id to inbound request.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Add correlation id to inbound request.policy.xml -------------------------------------------------------------------------------- /examples/Authenticate using Managed Identity to access Event Hub.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Authenticate using Managed Identity to access Event Hub.xml -------------------------------------------------------------------------------- /examples/Authenticate using Managed Identity to access Service Bus.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Authenticate using Managed Identity to access Service Bus.xml -------------------------------------------------------------------------------- /examples/Authenticate using Managed Identity to access Storage Account.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Authenticate using Managed Identity to access Storage Account.xml -------------------------------------------------------------------------------- /examples/Authorize requests using external authorizer.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Authorize requests using external authorizer.policy.xml -------------------------------------------------------------------------------- /examples/Back-end API redundancy.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Back-end API redundancy.policy.xml -------------------------------------------------------------------------------- /examples/Backend OAuth2 Authentication With Cache.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Backend OAuth2 Authentication With Cache.policy.xml -------------------------------------------------------------------------------- /examples/Call out to an HTTP endpoint and cache the response.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Call out to an HTTP endpoint and cache the response.policy.xml -------------------------------------------------------------------------------- /examples/Create HMAC SHA256-Signed JWT.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Create HMAC SHA256-Signed JWT.policy.xml -------------------------------------------------------------------------------- /examples/DELETE a from to blobStorage account.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/DELETE a from to blobStorage account.xml -------------------------------------------------------------------------------- /examples/Decrypt AES Data using policy expressions.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Decrypt AES Data using policy expressions.xml -------------------------------------------------------------------------------- /examples/Encrypt data using expressions.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Encrypt data using expressions.policy.xml -------------------------------------------------------------------------------- /examples/Extract value from XML.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Extract value from XML.xml -------------------------------------------------------------------------------- /examples/Extracting multiple values from xml documents.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Extracting multiple values from xml documents.policy.xml -------------------------------------------------------------------------------- /examples/Filter on IP Address when using Application Gateway.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Filter on IP Address when using Application Gateway.policy.xml -------------------------------------------------------------------------------- /examples/Filter response content based on product name.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Filter response content based on product name.policy.xml -------------------------------------------------------------------------------- /examples/Forward Azure Event Grid Event.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Forward Azure Event Grid Event.xml -------------------------------------------------------------------------------- /examples/Forward gateway hostname to backend for generating correct urls in responses.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Forward gateway hostname to backend for generating correct urls in responses.policy.xml -------------------------------------------------------------------------------- /examples/GET a file from blobStorage account.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/GET a file from blobStorage account.xml -------------------------------------------------------------------------------- /examples/Generate Azure Relay Token.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Generate Azure Relay Token.policy.xml -------------------------------------------------------------------------------- /examples/Generate Shared Access Signature and forward request to Azure storage.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Generate Shared Access Signature and forward request to Azure storage.policy.xml -------------------------------------------------------------------------------- /examples/Get OAuth2 access token from AAD and forward it to the backend.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Get OAuth2 access token from AAD and forward it to the backend.policy.xml -------------------------------------------------------------------------------- /examples/Get OAuth2 access token from AAD using client id and certificate using key vault manage identity.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Get OAuth2 access token from AAD using client id and certificate using key vault manage identity.xml -------------------------------------------------------------------------------- /examples/Get X-CSRF token from SAP gateway using send request.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Get X-CSRF token from SAP gateway using send request.policy.xml -------------------------------------------------------------------------------- /examples/Handle Power Query access request to custom API.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Handle Power Query access request to custom API.policy.xml -------------------------------------------------------------------------------- /examples/List all inbound headers.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/List all inbound headers.policy.xml -------------------------------------------------------------------------------- /examples/Log errors to Stackify.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Log errors to Stackify.policy.xml -------------------------------------------------------------------------------- /examples/Look up Key Vault certificate using Managed Service Identity and call backend.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Look up Key Vault certificate using Managed Service Identity and call backend.policy.xml -------------------------------------------------------------------------------- /examples/Look up Key Vault secret using Managed Service Identity.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Look up Key Vault secret using Managed Service Identity.policy.xml -------------------------------------------------------------------------------- /examples/Loopback request for service at same API Management service.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Loopback request for service at same API Management service.xml -------------------------------------------------------------------------------- /examples/Mask async calls as synchronous.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Mask async calls as synchronous.policy.xml -------------------------------------------------------------------------------- /examples/PUT a file to blobStorage account.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/PUT a file to blobStorage account.xml -------------------------------------------------------------------------------- /examples/Parse a JWT token using expressions.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Parse a JWT token using expressions.xml -------------------------------------------------------------------------------- /examples/Perform basic authentication.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Perform basic authentication.policy.xml -------------------------------------------------------------------------------- /examples/Pre-authorize requests based on HTTP method with validate-jwt.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Pre-authorize requests based on HTTP method with validate-jwt.policy.xml -------------------------------------------------------------------------------- /examples/Query CosmosDB.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Query CosmosDB.policy.xml -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/README.md -------------------------------------------------------------------------------- /examples/Random load balancer simpler.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Random load balancer simpler.policy.xml -------------------------------------------------------------------------------- /examples/Random load balancer.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Random load balancer.policy.xml -------------------------------------------------------------------------------- /examples/Replay request on error.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Replay request on error.policy.xml -------------------------------------------------------------------------------- /examples/Request OAuth2 access token from SAP using AAD JWT token.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Request OAuth2 access token from SAP using AAD JWT token.xml -------------------------------------------------------------------------------- /examples/Request OAuth2 access token from SuccessFactors using AAD JWT token.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Request OAuth2 access token from SuccessFactors using AAD JWT token.xml -------------------------------------------------------------------------------- /examples/Return HTTP 405 if the HTTP Method of the request is not defined.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Return HTTP 405 if the HTTP Method of the request is not defined.xml -------------------------------------------------------------------------------- /examples/Return a blob URL signed with a user delegation SAS token.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Return a blob URL signed with a user delegation SAS token.xml -------------------------------------------------------------------------------- /examples/Route requests based on size.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Route requests based on size.policy.xml -------------------------------------------------------------------------------- /examples/Route requests to regional backend instances.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Route requests to regional backend instances.xml -------------------------------------------------------------------------------- /examples/Send request context information to the backend service.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Send request context information to the backend service.policy.xml -------------------------------------------------------------------------------- /examples/Set cache duration using response cache control header.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Set cache duration using response cache control header.policy.xml -------------------------------------------------------------------------------- /examples/Trigger Azure Data Factory Pipeline With Parameters.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Trigger Azure Data Factory Pipeline With Parameters.policy.xml -------------------------------------------------------------------------------- /examples/Trigger Azure Data Factory Pipeline.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Trigger Azure Data Factory Pipeline.policy.xml -------------------------------------------------------------------------------- /examples/Use custom error messages for jwt-validate policy with on-error handler.policy.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/Use custom error messages for jwt-validate policy with on-error handler.policy.xml -------------------------------------------------------------------------------- /examples/oauth-proxy/oauth-proxy-callback.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/oauth-proxy/oauth-proxy-callback.xml -------------------------------------------------------------------------------- /examples/oauth-proxy/oauth-proxy-construct-authorization-redirect-fragment.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/oauth-proxy/oauth-proxy-construct-authorization-redirect-fragment.xml -------------------------------------------------------------------------------- /examples/oauth-proxy/oauth-proxy-session-fragment.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/oauth-proxy/oauth-proxy-session-fragment.xml -------------------------------------------------------------------------------- /examples/oauth-proxy/oauth-proxy-sign-in.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/oauth-proxy/oauth-proxy-sign-in.xml -------------------------------------------------------------------------------- /examples/oauth-proxy/oauth-proxy-sign-out.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/oauth-proxy/oauth-proxy-sign-out.xml -------------------------------------------------------------------------------- /examples/oauth-proxy/oauth-proxy-slide-session-fragment.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/oauth-proxy/oauth-proxy-slide-session-fragment.xml -------------------------------------------------------------------------------- /examples/oauth-proxy/oauth-proxy-token-endpoint-fragment.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/oauth-proxy/oauth-proxy-token-endpoint-fragment.xml -------------------------------------------------------------------------------- /examples/oauth-proxy/oauth-proxy-validate-token-fragment.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/oauth-proxy/oauth-proxy-validate-token-fragment.xml -------------------------------------------------------------------------------- /examples/oauth-proxy/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/examples/oauth-proxy/readme.md -------------------------------------------------------------------------------- /media/vscode-snippets/apim-vscode-snippets-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/media/vscode-snippets/apim-vscode-snippets-1.png -------------------------------------------------------------------------------- /media/vscode-snippets/apim-vscode-snippets-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/media/vscode-snippets/apim-vscode-snippets-2.png -------------------------------------------------------------------------------- /media/vscode-snippets/apim-vscode-snippets-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/media/vscode-snippets/apim-vscode-snippets-3.png -------------------------------------------------------------------------------- /policy-expressions/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/policy-expressions/README.md -------------------------------------------------------------------------------- /vscode-snippets/xml.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/api-management-policy-snippets/HEAD/vscode-snippets/xml.json --------------------------------------------------------------------------------