Updated on 2024-11-26 GMT+08:00

Scaling Up a DCS Instance

Function

This API is used to scale up a DCS Redis instance in the Running state.

URI

POST /v1.0/{project_id}/instances/{instance_id}/extend

Table 1 describes the parameters.
Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Project ID. For details on how to obtain the value of this parameter, see Obtaining a Project ID.

instance_id

String

Yes

Instance ID.

Request

Request parameters

Table 2 describes the request parameters.
Table 2 Parameter description

Parameter

Type

Mandatory

Description

new_capacity

Integer

Yes

New specification (memory space) of the DCS instance. The new specification to which the DCS instance will be scaled up must be greater than the current specification. Unit: GB.

The value must be supported specifications. For details, see the Total Memory (GB) column in the "DCS Instance Specifications" section in Distributed Cache Service User Guide.

newCapacityString

String

Yes

New specification (memory space) of the DCS instance. The new specification to which the DCS instance will be scaled up must be greater than the current specification. Unit: GB.

The value must be supported specifications. For details, see the Total Memory (GB) column in the "DCS Instance Specifications" section in Distributed Cache Service User Guide.

spec_code

String

Yes

DCS instance specification code.

For details about the specification codes, see the Specification Code (spec_code in the API) column in the "DCS Instance Specifications" section in Distributed Cache Service User Guide.

Example request

  • Request URL:
    POST https://{dcs_endpoint}/v1.0/{project_id}/instances/{instance_id}/extend
  • Example:
    {
        "spec_code":"redis.single.au1.large.4",
        "new_capacity":4,
        "newCapacityString":"4"
    }

Response

Response parameters

None

Example response

None

Status Code

Table 3 describes the status code of successful operations. For details about other status codes, see Table 1.

Table 3 Status code

Status Code

Description

204

Scale-up task submitted successfully.