Updated on 2024-09-26 GMT+08:00

Unsubscribing from Yearly/Monthly Resources (Old)

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.

This API will be brought offline. For details about the new API for unsubscribing from yearly/monthly resources, see Unsubscribing from Yearly/Monthly Resources.

Web UI

If a customer has subscribed to a yearly/monthly resource, the customer can use this API to unsubscribe from the resource in the Billing Center.

  1. Go to the Unsubscriptions page.
  2. Click the Succeeded Resources tab.
  3. Unsubscribe from resources separately or in batches.

    • Unsubscribe from a single resource: Click Unsubscribe for a resource from which you want to unsubscribe.

    • Batch unsubscribe from resources: Select the target resources from the resource list and click Unsubscribe in the upper left corner of the resource list.

  4. View the unsubscription information, select I have confirmed that a handling fee will be charged for this unsubscription, and click Unsubscribe.

REST API

A customer can unsubscribe from its yearly/monthly resources on the customer platform.

A yearly/monthly resource can be unsubscribed from only after it has been successfully paid and provisioned.

  • This API can be invoked only using the AK/SK or token of the customer.
  • After you invoke this API, if a primary resource ID has an attached resource ID, the system will unsubscribe from both the primary resource and attached resource.
    • For example, ECS is the primary resource, and EVS is the attached resource.
    • If the shared bandwidth is used, the bandwidth is the primary resource, and EIPs are the attached resource.
    • If the exclusive bandwidth is used, EIPs are the primary resources, and the bandwidth is the attached resource.

  1. URI

    POST /v1.0/{domain_id}/common/order-mgr/resources/delete

    The following table describes the parameters.

    Table 1 URI parameter description

    Parameter

    Mandatory

    Value Range

    Description

    domain_id

    Yes

    A maximum 64 characters

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

  1. Request

    Request Parameters

    Parameter

    Mandatory

    Type

    Value Range

    Description

    resourceIds

    Yes

    List<String>

    [1-10]

    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 (Old).

    unSubType

    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.

    unsubscribeReasonType

    No

    Integer

    [1-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

    If this parameter is not included in the request parameters, is set to "", or is set to null, no value is returned.

    unsubscribeReason

    No

    String

    A maximum of 512 characters

    Unsubscription reason, which is generally specified by the customer.

    If this parameter is not included in the request parameters, is set to "", or is set to null, no value is returned.

    Example Request

    POST https://bss-intl.myhuaweicloud.com/v1.0/{domain_id}/common/order-mgr/resources/delete HTTP/1.1
    Content-Type: application/json
    X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
    
    {
      "resourceIds": ["53fa7828774df68b","72a256456xdf45g"],
      "unSubType":2,
      "unsubscribeReasonType":2,
      "unsubscribeReason":"xxxxxxx"
    }

  1. Response

    Response Parameters

    Parameter

    Type

    Description

    error_code

    String

    Status code.

    For details, see 4.

    error_msg

    String

    Error description.

    orderIds

    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  
    
    {
        "error_code": "CBC.0000",
        "error_msg": "unsubscribe success",
        "orderIds": ["xxxxxxxxxx"]
    }

  1. 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 Status Code

    Error Code

    Description

    200

    CBC.0000

    Success.

    400

    CBC.0100

    Invalid input parameter.

    403

    CBC.0151

    Access denied.

    500

    CBC.0999

    Other errors.

    200

    CBC.3185

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

    200

    CBC.30000053

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

    200

    CBC.30000067

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

    200

    CBC.7281

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

    200

    CBC.99003012

    Resource ID not found.

    200

    CBC.99003100

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

    200

    CBC.99003128

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

    200

    CBC.99006066

    An error occurred during fee inquiry.

    200

    CBC.99003645

    Unsubscription not supported for this cloud service type.

    400

    CBC.99003650

    Unsubscription not allowed for this cloud service in the Marketplace.

    200

    CBC.99003656

    Operation not allowed. Your resource has been frozen.