rds.instances.delete

Delete a database instance and its machines

DELETE /rds/api/instances/{id}IAM rds:DeleteDBInstanceChanges stateDestructive

Refused with 400 while deletion protection is enabled. With finalBackup=true a full backup is taken first; if it fails nothing is deleted. The database then stays as `retained` (no machines, backups kept) until its retention period ends, and can be restored from. Deleting a `retained` database removes its backups at once.

Request syntax

DELETE /rds/api/instances/{id}

Path parameters

  • idRequired

    string

    Constraints: 3-64 chars, /^(?!ewdoc-)[a-z0-9-]+$/

Query parameters

  • finalBackupOptional

    enum

    true: take a full backup first and keep the backups for the retention period, as a `retained` database that can be restored from

    One of: true, false

Response

200 with { id, status: "deleting", finalBackup }; the machines are removed in the background.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Fields of data

  • idAlways

    string

    Database id
  • statusAlways

    "deleting"

    The database is being removed
  • finalBackupAlways

    boolean

    Whether a final backup is taken first and the database kept as retained

Checked against the handlers: every route test validates their answers against this schema.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow rds:DeleteDBInstance on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud rds instances delete id

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_rds_instances_delete.