pem.getResourceUsage

This method is supported by Operations starting from version 2.3.

This method returns the limits and up-to-date usage statistics for Resource Types within the specified Subscription.

The method has the following input parameters:

Name

Type

Short Description

subscription_id

int

ID of Subscription. It indicates the Subscription the resource usage is returned for.

resource_type_ids

array of int

IDs of Resource Types. It contains IDs of Resource Types the resource usage is requested for.

The method has the following output parameters:

Name

Type

Short Description

subscription_id

int

ID of Subscription. It indicates the Subscription the resource usage is returned for.

resource_type_usages

array of struct

Resource Types usage statistics. It contains resource usages for each requested Resource Type.

  • resource_type_id

int

Resource Type ID. It indicates the Resource Type the usage statistics is returned for.

  • usage

int

It represents the absolute value of resource’s usage at the moment defined by the last_checkpoint parameter. The usage is specified in units the Resource Type is measured in.

  • usage64

bigint

64bit analog of the usage parameter.

  • limit

bigint

Resource Type limit defined in the Subscription.

Note:-1 value means that resource's usage is not limited.

  • last_checkpoint

int

It indicates the point in time when the usage of the resource was measured last time. It is specified in the number of seconds since 1970-01-01 00:00:00 UTC (Unix time format).

See also:

pem.getResourceUsageForPeriod method.