
# 查询订单的资源开通详情（旧）
#### 功能介绍
客户在自建平台查询订单的资源详情及开通状态。
注意事项：
该接口只允许客户的AK/SK或者Token调用。
![](https://support.huaweicloud.com/api-oce/public_sys-resources/note_3.0-zh-cn.png)
该接口即将下线，替代接口将由云服务后续提供。
#### URI
GET /v1.0/{domain_id}/common/order-mgr/orders-resource/{order_id}
参数说明请参见下表。
表1路径参数 
| 参数        | 是否必选 | 取值范围    | 描述                                                                                                      |
|:---|:---|:---|:---|
| domain_id | 是    | 最大长度：64 | 客户账号ID。获取方法请参见[如何获取客户的customer_id/domain_id](https://support.huaweicloud.com/api-oce/offl_110002.html)。 |
| order_id  | 是    | 最大长度：64 | 订单ID。 订购包年/包月产品时系统会生成一个订单ID。                                            |
   
表2查询参数 
| 参数     | 是否必选 | 参数类型    | 取值范围             | 描述             |
|:---|:---|:---|:---|:---|
| offset | 是    | Integer | \[1-2147483647\] | 页数，默认值为1。      |
| limit  | 是    | Integer | \[1-50\]         | 每页查询条数，默认值为10。 |
   
#### 请求消息
**请求参数**
无。
**请求示例**
```
GET https://bss.myhuaweicloud.com/v1.0/{domain_id}/common/order-mgr/orders-resource/CS*****YE?offset=1&limit=10 HTTP/1.1
Content-Type: application/json
X-Auth-Token：MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
```
#### 响应消息
**响应参数**
| 参数         | 参数类型             | 描述                                                                                                    |
|:---|:---|:---|
| error_code | String           | 状态码。 只有失败时才返回此参数，具体请参考[状态码]。 |
| error_msg  | String           | 错误描述信息。只有失败时才返回此参数。                                                                                   |
| totalSize  | Integer          | 资源总数。 只有成功时才返回此参数。                                                    |
| resources  | List\<Resource\> | 资源信息列表。 只有成功时才返回此参数，具体请参见[表3]。  |
   
 表3Resource 
| 参数                   | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|:---|:---|:---|
| resourceId           | String  | 资源实例ID。 只有有资源实例ID并且开通成功的资源才会返回该字段。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| cloudServiceType     | String  | 云服务类型编码，例如OBS的云服务类型编码为"hws.service.type.obs"。您可以调用[查询云服务类型列表-ListServiceTypes](https://support.huaweicloud.com/api-oce/zh-cn_topic_0000001256679455.html)接口获取。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| regionCode           | String  | 云服务区编码，例如："cn-north-1"。具体请参见[地区和终端节点](https://developer.huaweicloud.com/endpoint)对应云服务的"区域"列的值。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| resourceType         | String  | 资源类型编码，例如ECS的VM为"hws.resource.type.vm"。您可以调用[查询资源类型列表-ListResourceTypes](https://support.huaweicloud.com/api-oce/zh-cn_topic_0000001256519451.html)接口获取。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| resourceSpecCode     | String  | 云服务产品的资源规格。如果是VM的资源规格，则需要在规格后面添加".win"或".linux"，例如"s2.small.1.linux"。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| resourceSize         | Double  | 资源容量大小，与"resouceSizeMeasureId"配合。 例如购买的卷大小或带宽大小。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| resouceSizeMeasureId | Integer | 资源容量度量标识，枚举值如下： - 15：Mbps（购买带宽时使用）  - 17：GB（购买云硬盘时使用）                                                                                                                                                                                                                                                                                                                                                                                       |
| status               | Integer | 资源开通状态： - 1：成功  - 2：失败  - 3：处理中  - 4：已取消  - 6：待付款  - 7：待审核  - 8：已退订   |
   
**响应示例:**
```
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  
{
    "totalSize": 5,
    "resources": [
        {
            "resourceId": "01c*****5f7",
            "cloudServiceType": "hws.service.type.ec2",
            "regionCode": "cn-north-1",
            "resourceType": "hws.resource.type.vm",
            "resourceSpecCode": "h1.8xlarge.4.gwc01",
            "resourceSize": null,
            "resouceSizeMeasureId": null,
            "status": 1
        },
        {
            "resourceId": "df1*****def",
            "cloudServiceType": "hws.service.type.vpc",
            "regionCode": "cn-north-1",
            "resourceType": "hws.resource.type.ip",
            "resourceSpecCode": "5_bgp",
            "resourceSize": null,
            "resouceSizeMeasureId": null,
            "status": 1
        },
        {
            "resourceId": "3d*****585",
            "cloudServiceType": "hws.service.type.ebs",
            "regionCode": "cn-north-1",
            "resourceType": "hws.resource.type.volume",
            "resourceSpecCode": "SATA",
            "resourceSize": 40,
            "resouceSizeMeasureId": 17,
            "status": 1
        },
        {
            "resourceId": "23b*****3321",
            "cloudServiceType": "hws.service.type.ebs",
            "regionCode": "cn-north-1",
            "resourceType": "hws.resource.type.volume",
            "resourceSpecCode": "SATA",
            "resourceSize": 100,
            "resouceSizeMeasureId": 17,
            "status": 1
        },
        {
            "resourceId": "3e00*****d779",
            "cloudServiceType": "hws.service.type.vpc",
            "regionCode": "cn-north-1",
            "resourceType": "hws.resource.type.bandwidth",
            "resourceSpecCode": "19_bgp",
            "resourceSize": 1,
            "resouceSizeMeasureId": 15,
            "status": 1
        }
    ]
}
```
 #### 状态码
![](https://support.huaweicloud.com/api-oce/public_sys-resources/note_3.0-zh-cn.png)
- 状态码4xx：由于明显的客户端错误（例如，格式错误的请求语法、参数错误等），华为云会返回4xx错误码，请及时检查请求消息的正确性，重新发起请求。
- 状态码5xx：由于华为云系统原因，导致无法完成明显有效请求的处理，可及时联系华为云客服处理。
 
| HTTP状态码 | 错误码          | 描述              |
|:---|:---|:---|
| 200     | CBC.0000     | 成功。             |
| 500     | CBC.0999     | 其他错误。           |
| 400     | CBC.0100     | 参数错误。           |
| 403     | CBC.0151     | 访问拒绝。           |
| 400     | CBC.99000083 | 不支持该订单查询资源开通详情。 |
   
