Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Partner Center/ API Reference/ Product Management/ Querying the Price of a Product/ Querying the Renewal Price of a Yearly/Monthly Resource

Querying the Renewal Price of a Yearly/Monthly Resource

Updated on 2024-08-27 GMT+08:00

Function

Customers can query the renewal price of a yearly/monthly resource by criteria on the partner sales platform.

NOTE:
  • If a primary resource has resources attached, the renewal price will include the price of the primary resource and that of the attached. The information of the attached resources can also be accessed through Querying Customer's Yearly/Monthly Resources.
  • Note: When a newly purchased EVS disk is attached to an ECS, the EVS disk is not necessarily an attached resource of the ECS. The precise information of the attached resources can only be accessed through Querying Customer's Yearly/Monthly Resources.

Constraints

Only customer AK/SK can be used to call the API. Since partners are not allowed to buy products with their own accounts, let alone yearly/monthly products.

Debugging

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

URI

POST /v2/bills/ratings/period-resources/renew-rate

Request

Request parameters

Parameter

Mandatory

Parameter Type

Value Range

Description

resource_ids

Yes

List<String>

[1-10]

Primary resource IDs

A maximum of 10 resource IDs are supported.

Determine whether a resource is a primary resource or not by the is_main_resource, a response parameter described in Querying Customer's Yearly/Monthly Resources.

period_type

Yes

Integer

[2|3]

Period type:

  • 2: Month
  • 3: Year

period_num

Yes

Integer

[1-11]

Number of periods:

  • Month: 1 to 11
  • Year: 1 to 3

include_relative_resources

No

Boolean

-

Specifies whether to include associated resources for renewal price querying.

  • false: Not included.
  • true: Included.

If this parameter is not included in the request or is set to "", the default value false is used.

Request Sample
POST https://bss-intl.myhuaweicloud.com/v2/bills/ratings/period-resources/renew-rate HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
{
	"resource_ids": ["230221_169ee********9d5b8af6a38f099abea"],
	"period_type": 2,
	"period_num": 1,
        "include_relative_resources": false
}

Response

Response Parameters

Parameter

Parameter Type

Value Range

Description

error_code

String

A maximum of 20 characters

Status code

For details, see Status Codes.

error_msg

String

A maximum of 1,000 characters

Error description

currency

String

A maximum of 20 characters

Currency

USD

If the parameter is left blank, USD is used.

renew_inquiry_results

List<RenewInquiryResultInfo>

--

Renew price inquiry result of the primary resources and their attached resources For details, see Table 1.

official_website_rating_result

OfficialWebsiteRatingResult Object

--

For list price of a primary resource and its attached resources, see Table 2.

optional_discount_rating_results

List<OptionalDiscountRatingResult>

--

Price inquiry result with an optional discount applied. If there are multiple optional discounts, different price inquiry results can be returned with a different discount applied each time. For details, see Table 3 OptionalDiscountRatingResult.

fail_resource_infos

List<FailResourceInfo>

--

Resource information for a failed query. For details, see resource information for a failed query.

Table 1 RenewInquiryResultInfo

Parameter

Parameter Type

Description

resource_id

String

Resource ID.

NOTE:

If the request contains the include_relative_resources field, the ID of the associated primary resource will be returned.

amount

String

Renewal price of primary resources and their attached resources Unit: USD

NOTE:

If the request contains the include_relative_resources field, the renewal amount of the associated primary resource is returned.

Table 2 OfficialWebsiteRatingResult

Parameter

Parameter Type

Value Range

Description

official_website_amount

String

A maximum of 64 characters

List price Unit: USD

Table 3 OptionalDiscountRatingResult

Parameter

Parameter Type

Value Range

Description

discount_id

String

A maximum of 64 characters

Discount ID.

amount

String

A maximum of 64 characters

Final price after the discount Unit: USD

Amount= official_website_amount - discount_amount

official_website_amount

String

A maximum of 64 characters

List price Unit: USD

discount_amount

String

A maximum of 64 characters

Amount of an available discount, such as commercial discounts, partner discounts, promotion discounts, and coupons Unit: USD

discount_type

Integer

A maximum of 32 characters

Discount type

  • Commercial discounts:
    • 605: Contract commercial discount in the Huawei Cloud BE scenario
    • 606: Contract commercial discount in the reseller BE scenario
  • Partner discounts:

    607: Partner authorized discount - discount rate

discount_name

String

A maximum of 256 characters

Discount name

best_offer

Integer

-

Optimal discount or not

  • 0: No (default value)
  • 1: Yes

    Optimal discount is a discount selected from the commercial discount and partner discount. The discount with the maximum discount amount is the optimal discount. If the discount amounts are the same, the system uses the commercial discount first. The promotional discount and coupon are not in the calculation of the optimal discount.

Resource information for a failed query

Parameter

Parameter Type

Description

error_code

String

Status code

For details, see Table Status Codes.

error_msg

String

Error description

resource_id

String

Resource ID.

Status code: 200

Response Sample
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  
{
	"currency": "CNY",
	"renew_inquiry_results": [{
		"resource_id": "230221_169ee********9d5b8af6a38f099abea",
		"amount": "800.0"
	}],
	"official_website_rating_result": {
		"official_website_amount": "800.0",
		"installment_official_website_amount": null,
		"installment_period_type": null
	},
	"optional_discount_rating_results": [],
	"fail_resource_infos": []
}

Status Codes

NOTE:
  • 4xx: indicates an error resulting from client, such as the request contains bad syntax or an invalid parameter. You need to check the statement and its format and make a request again.
  • 5xx: indicates an error to the Huawei Cloud system, which prevented the system from fulfilling the request from client. You can contact Huawei Cloud customer service to handle the issue.

HTTP Status Code

Error Code

Description

200

CBC.30050007

Renewal price inquiry is not applicable to non-primary resources.

200

CBC.30050008

The period type or number of periods for the resource does not exist.

200

CBC.30050009

The resources have expired and been deleted or do not exist.

200

CBC.30050010

This operation is not allowed because some resources included in your orders are to be paid.

200

CBC.30050011

Resources are being unsubscribed from or changed.

200

CBC.30050013

Renewal not supported.

400

CBC.0100

Incorrect parameter

400

CBC.99006006

The required product cannot be found.

400

CBC.99006024

Failed to query product information.

400

CBC.99006016

Failed to query coupon information.

400

CBC.99006017

Failed to query customer information.

400

CBC.99006050

Incorrect usage unit

400

CBC.99006055

The queried amount exceeds the upper limit.

400

CBC.99006066

Billing query failed

400

CBC.99006073

Project not found.

400

CBC.30050012

There are duplicate resource IDs.

403

CBC.0151

Access denied

403

CBC.0154

Invalid or expired token

500

CBC.0999

Other errors

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback