Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Create a new budget alert.

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

ARGS:
[budget-id] The ID of the budget to create alert for
[threshold] Threshold above which the alert is sent

FLAGS:
-h, --help help for create
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Delete a budget alert.

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

ARGS:
budget-alert-id The ID of the budget alert to delete

FLAGS:
-h, --help help for delete
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Create a new budget alert notification.

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

ARGS:
[budget-alert-id] The 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

FLAGS:
-h, --help help for create
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Delete a budget alert notification.

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

ARGS:
budget-alert-notification-id The ID of the budget alert notification to delete

FLAGS:
-h, --help help for delete
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Update a budget alert notification.

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

ARGS:
budget-alert-notification-id The ID of the budget alert notification to update
[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

FLAGS:
-h, --help help for update
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Budget alert notification management commands.

USAGE:
scw billing budget-alert-notification <command>

AVAILABLE COMMANDS:
create Create a new budget alert notification.
delete Delete a budget alert notification.
update Update a budget alert notification.

FLAGS:
-h, --help help for budget-alert-notification
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw billing budget-alert-notification [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Update a budget alert.

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

ARGS:
budget-alert-id The ID of the budget alert to update
[threshold] Threshold above which the alert is sent

FLAGS:
-h, --help help for update
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Budget alerts management commands.

USAGE:
scw billing budget-alert <command>

AVAILABLE COMMANDS:
create Create a new budget alert.
delete Delete a budget alert.
update Update a budget alert.

FLAGS:
-h, --help help for budget-alert
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw billing budget-alert [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Create a new budget.

USAGE:
scw billing budget create [arg=value ...]

ARGS:
[consumption-limit] Cost limit for the budget
[enabled] Whether the budget is enabled or not
[organization-id] Organization ID to use. If none is passed the default organization ID will be used

FLAGS:
-h, --help help for create
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Delete a budget.

USAGE:
scw billing budget delete [arg=value ...]

ARGS:
budget-id The ID of the budget to delete

FLAGS:
-h, --help help for delete
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
19 changes: 19 additions & 0 deletions cmd/scw/testdata/test-all-usage-billing-budget-get-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Fetch a budget.

USAGE:
scw billing budget get [arg=value ...]

ARGS:
budget-id The ID of the budget

FLAGS:
-h, --help help for get
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
List your budgets, filtering by `organization_id`.

USAGE:
scw billing budget list [arg=value ...]

ARGS:
[organization-id] Filter by organization ID

FLAGS:
-h, --help help for list
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Update a budget.

USAGE:
scw billing budget update [arg=value ...]

ARGS:
budget-id The ID of the budget to update
[consumption-limit] Cost limit for the budget
[enabled] Whether the budget will be enabled or not

FLAGS:
-h, --help help for update
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
25 changes: 25 additions & 0 deletions cmd/scw/testdata/test-all-usage-billing-budget-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
Budget management commands.

USAGE:
scw billing budget <command>

AVAILABLE COMMANDS:
create Create a new budget.
delete Delete a budget.
get Fetch a budget.
list List your budgets, filtering by `organization_id`.
update Update a budget.

FLAGS:
-h, --help help for budget
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw billing budget [command] --help" for more information about a command.
27 changes: 27 additions & 0 deletions cmd/scw/testdata/test-all-usage-billing-usage#01.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
This API allows you to manage and query your Scaleway billing and consumption.

USAGE:
scw billing <command>

AVAILABLE COMMANDS:
budget Budget management commands
budget-alert Budget alerts management commands
budget-alert-notification Budget alert notification management commands
charge
consumption Consumption management commands
discount Discount management commands
invoice Invoice management commands

FLAGS:
-h, --help help for billing
--list-sub-commands List all subcommands

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw billing [command] --help" for more information about a command.
11 changes: 7 additions & 4 deletions cmd/scw/testdata/test-all-usage-billing-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ USAGE:
scw billing <command>

AVAILABLE COMMANDS:
charge
consumption Consumption management commands
discount Discount management commands
invoice Invoice management commands
budget Budget management commands
budget-alert Budget alerts management commands
budget-alert-notification Budget alert notification management commands
charge
consumption Consumption management commands
discount Discount management commands
invoice Invoice management commands

FLAGS:
-h, --help help for billing
Expand Down
6 changes: 4 additions & 2 deletions commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import (
audit_trail "github.com/scaleway/scaleway-cli/v2/internal/namespaces/audit_trail/v1alpha1"
autocompleteNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/autocomplete"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/baremetal/v1"
billing "github.com/scaleway/scaleway-cli/v2/internal/namespaces/billing/v2beta1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/billing/v2"
billingV2beta1 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/billing/v2beta1"
block "github.com/scaleway/scaleway-cli/v2/internal/namespaces/block/v1alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/cockpit/v1"
configNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/config"
Expand Down Expand Up @@ -110,7 +111,7 @@ func GetCommands() *core.Commands {
tem.GetCommands(),
alias.GetCommands(),
webhosting.GetCommands(),
billing.GetCommands(),
billingV2beta1.GetCommands(),
mnq.GetCommands(),
block.GetCommands(),
ipam.GetCommands(),
Expand All @@ -130,6 +131,7 @@ func GetCommands() *core.Commands {
product_catalog.GetCommands(),
mcp.GetCommands(),
search.GetCommands(),
billing.GetCommands(),
)

if beta {
Expand Down
Loading
Loading