取得待命集區和實例詳細資料 (預覽)
本文討論如何擷取待命集區和其中容器群組的相關信息。
待命集區詳細數據
使用待命集區運行時間檢視 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 容器執行個體 的待命集區。