Request a container group from a standby pool using az deployment group create or New-AzResourceGroupDeployment and specifying the standby pool and container group profile. For more information on using config maps during container requests, see use config maps.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subscriptionId": {
"type": "string",
"metadata": {
"description": "The subscription ID."
}
},
"resourceGroup": {
"type": "string",
"metadata": {
"description": "The name of the resource group."
}
},
"location": {
"type": "string",
"metadata": {
"description": "Location for the resource."
},
"defaultValue": "West Central US"
},
"containerGroupName": {
"type": "string",
"metadata": {
"description": "The name of the container group."
}
},
"standbyPoolName": {
"type": "string",
"metadata": {
"description": "The name of the standby pool."
}
},
"containerGroupProfileName": {
"type": "string",
"metadata": {
"description": "The name of the container group profile."
}
},
"myContainerProfile": {
"type": "string",
"metadata": {
"description": "The name of the container profile."
}
},
"newKey": {
"type": "string",
"metadata": {
"description": "The new key for the config map."
}
},
"newValue": {
"type": "string",
"metadata": {
"description": "The new value for the config map."
}
},
"revisionNumber": {
"type": "int",
"metadata": {
"description": "The revision number for the container group profile."
}
}
},
"resources": [
{
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2024-05-01-preview",
"name": "[parameters('containerGroupName')]",
"location": "[parameters('location')]",
"properties": {
"standByPoolProfile": {
"id": "[concat('/subscriptions/', parameters('subscriptionId'), '/resourceGroups/', parameters('resourceGroup'), '/providers/Microsoft.StandbyPool/standbyContainerGroupPools/', parameters('standbyPoolName'))]"
},
"containerGroupProfile": {
"id": "[concat('/subscriptions/', parameters('subscriptionId'), '/resourceGroups/', parameters('resourceGroup'), '/providers/Microsoft.ContainerInstance/mycontainergroupprofile/', parameters('containerGroupProfileName'))]",
"revision": "[parameters('revisionNumber')]"
},
"containers": [
{
"name": "[parameters('mycontainergroupprofile')]",
"properties": {
"configMap": {
"keyValuePairs": {
"[parameters('newKey')]": "[parameters('newValue')]"
}
}
}
}
]
}
}
],
"outputs": {
"containerGroupId": {
"type": "string",
"value": "[resourceId('Microsoft.ContainerInstance/containerGroups', parameters('containerGroupName'))]"
}
}
}
Request a container group from a standby pool using Create or Update and specifying the standby pool and container group profile. For more information on using config maps during container requests, see use config maps.
PUT
https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroups/myContainerGroup?api-version=2024-05-01-preview
Request Body
{
"location": "{location}",
"properties": {
"standByPoolProfile":{
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyContainerGroupPools/myStandbyPool"
},
"containerGroupProfile": {
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroupProfiles/mycontainergroupprofile",
"revision": {revisionNumber}
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identity}": {}
},
"containers": [
{
"name": "{mycontainergroupprofile}",
"properties": {
"configMap": {
"keyValuePairs": {
"{newKey}": "{newValue}"
}
}
}
}
]
}
}
}