dcloud billing costs query

Cost over time, grouped and filtered by any dimension

IAM billing:GetCostAndUsageRead

Dimensions: service, usageType, resource, resourceType, region, zone, project, tag (with tagKey), creator. Returns the stacked series, group totals vs the previous period of equal length, top movers by group and by resource, anomaly hints with the rule spelled out, a month-end forecast, discounts and credits, every billed resource with idle/detached/untagged hints, and the budgets. Amounts are EUR strings at 8 decimal places, exact. A read behind a POST: nothing is written.

Synopsis

dcloud billing costs query --start start --end end [flags]

Flags

  • --startRequired

    string

    First day of the window, YYYY-MM-DD, UTC, inclusive

    Constraints: /^\d{4}-\d{2}-\d{2}$/

  • --endRequired

    string

    Last day of the window, YYYY-MM-DD, UTC, inclusive; not before start, and the window is at most 400 days

    Constraints: /^\d{4}-\d{2}-\d{2}$/

  • --granularityOptional

    enum

    Width of each bar: hour (windows of at most 14 days), day (default) or month

    One of: hour, day, month

    Default: "day"

  • --group-byOptional

    object

    What the bars are stacked by: {dimension, tagKey}; default {dimension: service}

    Constraints: JSON

    Default: {"dimension":"service"}

  • --filtersOptional

    array of json

    Narrow to rows matching every filter, at most 20: {dimension, values, tagKey, exclude}; default none

    Default: []

  • --max-groupsOptional

    number

    Groups drawn on their own, 1–50 (default 8); the rest are summed into "Other"

    Constraints: integer, 1-50

    Default: 8

Example

dcloud billing costs query --start example --end example

Generated from the API description, the same one the API checks requests against and the CLI is built from.