Querying the List of Purchased Resources
Function
This API is used to query the list of purchased resources.
Calling Method
For details, see Calling APIs.
URI
GET /v1/subscriptions/orders
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. You can obtain it by calling the IAM API for obtaining a user token. The token is the value of X-Subject-Token in the response header. |
|
X-Language |
Yes |
String |
Current environment language. zh-cn: simplified Chinese; en-us: English. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
resources |
Array of SubscriptionGlobalResource objects |
Purchased resources. |
|
Parameter |
Type |
Description |
|---|---|---|
|
project_id |
String |
Project ID. |
|
region_id |
String |
Code of the current region. The default value is null, indicating the current region. |
|
resources |
Array of SubscriptionResourceInfo objects |
List of purchased resources in the current demo-regionon. |
|
Parameter |
Type |
Description |
|---|---|---|
|
resource_id |
String |
Resource ID. |
|
resource_size |
Integer |
Resource specifications. |
|
resource_type |
String |
Resource type. |
|
resource_spec_code |
String |
Resource specification code. |
|
create_time |
Long |
Creation timestamp. |
|
expire_time |
Long |
Expiration timestamp. This field is available only for pay-per-use resources. |
|
resource_status |
Integer |
Resource status. Currently, only resources that are running properly are returned, and the status value is 0. |
|
order_id |
String |
Order ID. This field is available only for yearly/monthly resources. |
|
charging_mode |
String |
Billing mode. Currently, the options are yearly/monthly (PREPAID) and pay-per-use (POSTPAID). The value is case-insensitive. |
|
to_period |
Boolean |
Whether the billing mode for the current resource can be changed from pay-per-use to yearly/monthly. |
|
tag_list |
Array of TagInfo objects |
Resource list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
ID. Only letters, digits, underscores (_), and hyphens (-) are allowed. Length: [2, 36]. |
|
value |
String |
Content. Only letters, digits, underscores (_), and hyphens (-) are allowed. Length: [2, 36]. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. Range N/A |
|
error_msg |
String |
Definition Error description. Range N/A |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. Range N/A |
|
error_msg |
String |
Definition Error description. Range N/A |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. Range N/A |
|
error_msg |
String |
Definition Error description. Range N/A |
Example Requests
Query the list of purchased resources.
GET https://{endpoint}/v1/subscriptions/orders
Example Responses
Status code: 200
List of the SecMaster offerings supported at the current site.
{
"resources" : [ {
"region_id" : "demo-region",
"project_id" : "15645222e8744afa985c93dab6341da6",
"resources" : [ {
"resource_id" : "c9528aa2-d593-11f0-a34e-fa163e798915",
"resource_type" : "xxx.resource.type.secmaster.typical",
"resource_spec_code" : "csb.professional",
"resource_size" : 2,
"resource_status" : 0,
"to_period" : false,
"order_id" : "CS2510212051NLDL4",
"charging_mode" : "PREPAID",
"create_time" : 1765349400000,
"expire_time" : 1796885400000,
"tag_list" : [ {
"key" : "dept",
"value" : "dev"
} ]
} ]
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
List of the SecMaster offerings supported at the current site. |
|
400 |
Parameter error. |
|
403 |
No permissions. |
|
500 |
Internal error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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