Skip to content

Commit

Permalink
feat(tem): add project consumption (#4536)
Browse files Browse the repository at this point in the history
Co-authored-by: Rémy Léone <[email protected]>
  • Loading branch information
scaleway-bot and remyleone authored Feb 21, 2025
1 parent be3e6a4 commit b8a58f7
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Project consumption allow you to see your project consumption.

USAGE:
scw tem project-consumption

FLAGS:
-h, --help help for project-consumption

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
13 changes: 7 additions & 6 deletions cmd/scw/testdata/test-all-usage-tem-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ USAGE:
scw tem <command>

AVAILABLE COMMANDS:
blocklists Blocklist
domain Domain management commands
email Email management commands
offers Project offers management commands
project-settings Project settings management commands
webhook Webhook management commands
blocklists Blocklist
domain Domain management commands
email Email management commands
offers Project offers management commands
project-consumption Project consumption management commands
project-settings Project settings management commands
webhook Webhook management commands

FLAGS:
-h, --help help for tem
Expand Down
15 changes: 15 additions & 0 deletions docs/commands/tem.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This API allows you to manage your Transactional Email services.
- [Email statuses](#email-statuses)
- [List emails](#list-emails)
- [Project offers management commands](#project-offers-management-commands)
- [Project consumption management commands](#project-consumption-management-commands)
- [Project settings management commands](#project-settings-management-commands)
- [Webhook management commands](#webhook-management-commands)
- [Create a Webhook](#create-a-webhook)
Expand Down Expand Up @@ -407,6 +408,20 @@ scw tem offers



## Project consumption management commands

Project consumption allow you to see your project consumption.

Project consumption allow you to see your project consumption.

**Usage:**

```
scw tem project-consumption
```



## Project settings management commands

Project settings allow you to manage the configuration of your projects.
Expand Down
10 changes: 10 additions & 0 deletions internal/namespaces/tem/v1alpha1/tem_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func GetGeneratedCommands() *core.Commands {
temProjectSettings(),
temBlocklists(),
temOffers(),
temProjectConsumption(),
temEmailCreate(),
temEmailGet(),
temEmailList(),
Expand Down Expand Up @@ -111,6 +112,15 @@ func temOffers() *core.Command {
}
}

func temProjectConsumption() *core.Command {
return &core.Command{
Short: `Project consumption management commands`,
Long: `Project consumption allow you to see your project consumption.`,
Namespace: "tem",
Resource: "project-consumption",
}
}

func temEmailCreate() *core.Command {
return &core.Command{
Short: `Send an email`,
Expand Down

0 comments on commit b8a58f7

Please sign in to comment.