Skip to content

Commit 7c1edd7

Browse files
committed
feat: update generated APIs
1 parent a09dee0 commit 7c1edd7

File tree

10 files changed

+119
-18
lines changed

10 files changed

+119
-18
lines changed

cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ ARGS:
1919
[health-check.check-max-retries] Number of consecutive unsuccessful health checks after which the server will be considered dead
2020
[health-check.mysql-config.user] MySQL user to use for the health check
2121
[health-check.pgsql-config.user] PostgreSQL user to use for the health check
22-
[health-check.http-config.uri] HTTP URI used for the health check
22+
[health-check.http-config.uri] HTTP path used for the health check
2323
[health-check.http-config.method] HTTP method used for the health check
2424
[health-check.http-config.code] HTTP response code expected for a successful health check
2525
[health-check.http-config.host-header] HTTP host header used for the health check
26-
[health-check.https-config.uri] HTTP URI used for the health check
26+
[health-check.https-config.uri] HTTP path used for the health check
2727
[health-check.https-config.method] HTTP method used for the health check
2828
[health-check.https-config.code] HTTP response code expected for a successful health check
2929
[health-check.https-config.host-header] HTTP host header used for the health check

cmd/scw/testdata/test-all-usage-lb-backend-update-healthcheck-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ ARGS:
1414
[check-send-proxy] Defines whether proxy protocol should be activated for the health check
1515
[mysql-config.user] MySQL user to use for the health check
1616
[pgsql-config.user] PostgreSQL user to use for the health check
17-
[http-config.uri] HTTP URI used for the health check
17+
[http-config.uri] HTTP path used for the health check
1818
[http-config.method] HTTP method used for the health check
1919
[http-config.code] HTTP response code expected for a successful health check
2020
[http-config.host-header] HTTP host header used for the health check
21-
[https-config.uri] HTTP URI used for the health check
21+
[https-config.uri] HTTP path used for the health check
2222
[https-config.method] HTTP method used for the health check
2323
[https-config.code] HTTP response code expected for a successful health check
2424
[https-config.host-header] HTTP host header used for the health check
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Retrieve a list of ACL rules for a VPC, specified by its VPC ID.
4+
5+
USAGE:
6+
scw vpc rule get [arg=value ...]
7+
8+
ARGS:
9+
vpc-id ID of the Network ACL's VPC
10+
is-ipv6 Defines whether this set of ACL rules is for IPv6 (false = IPv4). Each Network ACL can have rules for only one IP type.
11+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
12+
13+
FLAGS:
14+
-h, --help help for get
15+
16+
GLOBAL FLAGS:
17+
-c, --config string The path to the config file
18+
-D, --debug Enable debug mode
19+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
20+
-p, --profile string The config profile to use
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Set the list of ACL rules and the default routing policy for a VPC.
4+
5+
USAGE:
6+
scw vpc rule set [arg=value ...]
7+
8+
ARGS:
9+
vpc-id ID of the Network ACL's VPC
10+
rules.{index}.protocol Protocol to which this rule applies (ANY | TCP | UDP | ICMP)
11+
rules.{index}.source Source IP range to which this rule applies (CIDR notation with subnet mask)
12+
rules.{index}.src-port-low Starting port of the source port range to which this rule applies (inclusive)
13+
rules.{index}.src-port-high Ending port of the source port range to which this rule applies (inclusive)
14+
rules.{index}.destination Destination IP range to which this rule applies (CIDR notation with subnet mask)
15+
rules.{index}.dst-port-low Starting port of the destination port range to which this rule applies (inclusive)
16+
rules.{index}.dst-port-high Ending port of the destination port range to which this rule applies (inclusive)
17+
rules.{index}.action Policy to apply to the packet (unknown_action | accept | drop)
18+
rules.{index}.description Rule description
19+
is-ipv6 Defines whether this set of ACL rules is for IPv6 (false = IPv4). Each Network ACL can have rules for only one IP type.
20+
default-policy Action to take for packets which do not match any rules (unknown_action | accept | drop)
21+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
22+
23+
FLAGS:
24+
-h, --help help for set
25+
26+
GLOBAL FLAGS:
27+
-c, --config string The path to the config file
28+
-D, --debug Enable debug mode
29+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
30+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-vpc-rule-usage.golden

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
Acl Rules.
44

55
USAGE:
6-
scw vpc rule
6+
scw vpc rule <command>
7+
8+
AVAILABLE COMMANDS:
9+
get Get Acl Rules for VPC
10+
set Set VPC ACL rules
711

812
FLAGS:
913
-h, --help help for rule
@@ -13,3 +17,5 @@ GLOBAL FLAGS:
1317
-D, --debug Enable debug mode
1418
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
1519
-p, --profile string The config profile to use
20+
21+
Use "scw vpc rule [command] --help" for more information about a command.

docs/commands/lb.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,11 @@ scw lb backend create [arg=value ...]
291291
| health-check.check-max-retries | | Number of consecutive unsuccessful health checks after which the server will be considered dead |
292292
| health-check.mysql-config.user | | MySQL user to use for the health check |
293293
| health-check.pgsql-config.user | | PostgreSQL user to use for the health check |
294-
| health-check.http-config.uri | | HTTP URI used for the health check |
294+
| health-check.http-config.uri | | HTTP path used for the health check |
295295
| health-check.http-config.method | | HTTP method used for the health check |
296296
| health-check.http-config.code | | HTTP response code expected for a successful health check |
297297
| health-check.http-config.host-header | | HTTP host header used for the health check |
298-
| health-check.https-config.uri | | HTTP URI used for the health check |
298+
| health-check.https-config.uri | | HTTP path used for the health check |
299299
| health-check.https-config.method | | HTTP method used for the health check |
300300
| health-check.https-config.code | | HTTP response code expected for a successful health check |
301301
| health-check.https-config.host-header | | HTTP host header used for the health check |
@@ -522,11 +522,11 @@ scw lb backend update-healthcheck [arg=value ...]
522522
| check-send-proxy | | Defines whether proxy protocol should be activated for the health check |
523523
| mysql-config.user | | MySQL user to use for the health check |
524524
| pgsql-config.user | | PostgreSQL user to use for the health check |
525-
| http-config.uri | | HTTP URI used for the health check |
525+
| http-config.uri | | HTTP path used for the health check |
526526
| http-config.method | | HTTP method used for the health check |
527527
| http-config.code | | HTTP response code expected for a successful health check |
528528
| http-config.host-header | | HTTP host header used for the health check |
529-
| https-config.uri | | HTTP URI used for the health check |
529+
| https-config.uri | | HTTP path used for the health check |
530530
| https-config.method | | HTTP method used for the health check |
531531
| https-config.code | | HTTP response code expected for a successful health check |
532532
| https-config.host-header | | HTTP host header used for the health check |

docs/commands/vpc.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ This API allows you to manage your Virtual Private Clouds (VPCs) and Private Net
1717
- [Return routes with associated next hop data](#return-routes-with-associated-next-hop-data)
1818
- [Update Route](#update-route)
1919
- [Rule management command](#rule-management-command)
20+
- [Get Acl Rules for VPC](#get-acl-rules-for-vpc)
21+
- [Set VPC ACL rules](#set-vpc-acl-rules)
2022
- [Subnet management command](#subnet-management-command)
2123
- [VPC management command](#vpc-management-command)
2224
- [Create a VPC](#create-a-vpc)
@@ -313,15 +315,58 @@ scw vpc route update <route-id ...> [arg=value ...]
313315

314316
Acl Rules.
315317

316-
Acl Rules.
318+
319+
### Get Acl Rules for VPC
320+
321+
Retrieve a list of ACL rules for a VPC, specified by its VPC ID.
322+
323+
**Usage:**
324+
325+
```
326+
scw vpc rule get [arg=value ...]
327+
```
328+
329+
330+
**Args:**
331+
332+
| Name | | Description |
333+
|------|---|-------------|
334+
| vpc-id | Required | ID of the Network ACL's VPC |
335+
| is-ipv6 | Required | Defines whether this set of ACL rules is for IPv6 (false = IPv4). Each Network ACL can have rules for only one IP type. |
336+
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
337+
338+
339+
340+
### Set VPC ACL rules
341+
342+
Set the list of ACL rules and the default routing policy for a VPC.
317343

318344
**Usage:**
319345

320346
```
321-
scw vpc rule
347+
scw vpc rule set [arg=value ...]
322348
```
323349

324350

351+
**Args:**
352+
353+
| Name | | Description |
354+
|------|---|-------------|
355+
| vpc-id | Required | ID of the Network ACL's VPC |
356+
| rules.{index}.protocol | Required<br />One of: `ANY`, `TCP`, `UDP`, `ICMP` | Protocol to which this rule applies |
357+
| rules.{index}.source | Required | Source IP range to which this rule applies (CIDR notation with subnet mask) |
358+
| rules.{index}.src-port-low | Required | Starting port of the source port range to which this rule applies (inclusive) |
359+
| rules.{index}.src-port-high | Required | Ending port of the source port range to which this rule applies (inclusive) |
360+
| rules.{index}.destination | Required | Destination IP range to which this rule applies (CIDR notation with subnet mask) |
361+
| rules.{index}.dst-port-low | Required | Starting port of the destination port range to which this rule applies (inclusive) |
362+
| rules.{index}.dst-port-high | Required | Ending port of the destination port range to which this rule applies (inclusive) |
363+
| rules.{index}.action | Required<br />One of: `unknown_action`, `accept`, `drop` | Policy to apply to the packet |
364+
| rules.{index}.description | Required | Rule description |
365+
| is-ipv6 | Required | Defines whether this set of ACL rules is for IPv6 (false = IPv4). Each Network ACL can have rules for only one IP type. |
366+
| default-policy | Required<br />One of: `unknown_action`, `accept`, `drop` | Action to take for packets which do not match any rules |
367+
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
368+
369+
325370

326371
## Subnet management command
327372

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ require (
2525
github.com/mattn/go-isatty v0.0.20
2626
github.com/moby/buildkit v0.13.2
2727
github.com/opencontainers/go-digest v1.0.0
28-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250317081556-ba26a9f2b785
28+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250318071030-c9219eeb27a0
2929
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3030
github.com/spf13/cobra v1.9.1
3131
github.com/spf13/pflag v1.0.6

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.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
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.32.0.20250317081556-ba26a9f2b785 h1:exmunaUMPq9jpmmQgKuuNUn3akjLodGtBNQLNiVYenI=
466-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250317081556-ba26a9f2b785/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
465+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250318071030-c9219eeb27a0 h1:PETheFa72UbxYylRz9ZNY0oUs1CkY3YHfQwv9o6EpCM=
466+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250318071030-c9219eeb27a0/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
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/lb/v1/lb_cli.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ func lbBackendCreate() *core.Command {
909909
},
910910
{
911911
Name: "health-check.http-config.uri",
912-
Short: `HTTP URI used for the health check`,
912+
Short: `HTTP path used for the health check`,
913913
Required: false,
914914
Deprecated: false,
915915
Positional: false,
@@ -937,7 +937,7 @@ func lbBackendCreate() *core.Command {
937937
},
938938
{
939939
Name: "health-check.https-config.uri",
940-
Short: `HTTP URI used for the health check`,
940+
Short: `HTTP path used for the health check`,
941941
Required: false,
942942
Deprecated: false,
943943
Positional: false,
@@ -1517,7 +1517,7 @@ func lbBackendUpdateHealthcheck() *core.Command {
15171517
},
15181518
{
15191519
Name: "http-config.uri",
1520-
Short: `HTTP URI used for the health check`,
1520+
Short: `HTTP path used for the health check`,
15211521
Required: false,
15221522
Deprecated: false,
15231523
Positional: false,
@@ -1545,7 +1545,7 @@ func lbBackendUpdateHealthcheck() *core.Command {
15451545
},
15461546
{
15471547
Name: "https-config.uri",
1548-
Short: `HTTP URI used for the health check`,
1548+
Short: `HTTP path used for the health check`,
15491549
Required: false,
15501550
Deprecated: false,
15511551
Positional: false,

0 commit comments

Comments
 (0)