Obtains a cursor for a specific time using the SLS CLI.
Request syntax
aliyunlog log get_cursor --project_name=<value> --logstore_name=<value> --shard_id=<value> --start_time=<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
Required parameters:
|
Parameter name |
Data type |
Required |
Example |
Description |
|
--project_name |
String |
Yes |
aliyun-test-project |
Project name. |
|
--logstore_name |
String |
Yes |
logstroe-a |
Logstore name. |
|
--shard_id |
String |
Yes |
0 |
Shard ID. |
|
--start_time |
String |
Yes |
begin |
The start time. Valid values:
|
This command also supports Global parameters.
Examples
-
Request example
Query the start cursor for shard 0 in logstore-a with the default account:
aliyunlog log get_cursor --project_name="aliyun-test-project" --logstore_name="logstore-a" --shard_id=0 --start_time="begin" -
Response example
{"cursor": "MTYxNDc1MDAyNzM3MzIwNTcxNA=="}
Error codes
Applicable error codes are listed in Error codes.