Skip to content

[CLOUDGA-28778] Billing estimate cli#309

Merged
bhupendray-yb merged 1 commit intomainfrom
CLOUDGA-28778
Aug 14, 2025
Merged

[CLOUDGA-28778] Billing estimate cli#309
bhupendray-yb merged 1 commit intomainfrom
CLOUDGA-28778

Conversation

@bhupendray-yb
Copy link
Copy Markdown
Contributor

@bhupendray-yb bhupendray-yb commented Aug 11, 2025

Summary:

  • [CLOUDGA-28778] Added billing estimate cli under a feature flag.

Testing:

Help

> mb; ./ybm billing estimate --help
Get billing estimate for one or more accounts within a specified date range. NOTE: Results may not reflect real-time usage due to backend aggregation pipelines. Expect delays of up to 48 hours under normal conditions, or up to several days in rare cases of pipeline failures.

Usage:
  ybm billing estimate [flags]

Flags:
      --account-names strings   [OPTIONAL] Comma-separated list of account names to fetch billing information for.
      --end-date string         [OPTIONAL] End date(format yyyy-MM-dd) for billing estimate (inclusive). Defaults to current date if not provided.
  -h, --help                    help for estimate
      --start-date string       [OPTIONAL] Start date(format yyyy-MM-dd) for billing estimate (inclusive). Defaults to 1st day of current month if not provided.

Usage

> export YBM_FF_BILLING=true

> make build; ./ybm billing estimate
Start Date   End Date     Total Amount
2025-08-01   2025-08-11   $120.45

Account Name     Amount
superman1        $70.15
iam-batman       $50.30
ybcloud-876412   $0.00
dev-bhupendra    $0.00
image

Comment thread cmd/test/fixtures/billing-estimate-response.json Outdated
Comment thread cmd/billing/billing.go Outdated
Comment thread cmd/billing/billing.go Outdated
Comment thread cmd/billing_test.go
@arishta-yb
Copy link
Copy Markdown
Contributor

Can you please attach a screenshot of a sample output.

Comment thread cmd/billing_test.go
@bhupendray-yb bhupendray-yb merged commit b63643c into main Aug 14, 2025
1 check passed
@bhupendray-yb bhupendray-yb deleted the CLOUDGA-28778 branch August 14, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants