All Products
Search
Document Center

Simple Log Service:UpdateMetricStore

Last Updated:Jun 11, 2026

Memperbarui konfigurasi penyimpanan metrik yang ada. Penyimpanan metrik digunakan untuk menyimpan metrik.

Deskripsi operasi

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.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Sintaks permintaan

PUT /metricstores/{name} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

name

string

Yes

Nama penyimpanan metrik.

my_metric_store

Parameter permintaan

Parameter

Type

Required

Description

Example

project

string

Yes

Nama proyek.

my-project

body

object

No

Badan permintaan.

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

Elemen respons

Element

Type

Description

Example

Tidak ada yang didefinisikan.

Contoh

Respons sukses

JSONformat

{}

Kode kesalahan

HTTP status code

Error code

Error message

Description

404 MetricStoreNotExist The specified metricstore xxx does not exist. The specified metricstore xxx does not exist.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.