All Products
Search
Document Center

Simple Log Service:get_logstore

Last Updated:Oct 26, 2023

Queries the information about a specified Logstore.

Request syntax

aliyunlog log get_logstore --project_name=<value> --logstore_name=<value> [--access-id=<value>] [--access-key=<value>] [--sts-token=<value>] [--region-endpoint=<value>] [--client-name=<value>] [--jmes-filter=<value>] [--format-output=<value>] [--decode-output=<value>]

Request parameters

The following table describes the required and specific parameters of the get_logstore command.
ParameterTypeRequiredExampleDescription
--project_nameStringYesaliyun-test-projectThe name of the project.
--logstore_nameStringYesmoni-nginxThe name of the destination Logstore.
For information about the global parameters of the Log Service command-line interface (CLI), see Global parameters.

Examples

  • Sample requests
    Use the default account to query the information about a Logstore named moni-nginx.
    aliyunlog log get_logstore --project_name="aliyun-test-project" --logstore_name="moni-nginx"
  • Sample responses
    {
      "appendMeta": true,
      "archiveSeconds": 0,
      "autoSplit": true,
      "createTime": 1619493098,
      "enable_tracking": false,
      "lastModifyTime": 1620814389,
      "logstoreName": "moni-nginx",
      "maxSplitShard": 64,
      "resourceQuota": {
        "storage": {
          "preserved": -1,
          "used": 0
        }
      },
      "shardCount": 2,
      "telemetryType": "",
      "ttl": 30
    }

Error codes

If an error message is returned, fix the error based on the error codes of the related API operation. For more information, see Error codes of GetLogstore.

API reference

GetLogStore