Help Center/ Partner Center/ API Reference/ Product Management/ Querying Product Information/ Querying Resource Specifications and Prices of a Cloud Service Type
Updated on 2026-09-22 GMT+08:00

Querying Resource Specifications and Prices of a Cloud Service Type

Function

This API is used to query resource specifications and prices of a cloud service type on the partner sales platform.

  • This API returns only the resource specifications and prices of available cloud service types on Huawei Cloud.
  • Parameters marker and limit are used for pagination query. These two parameters take effect only when they are used together.

Constraints

This API can only be invoked using the AK/SK or token of a cloud solution provider or a Huawei Cloud distributor.

Debugging

You can debug the API in API Explorer which supports automatic authentication. API Explorer can automatically generate and debug example SDK code.

Authorization

This API does not require authorization when being called by a partner operator.

URI

POST /v2/products/resource-specs-price/query

Table 1 Header parameters

Parameter

Mandatory

Description

X-Language

No

Definition:

Language.

Constraints:

N/A

Range:

  • zh_CN: Chinese
  • en_US: English

Default Value:

en_US

Request

Request Parameters

Parameter

Mandatory

Type

Description

cloud_service_type

No

String

Definition:

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.

Constraints:

If this parameter is not included in the request parameters or is set to null, it cannot be used as a filter criterion.

Range:

1–64

Default Value:

N/A

resource_type

No

String

Definition:

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.

Constraints:

If this parameter is not included in the request parameters or is set to null, it cannot be used as a filter criterion.

Range:

1–64

Default Value:

N/A

region_code

Yes

String

Definition:

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

Constraints:

N/A

Range:

1–64

Default Value:

N/A

filters

No

List<Filter>

Definition:

Filter. For details, see Table 2.

Constraints:

If this parameter is not included in the request parameters, is left empty, or is set to null, it cannot be used as a filter criterion.

Range:

0–1

Default Value:

N/A

need_attributes

No

boolean

Definition:

Whether to return the attributes of resource specifications.

Constraints:

N/A

Range:

  • true: yes
  • false: no

Default Value:

false

need_price

No

boolean

Definition:

Whether to return the list prices of resource specifications.

Constraints:

N/A

Range:

  • true: yes
  • false: no

Default Value:

false

marker

No

String

Definition:

Pagination information, which is obtained from the pagination query information returned in the last API call.

Constraints:

  • When querying the data on the first page, you do not need to specify this parameter. When querying the data on other pages, set this parameter to the value of next_marker returned in the response of the previous page.
  • During pagination query, the query criteria, including the filters, sorting criteria, the limit value, and language, cannot be modified.

Range:

1–256

Default Value:

N/A

limit

No

Integer

Definition:

Number of records returned on each page in a pagination query.

Constraints:

N/A

Range:

1–50

Default Value:

50

Table 2 Filter

Parameter

Mandatory

Type

Description

key

Yes

String

Definition:

Key of a filter condition.

Constraints:

N/A

Range:

  • RESOURCE_SPEC: resource specification code
  • CHARGING_MODE: billing mode

Default Value:

N/A

value

Yes

String

Definition:

Value of the filter condition. Fuzzy search is not supported.

Constraints:

N/A

Range:

1–256

If key is set to CHARGING_MODE, the options are as follows:
  • PERIOD: yearly/monthly
  • ON_DEMAND: pay-per-use
  • ONE_TIME: one-time
  • ON_DEMAND_PKG: pay-per-use package

Default Value:

N/A

Example Request

POST https://bss-intl.myhuaweicloud.com/v2/products/resource-specs-price/query HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ 
X-Language: zh_CN
{
    "cloud_service_type": "hws.service.type.ec2",
    "resource_type": "hws.resource.type.vm",
    "filters": [
        {
            "key": "RESOURCE_SPEC",
            "value": "ac3.2xlarge.4.linux"
        }
    ],
    "region_code": "ap-southeast-1",
    "need_attributes": true,
    "need_price": true,
    "marker": null,
    "limit": 50
}

Response

Response Parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

For details, see Status Codes. This parameter is returned only when the query failed.

Range:

A maximum of 20 characters

error_msg

String

Definition:

Error description. This parameter is returned only when the query failed.

Range:

A maximum of 1,000 characters

page_info

PageInfo Object

Definition:

Pagination query information. For details, see Table 3.

Range:

N/A

region_code

String

Definition:

Cloud service region code, for example, ap-southeast-1.

Range:

A maximum of 64 characters

resource_spec_infos

List<ResourceSpecInfo>

Definition:

Resource specifications of a cloud service type. For details, see Table 4.

Range:

N/A

Table 3 PageInfo

Parameter

Type

Description

next_marker

String

Definition:

Backward pagination identifier. This serves as the starting marker for the next page of data. If a value is present, it indicates that a subsequent page exists; if null, it indicates that there is no further data available.

Range:

A maximum 256 characters

Table 4 ResourceSpecInfo

Parameter

Type

Description

cloud_service_type

String

Definition:

Cloud service type code.

Range:

A maximum of 64 characters

cloud_service_type_name

String

Definition:

Cloud service type name.

Range:

A maximum of 200 characters

resource_type

String

Definition:

Resource type code. For example, the resource type code of ECS is hws.resource.type.vm.

Range:

A maximum of 64 characters

resource_type_name

String

Definition:

Resource type name.

Range:

A maximum of 200 characters

resource_spec

String

Definition:

Resource specification code of the cloud service type.

Range:

A maximum of 200 characters

resource_spec_name

String

Definition:

Resource specification name of the cloud service type.

Range:

A maximum 256 characters

attributes

List<Attribute>

Definition:

Attributes of resource specifications of the cloud service type. If need_attributes is set to true, the attributes are returned. For details, see Table 5.

Range:

N/A

price_lists

List<PriceItem>

Definition:

Prices of resource specifications of the cloud service type. If need_price is set to true, the prices are returned. For details, see Table 7.

Range:

N/A

Table 5 Attribute

Parameter

Type

Description

code

String

Definition:

Attribute code.

Range:

A maximum of 128 characters

name

String

Definition:

Attribute name.

Range:

A maximum of 1,024 characters

value

String

Definition:

Attribute value.

Range:

A maximum of 200 characters

unit

String

Definition:

Attribute unit.

Range:

A maximum of 64 characters

linear_range

Object LinearRange

Definition:

Linear attribute range. For details, see Table 6.

Range:

N/A

Table 6 LinearRange

Parameter

Type

Description

min

Integer

Definition:

Minimum value of a linear attribute.

Range:

N/A

max

Integer

Definition:

Maximum value of a linear attribute.

Range:

N/A

step

Integer

Definition:

Step of a linear attribute.

Range:

N/A

Table 7 PriceItem

Parameter

Type

Description

offering_id

String

Definition:

Offering ID.

Range:

A maximum of 64 characters

currency

String

Definition:

Currency.

Range:

USD

If the parameter is left blank, USD is used.

official_price

String

Definition:

List price effective when the query is performed.

Range:

A maximum of 64 characters

charging_mode

String

Definition:

Billing mode.

Range:

  • PERIOD: yearly/monthly
  • ON_DEMAND: pay-per-use
  • ONE_TIME: one-time
  • ON_DEMAND_PKG: pay-per-use package

period_type

Integer

Definition:

Sales period type.

Range:

  • 0: day
  • 2: month
  • 3: year
  • 4: hour

period_nums

List<Integer>

Definition:

Number of sales periods.

Range:

N/A

billing_usage_factor

String

Definition:

Billing factor.

Range:

A maximum of 64 characters

Example Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  
{
	"page_info": {
		"next_marker": "c3ne.xlarge.2.linux"
	},
	"region_code": "ap-southeast-1",
	"resource_spec_infos": [
		{
                        "cloud_service_type": "hws.service.type.ec2",
	                "cloud_service_type_name": "Elastic Cloud Server",
			"resource_type": "hws.resource.type.vm",
			"resource_type_name": "Cloud Host",
			"resource_spec": "ac3.2xlarge.4.linux",
			"resource_spec_name": "ARM Enhaced General Computing|ac3.2xlarge.4|8vCPUs|29GB|linux",
			"attributes": [
				{
					"code": "etryy",
					"name": "Memory",
					"value": "8",
					"unit": "GB",
                                        "linear_range": {
					            "min": 1,
					            "max": 5,
					            "step": 1
			                        }
				}
			],
			"price_lists": [
				{
					"offering_id": "OFF-003",
					"currency": "USD",
					"official_price": "300.00",
					"charging_mode": "PERIOD",
					"period_type": 3,
					"period_nums": [1,2,3],
					"billing_usage_factor": "TRAFFIC_GB"
				}
			]
		}
	]
}

Status Codes

  • 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

403

CBC.0151

Access denied.

500

CBC.0999

Other errors.

400

CBC.0100

Parameter error.