Reference

Set the resources a saving applies to

Curates which resources in the recommendation the saving is limited to (the checked resources)

POST
/api/v1/recommendations/{recommendation_id}/resource-selection

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.

Request to prune a recommendation down to the resources it should keep.

selected_resources is the list of resources to keep (the checked resources). Any resource in the recommendation's resource_breakdown that is not listed is removed from the recommendation entirely, from both resource_breakdown and the iam_policy, so there is one resource list across the whole flow. The list must be non-empty and every id must belong to the current resource_breakdown.

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/recommendations/string/resource-selection" \  -H "Content-Type: application/json" \  -d '{    "selected_resources": [      "string"    ]  }'
{
  "success": true,
  "timestamp": "2019-08-24T14:15:22Z",
  "data": {
    "recommendation_id": "string",
    "selected_resources": [
      "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