文档中心 > CreateResourcePackOrder
CreateResourcePackOrder

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

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

请求参数(POST)

名称

类型

是否必选

描述

示例

Action

String

系统规定参数取值:CreateResourcePackOrder

CreateResourcePackOrder

body

名称

类型

是否必选

描述

示例

azoneId

String

可用区id

cn-tianjin-yfb1

capacity

String

容量

100

componentCode

String

组件码

packageInstance

orderCategory

String

订单类型

NEW

organizationId

String

组id


payType

String

计费模式

YEAR_MONTH

projectId

String

项目id

rg-k0n2gf8ew1pd

regionId

String

地域id

cn-tianjin-yfb

renewType

String

续费类型

notrenew

rentCount

Integer

租借数量

1

rentUnit

String

租借单位

month

specificationCode

String

资源类型、存储类型和容量

nasbag.capacity.100G

返回参数

名称

类型

描述

示例值

RequestId

String

请求ID

f79fd132-eae6-455e-8542-c0db5296d69b

Status

Boolean

状态

true

Auth

Boolean

用户认证

true

Code

String

状态码

Success

Res

List

文件系统id和订单id

"Ids": [

         " pack-h58kdagr9vyv   "

         ],

"OrderId": " 1038174323649126788   "

Message

String

错误提示信息 (异常返回才有此项)

The specified parameter “Signature” is not valid

示例

示例

示例内容

请求示例

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

body:

{

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

         "capacity":"100",

         "componentCode":   "packageInstance",

         "orderCategory":   "NEW",

         "payType":   "YEAR_MONTH",

         "projectId":   "",

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

         "renewType":   "notrenew",

         "rentCount":   1,

         "rentUnit":   "month",

         "specificationCode":   "nasbag.capacity.100G",

}

正常返回示例

{

         "Status":   true,

         "Auth":   true,

         "Code":   "Success",

         "Res":   {

                   "Ids":   [

                            "pack-h58kdagr9vyv"

                   ],

                   "OrderId":   "1038174323649126788"

         },

         "RequestId":   "5cf01452-c429-41db-b807-244ea63046a8"

}

异常返回示例

{

         "Status":   false,

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

         "Auth":   true,

         "Code":   "ProductConfigError",

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

}

错误码

HttpCode

错误码

错误信息

错误描述

400

InvalidParameter

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

签名无效