CreateDrdsInstance - 创建一个实例

更新时间:
复制 MD 格式

创建新实例。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
Descriptionstring

实例描述,需满足如下要求:

  • 不能以 http://或 https://开头。
  • 必须以字母或中文开头,可包含大小写字母、中文、数字、下划线(_)或短划线(-)。
  • 长度为 2~256 个字符。
test
RegionIdstring

地域 ID。

cn-hangzhou
ZoneIdstring

可用区 ID。

cn-hangzhou-e
Typestring

实例类型,仅支持 PRIVATE,即专享实例。

说明 您也可以传入 1 表示专享实例。
PRIVATE
Quantityinteger

创建实例的数量,仅支持传入 1,即一次只能创建一个实例。

1
InstanceSeriesstring

实例系列参数,取值范围如下:

  • drds.sn2.4c16g:入门版
  • drds.sn2.8c32g:标准版
  • drds.sn2.16c64g:企业版
drds.sn2.4c16g
Specificationstring

实例规格码,取值由实例系列加具体实例规格组成,例如 drds.sn2.4c16g.8c32g。

drds.sn2.4c16g.8C32g
ClientTokenstring

用于保证请求的幂等性,防止重复提交请求。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符,且该参数值中不能包含非 ASCII 字符。

c1dd299c-10c6-11ea-bbbb-************
PayTypestring

付费类型,取值范围如下:

  • drdsPre:包年包月(也称预付费)。
  • drdsPost:按量付费(也称后付费)。
  • drdsRo:创建只读实例时,默认按量付费模式。
drdsPost
VpcIdstring

专有网络 ID。

vpc-**********
VswitchIdstring

虚拟交换机 ID。

vsw-**********
isHaboolean

是否为高可用实例。

true
PricingCyclestring

指定预付费实例为包年或包月类型,取值范围如下:

  • year:年
  • month:月
说明 若付费类型为 drdsPre,该参数为必传参数。
month
Durationinteger

包年或包月实例的购买时长。

  • 当 PricingCycle 为 year 时,取值范围为 1~3。
  • 当 PricingCycle 为 month 时,取值范围为 1~9。
说明 仅当付费类型是 drdsPre 时该参数生效。
1
IsAutoRenewboolean

是否自动续费,取值范围如下:

  • true:如果按月购买则自动续费一个月,如果按年购买则自动续费一年。
  • false:不自动续费。
说明 仅当付费类型为 drdsPre 时该参数生效。
true
MasterInstIdstring

主实例 ID,仅在创建只读实例时填写。

drds***********
MySQLVersioninteger

实例支持的 MySQL 版本,取值范围如下:

  • 5:与 MySQL 5.x 完全兼容(默认)
  • 8:与 MySQL 8.0 完全兼容
说明 仅当创建主实例时该参数生效,只读实例的 MySQL 版本默认与主实例相同。
5
ResourceGroupIdstring

资源组 ID。

rg-************

返回参数

名称类型描述示例值
object
Successboolean

请求是否成功。

true
RequestIdstring

请求 ID。

D99D4644-A70D-49A3-B8B4-767ACC50SE2R
Dataobject

结果详情。

OrderIdlong

订单 ID。

111111111111111
DrdsInstanceIdListarray

实例信息。

drdsInstanceIdListstring

实例 ID。

drds************

示例

正常返回示例

JSON格式

{
  "Success": true,
  "RequestId": "D99D4644-A70D-49A3-B8B4-767ACC50SE2R",
  "Data": {
    "OrderId": 111111111111111,
    "DrdsInstanceIdList": {
      "drdsInstanceIdList": [
        "drds************"
      ]
    }
  }
}

错误码

HTTP status code错误码错误信息描述
400ParameterErrorParameter error-
400ActionUnauthorizedThe specified action is not available for you指定的action未授权,请您先做RAM授权再进行操作。
400ServiceUnableThe service is not available now, please try again later-
400OperationDenieddrds service is not enable for you-
400QuotaExceeded.DRDSInstanceThe quota of create instance exceeds.-
400InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.-
400InvalidDescription.MalFormedThe specified parameter description is not valid.-
400CommunicateWithManager.ErrorInternal Error. Communicate with drds manager error-
400InvalidVSwitchIdInvalid vswitchId-
400InvalidVpcIdInvalid vpcId, or the region of vpc does not match-
400InvalidZoneId.Mismatchzone is illegal in this order-
400LowInventory.ServerErrorlow inventory error-
400publicInstanceAlreadExist.Errora public Drds instance is exist-
400CreateDRDSInstanceId.Errorcreate Drds instance id error-
400ResourceInsufficientresource is Insufficient-
400AnotherOrderExist.Errorthere is another order-
400InstanceExceedLimit.Errorinstance number has exceeded-
400InvalidParameter.QuantityInvalid parameter of quantity-
400InvalidParameter.RegionIdInvalid parameter of region id-
400InvalidParameter.ZoneIdInvalid parameter of zone id-
400InvalidParameter.PayTypeInvalid parameter of pay type-
400InvalidParameter.SpectionInvalid parameter of specification-
400InvalidParameter.SeriesInvalid parameter of series-
400InvalidParameter.duration_pricingCyclewhen payType=drdsPre, duration and pricingCycle is required-
400InvalidParameter.year.durationwhen pricingCycle=year, duration must between 1 to 3-
400InvalidParameter.month.durationwhen pricingCycle=month, duration must between 1 to 9-
400InvalidDRDSInstanceType.ErrorInvalid parameter of Type, public is not supported-
400QueryVSwitchFailed.InvalidVpcIdOrServerErrorQuery VSwitch failed, please check vpcId-
400RegionNotSupportVPC.ErrorThis region does not support vpc instance-
400UserAccountVerify.FailedUser account verify failed. Please verify first-
500InternalErrorThe request processing has failed due to some unknown error.请求失败,内部错误

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2021-12-06OpenAPI 错误码发生变更查看变更详情