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.
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.
For information about the global parameters of the Log Service command-line interface (CLI), see Global variables.

Examples

  1. 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"
    }
  2. 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"
  3. Query the updated shipping task. Run the following command:
    aliyunlog log list_shipper --project="aliyun-test-project" --logstore="logstore-a"
    The following output is returned:
    {
      "count": 1,
      "shipper": [
        "sls-doc-testshippername"
      ],
      "total": 1
    }