Skip to content

Commit 4641662

Browse files
committed
feat: update generated APIs
1 parent 23f90be commit 4641662

File tree

10 files changed

+49
-6
lines changed

10 files changed

+49
-6
lines changed

cmd/scw/testdata/test-all-usage-audit-trail-event-list-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
ARGS:
99
[project-id] (Optional) ID of the Project containing the Audit Trail events
10-
[resource-type] (Optional) Returns a paginated list of Scaleway resources' features (unknown_type | secm_secret | secm_secret_version | kube_cluster | kube_pool | kube_node | kube_acl | keym_key | iam_user | iam_application | iam_group | iam_policy | iam_api_key | iam_ssh_key | iam_rule | secret_manager_secret | secret_manager_version | key_manager_key)
10+
[resource-type] (Optional) Returns a paginated list of Scaleway resources' features (unknown_type | secm_secret | secm_secret_version | kube_cluster | kube_pool | kube_node | kube_acl | keym_key | iam_user | iam_application | iam_group | iam_policy | iam_api_key | iam_ssh_key | iam_rule | secret_manager_secret | secret_manager_version | key_manager_key | account_user | account_organization)
1111
[method-name] (Optional) Name of the method of the API call performed
1212
[status] (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied
1313
[recorded-after] (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Organization-wide management commands.
4+
5+
USAGE:
6+
scw iam organization
7+
8+
FLAGS:
9+
-h, --help help for organization
10+
11+
GLOBAL FLAGS:
12+
-c, --config string The path to the config file
13+
-D, --debug Enable debug mode
14+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
15+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-iam-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ AVAILABLE COMMANDS:
1111
group Groups management commands
1212
jwt JWTs management commands
1313
log Log management commands
14+
organization Organization-wide management commands
1415
permission-set Permission sets management commands
1516
policy Policies management commands
1617
rule Rules management commands

cmd/scw/testdata/test-all-usage-keymanager-key-list-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARGS:
1010
[order-by] (name_asc | name_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc)
1111
[tags.{index}] (Optional) List of tags to filter on
1212
[name] (Optional) Filter by key name
13+
[usage] (Optional) Filter keys by usage. (unknown_usage | symmetric_encryption | asymmetric_encryption | asymmetric_signing)
1314
[organization-id] (Optional) Filter by Organization ID
1415
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1516

docs/commands/audit-trail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ scw audit-trail event list [arg=value ...]
2929
| Name | | Description |
3030
|------|---|-------------|
3131
| project-id | | (Optional) ID of the Project containing the Audit Trail events |
32-
| resource-type | One of: `unknown_type`, `secm_secret`, `secm_secret_version`, `kube_cluster`, `kube_pool`, `kube_node`, `kube_acl`, `keym_key`, `iam_user`, `iam_application`, `iam_group`, `iam_policy`, `iam_api_key`, `iam_ssh_key`, `iam_rule`, `secret_manager_secret`, `secret_manager_version`, `key_manager_key` | (Optional) Returns a paginated list of Scaleway resources' features |
32+
| resource-type | One of: `unknown_type`, `secm_secret`, `secm_secret_version`, `kube_cluster`, `kube_pool`, `kube_node`, `kube_acl`, `keym_key`, `iam_user`, `iam_application`, `iam_group`, `iam_policy`, `iam_api_key`, `iam_ssh_key`, `iam_rule`, `secret_manager_secret`, `secret_manager_version`, `key_manager_key`, `account_user`, `account_organization` | (Optional) Returns a paginated list of Scaleway resources' features |
3333
| method-name | | (Optional) Name of the method of the API call performed |
3434
| status | | (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied |
3535
| recorded-after | | (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default |

docs/commands/iam.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ This API allows you to manage Identity and Access Management (IAM) across your S
3131
- [Log management commands](#log-management-commands)
3232
- [Get a log](#get-a-log)
3333
- [List logs](#list-logs)
34+
- [Organization-wide management commands](#organization-wide-management-commands)
3435
- [Permission sets management commands](#permission-sets-management-commands)
3536
- [List permission sets](#list-permission-sets)
3637
- [Policies management commands](#policies-management-commands)
@@ -628,6 +629,20 @@ scw iam log list [arg=value ...]
628629

629630

630631

632+
## Organization-wide management commands
633+
634+
Organization-wide management commands.
635+
636+
Organization-wide management commands.
637+
638+
**Usage:**
639+
640+
```
641+
scw iam organization
642+
```
643+
644+
645+
631646
## Permission sets management commands
632647

633648
Permission sets management commands.

docs/commands/keymanager.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ scw keymanager key list [arg=value ...]
264264
| order-by | One of: `name_asc`, `name_desc`, `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc` | |
265265
| tags.{index} | | (Optional) List of tags to filter on |
266266
| name | | (Optional) Filter by key name |
267+
| usage | One of: `unknown_usage`, `symmetric_encryption`, `asymmetric_encryption`, `asymmetric_signing` | (Optional) Filter keys by usage. |
267268
| organization-id | | (Optional) Filter by Organization ID |
268269
| 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 |
269270

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/mattn/go-isatty v0.0.20
2424
github.com/moby/buildkit v0.13.2
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250507151153-c2221170c9cc
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250514090832-f36c46b181ca
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.9.1
2929
github.com/spf13/pflag v1.0.6

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
466466
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
468468
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250507151153-c2221170c9cc h1:BG7CJh8I2AuyMP0ie6sOqAGYn5jifL4piKBZCva9C5M=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250507151153-c2221170c9cc/go.mod h1:qiGzapFyNPFwBBLJ+hTFykKSnU95n1zL64+o1ubmwf0=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250514090832-f36c46b181ca h1:xNYnhDQ8TTsjB4m/3uUXRLryvtAETOpkNFOr5t0lq30=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250514090832-f36c46b181ca/go.mod h1:qiGzapFyNPFwBBLJ+hTFykKSnU95n1zL64+o1ubmwf0=
471471
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
472472
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
473473
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/iam/v1alpha1/iam_cli.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"reflect"
99

1010
"github.com/scaleway/scaleway-cli/v2/core"
11-
iam "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1"
11+
"github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1"
1212
"github.com/scaleway/scaleway-sdk-go/scw"
1313
)
1414

@@ -30,6 +30,7 @@ func GetGeneratedCommands() *core.Commands {
3030
iamPermissionSet(),
3131
iamJwt(),
3232
iamLog(),
33+
iamOrganization(),
3334
iamSSHKeyList(),
3435
iamSSHKeyCreate(),
3536
iamSSHKeyGet(),
@@ -176,6 +177,15 @@ func iamLog() *core.Command {
176177
}
177178
}
178179

180+
func iamOrganization() *core.Command {
181+
return &core.Command{
182+
Short: `Organization-wide management commands`,
183+
Long: `Organization-wide management commands.`,
184+
Namespace: "iam",
185+
Resource: "organization",
186+
}
187+
}
188+
179189
func iamSSHKeyList() *core.Command {
180190
return &core.Command{
181191
Short: `List SSH keys`,

0 commit comments

Comments
 (0)