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

Obtaining a Cluster Route

Function

By default, a CSS Elasticsearch cluster cannot access a target service—such as a client program or a Lightweight Directory Access Protocol (LDAP) service—that is located in a different VPC. To enable this access, you need to configure cluster routes. This API is used to obtain cluster route information, including the route IP address and the total number of routes.

Calling Method

For details, see Calling APIs.

Authorization Information

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 Permissions Policies and Supported Actions for details on the required permissions.
  • 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

    Dependencies

    css:cluster:getRoutes

    Read

    cluster *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    -

    -

URI

GET /v1.0/{project_id}/clusters/{cluster_id}/route

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name.

Constraints:

N/A

Value range:

Project ID of the account.

Default value:

N/A

cluster_id

Yes

String

Definition:

ID of the target cluster. For details about how to obtain the cluster ID, see Obtaining the Cluster ID.

Constraints:

N/A

Value range:

Cluster ID.

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition:

The start value of the query. The default value is 1, indicating that the query starts from the first route.

Constraints:

N/A

Value range:

Greater than or equal to 1.

Default value:

1

limit

No

Integer

Parameter description:

Number of routes to be queried. The default value is 10, indicating that 10 routes are queried at a time.

Constraints:

N/A

Options:

1-1000

Default value:

10

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

routeResps

Array of RouteRespsResource objects

Definition:

Route IP address.

Value range:

N/A

totalSize

Integer

Definition:

Total number of routes.

Value range:

N/A

Table 4 RouteRespsResource

Parameter

Type

Description

ipAddress

String

Definition:

IP address.

Value range:

N/A

ipNetMask

String

Definition:

Subnet mask.

Value range:

N/A

updateAt

String

Definition:

Route IP address update time.

Value range:

N/A

Example Requests

Obtain cluster routes.

GET https://{Endpoint}/v1.0/{project_id}/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/route

Example Responses

Status code: 200

Request succeeded.

{
  "routeResps" : [ {
    "ipAddress" : "1.2.3.65",
    "ipNetMask" : "255.255.255.255",
    "updateAt" : "2023-07-17T08:09:20"
  }, {
    "ipAddress" : "1.1.1.1",
    "ipNetMask" : "255.255.255.255",
    "updateAt" : "2023-07-17T08:08:50"
  } ],
  "totalSize" : 2
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Invalid request.

Modify the request and then try again.

409

The request could not be processed due to a conflict.

This status code indicates that the resource that the client attempts to create already exists, or the request failed to be processed because of the update of the conflict request.

412

The server does not meet one of the requirements that the requester puts on the request.

Error Codes

See Error Codes.