The Log Service command-line interface (CLI) provides three syntax formats that can be used to run commands, configure the CLI, and obtain help information. This topic describes the three syntax formats of the Log Service CLI.

CLI commands

The supported commands of Log Service CLI can be used to create a project or Logstore.
  • Syntax:
    aliyunlog log <subcommand> [parameters | global options]
    • subcommand: the supported command. For more information, see Commands.
    • parameters: the supported parameters. For a list of parameters supported by each command, see the description of specific commands.
    • global options: the supported global parameters. For more information, see Global variables.
  • Example
    The following command shows how to create a project:
    aliyunlog log create_project --project_name="project-a" --project_des="project created from cli"

configure command

The configure command is used to configure basic settings such as AccessKey pairs, endpoints, and accounts.
  • Syntax:
    aliyunlog configure <access_id> <access-key> <endpoint> [<client-name>]

    Replace the <access_id> and <access-key> variables with the AccessKey ID and AccessKey secret of an account that has management permissions on Log Service. Replace <endpoint> with the endpoint of the region to which the account belongs. <client-name> is the name of the account that runs the command. For more information, see AccessKey pair and Endpoints.

  • Example
    The following example shows how to create an account named test:
    aliyunlog configure LTAI4G24******dYKSpLMZ XjAsPzvbK******tagJeRqax test

help and version commands

The help and version commands are used to obtain online help and version information.
  • Syntax:
    aliyunlog [--help | --version]
  • Example
    The following example shows how to obtain the version of the current CLI:
    aliyunlog --version