你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
获取备用池和实例详细信息(预览版)
本文讨论如何检索有关备用池及其中的容器组的信息。
备用池详细信息
使用备用池运行时视图 API 获取备用池的当前状态,包括可用的容器组数及其当前预配状态。
az standby-container-group-pool status --resource-group myResourceGroup --name myStandbyPool
{
"id": "/subscriptions/401ef76a-dea9-45da-b19a-db3efced675b/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyContainerGroupPools/myStandbyPool/runtimeViews/latest",
"instanceCountSummary": [
{
"instanceCountsByState": [
{
"count": 5,
"state": "Creating"
},
{
"count": 20,
"state": "Running"
},
{
"count": 0,
"state": "Deleting"
}
]
}
],
"name": "latest",
"provisioningState": "Succeeded",
"resourceGroup": "myResourceGroup",
"type": "Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews"
}
Get-AzStandbyContainerGroupPoolStatus -ResourceGroupName myResourceGroup -Name myStandbyPool
Id: /subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyContainerGroupPools/myStandbyPool/runtimeViews/latest
InstanceCountSummary : {{
"instanceCountsByState": [
{
"state": "Creating",
"count": 20
},
{
"state": "Running",
"count": 5
},
{
"state": "Deleting",
"count": 0
}
],
}
}
Name : latest
ProvisioningState : Succeeded
ResourceGroupName : myResourceGroup
Type : Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyContainerGroupPools/myStandbyPool/runtimeViews/latest?api-version=2024-03-01
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyContainerGroupPools/myStandbyPool/runtimeViews/latest",
"name": "latest",
"type": "Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews",
"properties": {
"instanceCountSummary": [
{
"instanceCountsByState": [
{
"state": "Creating",
"count": 5
},
{
"state": "Running",
"count": 20
},
{
"state": "Deleting",
"count": 0
}
]
}
],
"provisioningState": "Succeeded"
}
}
后续步骤
详细了解 Azure 容器实例的备用池。