Order ID for Creating a Resource Pool
Function
This API is used to create a resource pool order ID. It is used when you need to apply for a new resource pool due to service expansion, resource insufficiency, or temporary resource requirements. You can use this API to change the pay-per-use billing mode to yearly/monthly. Before using this API, ensure that you have the permission to apply for resources, and the submitted resource pool configuration parameters (such as the resource type, capacity, and period) must comply with the system verification rules. Currently, only pay-per-use orders can be changed to yearly/monthly orders. After an order is created, the system generates a unique order ID, triggers the subsequent resource allocation, and records operation logs. If you do not have the required permissions, configuration parameters are missing or encounter an error (for example, the capacity exceeds the quota), the order type is not supported, or the system resources are insufficient, an error code and message are returned. No order ID is generated and no resource is occupied.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
POST /v2/{project_id}/pools/{name}/orderid
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
| name | Yes | String | Definition: Resource pool ID. Constraints: N/A Range: N/A Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| actionType | No | String | Definition: Order operation type. Constraints: N/A Range: Default Value: N/A |
| workspaceId | No | String | Definition: Workspace ID. The default value is 0. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| actionType | No | String | Definition: Order type. Constraints: N/A Range: N/A Default Value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition: Order ID. Range: N/A |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Range: N/A |
| error_msg | String | Definition: Error message. Range: N/A |
Status code: 409
Example Requests
Create an order for changing the billing mode from pay-per-use to yearly/monthly.
POST https://{endpoint}/v2/{project_id}/pools/{name}/orderid?actionType=toPeriod
{
"actionType" : "toPeriod"
} Example Responses
Status code: 200
Order ID.
{
"id" : "0123456789"
} Status code: 400
Bad request
{
"error_code" : "ModelArts.50004000",
"error_msg" : "Bad request"
} Status code: 409
Already exists
{
"error_code" : "ModelArts.50015000",
"error_msg" : "Pool already exists."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Order ID. |
| 400 | Bad request |
| 409 | Already exists |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot