Reference

Buy a released purchase now instead of after its hold

A new purchase released to Automated Savings waits up to 24 hours before LevelFour sends it to AWS, so it can still be cancelled. This ends the wait: the executor sends it on its next run, within about five minutes. Organization admins only. Answers where the purchase stands; calling it again changes nothing. 409 purchase_not_held for a purchase that is not released to Automated Savings, tranche_keeps_its_day for a tranche of a purchase schedule, purchase_cancelled once it was cancelled, and purchase_already_sent once it was sent. 404 for an id that is no purchase.

POST
/api/v1/commitments/purchase/{recommendation_id}/buy-now

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 POST "https://example.com/api/v1/commitments/purchase/string/buy-now"
{
  "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