Help Center/ VPC Endpoint/ API Reference/ API/ VPC Endpoints/ Modifying Route Tables Associated with a VPC Endpoint
Updated on 2025-05-15 GMT+08:00

Modifying Route Tables Associated with a VPC Endpoint

Function

This API is used to modify route tables associated with a VPC endpoint.

Calling Method

For details, see Calling APIs.

URI

PUT /v1/{project_id}/vpc-endpoints/{vpc_endpoint_id}/routetables

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

vpc_endpoint_id

Yes

String

Specifies the ID of the VPC endpoint.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token.

Content-Type

No

String

Specifies the MIME type of the request body. Default value application/json is recommended. For APIs used to upload objects or images, the MIME type varies depending on the flow type.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

routetables

Yes

Array of strings

Lists the IDs of route tables.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

routetables

Array of strings

Specifies the IDs of route tables.

If this parameter is not specified, the ID of the route table of the default VPC is returned.

This parameter is available when you update VPC endpoints for connecting to gateway VPC endpoint services.

error

Array of RoutetableInfoError objects

Specifies the error message returned when the route table of the VPC endpoint subnet fails to be modified.

Table 5 RoutetableInfoError

Parameter

Type

Description

bind_failed

Array of RoutetableInfoErrorDetial objects

Failed to bind the route table to the VPC endpoint subnet.

unbind_failed

Array of RoutetableInfoErrorDetial objects

Failed to unbind the route table from the VPC endpoint subnet.

Table 6 RoutetableInfoErrorDetial

Parameter

Type

Description

id

String

Route table ID.

error_message

String

Detailed error information.

Example Requests

Modifying route tables associated with a VPC endpoint

PUT https://{endpoint}/v1/{project_id}/vpc-endpoints/4189d3c2-8882-4871-a3c2- d380272eed83/routetables

{
  "routetables" : [ "705290f3-0d00-41f2-aedc-71f09844e879" ]
}

Example Responses

Status code: 200

The server has successfully processed the request.

{
  "routetables" : [ "705290f3-0d00-41f2-aedc-71f09844e879" ]
}

Status Codes

Status Code

Description

200

The server has successfully processed the request.

Error Codes

See Error Codes.