Updated on 2023-12-13 GMT+08:00
Querying Resource Provisioning Details of an Order

Querying Resource Provisioning Details of an Order

Function

A customer can query resource details and provisioning status of an order on the partner sales platform.

Note:

This API can be invoked only by the customer AK/SK or token. This is because that partners cannot buy products by themselves.

This API will be taken offline soon. The new API will be provided by cloud services later.

URI

GET /v1.0/{domain_id}/common/order-mgr/orders-resource/{order_id}

The following table describes the parameters.

Table 1 URI parameters

Parameter

Mandatory

Maximum Length of Characters

Description

domain_id

Yes

A maximum of 64 characters

Customer account ID. For details, see How Do I Obtain Customer's customer_id and domain_id Values?

order_id

Yes

A maximum of 64 characters

Order ID.

The system will generate an order ID when the customer places an order of yearly/monthly products.

Table 2 Request parameters

Parameter

Mandatory

Type

Value Range

Description

offset

Yes

Integer

[1-2147483647]

Page number. The default value is 1.

limit

Yes

Integer

[1-50]

Number of records per page. The default value is 10.

Request

Request Parameters

None

Example Request

GET https://bss-intl.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

Response

Response Parameters

Parameter

Type

Description

error_code

String

Error code.

This parameter is returned only when the operation fails. For details, see Status Code.

error_msg

String

Error description. This parameter is returned only when the operation fails.

totalSize

Integer

Total resources.

This parameter is returned only when the operation is successful.

resources

List<Resource>

Resource list.

This parameter is returned only when the operation is successful. For details, see Table 3.

Table 3 Resource

Parameter

Type

Description

resourceId

String

Resource instance ID.

This parameter is returned only for resources that have resource instance IDs and are successfully provisioned.

cloudServiceType

String

Cloud service type code. For example, the cloud service type code of OBS is hws.service.type.obs. To obtain a specific service type, call the API in Querying Cloud Service Types.

regionCode

String

Cloud service region code, for example, ap-southeast-1. Obtain the value from the Region column in Regions and Endpoints.

resourceType

String

Resource type code. For example, the VM resource type code of ECS is hws.resource.type.vm. To obtain a specific resource type, call the API in Querying Resource Types.

resourceSpecCode

String

Specification of a cloud service resource. For example, a VM resource specification is s2.small.1.linux (.win or .linux should be added at the end of the specification).

resourceSize

Double

Resource capacity. The parameter is used with resouceSizeMeasureId.

For example, it can be the size of the purchased disk or bandwidth.

resouceSizeMeasureId

Integer

Resource capacity measurement ID. The options are as follows:

  • 15: Mbit/s (used when the bandwidth is subscribed)
  • 17: GB (used when an EVS disk is subscribed to)

status

Integer

Resource provisioning status.

  • 1: Successful.
  • 2: Failed.
  • 3: Processing
  • 4: Canceled
  • 6: Pending payment
  • 7: Pending approval
  • 8: Unsubscribed

Example Response

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
        }
    ]
}

Status Code

  • 4xx: This class of HTTP status code is intended for situations in which the error seems to have been caused by the client, for example, the request contains bad syntax or incorrect parameters. You must ensure the request is correct.
  • 5xx: This class of HTTP status code is intended for cases in which the Huawei Cloud server is aware that it has encountered an error or is otherwise incapable of performing the request. In this case, contact Huawei Cloud customer service.

HTTP Status Code

Error Code

Description

200

CBC.0000

Succeeded.

500

CBC.0999

Other errors.

400

CBC.0100

Incorrect parameter.

403

CBC.0151

Access denied.

400

CBC.99000083

The resource provisioning details of this order cannot be queried.