简体   繁体   中英

Enable API Management access to the REST API with ARM template

I've created the ARM template for Azure API Management deployment. In order to enable its REST API I need to select the Enable API Management REST API checkbox in Azure Portal as explained here . I'd like to activate this option within the ARM template but I'm unable to find which resource to add/modify in my template to achieve it.

This one https://docs.microsoft.com/en-us/rest/api/apimanagement/2019-01-01/tenantaccess/update . In general whatever Azure portal does it does through same public API used by templates. So usually you can open browser dev console and see what call is being made behind the scenes.

If anyone is still looking for an answer, the below template does the job of enabling Management REST API in Azure APIM

{
"type": "Microsoft.ApiManagement/service/tenant",
"apiVersion": "2020-06-01-preview",
"name": "[concat(parameters('ApimServiceName'), '/access')]",
"dependsOn": [
    "[resourceId('Microsoft.ApiManagement/service', parameters('ApimServiceName'))]"
],
"properties": {
    "enabled": true
}
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM