You can call this operation to create an elastic plan. This operation can be used only for AnalyticDB for MySQL elastic clusters.

Debugging

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

Request parameters

Parameter Type Required Example Description
Action String Yes CreateElasticPlan

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

DBClusterId String Yes am-bp1xxxxxxxx47

The ID of the cluster.

ElasticPlanEnable Boolean Yes true

Specifies whether to enable elastic plans. Valid values: true and false. Default value: true.

ElasticPlanEndDay String Yes 2020-11-11

The end date of the elastic plan. Example: 2020-11-11.

ElasticPlanName String Yes test

The name of the elastic plan.

ElasticPlanNodeNum Integer Yes 2

The number of nodes in the elastic plan.

ElasticPlanStartDay String Yes 2020-10-10

The start date of the elastic plan. Example: 2020-10-10.

ElasticPlanTimeEnd String Yes 10:00:00

The end time of the elastic plan on the hour. Example: 10:00:00. You can specify a point of time of the next day. The time elapsed from when the elastic plan starts to when the elastic plan ends cannot exceed 24 hours.

ElasticPlanTimeStart String Yes 08:00:00

The start time of the elastic plan on the hour. Example: 08:00:00.

ElasticPlanWeeklyRepeat String Yes 1,2,3,4,5

The days of the week when you want to execute the elastic plan. Valid values: 0, 1, 2, 3, 4, 5, and 6. 0 to 6 indicate Sunday to Saturday. Separate multiple days with commas (,). Example: 1,2,3,4,5.

ResourcePoolName String Yes realtime

The name of the resource pool.

Response parameters

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

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=CreateElasticPlan
&DBClusterId=am-bp1xxxxxxxx47
&ElasticPlanEnable=true
&ElasticPlanEndDay=2020-11-11
&ElasticPlanName=test
&ElasticPlanNodeNum=2
&ElasticPlanStartDay=2020-10-10
&ElasticPlanTimeEnd=10:00:00
&ElasticPlanTimeStart=08:00:00
&ElasticPlanWeeklyRepeat=1,2,3,4,5
&ResourcePoolName=realtime
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

HttpCode 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 you specify the DBClusterId parameter correctly.

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