Reserved instances requests

Getting reserved instances

For a list of reserved instances, the API returns an array of ReservedInstanceApiDTOs. Each ReservedInstanceApiDTO will contain the validation status, target type and category, and input field names and values. To get a single reserved instance, include the UUID of the reserved instance in the request.

This request takes the following parameters:

scope

Returns only reserved instances in the specified scope. This can be the scope of a group of entities or target. For example, to see reserved instances for a single AWS target, use that target's UUID here.

Examples:

  • All Reserved instances: GET https://10.10.10.10/api/v3/reservedinstances

  • Reserved Instances for a Specified Scope: GET https://10.10.10.10//api/v3/reservedinstances?scope=_zeCtIMAVEei2-fP3xzx1Fw

Response:

[
  {
    "uuid": "aws::eu-west-1::RI::a0643140-85d7-4c5e-a7ba-4ec2fc47bb76",
    "displayName": "i3.large",
    "className": "ReservedInstance",
    "template": {
      "uuid": "aws::VMPROFILE::i3.large",
      "displayName": "i3.large",
      "discovered": false,
      "family": "i3"
    },
    "platform": "LINUX",
    "type": "STANDARD",
    "location": {
      "uuid": "aws::eu-west-1::DC::eu-west-1",
      "displayName": "aws-EU (Ireland)"
    },
    "accountId": "19265476245",
    "targetId": "_zeCtIMAVEei2-fP3xzx1Fw",
    "masterAccountId": "194356375",
    "term": {
      "units": "Year",
      "values": {
        "max": 1,
        "min": 1,
        "avg": 1,
        "total": 1
      },
      "value": 1
    },
    "payment": "PARTIAL_UPFRONT",
    "onDemandPrice": {
      "units": "$/h",
      "values": {
        "max": 0.172,
        "min": 0.172,
        "avg": 0.172,
        "total": 0.172
      },
      "value": 0.172
    },
    "costPrice": {
      "units": "$/h",
      "values": {
        "max": 0.11193608,
        "min": 0.11193608,
        "avg": 0.11193608,
        "total": 0.11193608
      },
      "value": 0.11193608
    },
    "coupons": {
      "capacity": {
        "max": 16,
        "min": 16,
        "avg": 16
      },
      "units": "RICoupon",
      "values": {
        "max": 0,
        "min": 0,
        "avg": 0,
        "total": 0
      },
      "value": 0
    },
    "totalCoupons": 0,
    "expDate": "Sat Apr 06 19:11:19 EDT 2019",
    "instanceCount": 1,
    "tenancy": "DEFAULT",
    "upFrontCost": 490,
    "actualHourlyCost": 0.0560000017285347,
    "effectiveHourlyCost": 0.11193607478789543
  },
  ...
]
      

Getting entities covered by reserved instances

Given the UUID of a reserved instance, the API returns a list of entities covered by the reserved instance.

This request takes the following parameters:

reservedInstance_Uuid

The UUID of the reserved instance.

Example: GET https://10.10.10.10/api/v3/reservedinstances/1234/coveredEntities

Response: An array of BaseApiDTOs describing the entities covered by the specified RI.

[
   {
      "uuid":"73943736161360",
      "displayName":"pyaus",
      "className":"VirtualMachine"
   },
   {
      "uuid":"73812178348464",
      "displayName":"ptaub807disabled",
      "className":"VirtualMachine"
   },
   {
      "uuid":"73746051159552",
      "displayName":"pymm",
      "className":"VirtualMachine"
   }
]