Scaleway logo
Commands

Documentation for `scw billing`

The CLI documentation pages are currently under construction

The content is up to date. We're making improvements to the site over the next few weeks for a better experience.

This API allows you to query billing related objects.

Budget management commands

Budget management commands.

Create a new budget.

Create a new budget.

Usage:

TerminalCode
scw billing budget create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
consumption-limitCost limit for the budget expressed in the invoiced currency (no cents allowed)
enabledWhether the budget is enabled or not
organization-idOrganization ID to use. If none is passed the default organization ID will be used

Delete a budget.

Delete a budget.

Usage:

TerminalCode
scw billing budget delete [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
budget-idThe ID of the budget to deleteRequired

Fetch a budget.

Fetch a budget.

Usage:

TerminalCode
scw billing budget get [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
budget-idThe ID of the budgetRequired

List your budgets, filtering by organization_id.

List your budgets, filtering by organization_id.

Usage:

TerminalCode
scw billing budget list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
organization-idFilter by organization ID

Update a budget.

Update a budget.

Usage:

TerminalCode
scw billing budget update [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
budget-idThe ID of the budget to updateRequired
consumption-limitCost limit for the budget expressed in the invoiced currency (no cents allowed)
enabledWhether the budget will be enabled or not

Budget alerts management commands

Budget alerts management commands.

Create a new budget alert.

Create a new budget alert.

Usage:

TerminalCode
scw billing budget-alert create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
budget-idThe ID of the budget to create alert for
thresholdThreshold above which the alert is sent

Delete a budget alert.

Delete a budget alert.

Usage:

TerminalCode
scw billing budget-alert delete [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
budget-alert-idThe ID of the budget alert to deleteRequired

Update a budget alert.

Update a budget alert.

Usage:

TerminalCode
scw billing budget-alert update [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
budget-alert-idThe ID of the budget alert to updateRequired
thresholdThreshold above which the alert is sent

Budget alert notification management commands

Budget alert notification management commands.

Create a new budget alert notification.

Create a new budget alert notification.

Usage:

TerminalCode
scw billing budget-alert-notification create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
budget-alert-idThe ID of the budget alert to create notification for
sms-phone-numbers.{index}List of phone numbers to receive sms notifications
email-addresses.{index}List of email addresses to receive email notifications
webhook-urls.{index}List of webhook url to receive webhook notifications

Delete a budget alert notification.

Delete a budget alert notification.

Usage:

TerminalCode
scw billing budget-alert-notification delete [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
budget-alert-notification-idThe ID of the budget alert notification to deleteRequired

Update a budget alert notification.

Update a budget alert notification.

Usage:

TerminalCode
scw billing budget-alert-notification update [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
budget-alert-notification-idThe ID of the budget alert notification to updateRequired
sms-phone-numbers.{index}List of phone numbers to receive sms notifications
email-addresses.{index}List of email addresses to receive email notifications
webhook-urls.{index}List of webhook url to receive webhook notifications

List charges

List charges for organizations or projects. You must specify at least organization_ids or project_ids.

Usage:

TerminalCode
scw billing charge list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-bySort order of charges in the responseOne of: start_date_asc, start_date_desc
page-tokenToken returned by previous call to list next paginated charges, omitted for first page
page-sizeNumber of charges to return per page
start-date-afterMinimum start date of charges to filter for, defaults to the start of the billing period
end-date-beforeMaximum end date of charges to filter for, defaults to the end of the billing period
invoice-ids.{index}Invoice IDs to filter for, only charges from these invoices will be returned
project-ids.{index}Project IDs to filter for, only charges for these projects will be returned
resource-ids.{index}Resource IDs to filter for, only charges for these resources will be returned
resource-names.{index}Resource display names to filter for, only charges for these resources will be returned
skus.{index}SKU IDs to filter for, only charges for these SKUs will be returned
clamp-to-time-rangeClamp charges to the requested time range
organization-idOrganization ID to use. If none is passed the default organization ID will be used

Consumption management commands

Consumption management commands.

Get monthly consumption

Consumption allows you to retrieve your past or current consumption cost, by project or category.

Usage:

TerminalCode
scw billing consumption list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder consumptions list in the response by their update dateOne of: updated_at_desc, updated_at_asc, category_name_desc, category_name_asc
project-idProject ID to use. If none is passed the default project ID will be used
category-nameFilter by name of a Category as they are shown in the invoice (Compute, Network, Observability)
billing-periodFilter by the billing period in the YYYY-MM format. If it is empty the current billing period will be used as default
organization-idOrganization ID to use. If none is passed the default organization ID will be used

Get monthly consumption taxes

Consumption Tax allows you to retrieve your past or current tax charges, by project or category.

Usage:

TerminalCode
scw billing consumption list-taxes [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder consumed taxes list in the response by their update dateOne of: updated_at_desc, updated_at_asc, category_name_desc, category_name_asc
billing-periodFilter by the billing period in the YYYY-MM format. If it is empty the current billing period will be used as default
organization-idOrganization ID to use. If none is passed the default organization ID will be used

Discount management commands

Discount management commands.

List discounts

List all discounts for your Organization and usable categories, products, offers, references, regions and zones where the discount can be applied. As a reseller:

  • If you do not specify an organization_id you will list the discounts applied to your own Organization and your customers
  • If you indicate your organization_id you will list only the discounts applied to your Organization
  • If you indicate the organization_id of one of your customers, you will list the discounts applied to their Organization.

Usage:

TerminalCode
scw billing discount list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-byOrder discounts in the response by their descriptionOne of: creation_date_desc, creation_date_asc, start_date_desc, start_date_asc, stop_date_desc, stop_date_asc
organization-idID of the organization

Invoice management commands

Invoice management commands.

Download an invoice

Download a specific invoice, specified by its ID.

Usage:

TerminalCode
scw billing invoice download <invoice-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
invoice-idInvoice IDRequired
file-pathWanted file pathDefault: ./
file-typeWanted file extensionDefault: pdf
force-replaceForce file replacementDefault: false

Export invoices

Export invoices in a CSV file.

Usage:

TerminalCode
scw billing invoice export [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
organization-idOrganization ID. If specified, only invoices from this Organization will be returned
billing-period-start-afterReturn only invoice with start date greater than billing_period_start
billing-period-start-beforeReturn only invoice with start date less than billing_period_start
invoice-typeInvoice type. It can either be periodic or purchase
file-pathWanted file pathDefault: ./
file-typeWanted file extensionDefault: csv
force-replaceForce file replacementDefault: false

Get an invoice

Get a specific invoice, specified by its ID.

Usage:

TerminalCode
scw billing invoice get <invoice-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
invoice-idInvoice IDRequired

List invoices

List all your invoices, filtering by start_date and invoice_type. Each invoice has its own ID.

Usage:

TerminalCode
scw billing invoice list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
billing-period-start-afterReturn only invoice with start date greater than billing_period_start
billing-period-start-beforeReturn only invoice with start date less than billing_period_start
invoice-typeInvoice type. It can either be periodic, purchase or credit_noteOne of: unknown_type, periodic, purchase, credit_note
order-byHow invoices are ordered in the responseOne of: invoice_number_desc, invoice_number_asc, start_date_desc, start_date_asc, issued_date_desc, issued_date_asc, due_date_desc, due_date_asc, total_untaxed_desc, total_untaxed_asc, total_taxed_desc, total_taxed_asc, invoice_type_desc, invoice_type_asc
organization-idOrganization ID. If specified, only invoices from this Organization will be returned