华为云计算 云知识 查询连接列表ListAttachments
查询连接列表ListAttachments

 

功能介绍

查询 企业路由器 实例下的连接列表。

接口约束

  • 支持过滤查询,过滤条件有state,resource_type,resource_id过滤条件可以重复和组合;

  • 支持分页查询,limit和marker组合实现分页查询;

  • 支持单字段排序,排序字段有[id,name,description,created_at,updated_at],不支持多字段排序。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v3/{project_id}/enterprise-router/{er_id}/attachments

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID

er_id

String

企业路由器实例ID

表2 Query参数

参数

是否必选

参数类型

limit

Integer

marker

String

state

Array

resource_type

Array

resource_id

Array

sort_key

Array

sort_dir

Array

请求参数

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

attachments

Array of AttachmentDetails objects

连接列表

page_info

PageInfo object

分页查询的信息

request_id

String

请求ID

表4 AttachmentDetails

参数

参数类型

id

String

name

String

description

String

state

String

created_at

String

updated_at

String

tags

Array of Tag objects

project_id

String

er_id

String

resource_id

String

resource_type

String

resource_project_id

String

associated

Boolean

route_table_id

String

表5 Tag

参数

参数类型

描述

key

String

标签键,最大长度36个unicode字符,格式为大小写字母,数字,中划线“-”,下划线“_”,中文。

最小长度:0

最大长度:128

value

String

标签值,最大长度43个unicode字符,格式为大小写字母,数字,中划线“-”,下划线“_”,点“.”,中文。

最小长度:0

最大长度:128

表6 PageInfo

参数

参数类型

描述

next_marker

String

下一个marker标识,为空时表示最后一页

current_count

Integer

当前列表中资源数量

请求示例

查询连接列表

GET https://{erouter_endpoint}/v3/08d5a9564a704afda6039ae2babbef3c/
enterprise-router/4ab54142-7c92-48ad-8288-77727a231052/attachments

响应示例

状态码: 200

OK

{
  "attachments" : [ {
    "id" : "6f83b848-8331-4271-ac0c-ef94b7686402",
    "name" : "vpc-001",
    "description" : "vpc attachment",
    "resource_id" : "b715e131-3371-4e17-a2de-4f669e24439a",
    "resource_type" : "vpc",
    "project_id" : "0605767a9980d5762fbcc00b3537e757",
    "state" : "available",
    "created_at" : "2020-03-11T15:13:31Z",
    "updated_at" : "2020-03-11T15:13:31Z"
  }, {
    "id" : "6f83b848-8331-4271-ac0c-ef94b7686403",
    "name" : "vpc-002",
    "description" : "for test",
    "resource_id" : "4b8567f6-358f-4a7f-8cd3-3cbb82c0b25f",
    "resource_type" : "vpc",
    "project_id" : "0605767a9980d5762fbcc00b3537e757",
    "state" : "available",
    "created_at" : "2020-03-11T15:13:31Z",
    "updated_at" : "2020-03-11T15:13:31Z"
  } ],
  "page_info" : {
    "next_marker" : "1",
    "current_count" : 2
  },
  "request_id" : "b715e131-3371-4e17-a2de-4f669e24439a"
}

状态码

状态码

描述

200

OK

错误码

请参见错误码

 

上一篇:好会计功能介绍-发票 下一篇:什么是Cerebro