Domain name for API request: cls.intl.tencentcloudapi.com.
This API is used to modify an existing shipping rule. To use this API, you need to grant CLS the write permission of the specified bucket.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: ModifyShipper. |
| Version | Yes | String | Common Params. The value used for this API: 2020-10-16. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| ShipperId | Yes | String | Shipping rule ID.
|
| Bucket | No | String | COS bucket, see the supported bucket naming conventions.
|
| Prefix | No | String | The new directory prefix delivered by the Shipping Rule.
|
| Status | No | Boolean | Switch state of shipping rules. true: enable delivery task; false: disable delivery task. |
| ShipperName | No | String | Shipping rule name |
| Interval | No | Integer | Shipping time interval in seconds. Default: 300. Valid range: 300-900. |
| MaxSize | No | Integer | Maximum value of delivered files in MB. Default: 256. Range: 5-256. |
| FilterRules.N | No | Array of FilterRuleInfo | Filter rules for log shipping. Matched logs are shipped. The relationship between the rules is and. Up to 5 rules are allowed. An empty array indicates all logs are shipped without filtering. |
| Partition | No | String | Partition rules for log shipping support strftime time format representation |
| Compress | No | CompressInfo | Compression configuration of shipped logs |
| Content | No | ContentInfo | Content format configuration for shipped logs |
| FilenameMode | No | Integer | Delivery file naming configuration. 0: Random number naming. 1: Delivery time naming. |
| StorageType | No | String | The storage type. Default value is STANDARD. For enumeration values, please refer to the storage class overview document.
|
| RoleArn | No | String | Role access description name Create role |
| ExternalId | No | String | External ID |
| TimeZone | No | String | Used to generate time variables in the file path shipped to COS. Input limitation: Supports the following time zone list
|
| DSLFilter | No | String | Pre-filtering process - filter out original data written to COS |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Modify delivery COS Task
POST / HTTP/1.1
Host: cls.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyShipper
<Common request parameters>
{
"ShipperId": "2ac8a8aa-xxxx-xxxx-84cd-8cd2beeeae17",
"Bucket": "bucket-test-12541111",
"Prefix": "bow-test-12541111",
"ShipperName": "bow-test-shipper-12541111",
"Interval": 300,
"MaxSize": 5,
"FilenameMode": 1,
"FilterRules": [
{
"Key": "http",
"Regex": "^(\\d+\\.\\d+)\\..*",
"Value": "172.16"
}
],
"Partition": "/%Y/%m/%d/%H/",
"Compress": {
"Format": "none"
},
"RoleArn": "",
"ExternalId": "",
"Content": {
"Format": "json",
"Json": {
"EnableTag": true,
"MetaFields": [
"__SOURCE__",
"__FILENAME__",
"__TIMESTAMP__",
"__HOSTNAME__"
],
"JsonType": 1
}
}
}
{
"Response": {
"RequestId": "6ef60bec-xxxx-xxxx-bb20-270359fb54a7"
}
}
Change to cross-account delivery
POST / HTTP/1.1
Host: cls.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyShipper
<Common request parameters>
{
"ShipperId": "3f9562a7-xxxx-xxxx-b32a-d51a927226a7",
"Bucket": "examplebucket-1250000000",
"Prefix": "bowtest-1250000000",
"ShipperName": "bow-test-1250000000",
"Interval": 300,
"MaxSize": 10,
"FilenameMode": 1,
"FilterRules": [
{
"Key": "http",
"Regex": "^(\\d+\\.\\d+)\\..*",
"Value": "172.16"
}
],
"Partition": "/%Y/%m/%d/%H/",
"Compress": {
"Format": "gzip"
},
"RoleArn": "qcs::cam::uin/123123123:roleName/uinA_writeCLS_to_COS",
"ExternalId": "123123123123123",
"Content": {
"Format": "json",
"Json": {
"EnableTag": true,
"MetaFields": [
"__SOURCE__",
"__FILENAME__",
"__TIMESTAMP__",
"__HOSTNAME__"
],
"JsonType": 0
}
}
}
{
"Response": {
"RequestId": "25d826d2-xxxx-xxxx-a4b6-f5490e86ae81"
}
}
POST / HTTP/1.1
Host: cls.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyShipper
<Common request parameters>
{
"ShipperId": "cd21db88-cfda-4164-8f8b-b236128f1f69",
"TimeZone": "UTC+04:30"
}
{
"Response": {
"RequestId": "ff84fdef-f2aa-43a2-8208-74481e99cd89"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure | CAM signature/authentication error. |
| FailedOperation | Operation failed. |
| InternalError | Internal error. |
| InvalidParameter | Incorrect parameter. |
| InvalidParameterValue | Incorrect parameter value. |
| OperationDenied.ACLFailed | ACL verification failed. |
| OperationDenied.AccountDestroy | The account has been terminated. |
| OperationDenied.AccountIsolate | The account has overdue payments. |
| OperationDenied.AccountNotExists | The account does not exist. |
| ResourceNotFound | The resource does not exist. |
| ResourceNotFound.ShipperNotExist | The shipping rule does not exist. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback