Help Center/ Customer Operation Capabilities/ API Reference/ Transaction Management/ Managing Yearly/Monthly Resources/ Setting a Deduction Date for Auto-Renewal of Yearly/Monthly Resources and a Same Expiration Date for Renewed Resources
Updated on 2025-06-24 GMT+08:00

Setting a Deduction Date for Auto-Renewal of Yearly/Monthly Resources and a Same Expiration Date for Renewed Resources

Function

This API can be used to set a deduction date for auto-renewal of yearly/monthly resources and a same expiration date for renewed resources.

  • If you set a deduction fee date for auto-renewal, the system will deduct the fee at 03:00 (GMT+08:00). For details, see Deduction Date for Auto-Renewal.
  • If you set a renewal date for a yearly/monthly subscription, the subscription will expire on the fixed date of a month. For details, see Renewal Date.

Constraints

This API can only be invoked using the customer AK/SK or token.

Debugging

You can debug this API in API Explorer. Automatic authentication is supported. API Explorer can automatically generate and debug example SDK code.

URI

POST /v2/orders/subscriptions/resources/renew/config

Request

Request Parameters

Parameter

Mandatory

Type

Value Range

Description

config_name

Yes

String

-

Attribute of resource renewal setting.

  • DEDUCTION_DATE: setting a deduction date for auto-renewal
  • EXPIRE_DATE: setting a renewal date

config_value

Yes

String

1 to 64

Attribute value of resource renewal setting.

  • When config_name is set to DEDUCTION_DATE, you can set the system to automatically deduct fees two to seven days before the resource expires. This parameter has the following values:
    • 2: two days before expiration
    • 3: three days before expiration
    • 4: four days before expiration
    • 5: five days before expiration
    • 6: six days before expiration
    • 7: seven days before expiration
  • If config_name is set to EXPIRE_DATE, the value of config_value can be:
    • 1: the first day of each month
    • 2: the second day of each month
    • 3: the third day of each month
    • 4: the 4th day of each month
    • 5: the 5th day of each month
    • 6: the 6th day of each month
    • 7: the 7th day of each month
    • 8: the 8th day of each month
    • 9: the 9th day of each month
    • 10: the 10th day of each month
    • 11: the 11th day of each month
    • 12: the 12th day of each month
    • 13: the 13th day of each month
    • 14: the 14th day of each month
    • 15: the 15th day of each month
    • 16: the 16th day of each month
    • 17: the 17th day of each month
    • 18: the 18th day of each month
    • 19: the 19th day of each month
    • 20: the 20th day of each month
    • 21: the 21st day of each month
    • 22: the 22nd day of each month
    • 23: the 23rd day of each month
    • 24: the 24th day of each month
    • 25: the 25th day of each month
    • 26: the 26th day of each month
    • 27: the 27th day of each month
    • 28: the 28th day of each month
    • -1: the last day of each month
Example Request
POST https://bss-intl.myhuaweicloud.com/v2/orders/subscriptions/resources/renew/config HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
{
    "config_name": "DEDUCTION_DATE",
    "config_value": "7"
}

Response

Response parameters

Parameter

Type

Description

error_code

String

Error code.

For details, see Returned Values.

error_msg

String

Error description.

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": "success"
}
 

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

400

CBC.0100

Incorrect parameter.

403

CBC.0151

Access denied.

500

CBC.0999

Other errors.