View a markdown version of this page

CancelDBCapacityReservation - Amazon Relational Database Service

CancelDBCapacityReservation

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 AWS 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.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

DBCapacityReservationIdentifier

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.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Pattern: [a-z](?:-?[a-z0-9]+){0,15}

Required: Yes

Response Elements

The following element is returned by the service.

DBCapacityReservation

Contains the details of the canceled DB capacity reservation.

Type: DBCapacityReservation object

Errors

For information about the errors that are common to all actions, see Common Error Types.

DBCapacityReservationNotFound

DBCapacityReservationIdentifier doesn't refer to an existing DB capacity reservation.

HTTP Status Code: 404

InvalidDBCapacityReservationState

The DB capacity reservation isn't in a valid state.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: