文档中心 > CreateOrder
CreateOrder

最近更新时间:2023-03-30

创建订单(预付费和后付费)

请求参数(POST)

名称

类型

是否必选

描述

示例

Action

String

系统规定参数取值:CreateOrder

CreateOrder

body

名称

类型

是否必选

描述

示例

azoneId

String

可用区id

cn-tianjin-yfb1

componentCode

String

组件码

nas.onestor

dataEncryption

Integer

数据是否加密

0

instanceName

String

系统名称

instance

orderCategory

String

订单类型

NEW

payType

String

计费模式

DAY_MONTH_USAGE

projectId

String

项目id

rg-k0n2gf8ew1pd

regionId

String

地域id

cn-tianjin-yfb

renewType

String

续费类型

manualrenew

rentCount

Integer

租借数量

1

rentUnit

String

租借单位

month

specificationCode

String

存储类型和文件协议

nas.capacity.nfs

unit

String

计量单位

GB

vpc

String

Vpc

vpc-g2gmswxtthml

返回参数

名称

类型

描述

示例值

RequestId

String

请求ID

f79fd132-eae6-455e-8542-c0db5296d69b

Status

Boolean

状态

true

Auth

Boolean

用户认证

true

Code

String

状态码

Success

Res

List

文件系统id和订单id

"Ids": [

         "nas-g6kv2k3zcld9"

         ],

"OrderId":   "907804353770394046"

示例

示例

示例内容

请求示例

https://api.unicloud.com/openapi/nas?SignatureVersion=2.0&Action=CreateOrder&Format=json&SignatureNonce=16343456325226&Version=2020-07-30&AccessKeyId=6oPiV0WMJXhxiT65&SignatureMethod=HMAC-SHA1&regionId=cn-tianjin-yfb&Timestamp=2020-07-30T12%3A00%3A00Z&Signature=i3dSGkCmnsNmYxtwEC92zG0oJsA%3D

body:

{

         "azoneId":   "cn-tianjin-yfb1",

         "componentCode":   "nas.onestor",

         "dataEncryption":   0,

         "instanceName":   "sdf",

         "orderCategory":   "NEW",

         "payType":   "DAY_MONTH_USAGE",

         "projectId":   "rg-k0n2gf8ew1pd",

         "regionId":   "cn-tianjin-yfb",

      "regionName":"天津研发-YFB区",

         "renewType":   "manualrenew",

         "rentCount":   1,

         "rentUnit":   "month",

         "specificationCode":   "nas.capacity.nfs",

         "unit":   "GB",

         "vpc":   "vpc-g2gmswxtthml"

}

正常返回示例

{

         "Status": true,

         "Auth": true,

         "Code": "Success",

         "Res": {

                   "Ids": [

                            "nas-g6kv2k3zcldu"

                   ],

                   "OrderId":   "907804353770394031"

         },

         "RequestId":   "a99c4e22-ff64-4142-a1aa-2c4b38970a99"

}

异常返回示例

{

         "Status":   false,

         "Msg":   "产品配置错误",

         "Auth":   true,

         "Code":   "ProductConfigError",

         "RequestId":   "adcf0d9b-fb6e-4400-8f7a-28799464db2d"

}

错误码

HttpCode

错误码

错误信息

错误描述

400

InvalidParameter

"The specified parameter”Signature”is   not valid."

签名无效