创建新实例。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| Description | string | 是 | 实例描述,需满足如下要求:
| test |
| RegionId | string | 是 | 地域 ID。 | cn-hangzhou |
| ZoneId | string | 是 | 可用区 ID。 | cn-hangzhou-e |
| Type | string | 是 | 实例类型,仅支持 PRIVATE,即专享实例。 说明
您也可以传入 1 表示专享实例。
| PRIVATE |
| Quantity | integer | 是 | 创建实例的数量,仅支持传入 1,即一次只能创建一个实例。 | 1 |
| InstanceSeries | string | 是 | 实例系列参数,取值范围如下:
| drds.sn2.4c16g |
| Specification | string | 是 | 实例规格码,取值由实例系列加具体实例规格组成,例如 drds.sn2.4c16g.8c32g。 | drds.sn2.4c16g.8C32g |
| ClientToken | string | 是 | 用于保证请求的幂等性,防止重复提交请求。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符,且该参数值中不能包含非 ASCII 字符。 | c1dd299c-10c6-11ea-bbbb-************ |
| PayType | string | 是 | 付费类型,取值范围如下:
| drdsPost |
| VpcId | string | 否 | 专有网络 ID。 | vpc-********** |
| VswitchId | string | 否 | 虚拟交换机 ID。 | vsw-********** |
| isHa | boolean | 否 | 是否为高可用实例。 | true |
| PricingCycle | string | 否 | 指定预付费实例为包年或包月类型,取值范围如下:
说明
若付费类型为 drdsPre,该参数为必传参数。
| month |
| Duration | integer | 否 | 包年或包月实例的购买时长。
说明
仅当付费类型是 drdsPre 时该参数生效。
| 1 |
| IsAutoRenew | boolean | 否 | 是否自动续费,取值范围如下:
说明
仅当付费类型为 drdsPre 时该参数生效。
| true |
| MasterInstId | string | 否 | 主实例 ID,仅在创建只读实例时填写。 | drds*********** |
| MySQLVersion | integer | 否 | 实例支持的 MySQL 版本,取值范围如下:
说明
仅当创建主实例时该参数生效,只读实例的 MySQL 版本默认与主实例相同。
| 5 |
| ResourceGroupId | string | 否 | 资源组 ID。 | rg-************ |
返回参数
示例
正常返回示例
JSON格式
{
"Success": true,
"RequestId": "D99D4644-A70D-49A3-B8B4-767ACC50SE2R",
"Data": {
"OrderId": 111111111111111,
"DrdsInstanceIdList": {
"drdsInstanceIdList": [
"drds************"
]
}
}
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 400 | ParameterError | Parameter error | - |
| 400 | ActionUnauthorized | The specified action is not available for you | 指定的action未授权,请您先做RAM授权再进行操作。 |
| 400 | ServiceUnable | The service is not available now, please try again later | - |
| 400 | OperationDenied | drds service is not enable for you | - |
| 400 | QuotaExceeded.DRDSInstance | The quota of create instance exceeds. | - |
| 400 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | - |
| 400 | InvalidDescription.MalFormed | The specified parameter description is not valid. | - |
| 400 | CommunicateWithManager.Error | Internal Error. Communicate with drds manager error | - |
| 400 | InvalidVSwitchId | Invalid vswitchId | - |
| 400 | InvalidVpcId | Invalid vpcId, or the region of vpc does not match | - |
| 400 | InvalidZoneId.Mismatch | zone is illegal in this order | - |
| 400 | LowInventory.ServerError | low inventory error | - |
| 400 | publicInstanceAlreadExist.Error | a public Drds instance is exist | - |
| 400 | CreateDRDSInstanceId.Error | create Drds instance id error | - |
| 400 | ResourceInsufficient | resource is Insufficient | - |
| 400 | AnotherOrderExist.Error | there is another order | - |
| 400 | InstanceExceedLimit.Error | instance number has exceeded | - |
| 400 | InvalidParameter.Quantity | Invalid parameter of quantity | - |
| 400 | InvalidParameter.RegionId | Invalid parameter of region id | - |
| 400 | InvalidParameter.ZoneId | Invalid parameter of zone id | - |
| 400 | InvalidParameter.PayType | Invalid parameter of pay type | - |
| 400 | InvalidParameter.Spection | Invalid parameter of specification | - |
| 400 | InvalidParameter.Series | Invalid parameter of series | - |
| 400 | InvalidParameter.duration_pricingCycle | when payType=drdsPre, duration and pricingCycle is required | - |
| 400 | InvalidParameter.year.duration | when pricingCycle=year, duration must between 1 to 3 | - |
| 400 | InvalidParameter.month.duration | when pricingCycle=month, duration must between 1 to 9 | - |
| 400 | InvalidDRDSInstanceType.Error | Invalid parameter of Type, public is not supported | - |
| 400 | QueryVSwitchFailed.InvalidVpcIdOrServerError | Query VSwitch failed, please check vpcId | - |
| 400 | RegionNotSupportVPC.Error | This region does not support vpc instance | - |
| 400 | UserAccountVerify.Failed | User account verify failed. Please verify first | - |
| 500 | InternalError | The request processing has failed due to some unknown error. | 请求失败,内部错误 |
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 |
|---|---|---|
| 2021-12-06 | OpenAPI 错误码发生变更 | 查看变更详情 |
