DescribeSpans
获取一个或多个 SPAN 的配置。
可根据 SPAN ID,名称, IP 地址作过滤条件,来获取 SPAN 列表。 如果不指定任何过滤条件,默认返回你的所有 SPAN。
请求参数
| 参数 | 参数类型 | 描述 | 是否必选 | 
|---|---|---|---|
| spans.n | String | SPAN ID | No | 
| span_name | String | SPAN名称 | No | 
| ip_addr | String | 接收流量的服务器IP地址 | No | 
| tags.n | String | 按照标签ID过滤, 只返回已绑定某标签的资源 | No | 
| offset | Integer | 数据偏移量,默认为0 | No | 
| limit | Integer | 返回数据长度,默认为20,最大100 | No | 
| zone | String | 区域 ID,注意要小写 | Yes | 
返回数据
| 参数 | 参数类型 | 描述 | 
|---|---|---|
| action | String | 响应动作 | 
| span_set | Array | JSON 格式的SPAN列表,每项参数可见下面 Response Item | 
| total_count | Integer | 根据过滤条件得到的SPAN总数 | 
Response Item
示例
请求示例:
https://api.qingcloud.com/iaas/?action=DescribeSpans
&spans.1=span-u6ssjx17
&COMMON_PARAMS
返回示例:
{
  "action":"DescribespansResponse",
  "total_count":1,
  "span_set":[
    {
      "is_applied":1,
      "span_name":"sample",
      "ip_addr":"1.2.3.4",
      "tunnel_type":"gre",
      "tags":[],
      "flag":3,
      "tunnel_key":123456,
      "create_time":"2016-01-23T13:35:56Z",
      "members":[
        {
              "status":"active",
              "status_time":"2016-01-23T13:35:56",
              "span_id":"span-xkxnx0j1",
              "create_time":"2016-01-23T13:35:56",
              "resource_id":"i-o9u2in8s"
        }
      ],
      "status_time":"2016-01-23T13:35:56Z",
      "span_id":"span-u6ssjx17"
    }
  ],
  "ret_code":0
}