Updated on 2026-01-08 GMT+08:00

Creating a Route

Function

This API is used to create a datasource connection route.

Authorization

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see the required permissions in Introduction.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    dli:edsconnection:createRoute

    Write

    edsconnection *

    -

    -

    -

    -

    -

    -

URI

  • URI format

    POST /v3/{project_id}/datasource/enhanced-connections/{connection_id}/routes

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.

    connection_id

    Yes

    String

    Datasource connection ID

Request Parameters

Table 2 Request parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Route name. The value can contain 1 to 64 characters.

cidr

Yes

String

Route network range

Response Parameters

Table 3 Response parameters

Parameter

Type

Description

is_success

Boolean

Whether the request is successfully executed. Value true indicates that the request is successfully executed.

message

String

System prompt. If the execution succeeds, the message may be left blank.

Example Request

Create a route. Set the next-hop address of the enhanced datasource connection to 127.0.0.0.

{
  "name": "route",
  "cidr": "127.0.0.0"
}

Example Response

{
  "is_success": true,
  "message": ""
}

Status Codes

Status Code

Description

200

OK

Error Codes

For details, see Error Codes.