Reference

Re-size a purchase nobody has decided yet

A body naming kind re-sizes a purchase raised as a NewPurchase: its size, term, payment option and offering, looked up again in AWS. Its target and buying account stay as raised (409 for another). A body without kind points a purchase raised from its proposal at another profile or commitment_hourly, sized on today's proposal; naming neither re-sizes the pick it was raised on. Each body fits only its own kind of purchase (409 otherwise). Keeps the id. 404 for an id that is no purchase, 409 once anybody has accepted, rejected or requested it, and 409 for any refusal a raise meets. Answers rebound true. A draft is re-sized by the person who raised it alone (404 for anybody else), which renews its expiry, and 409 purchase_draft_expired once it has expired.

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

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

recommendation_id*Recommendation Id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

One reservation to quote or raise: a class, a count, and a term the catalog sells.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v1/commitments/purchase/string" \  -H "Content-Type: application/json" \  -d '{    "kind": "reserved_instance",    "service": "ec2",    "region": "string",    "resource": "string",    "quantity": 1,    "term_months": 12,    "payment_option": "no_upfront",    "buying_account_id": "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",
    "created": false,
    "rebound": false
  }
}
{
  "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