tencent cloud

数据湖计算

产品动态
产品简介
产品概述
产品优势
应用场景
购买指南
计费概述
退费说明
欠费说明
调整配置费用说明
快速入门
新用户开通全流程
DLC 数据导入指引
一分钟入门 DLC 数据分析
一分钟入门 DLC 权限管理
一分钟入门分区表
开启数据优化
跨源分析 EMR Hive 数据
标准引擎配置指引
配置数据访问策略
操作指南
控制台操作介绍
开发指南
运行环境
SparkJar 作业开发指南
PySpark 作业开发指南
查询性能优化指南
UDF 函数开发指南
系统约束
客户端访问
JDBC 访问
TDLC 命令行工具访问
第三方软件联动
Python 访问
实践教程
通过 Power BI 访问 DLC 数据操作指南
建表实践
使用 Apache Airflow 调度 DLC 引擎提交任务
StarRocks 直接查询 DLC 内部存储
Spark 计算成本优化实践
DATA + AI
使用 DLC 分析 CLS 日志
使用角色 SSO 访问 DLC
资源级鉴权指南
在 DLC 中实现 TCHouse-D 读写操作
DLC 原生表
SQL 语法
SuperSQL 语法
标准 Spark 语法概览
标准 Presto 语法概览
保留字
API 文档
History
Introduction
API Category
Making API Requests
Data Table APIs
Task APIs
Metadata APIs
Service Configuration APIs
Permission Management APIs
Database APIs
Data Source Connection APIs
Data Optimization APIs
Data Engine APIs
Resource Group for the Standard Engine APIs
Data Types
Error Codes
通用类参考
错误码
配额与限制
第三方软件连接DLC操作指南
常见问题
权限类常见问题
引擎类常见问题
功能类常见问题
Spark 作业类常见问题
DLC 政策
隐私协议
数据处理和安全协议
服务等级协议
联系我们

CreateDataEngine

PDF
聚焦模式
字号
最后更新时间: 2025-11-13 20:53:59

1. API Description

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

This API is used to create a data engine.

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: CreateDataEngine.
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.
EngineType Yes String The engine type. Valid values: spark and presto.
DataEngineName Yes String The name of the virtual cluster.
ClusterType Yes String The cluster type. Valid values: spark_private, presto_private, presto_cu, and spark_cu.
Mode Yes Integer The billing mode. Valid values: 0 (shared engine), 1 (pay-as-you-go), and 2 (monthly subscription).
AutoResume Yes Boolean Whether to automatically start the clusters.
MinClusters No Integer The minimum number of clusters.
MaxClusters No Integer The maximum number of clusters.
CidrBlock No String The VPC CIDR block.
Message No String The description.
Size No Integer The cluster size.
PayMode No Integer The pay mode. Valid value: 0 (postpaid, default) and 1 (prepaid) (currently not available).
TimeSpan No Integer The usage duration of the resource. Postpaid: Fill in 3,600 as a fixed figure; prepaid: fill in a figure equal to or bigger than 1 which means purchasing resources for one month. The maximum figure is not bigger than 120. The default value is 1.
TimeUnit No String The unit of the resource period. Valid values: s (default) for the postpaid mode and m for the prepaid mode.
AutoRenew No Integer The auto-renewal status of the resource. For the postpaid mode, no renewal is required, and the value is fixed to 0. For the prepaid mode, valid values are 0 (manual), 1 (auto), and 2 (no renewal). If this parameter is set to 0 for a key account in the prepaid mode, auto-renewal applies. It defaults to 0.
Tags.N No Array of TagInfo The tags to be set for the resource being created.
AutoSuspend No Boolean Whether to automatically suspend clusters. Valid values: false (default, no) and true (yes).
CrontabResumeSuspend No Integer Whether to enable scheduled start and suspension of clusters. Valid values: 0 (disable) and 1 (enable). Note: This policy and the auto-suspension policy are mutually exclusive.
CrontabResumeSuspendStrategy No CrontabResumeSuspendStrategy The complex policy for scheduled start and suspension, including the start/suspension time and suspension policy.
EngineExecType No String The type of tasks to be executed by the engine, which defaults to SQL. Valid values: SQL and BATCH.
MaxConcurrency No Integer The max task concurrency of a cluster, which defaults to 5.
TolerableQueueTime No Integer The task queue time limit, which defaults to 0. When the actual queue time exceeds the value set here, scale-out may be triggered. Setting this parameter to 0 represents that scale-out may be triggered immediately after a task queues up.
AutoSuspendTime No Integer The cluster auto-suspension time, which defaults to 10 min.
ResourceType No String The resource type. Valid values: Standard_CU (standard) and Memory_CU (memory).
DataEngineConfigPairs.N No Array of DataEngineConfigPair The advanced configurations of clusters.
ImageVersionName No String The version name of cluster image, such as SuperSQL-P 1.1 and SuperSQL-S 3.2. If no value is passed in, a cluster is created using the latest image version.
MainClusterName No String The primary cluster, which is specified when a failover cluster is created.
ElasticSwitch No Boolean Whether to enable the scaling feature for a monthly subscribed Spark job cluster.
ElasticLimit No Integer The upper limit (in CUs) for scaling of the monthly subscribed Spark job cluster.
SessionResourceTemplate No SessionResourceTemplate The session resource configuration template for a Spark job cluster.
AutoAuthorization No Boolean Automatically grant permissions
EngineNetworkId No String Engine network ID
EngineGeneration No String Generation of the engine. SuperSQL means the supersql engine while Native means the standard engine. It is SuperSQL by default.

3. Output Parameters

Parameter Name Type Description
DataEngineId String The ID of the virtual engine.
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 Creating a data engine

This example shows you how to create a data engine.

Input Example

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

{
    "EngineType": "spark",
    "DataEngineName": "test",
    "ClusterType": "spark",
    "MinClusters": 0,
    "MaxClusters": 0,
    "DefaultDataEngine": true,
    "CidrBlock": "10.255.255.0/16",
    "Mode": 0,
    "Message": "test",
    "AutoResume": true,
    "Size": 0,
    "PayMode": 0,
    "TimeSpan": 1,
    "TimeUnit": "h",
    "AutoRenew": 0,
    "Tags": [
        {
            "TagKey": "key",
            "TagValue": "value"
        }
    ],
    "AutoSuspend": true,
    "CrontabResumeSuspend": 0,
    "CrontabResumeSuspendStrategy": {
        "ResumeTime": "10",
        "SuspendTime": "10",
        "SuspendStrategy": 0
    },
    "EngineExecType": "BATCH",
    "MaxConcurrency": 0,
    "TolerableQueueTime": 0,
    "AutoSuspendTime": 0,
    "ResourceType": "standard_cu",
    "ImageVersionName": "SuperSQL-P 1.1"
}

Output Example

{
    "Response": {
        "DataEngineId": "DataEngine-abc123",
        "RequestId": "sd01m2-fasfki-231safas"
    }
}

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.AbnormalOrderStatus Order status exception.
FailedOperation.AnotherCreateProcessRunning Another data source is being created.
FailedOperation.AnotherProcessRunning Another operation is in progress. Please try again later.
FailedOperation.AnotherRequestProcessing Another request is being processed. Try again later.
FailedOperation.BalanceNotEnough Insufficient account balance.
FailedOperation.BillingSystemError Billing system exception.
FailedOperation.BindTooManyTags The number of tags set reached the limit.
FailedOperation.CreateDataEngineFailed Failed to create the engine.
FailedOperation.DeliverGoodsFailed Failed to deliver the goods.
FailedOperation.DuplicateTagKey Duplicate tag keys.
FailedOperation.FeeDeductionFailed Deduction failed.
FailedOperation.GetProductInformationFailed Failed to get product information.
FailedOperation.IllegalResource Invalid resources.
FailedOperation.IllegalTagKey Invalid characters in the tag key.
FailedOperation.IllegalTagValue Invalid characters in the tag value.
FailedOperation.InquirePriceFailed Price query failed.
FailedOperation.ModifyInstanceFailed Failed to scale up/down the instance.
FailedOperation.NoPermission No permission.
FailedOperation.NoRealNameAuthentication Unverified account.
FailedOperation.NumberExceedLimit Reached the allowed limit of engines.
FailedOperation.ParameterValidationFailed Failed to verify parameters.
FailedOperation.RefundDepositFailed Refunding failed.
FailedOperation.TagAlreadyAttached A tag key of the same name has been set for the resource.
FailedOperation.TagKeyTooLong The tag key exceeded the length limit.
FailedOperation.TagNotExist The tag does not exist.
FailedOperation.TagValueTooLong The tag value exceeded the length limit.
FailedOperation.TooManyResources The number of resources reached the limit.
FailedOperation.TooManyTags The number of tags reached the limit.
InternalError An internal error occurred.
InternalError.DBError A database error occurred.
InvalidParameter.DataEngineModeNotMatch The specified cluster billing mode does not match. Currently, it only supports 1: pay-as-you-go and 2: annual and monthly subscriptions.
InvalidParameter.DataEngineSizeNotMatch The specified cluster specifications are not compliant.
InvalidParameter.DuplicateDataEngineName Duplicate engine name.
InvalidParameter.ImageParameterNotFound The specified cluster image parameter does not exist.
InvalidParameter.InvalidDataEngineCidrFormat The specified cluster CIDR format does not match, and the reference style is 192.0.2.1/24.
InvalidParameter.InvalidDataEngineMode Invalid data engine mode.
InvalidParameter.InvalidDataEngineName The data engine name is invalid.
InvalidParameter.InvalidDataEngineSpecs Invalid data engine spec.
InvalidParameter.InvalidDataEngineTimeSpan The usage duration of the specified cluster resource: Postpaid: Fill in 3,600 as a fixed figure; prepaid: Fill in a figure equal to or bigger than 1 which means purchasing resources for one month. The maximum figure is no more than 120. The default is 3,600.
InvalidParameter.InvalidDataEngineTimeUnit The unit of the usage duration of the specified cluster resource does not match; postpaid: h; prepaid: m. The default is h.
InvalidParameter.InvalidEngineType The engine type is invalid.
InvalidParameter.InvalidPayMode Invalid billing mode.
InvalidParameter.InvalidTimeSpan Invalid billing period.
InvalidParameter.InvalidTimeUnit Invalid unit of billing period.
InvalidParameter.VpcCidrFormatError Invalid VPC CIDR format.
ResourceNotFound The resource does not exist.
ResourceNotFound.DataEngineNotUnique The specified engine already exists.
UnauthorizedOperation.NoPaymentAuthority No permission to pay.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈