Skip to content

Commit 13d32a8

Browse files
authored
Merge branch 'master' into v1.6538.0
2 parents c2a8b65 + 359b1d1 commit 13d32a8

11 files changed

+289
-3
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Organization-wide management commands.
4+
5+
USAGE:
6+
scw iam organization
7+
8+
FLAGS:
9+
-h, --help help for organization
10+
11+
GLOBAL FLAGS:
12+
-c, --config string The path to the config file
13+
-D, --debug Enable debug mode
14+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
15+
-p, --profile string The config profile to use

cmd/scw/testdata/test-all-usage-iam-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ AVAILABLE COMMANDS:
1111
group Groups management commands
1212
jwt JWTs management commands
1313
log Log management commands
14+
organization Organization-wide management commands
1415
permission-set Permission sets management commands
1516
policy Policies management commands
1617
rule Rules management commands
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+
Create a new endpoint for a MongoDB® Database Instance. You can add `public_network` or `private_network` specifications to the body of the request.
4+
5+
USAGE:
6+
scw mongodb endpoint create <instance-id ...> [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance
10+
[endpoint.private-network.private-network-id] UUID of the Private Network
11+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
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
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 `endpoint_id` parameter of the endpoint you want to delete. Note that you might need to update any environment configurations that point to the deleted endpoint.
4+
5+
USAGE:
6+
scw mongodb endpoint delete <endpoint-id ...> [arg=value ...]
7+
8+
ARGS:
9+
endpoint-id UUID of the Endpoint to delete
10+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
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

cmd/scw/testdata/test-all-usage-mongodb-endpoint-usage.golden

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
Instance endpoints enable connection to your instance.
44

55
USAGE:
6-
scw mongodb endpoint
6+
scw mongodb endpoint <command>
7+
8+
AVAILABLE COMMANDS:
9+
create Create a new Instance endpoint
10+
delete Delete a Database Instance endpoint
711

812
FLAGS:
913
-h, --help help for endpoint
@@ -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 mongodb endpoint [command] --help" for more information about a command.
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 an user on a Database Instance. You must define the `name`, `password` of the user and `instance_id` parameters in the request.
4+
5+
USAGE:
6+
scw mongodb user create [arg=value ...]
7+
8+
ARGS:
9+
instance-id UUID of the Database Instance the user belongs to
10+
[name] Name of the database user
11+
[password] Password of the database user
12+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)
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

cmd/scw/testdata/test-all-usage-mongodb-user-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ USAGE:
66
scw mongodb user <command>
77

88
AVAILABLE COMMANDS:
9+
create Create an user on a Database Instance
910
delete Delete a user on a Database Instance
1011
list List users of a Database Instance
1112
set-role Apply user roles

docs/commands/iam.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ This API allows you to manage Identity and Access Management (IAM) across your S
3131
- [Log management commands](#log-management-commands)
3232
- [Get a log](#get-a-log)
3333
- [List logs](#list-logs)
34+
- [Organization-wide management commands](#organization-wide-management-commands)
3435
- [Permission sets management commands](#permission-sets-management-commands)
3536
- [List permission sets](#list-permission-sets)
3637
- [Policies management commands](#policies-management-commands)
@@ -629,6 +630,20 @@ scw iam log list [arg=value ...]
629630

630631

631632

633+
## Organization-wide management commands
634+
635+
Organization-wide management commands.
636+
637+
Organization-wide management commands.
638+
639+
**Usage:**
640+
641+
```
642+
scw iam organization
643+
```
644+
645+
646+
632647
## Permission sets management commands
633648

634649
Permission sets management commands.

docs/commands/mongodb.md

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
This API allows you to manage your Managed Databases for MongoDB®.
44

55
- [Endpoint management commands](#endpoint-management-commands)
6+
- [Create a new Instance endpoint](#create-a-new-instance-endpoint)
7+
- [Delete a Database Instance endpoint](#delete-a-database-instance-endpoint)
68
- [Instance management commands](#instance-management-commands)
79
- [Create a MongoDB® Database Instance](#create-a-mongodb®-database-instance)
810
- [Delete a MongoDB® Database Instance](#delete-a-mongodb®-database-instance)
@@ -21,6 +23,7 @@ This API allows you to manage your Managed Databases for MongoDB®.
2123
- [Restore a Database Instance snapshot](#restore-a-database-instance-snapshot)
2224
- [Update a Database Instance snapshot](#update-a-database-instance-snapshot)
2325
- [User management commands](#user-management-commands)
26+
- [Create an user on a Database Instance](#create-an-user-on-a-database-instance)
2427
- [Delete a user on a Database Instance](#delete-a-user-on-a-database-instance)
2528
- [List users of a Database Instance](#list-users-of-a-database-instance)
2629
- [Apply user roles](#apply-user-roles)
@@ -33,15 +36,47 @@ This API allows you to manage your Managed Databases for MongoDB®.
3336

3437
Instance endpoints enable connection to your instance.
3538

36-
Instance endpoints enable connection to your instance.
39+
40+
### Create a new Instance endpoint
41+
42+
Create a new endpoint for a MongoDB® Database Instance. You can add `public_network` or `private_network` specifications to the body of the request.
3743

3844
**Usage:**
3945

4046
```
41-
scw mongodb endpoint
47+
scw mongodb endpoint create <instance-id ...> [arg=value ...]
4248
```
4349

4450

51+
**Args:**
52+
53+
| Name | | Description |
54+
|------|---|-------------|
55+
| instance-id | Required | UUID of the Database Instance |
56+
| endpoint.private-network.private-network-id | | UUID of the Private Network |
57+
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |
58+
59+
60+
61+
### Delete a Database Instance endpoint
62+
63+
Delete the endpoint of a Database Instance. You must specify the `endpoint_id` parameter of the endpoint you want to delete. Note that you might need to update any environment configurations that point to the deleted endpoint.
64+
65+
**Usage:**
66+
67+
```
68+
scw mongodb endpoint delete <endpoint-id ...> [arg=value ...]
69+
```
70+
71+
72+
**Args:**
73+
74+
| Name | | Description |
75+
|------|---|-------------|
76+
| endpoint-id | Required | UUID of the Endpoint to delete |
77+
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |
78+
79+
4580

4681
## Instance management commands
4782

@@ -375,6 +410,28 @@ scw mongodb snapshot update <snapshot-id ...> [arg=value ...]
375410
Users are profiles to which you can attribute database-level permissions. They allow you to define permissions specific to each type of database usage.
376411

377412

413+
### Create an user on a Database Instance
414+
415+
Create an user on a Database Instance. You must define the `name`, `password` of the user and `instance_id` parameters in the request.
416+
417+
**Usage:**
418+
419+
```
420+
scw mongodb user create [arg=value ...]
421+
```
422+
423+
424+
**Args:**
425+
426+
| Name | | Description |
427+
|------|---|-------------|
428+
| instance-id | Required | UUID of the Database Instance the user belongs to |
429+
| name | | Name of the database user |
430+
| password | | Password of the database user |
431+
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |
432+
433+
434+
378435
### Delete a user on a Database Instance
379436

380437
Delete an existing user on a Database Instance.

internal/namespaces/iam/v1alpha1/iam_cli.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func GetGeneratedCommands() *core.Commands {
3030
iamPermissionSet(),
3131
iamJwt(),
3232
iamLog(),
33+
iamOrganization(),
3334
iamSSHKeyList(),
3435
iamSSHKeyCreate(),
3536
iamSSHKeyGet(),
@@ -176,6 +177,15 @@ func iamLog() *core.Command {
176177
}
177178
}
178179

180+
func iamOrganization() *core.Command {
181+
return &core.Command{
182+
Short: `Organization-wide management commands`,
183+
Long: `Organization-wide management commands.`,
184+
Namespace: "iam",
185+
Resource: "organization",
186+
}
187+
}
188+
179189
func iamSSHKeyList() *core.Command {
180190
return &core.Command{
181191
Short: `List SSH keys`,

0 commit comments

Comments
 (0)