Memperbarui konfigurasi penyimpanan log.
Deskripsi operasi
-
The
Hostin the request header must contain both theProjectname 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.
Identify the names of the target
Project,Region, andLogstore. For more information, see Manage Project and Manage Logstore.
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).
| Actions | Resource |
log:PutLogStoreConfig | acs:log:{#regionId}:{#accountId}:project/{#ProjectName}/logstore/{#LogstoreName} |
Coba sekarang
Test
RAM authorization
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 |
|
|
string |
No |
A header key, such as |
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.