GetLogStoreConfig

更新时间:
复制 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.

  • You have an AccessKey. For more information, see AccessKey.

The AccessKey of an Alibaba Cloud account has full permissions on all APIs, which poses a high security risk. We recommend using a RAM user to make API calls or perform routine operations. You must 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 permission to call this API, add the following Action to a RAM permission policy.

ActionResource
log:GetLogStoreConfigacs: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, you must enable the appendMeta option on the Logstore. Log Service searches the request headers for these keys in the specified order, and then 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.