EC2.Client.
modify_capacity_reservation_fleet
(**kwargs)¶Modifies a Capacity Reservation Fleet.
When you modify the total target capacity of a Capacity Reservation Fleet, the Fleet automatically creates new Capacity Reservations, or modifies or cancels existing Capacity Reservations in the Fleet to meet the new total target capacity. When you modify the end date for the Fleet, the end dates for all of the individual Capacity Reservations in the Fleet are updated accordingly.
See also: AWS API Documentation
Request Syntax
response = client.modify_capacity_reservation_fleet(
CapacityReservationFleetId='string',
TotalTargetCapacity=123,
EndDate=datetime(2015, 1, 1),
DryRun=True|False,
RemoveEndDate=True|False
)
[REQUIRED]
The ID of the Capacity Reservation Fleet to modify.
The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to expired
and all of the Capacity Reservations in the Fleet expire.
The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify 5/31/2019
, 13:30:55
, the Capacity Reservation Fleet is guaranteed to expire between 13:30:55
and 14:30:55
on 5/31/2019
.
You can't specify EndDate and RemoveEndDate in the same request.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.Indicates whether to remove the end date from the Capacity Reservation Fleet. If you remove the end date, the Capacity Reservation Fleet does not expire and it remains active until you explicitly cancel it using the CancelCapacityReservationFleet action.
You can't specify RemoveEndDate and EndDate in the same request.
dict
Response Syntax
{
'Return': True|False
}
Response Structure
(dict) --
Return (boolean) --
Returns true
if the request succeeds; otherwise, it returns an error.