Skip to content

Commit b1b9dba

Browse files
scaleway-botMia-Cross
authored andcommitted
feat(iam): add expires_at to updateable API key fields
1 parent 1d39c40 commit b1b9dba

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

cmd/scw/testdata/test-all-usage-iam-api-key-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARGS:
99
access-key Access key to update
1010
[default-project-id] New default Project ID to set
1111
[description] New description to update
12+
[expires-at] New expiration date of the API key
1213

1314
FLAGS:
1415
-h, --help help for update

docs/commands/iam.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ scw iam api-key update <access-key ...> [arg=value ...]
196196
| access-key | Required | Access key to update |
197197
| default-project-id | | New default Project ID to set |
198198
| description | | New description to update |
199+
| expires-at | | New expiration date of the API key |
199200

200201

201202

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.25.1
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251022133213-7b6348727d6e
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251024091811-f46054a61f65
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.10.1
2929
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
462462
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
463463
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
464464
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
465-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251022133213-7b6348727d6e h1:g0hKUapP1X/99att+W0WS+iF/VJxhzw1kLa9fpnhEjg=
466-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251022133213-7b6348727d6e/go.mod h1:SVm1Zk6UpZtqZN6KtEQpjC+v+Lir4tyVfhQTU19q3PA=
465+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251024091811-f46054a61f65 h1:PFmz82c+uiCm7BY5JQGwR8R15LSqbitZAbEdd9SsFFY=
466+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251024091811-f46054a61f65/go.mod h1:SVm1Zk6UpZtqZN6KtEQpjC+v+Lir4tyVfhQTU19q3PA=
467467
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
468468
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
469469
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/iam/v1alpha1/iam_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,6 +2361,13 @@ func iamAPIKeyUpdate() *core.Command {
23612361
Deprecated: false,
23622362
Positional: false,
23632363
},
2364+
{
2365+
Name: "expires-at",
2366+
Short: `New expiration date of the API key`,
2367+
Required: false,
2368+
Deprecated: false,
2369+
Positional: false,
2370+
},
23642371
},
23652372
Run: func(ctx context.Context, args any) (i any, e error) {
23662373
request := args.(*iam.UpdateAPIKeyRequest)

0 commit comments

Comments
 (0)