Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ To enable beta features, you can set `SCW_ENABLE_BETA=1` in your environment.
# Reference documentation

| Namespace | Description | Documentation |
| -------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|----------------|-----------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| `account` | Account API | [CLI](./docs/commands/account.md) |
| `applesilicon` | Apple silicon API | [CLI](./docs/commands/apple-silicon.md) / [API](https://developers.scaleway.com/en/products/apple-silicon/api/) |
| `autocomplete` | Autocomplete related commands | [CLI](./docs/commands/autocomplete.md) |
Expand All @@ -138,6 +138,7 @@ To enable beta features, you can set `SCW_ENABLE_BETA=1` in your environment.
| `rdb` | Database RDB API | [CLI](./docs/commands/rdb.md) / [API](https://developers.scaleway.com/en/products/rdb/api/) |
| `redis` | Redis API | [CLI](./docs/commands/redis.md) / [API](https://developers.scaleway.com/en/products/redis/api/v1/) |
| `registry` | Container registry API | [CLI](./docs/commands/registry.md) / [API](https://developers.scaleway.com/en/products/registry/api/) |
| `secret` | Secret manager API | [CLI](./docs/commands/secret.md) |
| `shell` | Start Shell mode | [CLI](./docs/commands/shell.md) |
| `tem` | Transactional Email API | [CLI](./docs/commands/tem.md) / [API](https://developers.scaleway.com/en/products/transactional_email/api/) |
| `vpc-gw` | VPC Gateway API | [CLI](./docs/commands/vpc-gw.md) / [API](https://developers.scaleway.com/en/products/vpc-gw/api/v1/) |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a Secret containing no versions.

USAGE:
scw secret secret create [arg=value ...]

EXAMPLES:
Add a given secret
scw secret secret create name=foobar description="$(cat <path/to/your/secret>)"

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[name] Name of the Secret
[tags.{index}] List of tags associated to this Secret
[description] Description of the Secret
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for create

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a secret.

USAGE:
scw secret secret delete [arg=value ...]

EXAMPLES:
Delete a given secret
scw secret secret delete secret-id=11111111-1111-1111-1111-111111111111

ARGS:
secret-id ID of the Secret
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for delete

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
19 changes: 19 additions & 0 deletions cmd/scw/testdata/test-all-usage-secret-secret-get-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get metadata of a Secret.

USAGE:
scw secret secret get [arg=value ...]

ARGS:
secret-id ID of the Secret
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for get

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
22 changes: 22 additions & 0 deletions cmd/scw/testdata/test-all-usage-secret-secret-list-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List Secrets.

USAGE:
scw secret secret list [arg=value ...]

ARGS:
[project-id] ID of a project to filter on (optional)
[tags.{index}] List of tags to filter on (optional)
[order-by] (name_asc | name_desc | created_at_asc | created_at_desc | updated_at_asc | updated_at_desc)
[organization-id] ID of an organization to filter on (optional)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all)

FLAGS:
-h, --help help for list

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update metadata of a Secret.

USAGE:
scw secret secret update [arg=value ...]

ARGS:
secret-id ID of the Secret
[name] New name of the Secret (optional)
[tags.{index}] New list of tags associated to this Secret (optional)
[description] Description of the Secret
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for update

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
24 changes: 24 additions & 0 deletions cmd/scw/testdata/test-all-usage-secret-secret-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Logical container made up of zero or more immutable versions, that hold the sensitive data.

USAGE:
scw secret secret <command>

AVAILABLE COMMANDS:
create Create a Secret containing no versions
delete Delete a secret
get Get metadata of a Secret
list List Secrets
update Update metadata of a Secret

FLAGS:
-h, --help help for secret

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw secret secret [command] --help" for more information about a command.
21 changes: 21 additions & 0 deletions cmd/scw/testdata/test-all-usage-secret-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
This API allows you to conveniently store, access and share sensitive data

USAGE:
scw secret <command>

AVAILABLE COMMANDS:
secret Secret management commands
version Secret Version management commands

FLAGS:
-h, --help help for secret

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw secret [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Access a SecretVersion, returning the sensitive data.

USAGE:
scw secret version access [arg=value ...]

ARGS:
secret-id ID of the Secret
revision Revision of the SecretVersion (may be a number or "latest")
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for access

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a SecretVersion.

USAGE:
scw secret version create [arg=value ...]

ARGS:
secret-id ID of the Secret
[data] The base64-encoded secret payload of the SecretVersion
[description] Description of the SecretVersion
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for create

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Destroy a SecretVersion, permanently destroying the sensitive data.

USAGE:
scw secret version delete [arg=value ...]

EXAMPLES:
Delete a given Secret Version
scw secret version delete secret-id=11111111-1111-1111-1111-111111111111 revision=1

ARGS:
secret-id ID of the Secret
revision Revision of the SecretVersion (may be a number or "latest")
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for delete

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Disable a SecretVersion.

USAGE:
scw secret version disable [arg=value ...]

ARGS:
secret-id ID of the Secret
revision Revision of the SecretVersion (may be a number or "latest")
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for disable

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Enable a SecretVersion.

USAGE:
scw secret version enable [arg=value ...]

ARGS:
secret-id ID of the Secret
revision Revision of the SecretVersion (may be a number or "latest")
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for enable

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
20 changes: 20 additions & 0 deletions cmd/scw/testdata/test-all-usage-secret-version-get-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get metadata of a SecretVersion.

USAGE:
scw secret version get [arg=value ...]

ARGS:
secret-id ID of the Secret
revision Revision of the SecretVersion (may be a number or "latest")
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for get

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List versions of a secret, not returning any sensitive data.

USAGE:
scw secret version list [arg=value ...]

ARGS:
secret-id ID of the Secret
[status.{index}] Filter results by status (unknown | enabled | disabled | destroyed)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all)

FLAGS:
-h, --help help for list

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update metadata of a SecretVersion.

USAGE:
scw secret version update [arg=value ...]

ARGS:
secret-id ID of the Secret
revision Revision of the SecretVersion (may be a number or "latest")
[description] Description of the SecretVersion
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
-h, --help help for update

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
27 changes: 27 additions & 0 deletions cmd/scw/testdata/test-all-usage-secret-version-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Immutable version of a secret.

USAGE:
scw secret version <command>

AVAILABLE COMMANDS:
access Access a SecretVersion, returning the sensitive data
create Create a SecretVersion
delete Destroy a SecretVersion, permanently destroying the sensitive data
disable Disable a SecretVersion
enable Enable a SecretVersion
get Get metadata of a SecretVersion
list List versions of a secret, not returning any sensitive data
update Update metadata of a SecretVersion

FLAGS:
-h, --help help for version

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw secret version [command] --help" for more information about a command.
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-main-usage-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ AVAILABLE COMMANDS:
rdb Database RDB API
redis Managed Database for Redis™ API
registry Container registry API
secret This API allows you to conveniently store, access and share sensitive data
shell Start shell mode
tem Tem
version Display cli version
Expand Down
Loading