Reference

Where a Savings Plan purchase stands

One BUY- purchase: what it buys, the tranche it belongs to, and its latest purchase run with the steps, logs and trigger of its row. execution.status reads as it does for a renewal, plus returned when AWS refunded the plan after it was bought, and cancelled when a plan queued inside AWS was deleted while queued. execution.starts_at is when AWS starts such a plan: only runs sent before LevelFour stopped queueing inside AWS carry either. bought_outside names the plan of the same type and term bought outside LevelFour that stopped the latest run. execution.status reads scheduled while a released purchase waits on LevelFour's side until execution.send_at, and cancelled_before_purchase once it was cancelled before it was sent. execution.can_buy_now and execution.can_cancel say whether the caller may buy it now or cancel it at this moment, by the rules those two routes apply. Reads stored state only and never calls AWS. 404 for an id that is no purchase of this organization.

GET
/api/v1/commitments/purchase/{recommendation_id}

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

recommendation_id*Recommendation Id

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/purchase/string"
{
  "success": true,
  "timestamp": "2019-08-24T14:15:22Z",
  "data": {
    "recommendation_id": "string",
    "payer_account_id": "string",
    "plan_type": "compute",
    "term_months": 0,
    "payment_option": "all_upfront",
    "commitment_hourly": 0,
    "profile": "conservative",
    "capped_by": [
      "string"
    ],
    "monthly_savings": 0,
    "grain": "daily",
    "source": "cur",
    "created_by": "string",
    "created_at": "string",
    "rebindable": false,
    "kind": "reserved_instance",
    "origin": "recommended",
    "target": {},
    "resource": "string",
    "quantity": 0,
    "offering_id": "string",
    "quote": {},
    "draft": false,
    "draft_expires_at": "string",
    "buying_account_id": "string",
    "schedule_id": "string",
    "tranche_number": 0,
    "tranches_total": 0,
    "buy_after_utc": "string",
    "verified_active_at": "string",
    "execution": {
      "status": "not_started",
      "provider_state": "string",
      "purchase_id": "string",
      "error": "string",
      "starts_at": "string",
      "send_at": "string",
      "can_buy_now": false,
      "can_cancel": false
    },
    "bought_outside": {
      "plan_id": "string",
      "started_on": "string"
    },
    "trigger_info": {
      "property1": null,
      "property2": null
    },
    "execution_steps": [
      {
        "step_id": "string",
        "label": "string",
        "status": "done",
        "duration_seconds": 0,
        "parent_step_id": "string"
      }
    ],
    "execution_logs": [
      {
        "step_id": "string",
        "label": "string",
        "status": "done",
        "commands": [
          {
            "order": 0,
            "command": "string",
            "output": "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"
}
Ask the FinOps Agent about your cloud spend