Movatterモバイル変換


[0]ホーム

URL:


HashiConf 2025Don't miss the live stream of HashiConf Day 2 happening now View live stream

You are viewing documentation for version v202411-1.View latest version.

Show a cost estimate

Note: The hash in theresources attribute structure represents low-level Cost Estimation details. The keys or structure may change over time. Use the data in this hash at your own risk.

GET /cost-estimates/:id

ParameterDescription
idThe ID of the cost estimate to show.

There is no endpoint to list cost estimates. You can find the ID for a cost estimate in therelationships.cost-estimate property of a run object.

StatusResponseReason
200JSON API document (type: "cost-estimates")The request was successful
404JSON API error objectCost estimate not found, or user unauthorized to perform action

Sample Request

curl \  --header "Authorization: Bearer $TOKEN" \  https://app.terraform.io/api/v2/cost-estimates/ce-BPvFFrYCqRV6qVBK

Sample Response

{  "data": [    {      "id": "ce-BPvFFrYCqRV6qVBK",      "type": "cost-estimates",      "attributes": {        "error-message": null,        "status": "finished",        "status-timestamps": {          "queued-at": "2017-11-29T20:02:17+00:00",          "finished-at": "2017-11-29T20:02:20+00:00"        },        "resources": {...},        "resources-count": 4,        "matched-resources-count": 3,        "unmatched-resources-count": 1,        "prior-monthly-cost": "0.0",        "proposed-monthly-cost": "25.488",        "delta-monthly-cost": "25.488",      },      "links": {        "self": "/api/v2/cost-estimate/ce-9VYRc9bpfJEsnwum"      }    }  ]}
Edit this page on GitHub

[8]ページ先頭

©2009-2025 Movatter.jp