Partner CenterPartner Center

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain Service
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
HCloud CLI
Updated at: Apr 27, 2022 GMT+08:00

Unsubscribing from Yearly/Monthly Resources

Function

If a customer has subscribed to a yearly/monthly resource, the customer can use this API to unsubscribe from the resource, including the renewed part and currently used part. The customer cannot use the resources after unsubscription.

Customers can follow the instructions described in Unsubscription to unsubscribe from the yearly/monthly resources in Billing Center.

  • A yearly/monthly resource can be unsubscribed from only after it has been successfully paid and provisioned.
  • If a primary resource has resources attached, the system cancels the subscription to both the primary resource and its attached ones after this API is invoked. You can invoke Querying Customer's Yearly/Monthly Resources to obtain the details of the attached resources.
  • If a newly purchased EVS disk is attached to an ECS, but this disk is not the attached to any of the ECS primary resources, you must invoke Querying Customer's Yearly/Monthly Resources to obtain the details of the ECS primary resources and its attached ones.
  • After invoking this API, you can also invoke the API described in Querying the Amount of Unsubscription Orders to query the orders corresponding to the unsubscription order amounts.

Constraints

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

URI

POST /v2/orders/subscriptions/resources/unsubscribe

Request

Request Parameters

Parameter

Mandatory

Type

Value Range

Description

resource_ids

Yes

List<String>

A maximum 10 IDs

Resource IDs.

A maximum of 10 resource IDs can be entered at a time. Only the primary resource IDs can be entered.

Determine whether a resource is a primary resource based on is_main_resource in the response of the API described in Querying Customer's Yearly/Monthly Resources.

unsubscribe_type

Yes

Integer

1, 2

Unsubscription type. The value can be:

  • 1: Unsubscribe from the resource and its renewal periods.
  • 2: Unsubscribe from only the resource renewal periods.

unsubscribe_reason_type

No

Integer

1 to 5

Unsubscription cause. The value can be:

  • 1: The product is of poor usability.
  • 2: The product functions cannot meet the requirements.
  • 3: Customers do not know how to use the product, or the product operations are complex.
  • 4: Customers are not satisfied with the service.
  • 5: Others

unsubscribe_reason

No

String

A maximum of 512 characters

Unsubscription reason, which is generally specified by the customer.

Example Request

POST https://bss-intl.myhuaweicloud.com/v2/orders/subscriptions/resources/unsubscribe HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
{
  "resource_ids": [
    "21e09f37c5c9420c8746ad5c71fb3aab"
  ],
  "unsubscribe_type": 1,
  "unsubscribe_reason_type": 5,
  "unsubscribe_reason": "test"
}

Response

Response Parameters

Parameter

Type

Description

error_code

String

Status code.

For details, see Returned Values.

error_msg

String

Error description.

order_ids

List<String>

Unsubscription order IDs.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  
{
  "order_ids": [
    "CS19040119281JMYC"
  ]
}

Returned Values

  • 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 Value

Error Code

Description

400

CBC.0100

Parameter error.

400

CBC.7281

You cannot renew or cancel subscription because your account has been frozen.

400

CBC.99003001

The resource has expired.

400

CBC.99003002

The resource has been locked.

400

CBC.99003004

The resource has dependencies.

400

CBC.99003005

The resource is being provisioned.

400

CBC.99003006

Unsupported cloud service type.

400

CBC.99003100

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

400

CBC.99003124

The order has been unsubscribed. Please do not try to unsubscribe it again.

400

CBC.99003128

The resource does not have renewed periods or the renewed periods have taken effect, and the renewal periods cannot be unsubscribed.

400

CBC.99003144

You have orders in progress and cannot perform the current operation.

400

CBC.99003185

The cloud service can only be unsubscribed from as a whole.

400

CBC.99003640

Bandwidth add-on packages cannot be unsubscribed from.

400

CBC.99003652

Unsubscription is not supported for DevCloud packages.

400

CBC.99005042

The resource cannot be found or unsubscribed from.

403

CBC.0151

Access denied.

500

CBC.0999

Other errors.

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel