Hi @Jack Watts
Please refer to the below template for HTTP and logic app.
--For HTTP Function
{
"type":"Microsoft.ApiManagement/service/backends",
"apiVersion":"2020-06-01-preview",
"name":"[concat(parameters('your_common_name'), '/{anyname}')]",
"dependsOn":[
"[resourceId('Microsoft.ApiManagement/service', parameters('your_common_name'))]"
],
"properties":{
"description":"{yourdescription}",
"url":"https://{yourfunctionappname}.azurewebsites.net/api",
"protocol":"http", "resourceId":"https://management.azure.com/subscriptions/{yoursubscriptionID}/resourceGroups/{yourresourcegroupname}/providers/Microsoft.Web/sites/{functionappname}",
"credentials":{
"header":{
"x-functions-key":[
"{
{yourfunctionappkeynamed}}"
]
}
}
}
}
{
"type":"Microsoft.ApiManagement/service/namedValues",
"apiVersion":"2020-06-01-preview",
"name":"[concat(parameters('your_common_name'), '/{yourfunctionappkeynamed}')]",
"dependsOn":[
"[resourceId('Microsoft.ApiManagement/service', parameters('your_common_name'))]"
],
"properties":{
"displayName":"{keyname}",
"tags":[
"key",
"function",
"auto"
],
"secret":true
}
}
{
"type": "Microsoft.ApiManagement/service/properties",
"apiVersion": "2019-01-01",
"name": "[concat(parameters('your_common_name'), '/{keyname}')]",
"dependsOn": [
"[resourceId('Microsoft.ApiManagement/service', parameters('your_common_name'))]"
],
"properties": {
"displayName": "{anyname}",
"value": "{yourfunctionFunctionKey}",
"tags": [
"key",
"function",
"auto"
],
"secret": true
}
}
---For Logic App
{
"type":"Microsoft.ApiManagement/service/backends",
"apiVersion":"2020-06-01-preview",
"name":"[concat(parameters('your_common_name'), '/{anyname}')]",
"dependsOn":[
"[resourceId('Microsoft.ApiManagement/service', parameters('your_common_name'))]"
],
"properties":{
"description":"{yourdescription}",
"url":"{https://prod-25.westus2.logic.azure.com/workflows/84cef96340cd408fa41bsadasb6eb62a4/triggers}----{yourworkflowtriggerurl}",
"protocol":"http",
"resourceId":"https://management.azure.com/subscriptions/{yoursubscriptionID}/resourceGroups/{yourresourcegroupname}/providers/Microsoft.Logic/workflows/{workflowname}"
}
}
Reference:
https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource?tabs=json#return-value
https://learn.microsoft.com/en-us/azure/templates/microsoft.apimanagement/2019-01-01/service/backends?tabs=json
Let me know if you have any queries or concerns.