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

Unsubscribing from Yearly/Monthly Resources

Updated on 2024-10-29 GMT+08:00

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.

NOTE:
  • 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.
  • Confirm the resource information and the refund before unsubscribing from in-use resources. After being unsubscribed from, the resources not in the recycle bin cannot be restored. If you wan to continue using these resources, unsubscribe from the subscription term renewed but not used yet.

Constraints

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

Debugging

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

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.

Up to 10 resource IDs can be entered at a time. Only IDs of primary resources and child resources that are attached to primary resources are supported. The parent resource ID is required in whole-set sales scenarios.

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.

fail_resource_infos

List<FailResourceInfo>

List of resources that failed to be unsubscribed from. This parameter has a value only when there are resources that fail to be unsubscribed from. For details, see #api_order_00019/table173001375312.

This parameter is reserved.

Table FailResourceInfo

Parameter

Type

Description

error_code

String

Status code.

For details, see Returned Values.

This parameter is reserved.

error_msg

String

Error description.

This parameter is reserved.

resource_id

String

Resource ID.

This parameter is reserved.

Example Response

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

Returned Values

NOTE:
  • 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.30000053

Unsubscription not supported. The billing mode of the resource is Savings Plans.

400

CBC.30000067

Unsubscription not supported. This resource has been deleted or the subscription to this resource has not been synchronized to CBC.

400

CBC.99003012

The resource ID does not exist.

400

CBC.99003100

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

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.99003185

The associated resources of a cloud service cannot be operated independently.

400

CBC.99003643

For cloud services for which invoices have been issued, unsubscription is not supported.

400

CBC.99003647

Unsubscription not supported for this pay-per-use package.

400

CBC.99003649

Unsubscription not supported for cloud services in trial use.

400

CBC.99003650

Unsubscription not supported for this cloud service in KooGallery.

400

CBC.99003652

Unsubscription is not supported for DevCloud packages.

400

CBC.99003654

If there is a bandwidth add-on package, you cannot unsubscribe from the renewal period.

400

CBC.99003656

Operation not allowed. Your resource has been frozen.

400

CBC.99006066

An error occurred during the query of the fee information.

403

CBC.0151

Access denied.

400

CBC.99003651

Unsubscription not supported. An operation associated with this instance is in progress.

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