Help Center> GeminiDB> API Reference> API Description> DB Instance Management> Modifying DB Instance Specifications

Modifying DB Instance Specifications

Function

This API is used to modify DB instance specifications.

Services will be interrupted for 5 to 10 minutes when you modify DB instance specifications. Exercise caution when performing this operation.

Constraints

  • This API supports GaussDB(for Cassandra) instances.
  • This API supports both yearly/monthly and pay-per-use DB instances.
  • The instance class can be scaled up or down.
  • The new specifications cannot be the same as the original specifications.
  • Specifications can be modified only when the DB instance status is normal.

URI

  • URI format

    PUT /v3/{project_id}/instances/{instance_id}/resize

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    instance_id

    Yes

    Specifies the DB instance ID.

Requests

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    resize

    Yes

    Object

    Specifies the specification information. For more information, see Table 3.

    is_auto_pay

    No

    String

    Specifies the payment method. When creating a yearly/monthly DB instance, you can specify whether to automatically pay with your account. This parameter does not affect the payment method of automatic renewal.

    • This parameter is invalid when the instance class is scaled down.
    • When the instance class is scaled up:

      true: indicates that the fee is automatically paid from the account.

      false: indicates that the fee is manually paid from the account. This payment method is used by default.

    Table 3 resize field data structure description

    Name

    Mandatory

    Type

    Description

    target_spec_code

    Yes

    String

    Specifies the resource specification code of the new specification. For details about how to obtain the value, see the response values of flavors.spec_code in Querying All DB Instance Specifications.

  • Request header
    PUT https://GaussDB NoSQL Endpoint/v3/{project_id}/instances/{instance_id}/resize
  • Example request
    {
      "resize": {
        "target_spec_code": "geminidb.cassandra.4xlarge.4"
      }
    }

Responses

  • Parameter description
    Table 4 Parameter description

    Name

    Type

    Description

    job_id

    String

    Specifies the task ID. This parameter is returned only for pay-per-use DB instances.

    order_id

    String

    Specifies the order ID. This parameter is returned when a yearly/monthly instance is created.

  • Response example

    Pay-per-use instance

    {
        "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5"
    }

    Yearly/monthly DB instance

    {
        "order_id": "CS20070721568OVO9"
    }

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.