Query Logstore Details

Updated at:

Run a CLI command to query the details of a specified Logstore.

Prerequisites

Before you run the CLI command, make sure that the following requirements are met:

  • SLS is activated. For more information, see Getting started with Simple Log Service.

  • The SLS CLI is installed and configured. For more information, see Install the CLI and Configure the CLI.

  • A project is created. For more information, see Create a project.

Command syntax

aliyun sls get-log-store --project=<value> --logstore=<value>

Parameters

The following table describes the required and command-specific parameters.

Parameter

Type

Required

Example

Description

--project

String

Yes

aliyun-test-project

The name of the project.

--logstore

String

Yes

aliyun-test-logstore

The name of the Logstore.

For information about global parameters, see Global parameters.

Command example

  • Command example

Query the details of the LogStore named aliyun-test-logstore under the default account.

aliyun sls get-log-store --project="aliyun-test-project" --logstore="aliyun-test-logstore"
  • Sample response

{
  "appendMeta": true,
  "archiveSeconds": 0,
  "autoSplit": true,
  "createTime": 1619493098,
  "enable_tracking": false,
  "lastModifyTime": 1620814389,
  "logstoreName": "aliyun-test-logstore",
  "maxSplitShard": 64,
  "resourceQuota": {
    "storage": {
      "preserved": -1,
      "used": 0
    }
  },
  "shardCount": 2,
  "telemetryType": "",
  "ttl": 30
}