Delete an index

Updated at:

Run a CLI command to delete the index 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.

Warning

After the index is deleted, you can no longer query or analyze logs. Proceed with caution.

Command syntax

aliyun sls delete-index --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

Delete the index configuration of the LogStore named aliyun-test-logstore.

aliyun sls delete-index --project="aliyun-test-project" --logstore="aliyun-test-logstore"
  • Response example

If the command is run successfully, no response message is returned.