Skip to main content

getHourlyUsageForAmazonEC2Instances

This method exposes the hourly usage for each Amazon instance category (micro, medium etc.).

Parameters

Parameter

Type

Optional

Description

companyId

String

Yes

The ID of the company. The default value is the ID of the company linked to the user who generated the API key.

targetMonth

String

Yes

The month for which the usage is returned. The month will be provided in the following format: mm/yyyy. The default value is the current month.

Return value

This method returns an Object containing the hourly usage for each instance category.

Example

Request:

  {
       "params": {
           "targetMonth": "03/2015",
           "companyId": "55115935b1a43dcc4a7b23c6"
       },
       "jsonrpc": "2.0",
       "method": "getHourlyUsageForAmazonEC2Instances",
       "id": "5087eab8-b74f-4a3e-85b3-4271e85890d4"
  }  

Response:

  {
      "id": "5087eab8-b74f-4a3e-85b3-4271e85890d4",
      "jsonrpc": "2.0",
      "result": {
           "micro": 11,
           "medium": 157
       }
  }