You can call this operation to push metering data.
- Currently, you cannot call this operation as a RAM user.
- All request parameters of this operation must be URL-encoded.
- Alibaba Cloud Marketplace allows you to send only one request to push metering data of each instance within 60 seconds. Each request can contain a maximum of 100 metering data records.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | PushMeteringData |
The operation that you want to perform. Set the value to PushMeteringData. |
Metering | String | No | [{"InstanceId":"1000001","StartTime":"100000000","EndTime":"100000010","Entities":[{"Key":"Frequency","Value":"96"}]}] |
The parameters in the example are described as follows:
Note:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 6EF60BEC-0242-43AF-BB20-270359FB54A7 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call of the operation was successful. |
Examples
Sample requests
http(s)://market.ap-southeast-1.aliyuncs.com/? Action=PushMeteringData
&Metering=%5B%7B%22InstanceId%22%3A%221000001%22%2C%22StartTime%22%3A%22100000000%22%2C%22EndTime%22%3A%22100000010%22%2C%22Entities%22%3A%5B%7B%22Key%22%3A%22Frequency%22%2C%22Value%22%3A%2296%22%7D%5D%7D%5D
&<Common request parameters>
Sample success responses
XML
format
<PushMeteringDataResponse>
<RequestId>6EF60BEC-0242-43AF-BB20-270359FB54A7</RequestId>
<Success>true</Success>
</PushMeteringDataResponse>
JSON
format
{
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
"Success": "true"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
500 | UnknownError | An error occurred while processing your request. | The error message returned because an unknown error has occurred. |
500 | Service.Flow.Control | The rate throttling threshold has been exceeded. | The error message returned because the number of requests exceeds the upper limit. |
500 | Invalid.Parameter | The specified parameter is invalid. | The error message returned because the specified request parameters are invalid. |
500 | Invalid.Parameter.Instance | The specified Instance parameter is invalid. | The error message returned because the specified Instance parameter is invalid. |
500 | Invalid.Parameter.Metering | The specified Metering parameter is invalid. | The error message returned because the specified Metering parameter is invalid. |
500 | Metering.Data.Exceeded | The number of metering entities must not exceed 100. | The error message returned because the number of metering entities cannot exceed 100. |
500 | Permission.Denied | You are not authorized to call the API operation. Contact the API developer to add your account to the API user whitelist. | The error message returned because you are not authorized to call the API operation. Contact the API developer to add your account to the API user whitelist. |
For a list of error codes, visit the API Error Center.