Skip to content

RDS  >  Operations  >  cancel_db_capacity_reservation

cancel_db_capacity_reservation

Operation

cancel_db_capacity_reservation async

cancel_db_capacity_reservation(request: CancelDBCapacityReservationInput | CancelDBCapacityReservationInputDict, /, *, plugins: list[Plugin] | None = None) -> CancelDBCapacityReservationOutput
cancel_db_capacity_reservation(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[CancelDBCapacityReservationInputDict]) -> CancelDBCapacityReservationOutput

Cancels a DB capacity reservation. Amazon RDS changes the state of the reservation to cancelled and stops reporting available capacity for it. Amazon RDS then releases the reserved capacity.

A DB instance that uses the reservation keeps running. It continues on unreserved capacity, and Amazon RDS doesn't stop it or modify it. However, Amazon RDS no longer reserves capacity for the DB instance. If Amazon RDS later moves the DB instance to different hardware, for example during hardware maintenance, that move can fail when the Amazon Web Services Region has insufficient capacity for the DB instance class.

You can't cancel a reservation in the active state during a capacity commitment. The response of DescribeDBCapacityReservations reports the end of the commitment in CommitmentInfo.

Constraints:

  • The reservation must be in the active, assessing, or delayed state.

  • The reservation must not be past its end date.

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
CancelDBCapacityReservationOutput

An instance of CancelDBCapacityReservationOutput.

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

CancelDBCapacityReservationInput dataclass

Bases: _SerdeShape

Dataclass for CancelDBCapacityReservationInput structure.

Attributes
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 cancel. You can specify the identifier, which has the prefix dbcr-, or the reservation name.

Dictionaries

CancelDBCapacityReservationInputDict

Bases: TypedDict

Dictionary form of CancelDBCapacityReservationInput.

Attributes
db_capacity_reservation_identifier instance-attribute
db_capacity_reservation_identifier: Required[str]

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

Output

CancelDBCapacityReservationOutput dataclass

Bases: _SerdeShape

Dataclass for CancelDBCapacityReservationOutput structure.

Attributes

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

Contains the details of the canceled 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.