tencent cloud

Feedback

SearchCosRechargeInfo

Last updated: 2024-04-15 19:58:44

1. API Description

Domain name for API request: cls.tencentcloudapi.com.

This API is used to preview COS import information.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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: SearchCosRechargeInfo.
Version Yes String Common Params. The value used for this API: 2020-10-16.
Region No String Common Params. This parameter is not required for this API.
TopicId Yes String Log topic ID
LogsetId Yes String Logset ID
Name Yes String Delivery Task Name
Bucket Yes String COS bucket, see the supported bucket naming conventions.
BucketRegion Yes String The region where the COS bucket is located, see the supported region list.
Prefix Yes String The prefix of the folder where COS files are located
Compress No String Compression mode: "", "gzip", "lzop", and "snappy". The default mode is "".

3. Output Parameters

Parameter Name Type Description
Data Array of String The first few lines of a file under a matched bucketNote: This field may return null, indicating that no valid values can be obtained.
Sum Integer Number of files under the matched bucket
Path String Current preview file path
Note: This field may return null, indicating that no valid values can be obtained.
Msg String Reason for preview data retrieval failureNote: This field may return null, indicating that no valid values can be obtained.
Status Integer Status
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.

4. Example

Example1 Previewing COS Import Information

Input Example

POST / HTTP/1.1
Host: cls.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: SearchCosRechargeInfo
<Common request parameters>

{
    "TopicId": "e6a94ed2-8191-49ac-ab67-90e33d2f1111",
    "LogsetId": "11114ed2-8191-49ac-ab67-90e33d2f3974",
    "Name": "test_name",
    "Bucket": "examplebucket-1-1250000000",
    "BucketRegion": "ap-guangzhou",
    "Prefix": "text_prefix",
    "Compress": "gzip"
}

Output Example

{
    "Response": {
        "Msg": "",
        "Status": 0,
        "Data": [
            "2021-11-09 20:16:29.038 INFO    apis/report.go:108      report data success, size 1",
            "2021-11-09 20:16:29.039 INFO    apis/report.go:108      report data success, size 1",
            "2021-11-09 20:16:29.040 INFO    apis/report.go:108      report data success, size 1",
            "2021-11-09 20:16:29.041 INFO    apis/report.go:108      report data success, size 1",
            "2021-11-09 20:16:29.042 INFO    apis/report.go:108      report data success, size 1"
        ],
        "Sum": 10000,
        "Path": "https://bucket1.ap-guangzhou.myqcloud.com/csv/g_xxx.gz",
        "RequestId": "e6a94ed2-8191-49ac-ab67-90e33d2f3974"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
FailedOperation.BucketNoFile No corresponding prefix files in the bucket. Please use the correct bucket, file prefix, and compression method.
FailedOperation.DecompressFile File decompression failed. Please choose the correct compression method.
FailedOperation.DownLoadFile Failed to download file. Please try again later.
FailedOperation.GetListFile Failed to get the file list. Please try again later.
FailedOperation.PreviewFile File preview failed. Please try again later.
FailedOperation.ReadFile Failed to read file content. Please make sure the file is readable.
FailedOperation.Timeout Operation timed out
InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameter.DbDuplication The unique key of database conflicts.
MissingParameter Missing parameter.
OperationDenied Operation denied.
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.TopicNotExist The log topic does not exist.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support