Domain name for API request: dlc.tencentcloudapi.com.
This API is used to create a data engine.
A maximum of 20 requests can be initiated per second for this API.
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. |
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. |
This example shows you how to create a data engine.
POST / HTTP/1.1
Host: dlc.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"
}
{
"Response": {
"DataEngineId": "DataEngine-abc123",
"RequestId": "sd01m2-fasfki-231safas"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
本页内容是否解决了您的问题?