tencent cloud

Feedback

ModifyTaskInfo

Last updated: 2024-06-21 15:10:07

1. API Description

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

[Note: This version is only available to a portion of allowlist customers in the Guangzhou Region]

Update Task

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: ModifyTaskInfo.
Version Yes String Common Params. The value used for this API: 2021-08-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
ProjectId Yes String Project ID
TaskId Yes String Task ID
DelayTime No Integer Execution time, in minutes, applicable to daily/weekly/monthly/yearly scheduling. For example, with daily scheduling, executing once at 02:00 AM every day, delayTime is 120 minutes
StartupTime No Integer Start Time
SelfDepend No Integer Self-Dependency Type 1: Sequential serial, one at a time, queued, 2: Unordered serial, one at a time, not queued, 3: Parallel, multiple at once
StartTime No String Effective Start Time, format yyyy-MM-dd HH:mm:ss
EndTime No String Effective End Time, format yyyy-MM-dd HH:mm:ss
TaskAction No String Scheduling Configuration - Elastic Cycle Configuration, applicable to Hourly/Weekly/Monthly/Yearly schedules. For hourly tasks scheduled at 0, 3, 4 o'clock, it would be '0,3,4'.
CycleType No Integer "Cycle Type 0:crontab, 1:Minute,2:Hour,3:Day,4:Week,5:Month,6:One-time,7:User driven,10:Flexible cycle Week,11:Flexible cycle Month,12:Year,13:Immediate Trigger Instant type, isolated from normal cycle scheduling task logic
CycleStep No Integer Step Length, Interval Time, minimum of 1
CrontabExpression No String Cron Expression is required only for Cron Tab Scheduling
ExecutionStartTime No String Execution Time Left Closed Interval, format: HH:mm. Applicable only to hourly scheduling. For example, for hourly tasks, it specifies the effective interval every day
ExecutionEndTime No String Execution Time Right Closed Interval, format: HH:mm. Applicable only to hourly scheduling. For example, for hourly tasks, it specifies the effective interval every day
TaskName No String New Task Name
RetryWait No Integer Failure Retry Interval, in minutes, a default value has already been provided during task creation
TryLimit No Integer Number of Retry Attempts on Failure, a default value has already been provided during task creation
Retriable No Integer Whether to Retry, 1 for yes
RunPriority No Integer Running Priority, 4 for High, 5 for Medium, 6 for Low
TaskExt.N No Array of TaskExtInfo Extended Task Configuration
ResourceGroup No String Execution Resource Group ID, needs to be created on the Resource Management Service and bind to a CVM machine
YarnQueue No String Resource Pool Queue Name
BrokerIp No String Specific Execution Machine under Resource Group, 'any' means it can run on any machine.
Notes No String Task notes
TaskParamInfos.N No Array of ParamInfo Task Parameters
SourceServer No String Source Data Source
TargetServer No String Target Data Source
DependencyWorkflow No String Supports Workflow Dependencies yes/no, default no
DependencyConfigDTOs.N No Array of DependencyConfig Dependency Configuration
ExecutionTTL No Integer Execution Duration
ScriptChange No Boolean Whether the Script has Changed
InChargeIds.N No Array of String Responsible Person ID

3. Output Parameters

Parameter Name Type Description
Data Boolean Execution Result
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 Example

Modify Task Information

Input Example

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

{
    "ProjectId": "1492511691706699776",
    "TaskId": "20240307211852581",
    "DelayTime": 600,
    "StartupTime": 0,
    "SelfDepend": 0,
    "StartTime": "2024-03-28 00:00:00",
    "EndTime": "2024-03-29 00:00:00",
    "TaskAction": "",
    "CycleType": 3,
    "CycleStep": 1,
    "ExecutionStartTime": "00:00",
    "ExecutionEndTime": "23:59",
    "TaskName": "python_task_failed",
    "RetryWait": 5,
    "TryLimit": 5,
    "Retriable": 1,
    "RunPriority": 6,
    "TaskExt": [
        {
            "Key": "python_type",
            "Value": "python3"
        }
    ],
    "ResourceGroup": "20221229172428663695",
    "BrokerIp": "ins-g8j6pv4f",
    "InCharge": "micofywang",
    "Notes": "test",
    "TaskParamInfos": [
        {
            "ParamKey": "a",
            "ParamValue": "3"
        }
    ],
    "DependencyWorkflow": "no",
    "InChargeIds": [
        "100033435965"
    ]
}

Output Example

{
    "Response": {
        "Data": true,
        "RequestId": "d7f6c6d3-d483-4485-b600-c665c9aea28b"
    }
}

Example2 Incorrect Example

Incorrect Example

Input Example

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

{
    "ProjectId": "1",
    "TaskId": "1"
}

Output Example

{
    "Response": {
        "Error": {
            "Code": "AuthFailure.SignatureFailure",
            "Message": "request signature verification failed, please check your signature calculation is correct."
        },
        "RequestId": "11d5af39-eac3-4960-b0d5-5cced5cdc49f"
    }
}

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 Failure.