0

I have created an API Management resource in Azure. Within the API management, under APIs section > All APIs, I have added an inbound policy 'ip-filter'.

enter image description here

I wish to programatically change the contents of the policy's xml.

enter image description here

Is there a way to achieve this?

Thanks!

SD4
  • 439
  • 10
  • 27

1 Answers1

0

You could use the Set-AzApiManagementPolicy from the Az Powershell to set the Policy XML.

Set-AzApiManagementPolicy -Context $apimContext -PolicyFilePath "C:\contoso\policies\tenantpolicy.xml"

There are various scopes. You could set it at the tenant level,product level,api level and at the operation level. You could refer this for more information.

Satya V
  • 3,811
  • 1
  • 6
  • 9
  • Please consider accepting this solution if it had helped :) https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – Satya V Apr 09 '21 at 04:21