Creates classic edition instances of ApsaraDB for Tair (Redis-compatible) in a batch.
Operation description
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:CreateInstances |
create |
*DBInstance
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Instances |
string |
Yes |
|
[{ "RegionId": "cn-hangzhou", "izNo": "cn-hangzhou-b", "quantity": 1, "instanceType": "Redis", "instanceClass": "redis.logic.sharding.1g.2db.0rodb.4proxy.default", "EngineVersion": "5.0", "ChargeType":"PrePaid", "Period":"1", "networkType": "VPC" , "vpcId": "vpc-2zex6u1nu32k3ux35oxxx", "vSwitchId": "vsw-2zesk464e647104kw3xxx" }] |
| Token |
string |
No |
|
ETnLKlblzczshOTUbOCz**** |
| AutoPay |
boolean |
No |
|
true |
| BusinessInfo |
string |
No |
|
000000000 |
| CouponNo |
string |
No |
youhuiquan_promotion_option_id_for_blank. |
youhuiquan_promotion_option_id_for_blank |
| EngineVersion |
string |
No |
|
5.0 |
| RebuildInstance |
boolean |
No |
|
false |
| AutoRenew |
string |
No |
|
false |
| ResourceGroupId |
string |
No |
|
rg-resourcegroupid1 |
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| RegionId | String | Yes | cn-hangzhou | The ID of the region in which to create the instance. You can call the DescribeRegions operation to query the latest list of available regions. |
| izNo | String | Yes | cn-hangzhou-b | The ID of the primary availability zone for the instance. You can find available availability zones by calling the DescribeRegions operation. |
| quantity | Integer | No | 1 | The number of instances to create. Valid values: 1 to 300. Default value: 1. |
| instanceType | String | No | Redis | The instance type. Valid values:
|
| instanceClass | String | No | redis.master.small.default | The instance class. For example, redis.master.small.default specifies a 1 GB dual-replica Community Edition (Classic Edition) instance that uses a standard architecture. For details, see Specification Query Guide.Note You must specify either this parameter or Capacity. |
| Capacity | Long | No | 16384 | The storage capacity of the instance, in MB. For details, see Specification Query Guide. Note You must specify either this parameter or InstanceClass. |
| EngineVersion | String | No | 5.0 | The engine version of the instance. Valid values:
|
| ChargeType | String | No | PrePaid | The billing method. Valid values:
|
| Period | Long | No | 12 | The subscription duration in months. Valid values: 1 to 9, 12, 24, 36, and 60. Note This parameter is required only when the ChargeType parameter is set to PrePaid. |
| AutoRenew | String | No | true | Specifies whether auto-renewal is enabled. Valid values:
ChargeType parameter is set to PrePaid. |
| InstanceName | String | No | apitest | The name of the instance. The name must meet the following requirements:
|
| Password | String | No | Pass!123456 | The password for the instance. The password must meet the following requirements:
|
| networkType | String | No | VPC | The network type. Valid value: VPC. |
| vpcId | String | No | vpc-bp1nme44gek34slfc**** | The ID of the VPC for the instance. You can call the VPC operation DescribeVpcs to query available VPCs. |
| vSwitchId | String | No | vsw-bp1e7clcw529l773d**** | The ID of the vSwitch that belongs to the specified VPC. You can call the VPC operation DescribeVSwitches to query available vSwitches. |
| NodeType | String | No | MASTER_SLAVE | The node type. Valid values:
|
| SrcDBInstanceId | String | No | r-bp1zxszhcgatnx**** | The ID of the source instance. You can call the DescribeInstances operation to find instance IDs. Note This parameter is required only when creating an instance from a source instance's backup. |
| BackupId | String | No | 111111111 | The ID of the backup set. You can call the DescribeBackups operation to find backup set IDs. Note When creating an instance from a source instance's backup, you must specify both this parameter and SrcDBInstanceId. |
| RebuildInstance | String | No | false | Specifies whether to restore the source instance from the Recycle Bin. Valid values:
SrcDBInstanceId parameter. |
[{
"RegionId": "cn-hangzhou",
"izNo": "cn-hangzhou-b",
"quantity": 1,
"instanceType": "Redis",
"instanceClass": "redis.logic.sharding.1g.2db.0rodb.4proxy.default",
"EngineVersion": "5.0",
"ChargeType": "PrePaid",
"Period": 1,
"networkType": "VPC" ,
"vpcId": "vpc-2zex6u1nu32k3ux35xxxx",
"vSwitchId": "vsw-2zesk464e647104kwxxxx"
}]
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| OrderId |
string |
|
20905403119**** |
| RequestId |
string |
|
561AFBF1-BE20-44DB-9BD1-6988B53E**** |
| InstanceIds |
object |
||
| InstanceId |
array |
|
|
|
string |
|
r-bp16e70a4338**** |
Examples
Success response
JSON format
{
"OrderId": "20905403119****",
"RequestId": "561AFBF1-BE20-44DB-9BD1-6988B53E****",
"InstanceIds": {
"InstanceId": [
"r-bp16e70a4338****"
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Zone.Closed | Specified zone is closed. | The specified Availability Zone is closed |
| 400 | MissingParameter | Period is mandatory for this action. | |
| 400 | InvalidToken.Malformed | The Specified parameter "Token" is not valid. | |
| 400 | InvalidInstanceName.Malformed | The Specified parameter "InstanceName" is not valid. | |
| 400 | InvalidPassword.Malformed | The Specified parameter "Password" is not valid. | The specified Password parameters do not meet the requirements |
| 400 | InvalidInstances.Malformed | The Specified parameter "Instances" is not valid. | The Instances parameter passed in is invalid. |
| 400 | InsufficientBalance | Your account does not have enough balance. | |
| 400 | QuotaExceed.AfterpayInstance | Living afterpay instances quota exceeded. | |
| 400 | InvalidCapacity.NotFound | The Capacity provided does not exist in our records. | |
| 400 | ResourceNotAvailable | Resource you requested is not available for finance user. | |
| 400 | PaymentMethodNotFound | No payment method has been registered on the account. | |
| 400 | IdempotentParameterMismatch | Request uses a client token in a previous request but is not identical to that request. | Idempotent check. |
| 400 | QuotaNotEnough | Quota not enough in this zone. | |
| 400 | QuotaExceed | Living afterpay instances quota exceed. | |
| 400 | VpcServiceError | Invoke vpc service failed. | |
| 400 | IzNotSupportVpcError | Specify iz not support vpc. | |
| 400 | InvalidVpcIdRegion.NotSupported | The Specified vpcId or vSwitchId not supported. | |
| 400 | ResourceGroupNotExist | The Specified ResourceGroupId does not exist. | |
| 403 | RealNameAuthenticationError | Your account has not passed the real-name authentication yet. | |
| 404 | InvalidCapacity.NotFound | The Capacity provided does not exist in our records. | The specified storage specification does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.