This method is supported by Operations starting from version 2.3.
This method returns usage statistics for Resource Types within the specified Subscription for a given period of time. It is complimentary to the pem.getResourceUsage method.
The method has the following input parameters:
| Name | Type | Short Description | 
|---|---|---|
| 
 | int | ID of Subscription. It indicates the Subscription the resource usage is returned for. | 
| 
 | array of int | IDs of Resource Types in request. | 
| 
 | int | It indicates the start time of the period the resource usage is returned for. Must be specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). | 
| 
 | int | It indicates the end time of the period the resource usage is returned for. Must be specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). | 
The method has the following output parameters:
| Name | Type | Short Description | 
|---|---|---|
| 
 | array of struct | It contains resource usages for each requested Resource Type. | 
| 
 | struct | The usage statistics for Resource Type identified by the  | 
| 
 | array of struct | It contains the information on changes of resource's usage. | 
| 
 | int | It contains the actual change of the resource’s usage. The value of the change may be negative depending on the Resource Type. | 
| 
 | bigint | 64bit analog of the  | 
| 
 | int | It indicates the point in time when the usage of the resource was changed. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). | 
| 
 | int | It indicates the parent Resource Type of the Resource Type the usage statistics is returned for. This value can be used to group usage statistics for related Resource Types. | 
| 
 | int | It represents the absolute value of resource’s usage at the start of the requested period. The usage is specified in units the Resource Type is measured in. | 
| 
 | int | It indicates the Resource Type the usage statistics is returned for. | 
| 
 | bigint | 64bit analog of the  | 
| 
 | struct | It indicates the actual period the resource usages are returned for. For the description of what the actual period is, see the note below. | 
| 
 | int | It indicates the actual start time of the period the resource usages are returned for. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). | 
| 
 | int | It indicates the actual end time of the period the resource usages are returned for. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format). | 
Note: The caller may request usage statistics for a period of time for which there are no statistics in the system at all or there exist statistics for a part of the requested period only. The actual_period returned parameter serves the purposes to address such situations. Depending on the values of input from_time and to_time parameters and the period of time for which the statistics exist in the system, the actual_period returned parameter can take values described in the table below.
| from_time in history & to_time in history | from_time in history & to_time > history_end | from_time > history_end & to_time > history_end | |
|---|---|---|---|
| 
 | 
 | 
 | 
 | 
| 
 | from_time | from_time | history_end | 
| 
 | to_time | history_end | history_end | 
Here "history_end" represents the point time when the given request for statistics is served (current time at callee side). "in history" means point in time that is earlier than "history_end".
See also: