Skip to content

Commit 572ca85

Browse files
authored
feat(rdb): enable generation for get-metrics, endpoint, settings (#2915)
1 parent b46f97c commit 572ca85

18 files changed

+874
-3
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Replace all the ACL rules of a Database Instance.
4+
5+
USAGE:
6+
scw rdb acl set [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance where the ACL rules must be set
10+
[rules.{index}.ip]
11+
[rules.{index}.description]
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
13+
14+
FLAGS:
15+
-h, --help help for set
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-rdb-acl-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ AVAILABLE COMMANDS:
99
add Add an ACL rule to a Database Instance
1010
delete Delete ACL rules of a Database Instance
1111
list List ACL rules of a Database Instance
12+
set Set ACL rules for a Database Instance
1213

1314
FLAGS:
1415
-h, --help help for acl
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a new endpoint for a Database Instance. You can add `load_balancer` and `private_network` specifications to the body of the request. Note that this action replaces your current endpoint, which means you might need to update any environment configurations that point to the old endpoint.
4+
5+
USAGE:
6+
scw rdb endpoint create [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance you to which you want to add an endpoint
10+
[endpoint-spec.private-network.private-network-id] UUID of the Private Network to be connected to the Database Instance
11+
[endpoint-spec.private-network.service-ip] Endpoint IPv4 address with a CIDR notation. Refer to the official Scaleway documentation to learn more about IP and subnet limitations.
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
13+
14+
FLAGS:
15+
-h, --help help for create
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-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 the endpoint of a Database Instance. You must specify the `region` and `endpoint_id` parameters of the endpoint you want to delete. Note that might need to update any environment configurations that point to the deleted endpoint.
4+
5+
USAGE:
6+
scw rdb endpoint delete [arg=value ...]
7+
8+
ARGS:
9+
endpoint-id UUID of the endpoint you want to delete
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
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 a Database Instance endpoint. Full details about the endpoint, like `ip`, `port`, `private_network` and `load_balancer` specifications are returned in the response.
4+
5+
USAGE:
6+
scw rdb endpoint get [arg=value ...]
7+
8+
ARGS:
9+
endpoint-id UUID of the endpoint you want to get
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Migrate an existing instance endpoint to another instance.
4+
5+
USAGE:
6+
scw rdb endpoint migrate [arg=value ...]
7+
8+
ARGS:
9+
endpoint-id UUID of the endpoint you want to migrate
10+
instance-id UUID of the instance you want to attach the endpoint to
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 migrate
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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
A point of connection to a Database Instance. The endpoint is associated with an IPv4 address and a port. It contains the information about whether the endpoint is read-write or not. The endpoints always point to the main node of a Database Instance.
4+
5+
All endpoints have TLS enabled. You can use TLS to make your data and your passwords unreadable in transit to anyone but you.
6+
7+
For added security, you can set up ACL rules to restrict access to your endpoint to a set of trusted hosts or networks of your choice.
8+
9+
Load Balancers are used to forward traffic to the right node based on the node state (active/hot standby). The Load Balancers' configuration is set to cut off inactive connections if no TCP traffic is sent within a 6-hour timeframe. We recommend using connection pooling on the application side to renew database connections regularly.
10+
11+
USAGE:
12+
scw rdb endpoint <command>
13+
14+
AVAILABLE COMMANDS:
15+
create Create a new Database Instance endpoint
16+
delete Delete a Database Instance endpoint
17+
get Get a Database Instance endpoint
18+
migrate Migrate an existing instance endpoint to another instance
19+
20+
FLAGS:
21+
-h, --help help for endpoint
22+
23+
GLOBAL FLAGS:
24+
-c, --config string The path to the config file
25+
-D, --debug Enable debug mode
26+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
27+
-p, --profile string The config profile to use
28+
29+
Use "scw rdb endpoint [command] --help" for more information about a command.
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+
Retrieve the time series metrics of a given Database Instance. You can define the period from which to retrieve metrics by specifying the `start_date` and `end_date`.
4+
5+
USAGE:
6+
scw rdb instance get-metrics <instance-id ...> [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance
10+
[start-date] Start date to gather metrics from
11+
[end-date] End date to gather metrics from
12+
[metric-name] Name of the metric to gather
13+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
14+
15+
FLAGS:
16+
-h, --help help for get-metrics
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

cmd/scw/testdata/test-all-usage-rdb-instance-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ AVAILABLE COMMANDS:
1616
delete Delete a Database Instance
1717
get Get a Database Instance
1818
get-certificate Get the TLS certificate of a Database Instance
19+
get-metrics Get Database Instance metrics
1920
list List Database Instances
2021
renew-certificate Renew the TLS certificate of a Database Instance
2122
restart Restart Database Instance
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Add an advanced setting to a Database Instance. You must set the `name` and the `value` of each setting.
4+
5+
USAGE:
6+
scw rdb setting add [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance you want to add settings to
10+
[settings.{index}.name]
11+
[settings.{index}.value]
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
13+
14+
FLAGS:
15+
-h, --help help for add
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use

0 commit comments

Comments
 (0)