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.
Authorization
BearerAuth In: header
Path Parameters
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"
}List commitments GET
Previous Page
Buy a released purchase now instead of after its hold POST
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.