Updates the billing mode of a specified Metricstore.
Operation description
Metricstore supports two billing modes: pay-by-feature and pay-by-ingested-data.
This operation requires a Metricstore that already exists.
The Host in the request syntax consists of the project name and the Simple Log Service endpoint. Specify the project in the Host.
An AccessKey pair has been created and obtained. For more information, see AccessKey pair.
An Alibaba Cloud account AccessKey pair has access permissions on all API operations, which poses high security risks. Create and use a Resource Access Management (RAM) user for API access or routine O&M. The RAM user must have permissions to perform operations on Simple Log Service resources. For more information, see Create a RAM user and grant authorization.
You have determined the name and region of the project to which the logs belong. To query this information, see Manage a project.
Try it now
Test
RAM authorization
Request syntax
PUT /metricstores/{metricStore}/meteringmode HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| metricStore |
string |
Yes |
The name of the Metricstore. |
metricStoreName |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
Yes |
The name of the project. |
projectName |
| body |
object |
No |
The request body. |
|
| meteringMode |
string |
Yes |
The billing mode to switch to. Valid values:
|
ChargeByFunction |
Response elements
|
Element |
Type |
Description |
Example |
None defined.
Examples
Success response
JSON format
{}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.