调用CLI命令修改日志投递任务。
请求语法
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>]
请求参数
该命令的必选和特有参数描述如下。
关于该命令的全局参数,请参见全局参数。
参数名称 | 数值类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
--project | String | 是 | aliyun-test-project | Project名称。 |
--logstore | String | 是 | logstore-a | Logstore名称。 |
--detail | String | 是 | file://./updateshipper.json | 用于更新投递任务的配置文件路径。 |
示例
- 创建updateshipper.json文件,包含修改后的日志数据投递任务参数。其内容示例如下:
{ "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" }
- 使用默认账号修改投递任务。命令示例如下:
aliyunlog log update_shipper --project="aliyun-test-project" --logstore="logstore-a" --detail="file://./updateshipper.json"
- 查询已修改的投递任务。命令示例如下:
其返回结果如下:aliyunlog log list_shipper --project="aliyun-test-project" --logstore="logstore-a"
{ "count": 1, "shipper": [ "sls-doc-testshippername" ], "total": 1 }