Updates the billing mode of a specified Metricstore.
Operation description
A Metricstore supports two billing modes: Pay-by-feature and Pay-by-ingested-data.
Specify an existing Metricstore.
The Host in the request syntax consists of a project name and a Simple Log Service endpoint. You must specify the project in the Host.
Obtain an AccessKey pair. For more information, see AccessKey pair.
An AccessKey pair that belongs to an Alibaba Cloud account has permissions for all API operations, which poses a high security threat. We recommend that you use a RAM user to call API operations or perform routine operations and maintenance (O&M). The RAM user must be granted the required permissions to manage Simple Log Service resources. For more information, see Create a RAM user and grant permissions.
Obtain the name and region of the project. For more information, see Manage projects.
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 which you want to switch. Valid values: ChargeByFunction and ChargeByDataIngest. ChargeByFunction specifies the pay-by-feature mode. ChargeByDataIngest specifies the pay-by-ingested-data mode. |
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.