Skip to content

EC2  >  Operations  >  modify_capacity_reservation_fleet

modify_capacity_reservation_fleet

Operation

modify_capacity_reservation_fleet async

modify_capacity_reservation_fleet(input: ModifyCapacityReservationFleetInput, plugins: list[Plugin] | None = None) -> ModifyCapacityReservationFleetOutput

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:

Name Type Description Default
input ModifyCapacityReservationFleetInput

An instance of ModifyCapacityReservationFleetInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
ModifyCapacityReservationFleetOutput

An instance of ModifyCapacityReservationFleetOutput.

Input

ModifyCapacityReservationFleetInput dataclass

Bases: _SerdeShape

Dataclass for ModifyCapacityReservationFleetInput structure.

Attributes

capacity_reservation_fleet_id class-attribute instance-attribute
capacity_reservation_fleet_id: str | None = ...

The ID of the Capacity Reservation Fleet to modify.

dry_run class-attribute instance-attribute
dry_run: bool | 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 is UnauthorizedOperation.

end_date class-attribute instance-attribute
end_date: datetime | None = ...

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.

remove_end_date class-attribute instance-attribute
remove_end_date: bool | 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.

total_target_capacity class-attribute instance-attribute
total_target_capacity: int | 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.

Output

ModifyCapacityReservationFleetOutput dataclass

Bases: _SerdeShape

Dataclass for ModifyCapacityReservationFleetOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

return_ class-attribute instance-attribute
return_: bool | None = ...

Returns true if the request succeeds; otherwise, it returns an error.