All Products
Search
Document Center

Simple Log Service:PutLogStoreConfig

Last Updated:Jun 11, 2026

Memperbarui konfigurasi penyimpanan log.

Deskripsi operasi

  • The Host in the request header must contain both the Project name and the Simple Log Service (SLS) endpoint.

  • This operation requires an AccessKey. For more information, see Access Key.

An AccessKey for an Alibaba Cloud account grants full access to all APIs and poses a high security risk. We strongly recommend that you create and use a RAM user for API access and daily operations. The RAM user must have the necessary permissions to operate SLS resources. For more information, see Create a RAM user and grant permissions.

Permissions

To grant a RAM user or RAM role permission to call this operation, add the Action and Resource in the following table to a permission policy in Resource Access Management (RAM).

ActionsResource
log:PutLogStoreConfigacs:log:{#regionId}:{#accountId}:project/{#ProjectName}/logstore/{#LogstoreName}

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 /logstores/{logstore}/config HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

logstore

string

Yes

Nama penyimpanan log.

ali-test-logstore

Parameter permintaan

Parameter

Type

Required

Description

Example

project

string

Yes

Nama Proyek.

ali-test-project

body

object

Yes

Badan permintaan.

clientIpHeaders

array

No

Specifies a list of header keys from which to extract the client IP address during log ingestion. Simple Log Service (SLS) searches these headers in the specified order and uses the first valid IP address that it finds. The key names are case-insensitive, but their order is significant. To use this feature, you must also enable the appendMeta setting for the Logstore. This setting adds the extracted IP address as a log tag.

string

No

A header key, such as X-Forwarded-For, used to extract the client IP address. The key name is case-insensitive.

X-Forwarded-For

Badan permintaan harus menyertakan setidaknya satu parameter konfigurasi.

Elemen respons

Element

Type

Description

Example

Tidak ada yang didefinisikan.

Contoh

Respons sukses

JSONformat

{}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.