查询路由表列表
功能介绍
查询路由表列表。
调试
您可以在API Explorer中调试该接口。
URI
GET /v1/{project_id}/routetables
样例:
GET https://{Endpoint}/v1/{project_id}/routetables?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d&vpc_id=3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85&subnet_id=9873b33f-ac1c-4630-ad1c-7dba1ed79r78
   参数说明请参见表1。
| 
         名称  | 
       
         是否必选  | 
       
         参数类型  | 
       
         说明  | 
      
|---|---|---|---|
| 
         project_id  | 
       
         是  | 
       
         String  | 
       
         项目ID,请参见获取项目ID。  | 
      
| 
         limit  | 
       
         否  | 
       
         Integer  | 
       
         分页查询每页返回的记录个数,取值范围为0~intmax(2^31-1),默认值2000。 limit需要和marker配合使用,详细规则请见marker的参数说明。  | 
      
| 
         marker  | 
       
         否  | 
       
         String  | 
       
         分页查询的起始资源ID,表示从指定资源的下一条记录开始查询。 marker需要和limit配合使用: 
  | 
      
| 
         id  | 
       
         否  | 
       
         String  | 
       
         按照路由表ID过滤查询,可过滤对应ID的路由表。  | 
      
| 
         vpc_id  | 
       
         否  | 
       
         String  | 
       
         按照路由表所属VPC的UUID过滤查询。  | 
      
| 
         subnet_id  | 
       
         否  | 
       
         String  | 
       
         按照路由表所关联子网的UUID过滤查询。 如果您使用管理控制台,此值即为子网详情中的“网络ID”参数值。  | 
      
请求参数
无
请求示例
GET https://{Endpoint}/v1/{project_id}/routetables?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d&vpc_id=3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85&subnet_id=9873b33f-ac1c-4630-ad1c-7dba1ed79r78
  响应参数
| 
         名称  | 
       
         参数类型  | 
       
         说明  | 
      
|---|---|---|
| 
         routetables  | 
       
         Array of routetable objects  | 
       
         路由表列表对象,参见表3。  | 
      
| 
         名称  | 
       
         参数类型  | 
       
         说明  | 
      
|---|---|---|
| 
         id  | 
       
         String  | 
       
        
  | 
      
| 
         name  | 
       
         String  | 
       
        
  | 
      
| 
         default  | 
       
         Boolean  | 
       
        
  | 
      
| 
         subnets  | 
       
         Array of subnet objects  | 
       
        
  | 
      
| 
         tenant_id  | 
       
         String  | 
       
        
  | 
      
| 
         vpc_id  | 
       
         String  | 
       
        
  | 
      
| 
         description  | 
       
         String  | 
       
        
  | 
      
| 
         created_at  | 
       
         String  | 
       
        
  | 
      
| 
         updated_at  | 
       
         String  | 
       
        
  | 
      
响应示例
{
    "routetables": [
        {
            "id": "3d42a0d4-a980-4613-ae76-a2cddecff054",
            "name": "routetable-1234",
            "vpc_id": "ab78be2d-782f-42a5-aa72-35879f6890ff",
            "subnets": [
                {
                    "id": "8d4ce32f-d68a-4c4c-9f18-c68d8a5c7f2f"
                }
            ],
            "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
            "description": "abc",
            "created_at": "2022-12-15T02:56:40",
            "updated_at": "2022-12-15T02:56:40"
        },
        {
            "id": "3d42a0d4-a980-4613-ae76-a2cddecfff89",
            "name": "routetable-5678",
            "vpc_id": "ab78be2d-782f-42a5-aa72-35879f667809",
            "subnets": [
                {
                    "id": "8d4ce32f-d68a-4c4c-9f18-c68d8a5c7f2f"
                }
            ],
            "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
            "description": "abc",
            "created_at": "2022-12-15T02:59:03",
            "updated_at": "2022-12-15T02:59:03"
        }
    ]
}
  状态码
请参见状态码。
错误码
请参考错误码。