rds.encryption.start

Encrypt a database created before disk encryption: an encrypted copy streams beside it, then a switchover of seconds in its maintenance window (or now)

POST /rds/api/instances/{id}/encryptIAM rds:EncryptDBInstanceChanges stateDestructive

Single-node databases. Same address, credentials and backup stanza; plaintext backups move to a new encrypted repository with a full backup first. Writes pause only for the switchover (the old machine stops, the address moves, the encrypted machine is promoted). The old disk is kept holdDays, then zero-filled and deleted.

Request syntax

POST /rds/api/instances/{id}/encrypt
{
  "schedule": "enum",
  "deleteOldAfterHold": "boolean"
}

Path parameters

  • idRequired

    string

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

Request body

  • scheduleOptional

    enum

    window: switch over in the maintenance window; now: as soon as the copy is ready

    One of: now, window

    Default: "window"

  • deleteOldAfterHoldOptional

    boolean

    Zero-fill and delete the old disk (and plaintext backups) when the hold ends; false keeps them until deleted by hand

    Default: true

Response

202 with the run.

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

Fields of data

  • idAlways

    string

    Run id
  • stateAlways

    one of queued, backups, standby, switching, holding, done, failed, cancelled

    queued, backups (moving to an encrypted repository), standby (encrypted copy streaming), switching, holding (encrypted; old disk kept), done, failed or cancelled
  • scheduleAlways

    one of now, window

    When the switchover may happen
  • requestedByAlways

    one of owner, operator

    Who asked
  • deleteOldAfterHoldAlways

    boolean

    The old disk is deleted when the hold ends
  • batchIdAlways

    string, may be null

    Shared by the runs of one encrypt-all; null otherwise
  • stepAlways

    string, may be null

    What it is doing now
  • errorAlways

    string, may be null

    Why it stopped; null otherwise
  • switchStartedAtAlways

    string, may be null

    When writes paused
  • switchFinishedAtAlways

    string, may be null

    When writes were accepted on the encrypted disk
  • switchoverSecondsAlways

    number, may be null

    Writes paused for this long
  • holdUntilAlways

    string, may be null

    When the old disk may be wiped
  • oldVolumeWipedAtAlways

    string, may be null

    When the old disk was zero-filled and deleted
  • createdAtAlways

    string

    When it was asked for
  • finishedAtAlways

    string, may be null

    When it ended

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:EncryptDBInstance 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 encryption start id

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