Skip to content

Commit 5b91b23

Browse files
feat(lb): enable generation for subscriber (#2918)
Co-authored-by: Rémy Léone <[email protected]>
1 parent cf187af commit 5b91b23

13 files changed

+724
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List information about your backend servers, including their state and the result of their last health check.
4+
5+
USAGE:
6+
scw lb backend list-statistics <lb-id ...> [arg=value ...]
7+
8+
ARGS:
9+
lb-id Load Balancer ID
10+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2 | all)
11+
12+
FLAGS:
13+
-h, --help help for list-statistics
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ AVAILABLE COMMANDS:
1111
delete Delete a backend of a given Load Balancer
1212
get Get a backend of a given Load Balancer
1313
list List the backends of a given Load Balancer
14+
list-statistics List backend server statistics
1415
remove-servers Remove a set of servers for a given backend
1516
set-servers Define all backend servers for a given backend
1617
update Update a backend of a given Load Balancer
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a new subscriber, either with an email configuration or a webhook configuration, for a specified Scaleway Project.
4+
5+
USAGE:
6+
scw lb subscriber create [arg=value ...]
7+
8+
ARGS:
9+
name Subscriber name
10+
email-config.email Email address to send alerts to
11+
webhook-config.uri URI to receive POST requests
12+
[project-id] Project ID to use. If none is passed the default project ID will be used
13+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
14+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)
15+
16+
FLAGS:
17+
-h, --help help for create
18+
19+
GLOBAL FLAGS:
20+
-c, --config string The path to the config file
21+
-D, --debug Enable debug mode
22+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
23+
-p, --profile string The config profile to use
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete an existing subscriber, specified by its subscriber ID. Deleting a subscriber is permanent, and cannot be undone.
4+
5+
USAGE:
6+
scw lb subscriber delete <subscriber-id ...> [arg=value ...]
7+
8+
ARGS:
9+
subscriber-id Subscriber ID
10+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)
11+
12+
FLAGS:
13+
-h, --help help for delete
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Retrieve information about an existing subscriber, specified by its subscriber ID. Its full details, including name and email/webhook configuration, are returned in the response object.
4+
5+
USAGE:
6+
scw lb subscriber get <subscriber-id ...> [arg=value ...]
7+
8+
ARGS:
9+
subscriber-id Subscriber ID
10+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)
11+
12+
FLAGS:
13+
-h, --help help for get
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List all subscribers to Load Balancer alerts. By default, returns all subscribers to Load Balancer alerts for the Organization associated with the authentication token used for the request.
4+
5+
USAGE:
6+
scw lb subscriber list [arg=value ...]
7+
8+
ARGS:
9+
[order-by] Sort order of subscribers in the response (created_at_asc | created_at_desc | name_asc | name_desc)
10+
name Subscriber name to search for
11+
[project-id] Filter subscribers by Project ID
12+
[organization-id] Filter subscribers by Organization ID
13+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2 | all)
14+
15+
FLAGS:
16+
-h, --help help for list
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use
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+
Subscribe an existing subscriber to alerts for a given Load Balancer.
4+
5+
USAGE:
6+
scw lb subscriber subscribe [arg=value ...]
7+
8+
ARGS:
9+
lb-id Load Balancer ID
10+
subscriber-id Subscriber ID
11+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)
12+
13+
FLAGS:
14+
-h, --help help for subscribe
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Unsubscribe a subscriber from alerts for a given Load Balancer. The subscriber is not deleted, and can be resubscribed in the future if necessary.
4+
5+
USAGE:
6+
scw lb subscriber unsubscribe [arg=value ...]
7+
8+
ARGS:
9+
lb-id Load Balancer ID
10+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)
11+
12+
FLAGS:
13+
-h, --help help for unsubscribe
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Update the parameters of a given subscriber (e.g. name, webhook configuration, email configuration), specified by its subscriber ID.
4+
5+
USAGE:
6+
scw lb subscriber update <subscriber-id ...> [arg=value ...]
7+
8+
ARGS:
9+
subscriber-id Subscriber ID
10+
name Subscriber name
11+
email-config.email Email address to send alerts to
12+
webhook-config.uri URI to receive POST requests
13+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2)
14+
15+
FLAGS:
16+
-h, --help help for update
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Subscriber management commands.
4+
5+
USAGE:
6+
scw lb subscriber <command>
7+
8+
AVAILABLE COMMANDS:
9+
create Create a subscriber
10+
delete Delete a subscriber
11+
get Get a subscriber
12+
list List all subscribers
13+
subscribe Subscribe a subscriber to alerts for a given Load Balancer
14+
unsubscribe Unsubscribe a subscriber from alerts for a given Load Balancer
15+
update Update a subscriber
16+
17+
FLAGS:
18+
-h, --help help for subscriber
19+
20+
GLOBAL FLAGS:
21+
-c, --config string The path to the config file
22+
-D, --debug Enable debug mode
23+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
24+
-p, --profile string The config profile to use
25+
26+
Use "scw lb subscriber [command] --help" for more information about a command.

0 commit comments

Comments
 (0)