Files
doc-exports/docs/ddm/api-ref/en-us_topic_0000002298949868.html
wangdengke2 823df869a9 ddm_api
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2026-03-03 12:01:43 +00:00

12 KiB

Switching Routes (a V3 API)

Function

This API is used to switch read and write requests to a new instance. During the switching process, one or two intermittent disconnections may occur but do not affect services. You are advised to switch routes during off-peak hours.

Constraints

You can only switch routes when a shard configuration task is in the ToBeSwitched state.

URI

PUT /v3/{project_id}/instances/{instance_id}/databases/{db_name}/migration/jobs/{job_id}/route-switch

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Project ID of a tenant in a region

instance_id

String

Yes

Instance ID

db_name

String

Yes

Schema name

job_id

String

Yes

ID of the shard configuration task

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

Example Request

Configuring route switching
PUT https://ddm.eu-de.otc.t-systems.com/v3/74f57817ca8f42e19318eb0e0ad41d18/instances/733c7e8d73a54c27b8308ec784a8be8cin09/databases/db_e487/migration/jobs/10501cd3-0c19-498b-9ba4-8935ed447542/route-switch

Response

Status Codes

Error Codes

For details, see Error Codes.