Skip to content

feat(rdb): add has_maintenances filter to ListInstances endpoint and... #4850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025
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
13 changes: 7 additions & 6 deletions cmd/scw/testdata/test-all-usage-rdb-instance-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ USAGE:
scw rdb instance list [arg=value ...]

ARGS:
[tags.{index}] List Database Instances that have a given tag
[name] Lists Database Instances that match a name pattern
[order-by] Criteria to use when ordering Database Instance listings (created_at_asc | created_at_desc | name_asc | name_desc | region | status_asc | status_desc)
[project-id] Project ID to list the Database Instance of
[organization-id] Please use project_id instead
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
[tags.{index}] List Database Instances that have a given tag
[name] Lists Database Instances that match a name pattern
[order-by] Criteria to use when ordering Database Instance listings (created_at_asc | created_at_desc | name_asc | name_desc | region | status_asc | status_desc)
[project-id] Project ID to list the Database Instance of
[has-maintenances] Filter to only list instances with a scheduled maintenance
[organization-id] Please use project_id instead
[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
Expand Down
1 change: 1 addition & 0 deletions docs/commands/rdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ scw rdb instance list [arg=value ...]
| name | | Lists Database Instances that match a name pattern |
| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc`, `region`, `status_asc`, `status_desc` | Criteria to use when ordering Database Instance listings |
| project-id | | Project ID to list the Database Instance of |
| has-maintenances | | Filter to only list instances with a scheduled maintenance |
| organization-id | | Please use project_id instead |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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.33.0.20250617152214-69633d417037
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250618150302-dd86fd661356
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,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.33.0.20250617152214-69633d417037 h1:NfJcMj32LgXi0YZ/a4FklGJ1y7fvTjXpbTKGYwZvfrg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250617152214-69633d417037/go.mod h1:zFWiHphneiey3s8HOtAEnGrRlWivNaxW5T6d5Xfco7g=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250618150302-dd86fd661356 h1:9cMV1lFohW5MTZJ5YRa3bjhOjErTdnAV27GkGJUlaRk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250618150302-dd86fd661356/go.mod h1:zFWiHphneiey3s8HOtAEnGrRlWivNaxW5T6d5Xfco7g=
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=
Expand Down
7 changes: 7 additions & 0 deletions internal/namespaces/rdb/v1/rdb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,13 @@ func rdbInstanceList() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "has-maintenances",
Short: `Filter to only list instances with a scheduled maintenance`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "organization-id",
Short: `Please use project_id instead`,
Expand Down
Loading