vpc — Virtual Private Cloud
vpc · 2017-03-12

CreateRoutes

POST

Create routes.

Wire call

Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /vpc/CreateRoutes path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.

curl
curl -sS https://vpc.api3.convergecloud.com/ \
  -H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/vpc/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'Host: vpc.api3.convergecloud.com' \
  -H 'X-TC-Action: CreateRoutes' \
  -H 'X-TC-Version: 2017-03-12' \
  -H 'X-TC-Timestamp: <unix-seconds>' \
  -H 'X-TC-Region: luzon' \
  -d '{"RouteTableId":"<RouteTableId>","Routes":"<Routes>"}'

Request parameters

FieldTypeRequiredDescription
RouteTableIdstringYesRoute table instance ID.
RoutesRoute[]YesRouting policy object.

Response

Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.

FieldTypeDescription
TotalCountintegerThe number of newly added instances.
RouteTableSetRouteTable[]Route table object.
RequestIdstringThe unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
Success
{
  "Response": {
    "TotalCount": …,
    "RouteTableSet": …,
    "RequestId": "…"
  }
}
Error
{
  "Response": {
    "Error": { "Code": "…", "Message": "…" },
    "RequestId": "…"
  }
}

Try it

CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/vpc.
Request bodyvalid JSONPOST vpc.api3.convergecloud.com · CreateRoutes
Recorded example response — captured 2026-09-17
{
  "Response": {
    "RouteTableSet": [
      {
        "VpcId": "vpc-5gqs921z",
        "RouteTableId": "rtb-90dtbn2g",
        "RouteTableName": "example default via nat",
        "AssociationSet": [],
        "RouteSet": [
          {
            "RouteItemId": "rti-9zgml95n",
            "RouteId": 1086,
            "DestinationCidrBlock": "0.0.0.0/0",
            "DestinationIpv6CidrBlock": "",
            "GatewayType": "NAT",
            "GatewayId": "nat-b6ku8fsk",
            "RouteDescription": "example default via nat",
            "Enabled": true,
            "CreatedTime": "0000-00-00 00:00:00"
          }
        ],
        "Main": false,
        "Region": "luzon",
        "TagSet": [],
        "LocalCidrForCcn": []
      }
    ],
    "TotalCount": 1,
    "RequestId": "97a7efc5-9235-464e-c048-44f7c6f3dc71"
  }
}

What failure looks like

Example error responses for this action. Match on Code.

Recorded error 1
{
  "Response": {
    "Error": {
      "Code": "ResourceNotFound",
      "Message": "指定资源 `rtb-00000000` 未找到。"
    },
    "RequestId": "a6e25b20-7526-427a-b9e1-80456363a3ca"
  }
}
Recorded error 2
{
  "Response": {
    "Error": {
      "Code": "ResourceNotFound",
      "Message": "指定资源 `rtb-00000000` 未找到。"
    },
    "RequestId": "9dbbaf30-08d3-1787-fb28-030b0a95f7b8"
  }
}

Behaviour

Each entry takes DestinationCidrBlock, GatewayType and GatewayId. The stored route is assigned both a numeric RouteId and a RouteItemId; DeleteRoutes identifies routes by RouteItemId.