modify_capacity_reservation_fleet
¶
modify_capacity_reservation_fleet(
*,
config_overrides: Optional[EC2ClientConfig] = None,
capacity_reservation_fleet_id: Optional[CapacityReservationFleetId] = None,
total_target_capacity: Optional[Integer] = None,
end_date: Optional[MillisecondDateTime] = None,
dry_run: Optional[Boolean] = None,
remove_end_date: Optional[Boolean] = None,
) -> ModifyCapacityReservationFleetResult
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.
Parameters:
-
capacity_reservation_fleet_id(Optional[CapacityReservationFleetId], default:None) –The ID of the Capacity Reservation Fleet to modify.
-
total_target_capacity(Optional[Integer], default:None) –The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value, together with the instance type weights that you assign to each instance type used by the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see Total target capacity in the Amazon EC2 User Guide.
-
end_date(Optional[MillisecondDateTime], default:None) –The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to
expiredand 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 between13:30:55and14:30:55on5/31/2019.You can't specify EndDate and RemoveEndDate in the same request.
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
remove_end_date(Optional[Boolean], default:None) –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.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
49261 49262 49263 49264 49265 49266 49267 49268 49269 49270 49271 49272 49273 49274 49275 49276 49277 49278 49279 49280 49281 49282 49283 49284 49285 49286 49287 49288 49289 49290 49291 49292 49293 49294 49295 49296 49297 49298 49299 49300 49301 49302 49303 49304 49305 49306 49307 49308 49309 49310 49311 49312 49313 49314 49315 49316 49317 49318 49319 49320 49321 49322 49323 | |