本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
檢視容量預留機群
您可以隨時檢視容量預留機群的組態和容量資訊。檢視機群也會提供有關機群內個別容量預留的詳細資訊。
若要檢視容量預留機群
使用 describe-capacity-reservation-fleets AWS CLI 命令。
aws ec2 describe-capacity-reservation-fleets \ --capacity-reservation-fleet-ids
cr_fleet_ids
下列為範例輸出。
{
"CapacityReservationFleets": [
{
"Status": "status
",
"EndDate": "yyyy-mm-ddThh:mm:ss.000Z
",
"InstanceMatchCriteria": "open",
"Tags": [],
"CapacityReservationFleetId": "cr_fleet_id
",
"Tenancy": "dedicated|default
",
"InstanceTypeSpecifications": [
{
"CapacityReservationId": "cr1_id
",
"AvailabilityZone": "cr1_availability_zone
",
"FulfilledCapacity": cr1_used_capacity
,
"Weight": cr1_instance_type_weight
,
"CreateDate": "yyyy-mm-ddThh:mm:ss.000Z
",
"InstancePlatform": "cr1_platform
",
"TotalInstanceCount": cr1_number of instances
,
"Priority": cr1_instance_type_priority
,
"EbsOptimized": true|false
,
"InstanceType": "cr1_instance_type
"
},
{
"CapacityReservationId": "cr2_id
",
"AvailabilityZone": "cr2_availability_zone
",
"FulfilledCapacity": cr2_used_capacity
,
"Weight": cr2_instance_type_weight
,
"CreateDate": "yyyy-mm-ddThh:mm:ss.000Z
",
"InstancePlatform": "cr2_platform
",
"TotalInstanceCount": cr2_number of instances
,
"Priority": cr2_instance_type_priority
,
"EbsOptimized": true|false
,
"InstanceType": "cr2_instance_type
"
},
],
"TotalTargetCapacity": total_target_capacity
,
"TotalFulfilledCapacity": total_target_capacity
,
"CreateTime": "yyyy-mm-ddThh:mm:ss.000Z
",
"AllocationStrategy": "prioritized"
}
]
}
範例
aws ec2 describe-capacity-reservation-fleets \ --capacity-reservation-fleet-ids crf-abcdef01234567890
下列為範例輸出。
{
"CapacityReservationFleets": [
{
"Status": "active",
"EndDate": "2021-12-31T23:59:59.000Z",
"InstanceMatchCriteria": "open",
"Tags": [],
"CapacityReservationFleetId": "crf-abcdef01234567890",
"Tenancy": "default",
"InstanceTypeSpecifications": [
{
"CapacityReservationId": "cr-1234567890abcdef0",
"AvailabilityZone": "us-east-1a",
"FulfilledCapacity": 5.0,
"Weight": 1.0,
"CreateDate": "2021-07-02T08:34:33.398Z",
"InstancePlatform": "Linux/UNIX",
"TotalInstanceCount": 5,
"Priority": 1,
"EbsOptimized": true,
"InstanceType": "m5.xlarge"
}
],
"TotalTargetCapacity": 5,
"TotalFulfilledCapacity": 5.0,
"CreateTime": "2021-07-02T08:34:33.397Z",
"AllocationStrategy": "prioritized"
}
]
}
容量預留機群狀態
容量預留機群可以是下列任一狀態:
-
submitted
— 已提交容量保留機群請求,Amazon 正在EC2準備建立容量保留。 -
modifying
– 正在修改容量保留機群。修改完前,機群會一直維持在此狀態。 -
active
– 容量保留機群已達到其總目標容量,並嘗試維持此容量。機群會一直維持在該狀態,直到遭修改或刪除。 -
partially_fulfilled
– 容量保留機群已部分達到總目標容量。Amazon EC2容量不足,無法滿足總目標容量。機群正嘗試以非同步方式達到總目標容量。 -
expiring
– 容量保留機群已到結束日期,且即將過期。其一或多個容量預留可能仍作用中。 -
expired
– 容量保留機群已到結束日期。機群及其容量預留已過期。機群無法建立新的容量預留。 -
cancelling
– 容量保留機群正遭取消。其一或多個容量預留可能仍作用中。 -
cancelled
– 容量保留機群已手動取消。機群及其容量預留已取消,且機群無法建立新的容量預留。 -
failed
– 容量保留機群無法為指定的執行個體類型預留容量。