pem.getCustomerSubscriptionsResources

This method is supported by Operations starting from version 2.9 hotfix01.

This method returns the limits and up-to-date usage statistics for Resource Types of the specified vendor's Account (Provider's or Reseller's Account).

The method has the following input parameters:

Name

Type

Short Description

vendor_account_id

int

Vendor's Account ID (ID of Provider's or Reseller's Account).

resource_type_ids

array of int

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

The method returns array of the following structures:

Name

Type

Short Description

account_id

int

ID of direct child Account (ID of Reseller's or Customer's Account).

resources

array of struct

Resource Types usage statistics for each Subscription of direct child Account.

  • subscription_id

int

ID of Subscription where the requested Resource Types are resides.

  • resource_type_usages

array of struct

Resource Types usage statistics. It contains resource usages for each requested Resource Type in Subscription identified by the subscription_id parameter.

  • 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, which is defined in the Subscription identified by the subscription_id parameter.

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).