dcloud billing cost-views create

Save a cost explorer view

IAM billing:CreateCostViewChanges state

`state.range` is relative ({type: relative, preset: last-month | month-to-date | last-30-days | …}) so the view keeps its meaning, or fixed ({type: fixed, start, end}). `report: {enabled, recipients}` mails the view on the 2nd for the month before, with its CSV. Names are unique per organization (409).

Synopsis

dcloud billing cost-views create --name name --state state [flags]

Flags

  • --nameRequired

    string

    1–100 characters, trimmed; unique in the organization (409 when taken)

    Constraints: 1-100 chars

  • --descriptionOptional

    string

    Free text shown with the view, at most 500 characters; default none

    Constraints: max 500 chars

  • --stateRequired

    object

    The explorer question: range (relative preset or fixed dates), granularity, groupBy, filters — the same shapes as cost-explorer/query. Grouping or filtering by provider needs iam:UpdateOrganization (403)

    Constraints: JSON

  • --sharedOptional

    boolean (--shared / --no-shared)

    true (default): visible to everyone with billing:GetCostAndUsage; false: only to its creator, and not found for everyone else

  • --reportOptional

    object

    Mail this view monthly, on the 2nd, for the month before: {enabled, recipients (at most 20 addresses)}; default off

    Constraints: JSON

Example

dcloud billing cost-views create --name example --state '{}'

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