本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
取消容量預留機群
不再需要容量預留機群及其預留的容量時,您可以取消該機群。取消機群時,其狀態會變更為 cancelled
,且無法再建立新的容量預留。此外,叢集中的所有個別容量保留都會被取消。先前以預留容量執行的執行個體會在共用容量中繼續正常執行。
若要取消容量預留機群
使用指cancel-capacity-reservation-fleets AWS CLI 令。
aws ec2 cancel-capacity-reservation-fleets \ --capacity-reservation-fleet-ids
cr_fleet_ids
下列為範例輸出。
{
"SuccessfulFleetCancellations": [
{
"CurrentFleetState": "state
",
"PreviousFleetState": "state
",
"CapacityReservationFleetId": "cr_fleet_id_1
"
},
{
"CurrentFleetState": "state
",
"PreviousFleetState": "state
",
"CapacityReservationFleetId": "cr_fleet_id_2
"
}
],
"FailedFleetCancellations": [
{
"CapacityReservationFleetId": "cr_fleet_id_3
",
"CancelCapacityReservationFleetError": [
{
"Code": "code
",
"Message": "message
"
}
]
}
]
}
範例:成功取消
aws ec2 cancel-capacity-reservation-fleets \ --capacity-reservation-fleet-ids crf-abcdef01234567890
下列為範例輸出。
{
"SuccessfulFleetCancellations": [
{
"CurrentFleetState": "cancelling",
"PreviousFleetState": "active",
"CapacityReservationFleetId": "crf-abcdef01234567890"
}
],
"FailedFleetCancellations": []
}