
# 查询资源列表-企业版
#### 功能介绍
查询资源列表-企业版
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/IoTEdge/doc?api=ShowClusterResources)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### URI
GET /v3/{project_id}/resources
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述                                                                                        |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID。获取方法请参见 [获取项目ID](https://support.huaweicloud.com/api-iotedge/iotedge_api_0032.html)。 |
   
表2Query参数 
| 参数             | 是否必选 | 参数类型    | 描述                      |
|:---|:---|:---|:---|
| resource_group | 否    | String  | 查询资源组                   |
| offset         | 否    | Integer | 查询的起始位置，取值范围为非负整数，默认为0  |
| limit          | 否    | Integer | 每页记录数，默认值为10，取值区间为1-100 |
   
#### 请求参数
表3请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                         |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | 用户Token。通过调用IAM服务 [获取IAM用户Token](https://support.huaweicloud.com/api-iam/iam_30_0001.html)接口获取，接口返回的响应消息头中"X-Subject-Token"就是需要获取的用户Token。简要的获取方法样例请参见 [Token认证](https://support.huaweicloud.com/api-iothub/iot_06_v5_0091.html#section0)。 |
   
#### 响应参数
**状态码：200**
表4响应Body参数 
| 参数            | 参数类型                                                                                                                   | 描述          |
|:---|:---|:---|
| count         | Long                                                                                                                   | 总记录数        |
| page_info     | [PageInfoDTO] object                 | 分页信息        |
| resource_list | Array of [ResourceDetail] objects | 查询资源列表返回消息体 |
   
 表5PageInfoDTO 
| 参数     | 参数类型    | 描述    |
|:---|:---|:---|
| offset | Integer | 页码    |
| limit  | Integer | 每页记录数 |
   
 表6ResourceDetail 
| 参数                         | 参数类型   | 描述                                    |
|:---|:---|:---|
| resource_id                | String | 资源id，添加资源时由边缘侧生成                      |
| status                     | String | 资源状态，冻结:freeze、解冻:unfreeze、退订:delete。 |
| charging_rule              | String | 计费规则                                  |
| type                       | String | 内部类型                                  |
| resource_name              | String | 资源名称，由边缘侧生成。                          |
| cloud_service_type         | String | 公有云CBC上注册的服务类型英文名                     |
| resource_type              | String | CBC上注册的资源类型编码。                        |
| resource_spec_code         | String | 资源规格编码                                |
| associated_edge_cluster_id | String | 关联的边缘集群ID                             |
   
#### 请求示例
无
#### 响应示例
**状态码：200**
Ok
```
{
  "count" : 1,
  "page_info" : {
    "offset" : 0,
    "limit" : 10
  },
  "resource_list" : [ {
    "resource_id" : "resource_id1",
    "status" : "unfreeze",
    "charging_rule" : "pre_paid",
    "type" : "iotedge.enterprise.32vcpu.300device",
    "resource_name" : null,
    "cloud_service_type" : "hws.service.type.iotedge",
    "resource_type" : "hws.resource.type.iotedge.campus",
    "resource_spec_code" : "iotedge.enterprise.32vcpu.300device",
    "associated_edge_cluster_id" : null
  } ]
}
```
#### 状态码
| 状态码 | 描述          |
|:---|:---|
| 200 | Ok          |
| 400 | Bad Request |
| 404 | Not Found   |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-iotedge/ErrorCode.html)。
