When you use the Log Service command-line interface (CLI) to run commands, you do not need to set global parameters each time. By default, the Log Service CLI uses global parameters to process requests. This topic describes the global parameters of the Log Service CLI.

Parameter Type Required Example Description
--access-id String No LTAI4G243ui******pLMZ The AccessKey ID. Replace the AccessKey ID with your AccessKey ID. For information about how to obtain an AccessKey ID, see AccessKey pair.
--access-key String No XjAsPzvbK******QFRqax The AccessKey secret. Replace the AccessKey secret with your AccessKey secret. For information about how to obtain an AccessKey secret, see AccessKey pair.
--sts-token String No None. The Security Token Service (STS) token. For more information, see Use STS to enable cross-account access to Log Service resources.
--region-endpoint String No cn-hangzhou.log.aliyuncs.com The endpoint of Log Service. For more information, see Endpoints.
--client-name String No test The name of the client that sends requests. Set this parameter to the account that is used to send requests.
--format-output String No json The format of the output. Valid values:
  • json: The output is in the JSON format.
  • no_escape: Non-English characters are not escaped in the output. The original characters are returned.

For example, if this parameter is set to json,no_escape, non-English characters are not escaped. The original characters are returned in the JSON format.

--jmes-filter String No --jmes-filter="join('\n', map(&to_string(@), @))" The JMESPath syntax that is used to filter the returned log data. For more information, see JMES syntax.
--decode-output String No utf8 The decoding method that is used to parse binary data. Valid values:
  • utf8: By default, UTF-8 decoding is used to parse data.
  • lartin1: Latin1 decoding is used to parse data.
  • gbk: GBK decoding is used to parse data.

For more information about how to configure global parameters, see Configure the Log Service CLI.