Skip to content

RDS  >  Operations  >  modify_db_capacity_reservation

modify_db_capacity_reservation

Operation

modify_db_capacity_reservation async

modify_db_capacity_reservation(request: ModifyDBCapacityReservationInput | ModifyDBCapacityReservationInputDict, /, *, plugins: list[Plugin] | None = None) -> ModifyDBCapacityReservationOutput
modify_db_capacity_reservation(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[ModifyDBCapacityReservationInputDict]) -> ModifyDBCapacityReservationOutput

Modifies a DB capacity reservation. You can change the reserved capacity in each Availability Zone of the reservation, and you can change the end date of the reservation. You can't change the Availability Zones of an existing reservation.

The reservation must be in the active state. A future-dated reservation that hasn't started isn't modifiable, and neither is a reservation that Amazon RDS is already modifying.

You must specify CapacityPerAvailabilityZone, EndDateType, or EndDate. A request that specifies none of the three changes nothing, and Amazon RDS rejects it.

Parameters:

Name Type Description Default
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
ModifyDBCapacityReservationOutput

An instance of ModifyDBCapacityReservationOutput.

Input

Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.

Model

ModifyDBCapacityReservationInput dataclass

Bases: _SerdeShape

Dataclass for ModifyDBCapacityReservationInput structure.

Attributes
capacity_per_availability_zone class-attribute instance-attribute
capacity_per_availability_zone: int | None = ...

The new number of DB instances to reserve in each Availability Zone of the reservation. Amazon RDS applies this number to every Availability Zone of the reservation.

An increase reserves more capacity at the time of the request, so it can fail when the Amazon Web Services Region has insufficient capacity.

This value multiplied by the number of Availability Zones counts against the DB instances quota for your Amazon Web Services account in the Amazon Web Services Region. Amazon RDS checks the quota only when you increase the value.

Constraints:

  • Minimum 1.

  • Can't be less than the highest number of DB instances that use the reservation in any single Availability Zone of the reservation. That number includes a DB instance that holds a unit of reserved capacity for a pending modification. To find that number for an Availability Zone, subtract AvailableCapacity from ReservedCapacityPerAvailabilityZone.

  • During a capacity commitment, can't be less than CommittedCapacityPerAvailabilityZone.

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

The identifier or the name of the DB capacity reservation to modify. You can specify the identifier, which has the prefix dbcr-, or the reservation name.

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

The new end date for the reservation, in Universal Coordinated Time (UTC). Required when EndDateType is limited. Don't specify a value when EndDateType is unlimited.

When you specify EndDate, you must also specify EndDateType.

Constraints:

  • Must be a date and time in the future.

  • During a capacity commitment, must be at or after CommitmentEndDate.

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

The end date type for the reservation.

Valid Values:

  • limited - The reservation has a specific end date. You must also specify EndDate.

  • unlimited - The reservation doesn't expire. Don't specify EndDate.

Dictionaries

ModifyDBCapacityReservationInputDict

Bases: TypedDict

Dictionary form of ModifyDBCapacityReservationInput.

Attributes
capacity_per_availability_zone instance-attribute
capacity_per_availability_zone: int | None

The new number of DB instances to reserve in each Availability Zone of the reservation. Amazon RDS applies this number to every Availability Zone of the reservation.

An increase reserves more capacity at the time of the request, so it can fail when the Amazon Web Services Region has insufficient capacity.

This value multiplied by the number of Availability Zones counts against the DB instances quota for your Amazon Web Services account in the Amazon Web Services Region. Amazon RDS checks the quota only when you increase the value.

Constraints:

  • Minimum 1.

  • Can't be less than the highest number of DB instances that use the reservation in any single Availability Zone of the reservation. That number includes a DB instance that holds a unit of reserved capacity for a pending modification. To find that number for an Availability Zone, subtract AvailableCapacity from ReservedCapacityPerAvailabilityZone.

  • During a capacity commitment, can't be less than CommittedCapacityPerAvailabilityZone.

db_capacity_reservation_identifier instance-attribute
db_capacity_reservation_identifier: Required[str]

The identifier or the name of the DB capacity reservation to modify. You can specify the identifier, which has the prefix dbcr-, or the reservation name.

end_date instance-attribute
end_date: datetime | None

The new end date for the reservation, in Universal Coordinated Time (UTC). Required when EndDateType is limited. Don't specify a value when EndDateType is unlimited.

When you specify EndDate, you must also specify EndDateType.

Constraints:

  • Must be a date and time in the future.

  • During a capacity commitment, must be at or after CommitmentEndDate.

end_date_type instance-attribute
end_date_type: str | None

The end date type for the reservation.

Valid Values:

  • limited - The reservation has a specific end date. You must also specify EndDate.

  • unlimited - The reservation doesn't expire. Don't specify EndDate.

Output

ModifyDBCapacityReservationOutput dataclass

Bases: _SerdeShape

Dataclass for ModifyDBCapacityReservationOutput structure.

Attributes

db_capacity_reservation class-attribute instance-attribute
db_capacity_reservation: DBCapacityReservation | None = ...

Contains the details of the modified DB capacity reservation.

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.