GetLogStoreConfig

Updated at:
Copy as MD

Retrieves the configuration of a Logstore.

Operation description

  • The Host in the request syntax consists of the Project name and the Log Service endpoint.

  • An AccessKey pair is available. For more information, see AccessKey.

The AccessKey of an Alibaba Cloud account has full permissions on all APIs and poses a high security risk. Use a RAM user to make API calls or perform routine operations. Grant the RAM user the required permissions to access Log Service resources. For more information, see Create a RAM user and grant permissions.

Authorization

To grant a RAM user or RAM role the permission to call this operation, add the following Action to a RAM permission policy.

Action Resource
log:GetLogStoreConfig acs:log:{#regionId}:{#accountId}:project/{#ProjectName}/logstore/{#LogstoreName}

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

GET /logstores/{logstore}/config HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

logstore

string

Yes

The name of the Logstore.

ali-test-logstore

Request parameters

Parameter

Type

Required

Description

Example

project

string

Yes

The name of the Project.

ali-test-project

Response elements

Element

Type

Description

Example

object

clientIpHeaders

array

An array of header keys used to extract the client IP address when data is written to the Logstore. The keys are case-insensitive, but their order in the array is significant. For this feature to work, enable the appendMeta option on the Logstore. Log Service searches the request headers for these keys in the specified order and adds the first valid IP address it finds as a log tag.

string

A case-insensitive header key, such as X-Forwarded-For.

X-Forwarded-For

Examples

Success response

JSON format

{
  "clientIpHeaders": [
    "X-Forwarded-For"
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.