Updated on 2024-04-01 GMT+08:00

Enabling Database Proxy

Function

This API is used to enable database proxy for a specified DB instance.

This API will be unavailable on April 30, 2024.

  • Before calling an API, you need to understand the API in Authentication.

Constraints

  • To use database proxy, contact customer service to apply for the required permissions.
  • Only RDS for PostgreSQL 11 and 12 are supported.
  • DB instances must be deployed in primary/standby mode, and at least one read replica is available.

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/proxy

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    instance_id

    Yes

    Specifies the DB instance ID.

Request

Parameter description
Table 2 Parameter description

Name

Mandatory

Type

Description

flavor_id

No

String

Flavor ID.

node_num

No

Integer

Number of nodes.

This parameter can be only set to 2 if it is not left blank.

Example Request

https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/f569f1358436479dbcba8603c32cc4aein03/proxy

{
     "flavor_id": "rds.pg.proxy.c6.large.2.ha",
     "node_num": 2
}

Response

  • Normal response
    Table 3 Parameter description

    Name

    Type

    Description

    workflow_id

    String

    Indicates the workflow ID.

  • Example normal response
    {
    	"workflow_id": "e7a7535b-eb9b-45ac-a83a-020dc5016d94"
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.