"Microsoft.Solutions.ArmApiControl" fails

Matthew Balkwill 1 Reputation point
2021-11-10T20:04:55.083+00:00

I have created managed app with a CustomRP.
Most of the elements defined here https://learn.microsoft.com/en-us/azure/azure-resource-manager/managed-applications/create-uidefinition-elements work OK.
However when I try to use "Microsoft.Solutions.ArmApiControl".

I am trying to use it to provide the available options for a drop-down list. Here is the excert of how I am using it :-
{
"name": "armApiControl",
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "GET",
"path": "/subscriptions/8bb381b1-XXXX-XXXX-XXXX-aeeeb2071090/resourceGroups/mattmappresrg/providers/Microsoft.CustomProviders/resourceProviders/public/nodes/" <== this is statically added for now
}
},
{
"name": "providerDropDown",
"type": "Microsoft.Common.DropDown",
"label": "Available storage accounts (Arm API)",
"toolTip": "Select a storage account from the available list.",
"constraints": {
"allowedValues": "[map(steps('settings').armApiControl.value, (item) => json(concat('{\"label\":\"', item.name, '\",\"value\":\"', item.name, '\"}')))]"
},
"visible": true
}

When I go to the dropdown field it says "No available items", even though there are definitely resources present.
I've tried the above AllowedValues line with the "json" function instead of the "parse" function but it makes no difference. (All examples use "parse" but I couldn;t see any documntation for this so assumed it might have been superceded by "json").

If I run the following ARM command (using the same path value as above), it works, and I get a list of resources back. Furthermore I believe the structure i.e. tere is a top level "value" field which contains a list of dinctionaries, each of which has a "name" field. :-

az resource show --id /subscriptions/8bb381b1-XXXX-XXXX-XXXX-aeeeb2071090/resourceGroups/mattmappresrg/providers/Microsoft.CustomProviders/resourceProviders/public/nodes/

Any suggestions of what is wrong would be useful.

I've tried to print out the output of the armApiControl as per https://stackoverflow.com/questions/65894871/microsoft-common-armapicontrol-trying-to-use-this-in-createuidef, but I then get an error saying the system was unable to create the InfoBox. So any suggestion of how to debug this would be good.

I should add that I am using a ManagedApp, with a customRP, with a proxy endpoint.
I've tried setting proxy as "Proxy" and "Proxy,Cache". In neither case do I see a GET request at the endpoint when I click on the dropdown.

Azure Managed Applications
Azure Managed Applications
An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.
113 questions
Azure Resource Mover
Azure Resource Mover
An Azure service used for moving multiple resources between Azure regions.
203 questions
{count} votes