API Introduction
Call the queryNewPurchaseOrderPriceForMongoDB API to query the price of newly purchased MongoDB instance.
API Restrictions
None
URI
POST /v1/extApi/queryNewPurchaseOrderPriceForMongoDB
Path Parameter
None
Query Parameter
None
Request Parameters
Request Header Parameter
None
Request Body Parameter
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
instanceCnt | Yes | String | Subscription quantity, the value must be greater than zero and the subscription quantity cannot exceed 50 units | 1 | |
cycleCnt | Yes | String | Subscription cycle, the value must be greater than zero and the longest subscription duration cannot exceed 384 months. | 1 | |
cycleType | Yes | String | Subscription type, 3 for monthly subscription, 5 for one-year subscription, 6 for two-year subscription, and 7 for three-year subscription. The cycleCnt attribute is 1, and the value of cycleType is 3, which indicates 1 month subscription | 3 | |
cpuNum | Yes | String | Number of CPU Cores | 2 | |
memSize | Yes | String | Memory Capacity | 4 | |
engineVersion | Yes | String | Engine Version | WiredTiger 4.0 | |
instanceType | Yes | String | Instance type: Single or Senior | Single | |
regionId | Yes | String | Resource pool id | 100054c0416811e9a6690242ac110002 | |
instanceName | Yes | String | Instance Name | mongo008 | |
dbPassWord | Yes | String | Encrypted database root password | /r/cUXnFwSNLfP0= | |
subnetId | Yes | String | Subnet id | 7d3fe61d-b279-4c2a-b190-afd9754125b4 | |
vpcId | Yes | String | vpc information | 07a41838-845c-467d-b2e8-e1001a9fc01f | |
secgroups | Yes | String | Security Group ID | aa8ddfb7-f042-4c57-bb25-7df09d5c732a | |
volumeType | Yes | String | Disk Type | SATA | |
diskSize | Yes | String | Disk Size | 100 | |
accessKey | Yes | String | Resource pool ak | 4a4bdc57e06542199b5f98d4cd107be2 | |
securityKey | Yes | String | Resource pool sk | 5566ddcc9b1646c6b77a0eaeff1c8763 |
Response Parameter
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
statusCode | Yes | Integer | Response Code Value range: 800 indicates success, 900 indicates failure | 800 | |
message | Yes | String | Response information | The price of newly purchased MongoDB instance is queried successfully | |
returnObj | Yes | Object | Return object. |
Table returnObj
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
totalPrice | Yes | Integer | Total price of the order | ||
subOrderPrices | Yes | Object[] | Suborder price array | subOrderPrices | |
finalPrice | Yes | Integer | Final price of the order | ||
isSucceed | Yes | Boolean |
Table subOrderPrices
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
totalPrice | Yes | Integer | Total price of the order | ||
serviceTag | Yes | Object[] | Suborder price array | subOrderPrices | |
finalPrice | Yes | Integer | Final price of the order | ||
orderItemPrices | Yes | Object[] | orderItemPrices |
Table "orderItemPrices":
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
itemId | Yes | String | Total price of the order | ||
totalPrice | Yes | Integer | Price of the suborder | ||
finalPrice | Yes | Integer | Final price of the suborder | ||
resourceType | Yes | String | Resource Type |
Sample Request
Request Header
None
Request Body
{
"instanceCnt":"1",
"cycleCnt":"1",
"cycleType":"3",
"cpuNum":"2",
"memSize":"4",
"engineVersion":"WiredTiger 4.0",
"instanceType":"Single",
"regionId":"100054c0416811e9a6690242ac110002",
"instanceName":"mongo008",
"dbPassWord":"/r/cUXnFwSNLfP0=",
"subnetId":"7d3fe61d-b279-4c2a-b190-afd9754125b4",
"vpcId":"07a41838-845c-467d-b2e8-e1001a9fc01f",
"secgroups":"aa8ddfb7-f042-4c57-bb25-7df09d5c732a",
"volumeType":"SATA",
"diskSize":"100",
"accessKey":"4a4bdc57e06542199b5f98d4cd107be2",
"securityKey":"5566ddcc9b1646c6b77a0eaeff1c8763"
}Response Example
{
"statusCode": 800,
"message": "the price of newly purchased MongoDB instance is queried successfully",
"returnObj": {
"totalPrice": 477.0,
"subOrderPrices": [
{
"totalPrice": 477.0,
"serviceTag": "PAAS",
"finalPrice": 477.0,
"orderItemPrices": [
{
"itemId": "fde0496ddf2d40a595bb28faa7740d7b",
"totalPrice": 417.0,
"finalPrice": 417.0,
"resourceType": "DOCBASE"
},
{
"itemId": "36b5e0e287614777b19dd8ed40f27142",
"totalPrice": 30.0,
"finalPrice": 30.0,
"resourceType": "MONGODB_EBSC"
},
{
"itemId": "b89428039ca14cd3b95edd04c3b510a2",
"totalPrice": 30.0,
"finalPrice": 30.0,
"resourceType": "MONGODB_BACKUP"
}
]
}
],
"finalPrice": 477.0,
"isSucceed": true
}
}Status Code
Status Code | Description |
800 | Indicate that the request succeeded |
900 | Indicates that the request failed |
Error Codes
None