Changes the metering method of Alibaba Cloud CDN.
Debugging
Run this operation in OpenAPI Explorer. OpenAPI Explorer automatically generates SDK code samples after a successful call.
Authorization information
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| cdn:ModifyCdnService | none | \*All Resources | none | none |
To grant a RAM user or RAM role permission to call this operation, add cdn:ModifyCdnService to the Action element of the RAM policy. This operation does not support resource-level authorization or condition keys.
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| InternetChargeType | string | Yes | The metering method. Valid values: <br>- PayByTraffic: pay-by-data-transfer <br>- PayByBandwidth: pay-by-bandwidth | PayByTraffic |
Response parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| object | |||
| RequestId | string | The request ID. | 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
Examples
Sample success responses
JSON format
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified value of parameter "InternetChargeType" is not valid. | The specified InternetChargeType parameter is invalid. |
| 400 | InsufficientBalance | Your account does not have enough balance. | You have insufficient balance in your account. Top up or add funds to your account. |
| 400 | FUWU_BIZ_COMMODITY_VERIFY_FAIL_INVALID_PAY_METHOD | INVALID_PAY_METHOD | The specified payment method is invalid. |
| 400 | FUWU_BIZ_COMMODITY_VERIFY_FAIL_HASORDER | You have an order not yet effective | The previous order that you placed has not taken effect. |
| 400 | CSS_CHECK_UPDOWNGRADE_ERROR | You have an order not yet effective | - |
| 400 | COMMODITY.INVALID_COMPONENT | The specified value of parameter "InternetChargeType" is not valid. | - |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-12-18 | API description update. The error code has changed. | View change details |