tencent cloud

文档反馈

QueryTaskCostDetail

最后更新时间:2024-08-21 19:10:01

1. API Description

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

This API is used to query task consumption details.

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: QueryTaskCostDetail.
Version Yes String Common Params. The value used for this API: 2021-01-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-singapore.
Filters.N No Array of Filter Filter criteria. The following filter types are supported. The parameter Name should be one of them. The maximum number of values that can be filtered by task-id is 50. The values that can be filtered by other parameter filters should not be more than 5.
task-id - String - (accurate filtering of task IDs). The example of the value of task-id is e386471f-139a-4e59-877f-50ece8135b99.
task-state - String - (filtering task status); valid values: 0 (initializing), 1 (running), 2 (successful), and -1 (failed).
task-sql-keyword - String - (fuzzy filtering of the keywords of SQL statements); the example of the value is DROP TABLE.
task-operator- string (filtering sub-UIN)
StartTime No String Start time, and the format is yyyy-mm-dd HH:MM:SS. It is the current moment 45 days ago by default.
EndTime No String End time, and the format is yyyy-mm-dd HH:MM:SS. The time span is longer than 0 day but shorter than or equal to 30 days. Data within the recent 45 days can be queried. It is the current moment by default.
DataEngineName No String Data engine name, used for selecting
SearchAfter No String Identifier on the next page
PageSize No Integer Size of each page

3. Output Parameters

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.

4. Example

Example1 Querying Task Consumption Details

Input Example

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

{}

Output Example

{
    "Response": {
        "RequestId": "abc"
    }
}

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
InternalError An internal error occurred.
InternalError.DBError A database error occurred.
InternalError.InternalSystemException The business system is abnormal. Please try again or submit a ticket to contact us.
InvalidParameter The parameter is incorrect.
InvalidParameter.FiltersValuesNumberOutOfLimit The number of specified Filter.Values parameters exceeds the limit. Currently, it should be less than or equal to 50.
InvalidParameter.InvalidFilterLength The number of filter conditions is invalid. When filter conditions are specified, the number of filter conditions should be greater than or equal to 1 and less than or equal to 5.
InvalidParameter.InvalidTimeFormat The specified time format is not compliant. Currently, only YYYY-mm-dd HH:MM:SS is supported.
InvalidParameter.ParameterBase64DecodeFailed Base64 parsing of the specified parameter failed.
InvalidParameter.ParameterNotFoundOrBeNone The parameter is not found or empty.
InvalidParameter.SQLTaskFiltersKeyTypeNotMath The specified Filter.Key does not match. Currently, only task-id/task-sql-keyword/task-kind/task-operator/batch-id/session-id/task-state is supported.
InvalidParameter.SQLTaskNotFound The specified SQL task does not exist.
InvalidParameter.SQLTaskSortByTypeNotMatch The SortBy type specified in the SQL task does not match. Currently, only create-time/data-amount/used-time/resource-usage is supported.
InvalidParameter.SparkJobNotFound The specified Spark task does not exist.
InvalidParameter.TaskStateTypeNotMath The specified task status does not match. Currently, it only supports 0: initializing, 1: running, 2: successful, 3: writing data, 4: queuing, -1: failed, and -3: deleted.
InvalidParameterValue The parameter value is incorrect.