Creates a resource pool for an AnalyticDB for MySQL cluster.

Description

This operation can be called only for AnalyticDB for MySQL clusters in elastic mode for Cluster Edition.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateDBResourcePool

The operation that you want to perform. Set the value to CreateDBResourcePool.

DBClusterId String Yes am-bp11q28kvl688****

The ID of the cluster.

PoolName String Yes test

The name of the resource pool. The name can be up to 64 bytes in length.

QueryType String No interactive

The query execution mode. Valid values:

  • etl: the batch mode
  • interactive: the interactive mode
  • default_type: the default mode

Default value: default_type

NodeNum Integer No 2

The number of nodes. Default value: 0. This value must be less than the number of nodes in the resource pool named USER_DEFAULT.

Note You can call the DescribeDBResourcePool operation to query the number of nodes in the resource pool named USER_DEFAULT.

Response parameters

Parameter Type Example Description
RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

The ID of the request.

Examples

Sample requests

http(s)://adb.aliyuncs.com/?Action=CreateDBResourcePool
&DBClusterId=am-bp11q28kvl688****
&PoolName=test
&QueryType=interactive
&NodeNum=2
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateDBResourcePoolResponse>
    <RequestId>1AD222E9-E606-4A42-BF6D-8A4442913CEF</RequestId>
</CreateDBResourcePoolResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "1AD222E9-E606-4A42-BF6D-8A4442913CEF"
}

Error codes

HTTP status code Error code Error message Description
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified DBClusterId parameter does not exist. Check whether the cluster ID is valid.

For a list of error codes, visit the API Error Center.