title | description | author | ms.author | ms.service | ms.custom | ms.topic | ms.date | ms.reviewer | |
---|---|---|---|---|---|---|---|---|---|
Update or delete a standby pool for Azure Container Instances (Preview) |
Learn how to update or delete a standby pool for Azure Container Instances. |
mimckitt |
mimckitt |
azure-container-instances |
|
how-to |
11/6/2024 |
tomvcassidy |
Important
Standby pools for Azure Container Instances is currently in preview. Previews are made available to you on the condition that you agree to the supplemental terms of use. Some aspects of this feature may change prior to general availability (GA).
This article steps through updating or deleting a standby pool for Azure Container Instances.
Before utilizing standby pools, complete the feature registration and configure role based access controls listed in the Standby pools for Azure Container Instances overview page.
A standby pool can be updated at any point in time. The settings that are adjustable after creation include maxReadyCapacity
and the associated containerGroupProfile
. If you update the container group profile of the standby pool, the new profile must also be in the same subscription and location as the standby pool. Once the profile has been updated, the pool will drain all existing instances and replaced them with new ones.
Update an existing standby pool using az standby-container-group-pool update.
az standby-container-group-pool update \
--resource-group myResourceGroup
--location WestCentralUS \
--name myStandbyPool \
--max-ready-capacity 20 \
--refill-policy always \
--container-profile-id "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroupProfiles/mycontainergroupprofile"
Update an existing standby pool using Update-AzStandbyContainerGroupPool.
Update-AzStandbyContainerGroupPool `
-ResourceGroup myResourceGroup `
-Location WestCentralUS `
-Name myStandbyPool `
-MaxReadyCapacity 20 `
-RefillPolicy always `
-ContainerProfileId "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroupProfiles/mycontainergroupprofile"
Update an existing a standby pool. Update your template and deploy it using az deployment group create or New-AzResourceGroupDeployment.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "West Central US"
},
"name": {
"type": "string",
"defaultValue": "myStandbyPool"
},
"maxReadyCapacity" : {
"type": "int",
"defaultValue": 10
},
"refillPolicy" : {
"type": "string",
"defaultValue": "always"
},
"containerGroupProfile" : {
"type": "string",
"defaultValue": "/subscriptions/{SubscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroupProfiles/mycontainergroupprofile"
}
},
"resources": [
{
"type": "Microsoft.StandbyPool/standbyContainerGroupPools",
"apiVersion": "2024-03-01",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"properties": {
"elasticityProfile": {
"maxReadyCapacity": "[parameters('maxReadyCapacity')]",
"refillPolicy": "[parameters('refillPolicy')]"
},
"containerGroupProfile": "[parameters('containerGroupProfile')]"
}
}
]
}
Update an existing standby pool using Create or Update.
PUT https://management.azure.com/subscriptions/{SubscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyContainerGroupPools/myStandbyPool?api-version=2024-03-01
Request Body
{
"properties": {
"elasticityProfile": {
"maxReadyCapacity": 20,
"refillPolicy": "always"
},
"containerGroupProperties": {
"containerGroupProfile": {
"id": "/subscriptions/{SubscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroupProfiles/mycontainergroupprofile",
"revision": 1
}
}
},
"location": "West Central US"
}
Delete an existing standby pool using az standby-container-group-pool delete.
az standby-container-group-pool delete \
--resource-group myResourceGroup \
--name myStandbyPool
Delete an existing standby pool using Update-AzStandbyContainerGroupPool.
Remove-AzStandbyContainerGroupPool `
-ResourceGroup myResourceGroup `
-Name myStandbyPool
Delete an existing standby pool using Delete.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}?api-version=2024-03-01
Get standby pool and container details using the standby pool runtime view APIs.