A community member has associated this post with a similar question:
"Microsoft.Solutions.ArmApiControl" fails

Only moderators can edit this content.

Issue calling Microsoft.Solutions.ArmApiControl

Matthew Balkwill 1 Reputation point
2021-11-09T19:10:51.58+00:00

I have created a Managed App,. which uses a proxy endpoint.

I'm trying to use the "Microsoft.Solutions.ArmApiControl" element to populate some drop items for another element.
However I keep getting the error "Failed to create element of type: 'Microsoft.Solutions.ArmApiControl' named 'armApiControl'".

I have tried using the basic example of this element from the documentation and I still get the same issue.
It seems as if I am just now allowed to use it.
Is there some authorisation needed, or is it only available in certain locations.

Fyi .. I'm using location westus2, and subscription "White Spaces Special Project".

Below is the viewDefintion.json file used for my CustomRP. Search for "Microsoft.Solutions.ArmApiControl" to see where it is referenced.

{
"$schema": "https://schema.management.azure.com/schemas/viewdefinition/0.0.1-preview/ViewDefinition.json#",
"contentVersion": "0.0.0.1",
"views": [
{
"kind": "Overview",
"properties": {
"header": "Welcome to your Azure Managed Application - Proxy",
"description": "This managed application is for demo purposes only.",
"commands": [
{
"displayName": "Test Action",
"path": "testAction"
}
]
}
},
{
"kind": "CustomResources",
"properties": {
"displayName": "Nodes",
"version": "1.0.0",
"resourceType": "nodes",
"createUIDefinition": {
"handler": "Microsoft.Azure.CreateUIDef",
"parameters": {
"config": {"basics": {}},
"steps": [
{
"name": "settings",
"label": "Configuration",
"bladeTitle": "Configuration",
"elements": [
{
"name": "Id",
"type": "Microsoft.Common.TextBox",
"label": "Id",
"constraints": {
"constraints": {
"required": true,
"regex": "^[a-z0-9A-Z/.]{3,79}$",
"validationMessage": "The Id must be between 3 and 79 characters long and contain letters, numbers and full stops only."
}
}
},
{
"name": "Type",
"type": "Microsoft.Common.DropDown",
"label": "type",
"multiselect": false,
"constraints": {
"allowedValues": [
{
"label": "vCU",
"value": "vCU"
},
{
"label": "vDU",
"value": "vDU"
}
],
"required": true
}
},
{
"name": "Janus",
"type": "Microsoft.Common.Section",
"label": "Janus",
"elements": [
{
"name": "Host",
"type": "Microsoft.Common.TextBox",
"label": "Host"
},
{
"name": "Port",
"type": "Microsoft.Common.TextBox",
"label": "Port"
}
],
"visible": true
}
]
}
],
"outputs": {
"Id": "[steps('settings').Id]",
"Type": "[steps('settings').Type]",
"Config": {
"Janus": {
"Host": "[steps('settings').Janus.Host]",
"Port": "[steps('settings').Janus.Port]"
}
}
}
}
},
"columns": [
{"key": "properties.Id", "displayName": "Id"},
{"key": "properties.Type", "displayName": "Type"},
{"key": "properties.Config.Janus.Host", "displayName": "Janus-Host"},
{"key": "properties.Config.Janus.Port", "displayName": "Janus-Port"}
]
}
},
{
"kind": "CustomResources",
"properties": {
"displayName": "NodeGroups",
"version": "1.0.0",
"resourceType": "nodeGroups",
"createUIDefinition": {
"handler": "Microsoft.Azure.CreateUIDef",
"parameters": {
"config": {"basics": {}},
"steps": [
{
"name": "settings",
"label": "Configuration",
"bladeTitle": "Configuration",
"elements": [
{
"name": "Id",
"type": "Microsoft.Common.TextBox",
"label": "Id",
"constraints": {
"required": true
}
},
{
"name": "infoBox1",
"type": "Microsoft.Common.InfoBox",
"visible": true,
"options": {
"icon" : "None",
"text" : "[concat(resourceGroup().id, '/providers/Microsoft.CustomProviders/resourceProviders/public/nodes']"
}
},
{
"name": "armApiControl",
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "GET",
"path": "[concat(subscription().id, '/providers/Microsoft.Storage/storageAccounts?api-version=2021-04-01')]"
}
},
{
"name": "infoBox2",
"type": "Microsoft.Common.InfoBox",
"visible": true,
"options": {
"icon" : "None",
"text" : "[steps('settings').armApiControl.value]"
}
},
{
"name": "providerDropDown",
"type": "Microsoft.Common.DropDown",
"label": "vDUs",
"constraints": {
"allowedValues": "[map(steps('settings').armApiControl.value, (item) => parse(concat('{\"label\":\"', item.name, '\",\"value\":\"', item.name, '\"}')))]",
"required": true
},
"visible": true
}
]
}
],
"outputs": {
"Id": "[steps('settings').Id]",
"vDUs": "[steps('settings').vDUs]"
}
}
},
"columns": [
{"key": "properties.Id", "displayName": "Id"}
]
}
}
]
}

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.
112 questions
{count} votes