Reference

One row per commitment

Every reservation or plan the tenant holds, one row each, with the state the cloud reports rather than one derived from the end date. A plan that starts next month is queued and one whose payment failed is neither running nor expired, and no date says either. Attributes only some services carry arrive as null rather than zero.

GET
/api/v1/commitments/inventory

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

provider?Provider
instrument*Instrument
service?|null
state?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/commitments/inventory?instrument=string"
{
  "success": true,
  "timestamp": "2019-08-24T14:15:22Z",
  "data": {
    "provider": "string",
    "instrument": "ri",
    "rows": [
      {
        "id": "string",
        "account_id": "string",
        "account_name": "string",
        "state": "active",
        "payment_option": "string",
        "start": "string",
        "end": "string",
        "end_at": "string",
        "end_is_derived": true,
        "term_months": 0,
        "currency": "string",
        "arn": "string",
        "tags": {
          "property1": "string",
          "property2": "string"
        },
        "tag": "string",
        "product_description": "string",
        "committed_monthly": 0,
        "saved_monthly": 0,
        "unused_monthly": 0,
        "on_demand": {
          "currency": "string",
          "measured_from": "string",
          "measured_to": "string",
          "on_demand_cost": 0,
          "covered_cost": 0,
          "unit_hours": 0,
          "daily_on_demand_cost": 0
        },
        "kind": "reserved_instance",
        "service": "string",
        "service_label": "string",
        "resource": "string",
        "qty": 0,
        "region": "string",
        "fixed_price": 0,
        "recurring_hourly": 0,
        "usage_hourly": 0,
        "offering_class": "string",
        "scope": "string",
        "availability_zone": "string",
        "tenancy": "string",
        "multi_az": true,
        "node_offering": "string",
        "reservation_name": "string"
      }
    ]
  }
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  },
  "timestamp": "2019-08-24T14:15:22Z"
}

Where the purchase renewing this commitment stands GET

The latest purchase run of this commitment's renewal, with the steps, logs and trigger of the recommendation that renews it. not_started until somebody releases the renewal. queued once released and waiting for the term to end, or once the provider queued the purchase. in_progress while a run holds it. active once the provider reports the new commitment active, or once the renewal was completed by hand. payment_failed when the provider could not charge for it. failed when a run was refused before sending or the provider refused the purchase. indeterminate when nobody knows yet whether the purchase went through: it is reconciled, never retried. A commitment the organization does not hold is a 404.

What AWS sells for a reservation or Savings Plan target GET

The catalogue one field at a time. choices lists, for every field of the target, the values sold given every field before it, in the order each narrows the next: service, region, engine, deployment, offering_class, tenancy and resource for a reservation, plan_type, instance_family and region for a plan. A field the service does not use has no choices and must be left out. complete says the target is whole; offers then lists every offering sold for it, priced per unit (a reservation, or a dollar an hour of a plan) beside the public on-demand rate where the price list has one. EC2 is read one instance type at a time, so its offers wait for resource. Regions are where the organization's accounts live, hold commitments, run anything or opted in; classes are those it runs and those the catalogue sells. Every page AWS returns is kept a day, fetched_at says when it was read. AWS is read through the role of the optional buying_account_id, the account the purchase would be bought in, then its payer's, then every other connected account's, payers first, passing over a role AWS refuses to assume. 422 for a value the service does not sell; 502 when every connected account refused the offerings lookup.

Ask the FinOps Agent about your cloud spend