Updated on 2024-03-14 GMT+08:00

Modifying Route Tables of a VPC Endpoint

Function

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

URI

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

Table 1 describes parameters in this URI.
Table 1 URI parameters

Parameter

Mandatory

Description

project_id

Yes

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

vpc_endpoint_id

Yes

Specifies the ID of the VPC endpoint.

Request

  • Parameter description
    Table 2 Request parameters

    Parameter

    Mandatory

    Type

    Description

    routetables

    Yes

    Array of strings

    Lists the IDs of route tables.

    If you do not specify this parameter, the route table ID of the VPC is returned.

    NOTE:

    This parameter is available only when you create a VPC endpoint for connecting to a gateway VPC endpoint service.

  • Example request
    This request is to modify route tables of the VPC endpoint whose ID is 4189d3c2-8882-4871-a3c2-d380272eed83.
    PUT https://{endpoint}/v1/{project_id}/vpc-endpoints/4189d3c2-8882-4871-a3c2-d380272eed83/routetables
    { 
         "routetables":["705290f3-0d00-41f2-aedc-71f09844e879"]
    }

Response

  • Parameter description
    Table 3 Response parameters

    Parameter

    Type

    Description

    routetables

    Array of strings

    Lists the IDs of route tables.

    If you do not specify this parameter, the route table ID of the VPC is returned.

    NOTE:

    This parameter is available only when you create a VPC endpoint for connecting to a gateway VPC endpoint service.

    error

    Array of objects

    An error message is returned when modifying the route table of the VPC endpoint subnet fails. For details, see Table 4.

    Table 4 Error parameters

    Parameter

    Type

    Description

    bind_failed

    Array of objects

    Indicates that associating a route table with the VPC endpoint fails.

    unbind_failed

    Array of objects

    Indicates that disassociating the route table from the VPC endpoint fails.

    Table 5 ErrorDetail parameters

    Parameter

    Type

    Description

    id

    String

    Specifies the route table ID.

    error_message

    String

    Specifies the error message.

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

Status Codes

See Status Codes.