Updates the configuration of an existing Metricstore. A Metricstore is used to store metrics.
Operation description
A Metricstore is used to store metrics.
-
The Metricstore that you want to update must already exist.
-
The Host in the request syntax consists of a project name and a Simple Log Service endpoint. You must specify a project in the Host.
-
You must have an AccessKey pair. For more information, see AccessKey pair.
An AccessKey pair for an Alibaba Cloud account has full permissions for all API operations, which poses a security risk. 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 only the permissions required to access Simple Log Service resources. For more information, see Create and authorize a RAM user.
-
You must know the name and region of the project. For more information, see Manage a project.
-
You can create a maximum of 200 Logstores or Metricstores in a project.
-
Metrics are deleted after their retention period expires.
Try it now
Test
RAM authorization
Request syntax
PUT /metricstores/{name} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| name |
string |
Yes |
The name of the Metricstore. |
my_metric_store |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
Yes |
The name of the project. |
my-project |
| body |
object |
No |
The request body. |
|
| ttl |
integer |
No |
The data retention period. Unit: days. |
7 |
| autoSplit |
boolean |
No |
Specifies whether to enable automatic sharding. |
true |
| maxSplitShard |
integer |
No |
The maximum number of shards for automatic sharding. This parameter is valid only when autoSplit is set to true. |
64 |
| mode |
string |
No |
The type of the Metricstore. |
standard |
| hot_ttl |
integer |
No |
The retention period of data in the hot storage layer. Unit: days. |
|
| infrequentAccessTTL |
integer |
No |
The retention period for the IA storage class. Unit: days. |
|
| appendMeta |
boolean |
No |
||
| shardingPolicy |
ShardingPolicy |
No |
Response elements
|
Element |
Type |
Description |
Example |
None defined.
Examples
Success response
JSON format
{}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | MetricStoreNotExist | The specified metricstore xxx does not exist. | The specified metricstore xxx does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.