All Products
Search
Document Center

Simple Log Service:UpdateMetricStore

Last Updated:Dec 04, 2025

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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.