Configuring the Billing Option
Function
- This API is used to configure the billing option.
- The service region can only be global.
- The billing option can be flux (traffic-based billing) or bw (bandwidth-based billing, only for V2 and higher customers).
- The acceleration type can only be base (basic acceleration).
- A single tenant can call this API 10 times per minute.
URI
PUT /v1.0/cdn/charge/charge-modes
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
charge_mode |
Yes |
String |
Billing option. The value can be flux (traffic-based billing) or bw (bandwidth-based billing, only for V2 and higher customers). |
product_type |
Yes |
String |
Product mode. Only base (basic acceleration) is supported. |
service_area |
Yes |
String |
Service region. Only global is supported. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
charge_mode |
String |
Billing option of the account. |
product_type |
String |
Service type. |
effective_time |
Long |
Effective time of the option. |
create_time |
Long |
Creation time. |
service_area |
String |
Area of this option. |
status |
String |
Status. The status is active when the option is enabled for the first time and is changed to upcoming when the option is enabled again. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error |
ErrMsg object |
Error code and error message. |
Example Requests
Configuring the billing option
POST https://{endpoint}/v1.0/cdn/charge/charge-modes { "charge_mode" : "flux", "product_type" : "base", "service_area" : "global" }
Example Responses
Status code: 200
Success response
- Configuring the billing option
{ "charge_mode" : "flux", "effective_time" : 1666238400000, "create_time" : 1664596800000, "service_area" : "global", "status" : "active", "product_type" : "base" }
Status Codes
Status Code |
Description |
---|---|
200 |
Success response |
400 |
Error response |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.