本接口用于创建自定义路由表。
前提条件:
存在可用的私有网络。
使用限制:
下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateRouteTable | 接口名称。当前 API 的名称为 CreateRouteTable 。 |
Version | String | 是 | 2021-04-30 | 接口版本。当前 API 的版本为 2021-04-30 。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
type | String | 是 |
| 路由表的类型。取值范围:
|
vpc_identity | String | 是 | vpc-7fs74n**** | 路由表所属的私有网络的 ID。 |
name | String | 是 |
| 路由表的名称。命名规则如下:
|
desc | String | 是 | This is a custom route table | 路由表的描述。最多可输入 80 个字符。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
route_table_instance | RouteTableInstance | 请参见返回示例 | 路由表的信息。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
route_table_identity | String | route-table-7fs74n**** | 路由表的 ID。 |
route_table_name | String | vpc-7fs74n****-自定义路由表 | 路由表的名称。 |
type | String | custom | 路由表的类型。 |
status | String |
| 路由表的状态:
|
vpc_identity | String | vpc-7fs74n**** | 路由表所属私有网络的 ID。 |
vpc_name | String | ****03-默认VPC | 路由表所属私有网络的名称。 |
desc | String | This is a custom route table | 路由表的描述。 |
associated_subnet_count | Long | 0 | 路由表关联的子网的数量。 |
create_time | Long | 1675062289 | 路由表的创建时间。 |
update_time | Long | 1675062289 | 路由表的更新时间。 |
POST https://veenedge.volcengineapi.com/?Action=CreateRouteTable&Version=2021-04-30
&<其他公共参数>
{
"type": "custom",
"vpc_identity": "vpc-7nlpcv****",
"name": "vpc-7nlpcv****-自定义路由表",
"desc": "This is a custom route table"
}
{
"ResponseMetadata": {
"RequestId": "20240318200135E917F317C56F5A1B****",
"Action": "CreateRouteTable",
"Version": "2021-04-30",
"Service": "veenedge",
"Region": "cn-north-1"
},
"Result": {
"route_table_instance": {
"account_identity": 210006****,
"user_identity": 0,
"route_table_identity": "route-table-x66rf6****",
"route_table_name": "vpc-7nlpcv****-自定义路由表",
"type": "custom",
"status": "creating",
"vpc_identity": "vpc-7nlpcv****",
"vpc_name": "**03-默认VPC",
"desc": "This is a custom route table",
"associated_subnet_count": 0,
"create_time": 1710763295,
"update_time": 1710763295
}
}
}
如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见错误码。