deploy.autoscaling.get

Read an app's autoscaling: config, state, machines, per-minute series, decisions

GET /deploy/api/apps/{id}/autoscalingIAM deploy:DescribeAppRead

Request syntax

GET /deploy/api/apps/{id}/autoscaling

Path parameters

  • idRequired

    string

    Constraints: uuid

Query parameters

  • hoursOptional

    number

    How far back the series reach, in hours

    Constraints: integer, 1-48

    Default: 3

Response

200 with `data`: config (null when off), the controller’s last reading, the machines (one draining at most), `hours` of per-minute series and the 50 newest decisions.

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

Fields of data

  • appIdAlways

    string

    The app
  • configAlways

    object, may be null

    null: replicas are fixed
  • config.​minReplicasAlways

    number

    Fewest machines
  • config.​maxReplicasAlways

    number

    Most machines; above 1 puts the app behind its load balancer at every size
  • config.​policiesAlways

    array of object

    The scaling policy, a list of exactly one
  • config.​policies[].​metricAlways

    one of cpu, memory, requests, queue

    What is read per machine: cpu or memory (%), requests (per second), queue (messages waiting)
  • config.​policies[].​targetAlways

    number

    The reading per machine to hold: a percentage (≤ 100), requests per second, or messages
  • config.​policies[].​queueIdWhen present

    string, may be null

    The queue whose backlog is read; only and always for metric queue
  • config.​scaleOutCooldownSecondsWhen present

    number

    Seconds after a scale-out before the next one
  • config.​scaleInCooldownSecondsWhen present

    number

    Seconds after any change before a scale-in
  • config.​drainSecondsWhen present

    number

    Most seconds a machine out of the load balancer may finish its requests before it is deleted
  • stateAlways

    object

    What the controller remembers
  • state.​lastScaleOutAtWhen present

    string, may be null

    The last scale-out
  • state.​lastScaleInAtWhen present

    string, may be null

    The last scale-in
  • state.​lastReadingWhen present

    object, may be null

    The last check
  • state.​lastReading.​atAlways

    string

    When the check ran
  • state.​lastReading.​metricAlways

    one of cpu, memory, requests, queue

    The metric read
  • state.​lastReading.​valueAlways

    number, may be null

    The reading per machine; null when there was none
  • state.​lastReading.​machinesAlways

    number

    Machines measured
  • state.​lastReading.​desiredAlways

    number

    Machines the check asked for
  • state.​lastReading.​noteAlways

    string

    The decision, in a sentence
  • state.​drainingWhen present

    object, may be null

    A machine out of the load balancer, finishing its requests before it is deleted
  • state.​draining.​instanceIdAlways

    string

    The machine
  • state.​draining.​sinceAlways

    string

    When it left the load balancer
  • replicasAlways

    number

    Machines the app runs on now (the controller owns it while on)
  • loadBalancedAlways

    boolean

    Whether the app sits behind its own load balancer
  • machinesAlways

    array of object

    The app’s machines, oldest first
  • machines[].​instanceIdAlways

    string

    The machine’s instance id
  • machines[].​nameAlways

    string, may be null

    Its name
  • machines[].​createdAtAlways

    string

    When it was bought
  • machines[].​drainingAlways

    boolean

    Out of the load balancer, about to be deleted
  • machines[].​requestsInFlightAlways

    number, may be null

    Requests it was serving on its last report; null before its agent sent one
  • metricsAlways

    array of one of cpu, memory, requests, queue

    Metrics an app can scale on
  • historyAlways

    map

    Per-minute series recorded by each pass, oldest first
  • eventsAlways

    array of object

    The 50 newest autoscaling decisions, newest first
  • events[].​atAlways

    string

    When
  • events[].​levelAlways

    string

    info, warn or error
  • events[].​messageAlways

    string

    What was decided or done, and why

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 deploy:DescribeApp 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 deploy autoscaling get id

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