DescribeTaskTemplates

Last updated: 2020-01-17 17:48:41

1. API Description

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

This API is used to query the information of task templates.

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

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 parameter. The value used for this API: DescribeTaskTemplates
Version Yes String Common parameter. The value used for this API: 2017-03-12
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
TaskTemplateIds.N No Array of String Job template ID
Filters.N No Array of Filter Filter
  • task-template-name - String - Required: No - (Filter) Filter by task template name.
  • Offset No Integer Offset
    Limit No Integer Number of returned results

    3. Output Parameters

    Parameter Name Type Description
    TaskTemplateSet Array of TaskTemplateView List of job templates
    TotalCount Integer Number of job templates
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1

    Input Example

    https://batch.tencentcloudapi.com/?Action=DescribeTaskTemplates
    &TaskTemplateIds.0=task-tmpl-pq24rq1e
    &TaskTemplateIds.1=task-tmpl-606i415o
    &<common request parameters>

    Output Example

    {
      "Response": {
        "TotalCount": 2,
        "TaskTemplateSet": [
          {
            "TaskTemplateName": "rendering",
            "TaskTemplateDescription": "3ds Max 2018 Demo",
            "TaskTemplateId": "task-tmpl-pq24rq1e",
            "CreateTime": "2018-03-08T03:27:43Z",
            "TaskTemplateInfo": {
              "OutputMappings": [
                {
                  "SourcePath": "C:\\\\render\\\\",
                  "DestinationPath": "cos://bucket-appid.cos.ap-guangzhou.myqcloud.com/"
                }
              ],
              "TaskInstanceNum": 1,
              "ComputeEnv": {
                "EnvType": "MANAGED",
                "EnvData": {
                  "SystemDisk": {
                    "DiskSize": "50",
                    "DiskType": "CLOUD_BASIC"
                  },
                  "LoginSettings": {
                    "Password": "B1habcdB1habcd"
                  },
                  "InternetAccessible": {
                    "InternetMaxBandwidthOut": "10",
                    "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR"
                  },
                  "ImageId": "img-i64lx84h",
                  "InstanceType": "S1.LARGE8",
                  "DataDisks": [
                    {
                      "DiskSize": "0",
                      "DiskType": "CLOUD_BASIC"
                    }
                  ]
                }
              },
              "RedirectInfo": {
                "StdoutRedirectPath": "cos://bucket-appid.cos.ap-guangzhou.myqcloud.com/wonderflet/logs/",
                "StderrRedirectPath": "cos://bucket-appid.cos.ap-guangzhou.myqcloud.com/wonderflet/logs/"
              },
              "Application": {
                "Command": "3dsmaxcmd Demo.max -outputName:c:\\\\render\\\\image.jpg",
                "PackagePath": "cos://bucket-appid.cos.ap-guangzhou.myqcloud.com/render/max.tar.gz",
                "DeliveryForm": "PACKAGE"
              },
              "MaxRetryCount": 0,
              "Timeout": 259200,
              "FailedAction": "TERMINATE",
              "TaskName": "rendering"
            }
          },
          {
            "TaskTemplateName": "A",
            "TaskTemplateDescription": "",
            "TaskTemplateId": "task-tmpl-606i415o",
            "CreateTime": "2018-01-25T07:46:12Z",
            "TaskTemplateInfo": {
              "TaskInstanceNum": 2,
              "ComputeEnv": {
                "EnvType": "MANAGED",
                "EnvData": {
                  "InstanceType": "S1.SMALL1",
                  "ImageId": "img-bq1gnde2"
                }
              },
              "RedirectInfo": {
                "StdoutRedirectPath": "cos://bucket-appid.cos.ap-guangzhou.myqcloud.com/hello2/logs/",
                "StderrRedirectPath": "cos://bucket-appid.cos.ap-guangzhou.myqcloud.com/hello2/logs/"
              },
              "Application": {
                "Command": "python -c \"fib=lambda n:1 if n&lt=2 else fib(n-1)+fib(n-2); print(fib(20))\" ",
                "DeliveryForm": "LOCAL"
              },
              "MaxRetryCount": 0,
              "FailedAction": "TERMINATE",
              "TaskName": "A"
            }
          }
        ],
        "RequestId": "23f7d202-1cd4-4658-a989-88ad4ed77aac"
      }
    }

    5. Developer Resources

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

    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 Internal error
    InvalidParameter.InvalidParameterCombination InvalidParameterCombination.
    InvalidParameter.TaskTemplateIdMalformed Invalid task template ID format.
    InvalidParameterValue Invalid parameter value.
    UnknownParameter Unknown parameter mistake.