Queries the usage summary of ENS virtual machines (VMs), disks, and networks.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:DescribeEnsResourceUsage |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ExpiredStartTime |
string |
No |
The beginning of the time range to query. Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. |
2018-06-15T09:07:23Z |
| ExpiredEndTime |
string |
No |
The end of the time range to query. Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss. |
2018-06-15T09:07:23Z |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E RequestID. |
| EnsResourceUsage |
array<object> |
The resource usage data. |
|
|
object |
Resource usage data. |
||
| ServiceType |
string |
The type of the service. Valid values:
|
1 |
| InstanceCount |
integer |
The number of instances. |
2 |
| CpuSum |
integer |
The CPU usage. Unit: cores. |
2 |
| GpuSum |
integer |
The number of GPUs. |
6 |
| DownCount |
integer |
The number of stopped VMs. |
7 |
| ExpiredCount |
integer |
The number of expired VM instances. |
1 |
| ExpiringCount |
integer |
The number of VM instances that are about to expire. |
0 |
| RunningCount |
integer |
The number of running instances. |
19 |
| DiskCount |
integer |
The number of data disks. |
4 |
| StorageSum |
integer |
The total disk size. |
5000 |
| ComputeResourceCount |
integer |
The number of edge services. This parameter is available only when you set the ServiceType parameter to 2. |
2 |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\t RequestID.",
"EnsResourceUsage": [
{
"ServiceType": "1",
"InstanceCount": 2,
"CpuSum": 2,
"GpuSum": 6,
"DownCount": 7,
"ExpiredCount": 1,
"ExpiringCount": 0,
"RunningCount": 19,
"DiskCount": 4,
"StorageSum": 5000,
"ComputeResourceCount": 2
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ens.interface.error | An error occurred while call the API. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.