rds.branches.set-pool

How old the pool base may be before a new branch refreshes it

PATCH /rds/api/instances/{id}/branch-poolIAM rds:ModifyDBBranchSettingsChanges state

Request syntax

PATCH /rds/api/instances/{id}/branch-pool
{
  "staleAfterHours": "number"
}

Path parameters

  • idRequired

    string

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

Request body

  • staleAfterHoursRequired

    number

    A branch asked for on an older base refreshes it first; 0: always

    Constraints: integer, 0-720

Response

200 with the branch pool, as `list` shows it, with its new staleAfterHours.

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

Fields of data

  • idAlways

    string

    Branch pool id
  • statusAlways

    one of building, preparing, available, refreshing, deleting, failed

    State of the pool
  • hostAlways

    object, may be null

    The machine the branches run on; null before it exists
  • host.​dbInstanceIdAlways

    string

    Database id of the pool machine
  • host.​identifierAlways

    string

    Its name
  • host.​instanceClassAlways

    string

    Its instance type
  • host.​allocatedStorageGibAlways

    number

    Its storage, GiB
  • host.​statusAlways

    string

    Its state
  • baseRestoredAtAlways

    string, may be null

    The moment the base's data is from
  • maskedAtAlways

    string, may be null

    When the base was masked
  • maskRulesCurrentAlways

    boolean

    False when the masking rules changed since: the next branch refreshes the base
  • staleAfterHoursAlways

    number

    A branch asked for on an older base refreshes it first; 0: always
  • refreshDueAlways

    string, may be null

    Why the next branch will refresh the base first; null when it will not
  • operationAlways

    object, may be null

    The pool's operation in progress; null: none
  • operation.​idAlways

    string

    Operation id
  • operation.​kindAlways

    one of prepare-base, refresh-base

    What is being done
  • operation.​statusAlways

    one of pending, running

    Waiting or running
  • operation.​requestedAtAlways

    string

    When it was asked for
  • operation.​claimedAtWhen present

    string

    When the pool machine took it up
  • operation.​attemptsAlways

    number

    Tries so far
  • operation.​rulesHashWhen present

    string, may be null

    Fingerprint of the masking rules the base is masked with
  • usageAlways

    object, may be null

    Space, as the pool machine last reported; null: not reported
  • usage.​poolSizeBytesAlways

    number

    Size of the pool storage, bytes
  • usage.​poolFreeBytesAlways

    number

    Free, bytes
  • usage.​baseUsedBytesAlways

    number

    Taken by the base, bytes
  • usage.​branchesAlways

    array of object

    Each branch
  • usage.​branches[].​idAlways

    string

    Branch id
  • usage.​branches[].​usedBytesAlways

    number

    Bytes written since the clone
  • usage.​branches[].​runningAlways

    boolean

    Whether its server runs
  • usageReportedAtAlways

    string, may be null

    When usage was reported
  • lastErrorAlways

    string, may be null

    Why the pool last failed; null otherwise
  • emptySinceAlways

    string, may be null

    Since when the pool holds no branch; null while it holds some

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:ModifyDBBranchSettings 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 branches set-pool id --stale-after-hours 1

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