From eaba10dd4d571005ac5a7ab57d2b59f6491eaa02 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 20 Feb 2025 15:25:03 +0000 Subject: [PATCH] feat: update generated APIs --- ...-all-usage-secret-secret-list-usage.golden | 19 ++++++++++--------- ...all-usage-secret-version-list-usage.golden | 2 +- ...usage-tem-project-consumption-usage.golden | 15 +++++++++++++++ .../testdata/test-all-usage-tem-usage.golden | 13 +++++++------ docs/commands/secret.md | 3 ++- docs/commands/tem.md | 15 +++++++++++++++ go.mod | 2 +- go.sum | 4 ++-- internal/namespaces/tem/v1alpha1/tem_cli.go | 10 ++++++++++ 9 files changed, 63 insertions(+), 20 deletions(-) create mode 100644 cmd/scw/testdata/test-all-usage-tem-project-consumption-usage.golden diff --git a/cmd/scw/testdata/test-all-usage-secret-secret-list-usage.golden b/cmd/scw/testdata/test-all-usage-secret-secret-list-usage.golden index 8cfa5672f7..4e65cb9d93 100644 --- a/cmd/scw/testdata/test-all-usage-secret-secret-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-secret-secret-list-usage.golden @@ -6,15 +6,16 @@ USAGE: scw secret secret list [arg=value ...] ARGS: - [project-id] Filter by Project ID (optional) - [order-by] (name_asc | name_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc) - [tags.{index}] List of tags to filter on (optional) - [name] Filter by secret name (optional) - [path] Filter by exact path (optional) - [ephemeral] Filter by ephemeral / not ephemeral (optional) - [type] Filter by secret type (optional) (unknown_type | opaque | certificate | key_value | basic_credentials | database_credentials | ssh_key) - [organization-id] Filter by Organization ID (optional) - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all) + [project-id] Filter by Project ID (optional) + [order-by] (name_asc | name_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc) + [tags.{index}] List of tags to filter on (optional) + [name] Filter by secret name (optional) + [path] Filter by exact path (optional) + [ephemeral] Filter by ephemeral / not ephemeral (optional) + [type] Filter by secret type (optional) (unknown_type | opaque | certificate | key_value | basic_credentials | database_credentials | ssh_key) + [scheduled-for-deletion] Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional) + [organization-id] Filter by Organization ID (optional) + [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all) FLAGS: -h, --help help for list diff --git a/cmd/scw/testdata/test-all-usage-secret-version-list-usage.golden b/cmd/scw/testdata/test-all-usage-secret-version-list-usage.golden index aa9a01aabb..ab67df1f29 100644 --- a/cmd/scw/testdata/test-all-usage-secret-version-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-secret-version-list-usage.golden @@ -7,7 +7,7 @@ USAGE: ARGS: secret-id ID of the secret - [status.{index}] Filter results by status (unknown_status | enabled | disabled | deleted) + [status.{index}] Filter results by status (unknown_status | enabled | disabled | deleted | scheduled_for_deletion) [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-tem-project-consumption-usage.golden b/cmd/scw/testdata/test-all-usage-tem-project-consumption-usage.golden new file mode 100644 index 0000000000..e11c4d58f5 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-tem-project-consumption-usage.golden @@ -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 diff --git a/cmd/scw/testdata/test-all-usage-tem-usage.golden b/cmd/scw/testdata/test-all-usage-tem-usage.golden index 83edb2fece..86a19b64eb 100644 --- a/cmd/scw/testdata/test-all-usage-tem-usage.golden +++ b/cmd/scw/testdata/test-all-usage-tem-usage.golden @@ -6,12 +6,13 @@ USAGE: scw tem 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 diff --git a/docs/commands/secret.md b/docs/commands/secret.md index 1ff854044b..3f47a51af6 100644 --- a/docs/commands/secret.md +++ b/docs/commands/secret.md @@ -160,6 +160,7 @@ scw secret secret list [arg=value ...] | path | | Filter by exact path (optional) | | ephemeral | | Filter by ephemeral / not ephemeral (optional) | | type | One of: `unknown_type`, `opaque`, `certificate`, `key_value`, `basic_credentials`, `database_credentials`, `ssh_key` | Filter by secret type (optional) | +| scheduled-for-deletion | | Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional) | | organization-id | | Filter by Organization ID (optional) | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config | @@ -457,7 +458,7 @@ scw secret version list [arg=value ...] | Name | | Description | |------|---|-------------| | secret-id | Required | ID of the secret | -| status.{index} | One of: `unknown_status`, `enabled`, `disabled`, `deleted` | Filter results by status | +| status.{index} | One of: `unknown_status`, `enabled`, `disabled`, `deleted`, `scheduled_for_deletion` | Filter results by status | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config | diff --git a/docs/commands/tem.md b/docs/commands/tem.md index a0daa3c16a..690f5f860b 100644 --- a/docs/commands/tem.md +++ b/docs/commands/tem.md @@ -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) @@ -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. diff --git a/go.mod b/go.mod index 3688bc4584..593576bfdb 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/mattn/go-isatty v0.0.20 github.com/moby/buildkit v0.13.2 github.com/opencontainers/go-digest v1.0.0 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250218143128-3136832efdcc + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250220095325-5f0d193bad95 github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 diff --git a/go.sum b/go.sum index 53ea4c4ba4..c51d6194d7 100644 --- a/go.sum +++ b/go.sum @@ -458,8 +458,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250218143128-3136832efdcc h1:YfW5EvR+6f6pGAoAY3Yu2Li4dmLbRxz28S+Nwf+bS+s= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250218143128-3136832efdcc/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250220095325-5f0d193bad95 h1:nxkDpup9Wj9wBLZGQF4uDYkjBsmGVfPjkhWb3i5rpyk= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250220095325-5f0d193bad95/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA= diff --git a/internal/namespaces/tem/v1alpha1/tem_cli.go b/internal/namespaces/tem/v1alpha1/tem_cli.go index 59d8ceace2..5471a49a27 100644 --- a/internal/namespaces/tem/v1alpha1/tem_cli.go +++ b/internal/namespaces/tem/v1alpha1/tem_cli.go @@ -26,6 +26,7 @@ func GetGeneratedCommands() *core.Commands { temProjectSettings(), temBlocklists(), temOffers(), + temProjectConsumption(), temEmailCreate(), temEmailGet(), temEmailList(), @@ -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`,