billing.estimates.createPrice an operation before running it (per hour, per month, monthly cap)
A read behind a POST: nothing is created. `operation` is the API operation id (ec2.instances.run, rds.instances.create, cache.clusters.create, vpn.endpoints.create, ec2.volumes.create, autoscaling.groups.create, lb.load-balancers.create, …) and `body` the request body it would get. Returns lines (per hour, per full month with the monthly cap applied, the cap), totals, `summary` ("5,99 €/month max · 0,0096 €/h (excl. VAT)", German number format as in the console; the numeric fields are plain decimals), pay-per-use unit prices, and lines marked `billed: false` for things that are not metered yet. Allowed with billing:EstimateCost or with the operation’s own action. `dcloud <command> --dry-run` prints this for the command it would run.
Request syntax
POST /billing/api/estimate
{
"operation": "string",
"body": "map of string"
}Request body
operationRequiredstring
API operation id, e.g. ec2.instances.run, rds.instances.create
Constraints: 3-96 chars, /^[a-z0-9-]+(\.[a-z0-9-]+)+$/
bodyOptionalmap of string
The request body the operation would be sent
Constraints: key=<json>
Default:
{}
Response
200 with operation, currency (EUR), vat ("excluded"), lines [{ item, quantity, sku, billed, eurPerHour, eurPerMonth, monthlyCap, note }], eurPerHour, eurPerMonth, eurPerMonthUncapped, eurPerMonthAtMax, notBilledEurPerMonth, usagePrices, notes and summary. An operation that buys nothing answers { operation, summary: "No charge: …", lines: [] }. 404 for an operation id the API does not have; 403 with neither billing:EstimateCost nor the operation’s own action.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow billing:EstimateCost on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud billing estimates create --operation examplecurl -X POST "https://console.platform.deutschecloud.app/billing/api/estimate" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"operation":"example"}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_billing_estimates_create.