Updates a log shipping task.
Request syntax
aliyunlog log update_shipper --project=<value> --logstore=<value> --detail=<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 update_shipper
command.
For information about the global parameters of the Log Service command-line interface
(CLI), see Global variables.
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
--project | String | Yes | aliyun-test-project | The name of the project. |
--logstore | String | Yes | logstore-a | The name of the destination Logstore. |
--detail | String | Yes | file://./updateshipper.json | The path of the configuration file that is used to update the log shipping task. |
Examples
- Create a file named updateshipper.json that contains the modified parameters of the
log shipping task. The following example shows the content of the updateshipper.json
file:
{ "shipperName": "sls-doc-testshippername", "targetConfiguration": { "pathFormat": "%Y/%m/%d/%H/%M", "compressType": "none", "bufferSize": 256, "ossBucket": "sls-doc-test", "roleArn": "acs:ram::17464******745:role/aliyunlogdefaultrole", "timeZone": "", "bufferInterval": 300, "ossPrefix": "sls-doc-test", "storage": { "detail": { "enableTag": true }, "format": "json" } }, "targetType": "oss" }
- Use the default account to update the log shipping task. Run the following command:
aliyunlog log update_shipper --project="aliyun-test-project" --logstore="logstore-a" --detail="file://./updateshipper.json"
- Query the updated shipping task. Run the following command:
The following output is returned:aliyunlog log list_shipper --project="aliyun-test-project" --logstore="logstore-a"
{ "count": 1, "shipper": [ "sls-doc-testshippername" ], "total": 1 }