# 虚拟交换机详情 (/products/qvm/vswitch/1-describe-vswitch)



最近更新时间: 2021-04-22 15:55:44

# 请求路径 [#请求路径]

> `GET` /v1/vm/switch/:v\_switch\_id

# 请求参数 [#请求参数]

| 名称            | 类型     | 位置    | 必须 | 描述     |
| ------------- | ------ | ----- | -- | ------ |
| v\_switch\_id | string | path  | 是  | 交换机 ID |
| region\_id    | string | query | 是  | 地域 ID  |

# 返回值 [#返回值]

| 名称          | 类型          | 描述      |
| ----------- | ----------- | ------- |
| request\_id | string      | 请求 ID   |
| data        | VSwitchInfo | 虚拟交换机详情 |

### VSwitchInfo [#vswitchinfo]

| 名称                            | 类型      | 描述                                  |
| ----------------------------- | ------- | ----------------------------------- |
| v\_switch\_id                 | string  | 交换机的ID                              |
| vpc\_id                       | string  | 交换机所属VPC的ID                         |
| status                        | string  | 交换机的状态，取值：Pending：配置中， Available：可用 |
| cidr\_block                   | string  | 交换机的IPv4网段                          |
| zone\_id                      | string  | 交换机所属的可用区 ID                        |
| region\_id                    | string  | 交换机所属的区域 ID                         |
| available\_ip\_address\_count | integer | 交换机中可用的IP地址数量                       |
| description                   | string  | 交换机的描述信息                            |
| v\_switch\_name               | string  | 交换机的名称                              |
| is\_default                   | boolean | 是否为默认交换机，只能在创建的时候插入该字段              |
| ipv6\_cidr\_block             | string  | 交换机的IPv6网段                          |
| created\_at                   | string  | 创建时间                                |
| updated\_at                   | string  | 更新时间                                |

## 返回值示例 [#返回值示例]

```json
{
  "data": {
    "v_switch_id": "7775f73d-1104-4758-97b2",
    "vpc_id": "76b39642-dbdd-4e41-8e1c",
    "status": "Available",
    "cidr_block": "192.168.0.0/24",
    "zone_id": "grand-cn-north-4g",
    "region_id": "grand-cn-north-4",
    "available_ip_address_count": 251,
    "description": "subnet-default",
    "v_switch_name": "subnet-default",
    "is_default": false,
    "client_token": "",
    "ipv6_cidr_block": "",
    "updated_at": "2020-11-12T17:09:25.283+08:00",
    "created_at": "2020-11-12T17:09:21.478+08:00"
  },
  "request_id": "N8cGFxnzdyenqFMW"
}
```
