All Products
Search
Document Center

Virtual Private Cloud:CreateRouteTable

Last Updated:Aug 28, 2026

Creates a custom route table.

Operation description

  • CreateRouteTable is an asynchronous operation. After a route table ID is returned, the route table may still be in the process of being created. Call DescribeRouteTableList to query the status:
    • Creating: the route table is being created.

    • Available: the route table is created.

  • Concurrent CreateRouteTable calls in the same VPC are not supported.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

Region ID of the VPC to which the custom route table belongs.

Call DescribeRegions to query regions.

cn-zhangjiakou

VpcId

string

Yes

ID of the VPC to which the custom route table belongs.

vpc-bp1qpo0kug3a20qqe****

RouteTableName

string

No

The name of the route table.

Must be 1 to 128 characters. Cannot start with http:// or https://.

myRouteTable

Description

string

No

The description of the route table.

Must be 1 to 256 characters. Cannot start with http:// or https://.

abc

AssociateType

string

No

The type of the route table. Valid values:

  • VSwitch (default): vSwitch route table

  • Gateway: gateway route table

VSwitch

RegionId

string

Yes

Region ID of the VPC to which the custom route table belongs.

Call DescribeRegions to query regions.

cn-zhangjiakou

ClientToken

string

No

Client token for request idempotence.

Generate on the client side. Must be unique per request and contain only ASCII characters.

Note

If not specified, defaults to RequestId, which differs per API request.

02fb3da4-130e-11e9-8e44-0016e04

Tag

array<object>

No

The resource tags.

object

No

The tags.

Key

string

No

The tag key. Maximum: 20 keys. Cannot be empty.

Maximum: 128 characters. Cannot start with aliyun or acs:, or contain http:// or https://.

FinanceDept

Value

string

No

The tag value. Maximum: 20 values. Can be empty.

Maximum: 128 characters. Cannot start with aliyun or acs:, or contain http:// or https://.

FinanceJoshua

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

62172DD5-6BAC-45DF-8D44-E11ED28DCAC0

RouteTableId

string

The route table ID.

vtb-bp145q7glnuzdvzu2****

Examples

Success response

JSON format

{
  "RequestId": "62172DD5-6BAC-45DF-8D44-E11ED28DCAC0",
  "RouteTableId": "vtb-bp145q7glnuzdvzu2****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 UnsupportedRegion The feature of ipv4Gateway is not supported in the region. IPv4 gateways are not supported in this region.
400 InvalidParameter.RouteTableName.Malformed The specified route table name is not valid.
400 InvalidParameter.Description.Malformed The specified Description is not valid.
400 QuotaExceeded.RouteTable VPC RouteTable quota exceeded. VPC route table quota exceeded.
400 IncorrectStatus.cbnStatus Current CBN status does not support this operation. The CEN instance is in an invalid state.
400 InvalidVpcId.NotSupport The vpc is not support.
400 OperationUnsupported.AdvancedFeature Advanced features of the vpc is unsupported. This advanced feature is not supported.
400 QuotaExceeded.GatewayRouteTable The quota of Gateway Route Table is exceeded. Gateway route table quota per VPC exceeded.
400 MissingParam.vpcId The parameter vpcId is mandatory. The vpcId parameter is required.
400 InvalidRegionId.NotFound Specified value of RegionId is not supported.
400 InvalidParameter.Action This vpc feature is not supported in this region
404 InvalidVpcId.NotFound Specified VPC does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.