Skip to main content
PUT
Update a custom calculation

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Scopes

write

Grants write access

Path Parameters

custom_calculation_token
string
required

Body

application/json

Update a CustomCalculation. Read-only calculations allow attachment changes only; is_read_only cannot be changed.

title
string

The title of the Custom Calculation.

filter
object
description
string | null

An optional description, up to 10000 characters. Send null or an empty string to clear; omit on update to leave unchanged.

operation
enum<string>

The operation applied to the filtered cost or usage data. Defaults to sum when creating a calculation.

Available options:
sum,
average,
division,
min,
max
display_as
enum<string>

The display format of the calculation. Defaults to ratio when creating a calculation.

Available options:
ratio,
percent,
per-n
unit_scale
integer<int32> | null

The integer unit scale of the calculation. Send null to reset to 1. Defaults to 1 on create; omit on update to leave unchanged.

cost_report_tokens
string[]

The complete replacement set of CostReport tokens to attach. An empty array clears all attachments; omission or null leaves them unchanged. Replacement requires access to every currently attached CostReport.

Response

Update a CustomCalculation. Read-only calculations allow attachment changes only; is_read_only cannot be changed.

CustomCalculation model

token
string
required

The token of the CustomCalculation.

Example:

"cstm_clcltn_1234"

title
string
required

The title of the Custom Calculation.

description
string | null
required

The description of the calculation, or null when blank.

operation
enum<string>
required

The operation applied to the filtered cost or usage data.

Available options:
sum,
average,
division,
min,
max
filter
object
required
display_as
enum<string>
required

The display format of the calculation.

Available options:
ratio,
percent,
per-n
unit_scale
integer<int32>
required

The integer unit scale of the calculation.

is_read_only
boolean
required

Whether the calculation is read only.

cost_report_tokens
string[]
required

The tokens of the attached CostReports visible to the caller.

created_at
string
required

When the calculation was created, in ISO 8601 format.

updated_at
string
required

When the calculation was last updated, in ISO 8601 format.