# 查询全域弹性公网IP段个数 - CountGlobalEipSegment
#### 功能介绍
查询全域弹性公网IP段个数。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/GEIP/doc?api=CountGlobalEipSegment)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-eip/eip_apipermission_0000.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项                    | 访问级别 | 资源类型（\*为必须）    | 条件键 | 别名 | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | eip:geipSegments:count | List | geipSegment \* | -   | -  | -      |
     
  
 
#### URI
GET /v3/{domain_id}/global-eip-segments/count
表1路径参数 
| 参数        | 是否必选 | 参数类型   | 描述                                                                                                                                                                           |
|:---|:---|:---|:---|
| domain_id | 是    | String | domain_id 最小长度：**5** 最大长度：**32** |
   
表2Query参数 
| 参数                                     | 是否必选 | 参数类型              | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|:---|:---|:---|:---|
| fields                                 | 否    | Array of strings  | - 功能说明：查询指定的字段，格式为fields=A\&fields=B\&fields=C\&......   - 支持的字段： - count       |
| id                                     | 否    | Array of strings  | 根据资源ID过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| internet_bandwidth_id                  | 否    | Array of strings  | 根据全域公网带宽的ID过滤，支持多值查询，查询条件格式：internet_bandwidth_id=xxx\&internet_bandwidth_id=xxx。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| name                                   | 否    | Array of strings  | 根据名称过滤，支持多值查询，查询条件格式：name=xxx\&name=xxx。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| name_like                              | 否    | String            | 根据名称模糊匹配                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| access_site                            | 否    | Array of strings  | 根据接入点过滤，支持多值查询，查询条件格式：access_site=xxx\&access_site=xxx。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| geip_pool_name                         | 否    | Array of strings  | 根据全域弹性公网IP池名称过滤，支持多值查询，查询条件格式：geip_pool_name=xxx\&geip_pool_name=xxx。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| isp                                    | 否    | Array of strings  | 根据运营商线路过滤，支持多值查询，查询条件格式：isp=xxx\&isp=xxx。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ip_version                             | 否    | Array of integers | 根据IP版本过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| cidr                                   | 否    | Array of strings  | 根据分配的CIDR过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| cidr_v6                                | 否    | Array of strings  | 根据分配的IPv6 CIDR过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| freezen                                | 否    | Array of booleans | 根据是否冻结过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| internet_bandwidth_is_null             | 否    | Array of booleans | 根据是否绑定全域公网带宽过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| status                                 | 否    | Array of strings  | 根据资源状态过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| associate_instance.region              | 否    | Array of strings  | 根据绑定实例所属的局点过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| associate_instance.public_border_group | 否    | Array of strings  | - 功能说明：根据绑定实例所属的边缘信息过滤   - 取值范围：center、边缘站点名称                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| associate_instance.instance_site       | 否    | Array of strings  | 根据绑定实例所在的站点过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| associate_instance.instance_type       | 否    | Array of strings  | 根据绑定实例的类型过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| associate_instance.instance_id         | 否    | Array of strings  | 根据绑定实例的ID过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| associate_instance.project_id          | 否    | Array of strings  | 根据绑定实例所属的项目ID过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| enterprise_project_id                  | 否    | Array of strings  | 根据企业项目ID过滤                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| tags                                   | 否    | Array of strings  | 根据标签过滤，过滤格式为key1\|value1,key2\|value2,...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
   
#### 请求参数
表3请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                       |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | 用户的Token，如何获取用户Token请参见[获取用户Token](https://support.huaweicloud.com/api-iam/iam_30_0001.html#iam_30_0001__li195948474711) |
   
#### 响应参数
**状态码：200**
表4响应Header参数 
| 参数           | 参数类型   | 描述     |
|:---|:---|:---|
| X-Request-Id | String | 本次请求编号 |
   
表5响应Body参数 
| 参数                 | 参数类型                                                                                                        | 描述      |
|:---|:---|:---|
| request_id         | String                                                                                                      | 本次请求的编号 |
| global_eip_segment | [CountGeipSegments] object | 响应对象    |
   
 表6CountGeipSegments 
| 参数    | 参数类型    | 描述          |
|:---|:---|:---|
| count | Integer | 全域弹性公网IP段个数 |
   
#### 请求示例
查询全域弹性公网IP段个数
```
GET https://{Endpoint}/v3/{domain_id}/global-eip-segments/count
```
#### 响应示例
**状态码：200**
```
{
  "request_id" : "d224afc0e7add65c715707dbadd3004a",
  "global_eip_segment" : {
    "count" : 0
  }
}
```
#### 状态码
| 状态码 | 描述 |
|:---|:---|
| 200 | OK |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-eip/ErrorCode.html)。
