Skip to content

Commit 89f428a

Browse files
authored
feat(documentdb): enable command documentdb (#3387)
1 parent 622ac6a commit 89f428a

File tree

66 files changed

+2587
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2587
-12
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ To enable beta features, you can set `SCW_ENABLE_BETA=1` in your environment.
113113
| `cockpit` | Cockpit API | [CLI](./docs/commands/cockpit.md) / [API](https://developers.scaleway.com/en/products/cockpit/api/) |
114114
| `config` | Config file management | [CLI](./docs/commands/config.md) |
115115
| `container` | Serverless Container API | [CLI](./docs/commands/container.md) / [API](https://developers.scaleway.com/en/products/containers/api/) |
116+
| `documentdb` | DocumentDB API | [CLI](./docs/commands/document-db.md) / [API](https://www.scaleway.com/en/developers/api/document_db/) |
116117
| `dns` | DNS API | [CLI](./docs/commands/dns.md) / [API](https://developers.scaleway.com/en/products/domain/dns/api/) |
117118
| `feedback` | Send feedback to the Scaleway CLI Team! | [CLI](./docs/commands/feedback.md) |
118119
| `flexibleip` | Flexible IP API | [CLI](./docs/commands/fip.md) / [API](https://developers.scaleway.com/en/products/flexible-ip/api/) |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Add an additional ACL rule to a Database Instance.
4+
5+
USAGE:
6+
scw document-db acl add [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance you want to add ACL rules to
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 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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete one or more ACL rules of a Database Instance.
4+
5+
USAGE:
6+
scw document-db acl delete [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance you want to delete an ACL rule from
10+
acl-rule-ips.{index} IP addresses defined in the ACL rules of the Database Instance
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 delete
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List the ACL rules for a given Database Instance. The response is an array of ACL objects, each one representing an ACL that denies, allows or redirects traffic based on certain conditions.
4+
5+
USAGE:
6+
scw document-db acl list [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
11+
12+
FLAGS:
13+
-h, --help help for list
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
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 document-db 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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Network Access Control Lists allow you to control incoming network traffic by setting up ACL rules.
4+
5+
USAGE:
6+
scw document-db acl <command>
7+
8+
AVAILABLE COMMANDS:
9+
add Add an ACL rule to a Database Instance
10+
delete Delete ACL rules of a Database Instance
11+
list List ACL rules of a Database Instance
12+
set Set ACL rules for a Database Instance
13+
14+
FLAGS:
15+
-h, --help help for acl
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
22+
23+
Use "scw document-db acl [command] --help" for more information about a command.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a new database. You must define the `name` parameter in the request.
4+
5+
USAGE:
6+
scw document-db database create [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance where to create the database
10+
[name] Name of the database
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 create
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete a given database on a Database Instance. You must specify, in the endpoint, the `region`, `instance_id` and `name` parameters of the database you want to delete.
4+
5+
USAGE:
6+
scw document-db database delete [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance where to delete the database
10+
name Name of the database to delete
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 delete
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List all databases of a given Database Instance. By default, the databases returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `name`, `managed` and `owner`.
4+
5+
USAGE:
6+
scw document-db database list [arg=value ...]
7+
8+
ARGS:
9+
[name] Name of the database
10+
[managed] Defines whether or not the database is managed
11+
[owner] User that owns this database
12+
[order-by] Criteria to use when ordering database listing (name_asc | name_desc | size_asc | size_desc)
13+
instance-id UUID of the Database Instance to list the databases of
14+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
15+
16+
FLAGS:
17+
-h, --help help for list
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Databases can be used to store and manage sets of structured information, or data. The interaction between the user and a database is done using a Database Engine, which provides a structured query language to add, modify or delete information from the database.
4+
5+
USAGE:
6+
scw document-db database <command>
7+
8+
AVAILABLE COMMANDS:
9+
create Create a database in a Database Instance
10+
delete Delete a database in a Database Instance
11+
list List databases in a Database Instance
12+
13+
FLAGS:
14+
-h, --help help for database
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
21+
22+
Use "scw document-db database [command] --help" for more information about a command.
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.
4+
5+
USAGE:
6+
scw document-db 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
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 document-db 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
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 document-db 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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Migrate an existing Database Instance endpoint to another Database Instance.
4+
5+
USAGE:
6+
scw document-db 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
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 document-db 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 Database Instance endpoint
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 document-db endpoint [command] --help" for more information about a command.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List the FerretDB database engines available at Scaleway.
4+
5+
USAGE:
6+
scw document-db engine list [arg=value ...]
7+
8+
ARGS:
9+
[name] Name of the database engine
10+
[version] Version of the database engine
11+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
12+
13+
FLAGS:
14+
-h, --help help for list
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
A database engine is the software component that stores and retrieves your data from a database. Currently FerretDB 1.X is available.
4+
5+
USAGE:
6+
scw document-db engine <command>
7+
8+
AVAILABLE COMMANDS:
9+
list List available database engines
10+
11+
FLAGS:
12+
-h, --help help for engine
13+
14+
GLOBAL FLAGS:
15+
-c, --config string The path to the config file
16+
-D, --debug Enable debug mode
17+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
18+
-p, --profile string The config profile to use
19+
20+
Use "scw document-db engine [command] --help" for more information about a command.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Clone a given Database Instance, specified by the `region` and `instance_id` parameters. The clone feature allows you to create a new Database Instance from an existing one. The clone includes all existing databases, users and permissions. You can create a clone on a Database Instance bigger than your current one.
4+
5+
USAGE:
6+
scw document-db instance clone <instance-id ...> [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance you want to clone
10+
[name] Name of the Database Instance clone
11+
[node-type] Node type of the clone
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 clone
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)