Skip to content

Commit

Permalink
feat(mnq): enable v1beta1 per default and rename alpha (#3440)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax authored Oct 18, 2023
1 parent 00bcf7c commit 98e5b11
Show file tree
Hide file tree
Showing 36 changed files with 851 additions and 197 deletions.
24 changes: 0 additions & 24 deletions cmd/scw/testdata/test-all-usage-mnq-credential-usage.golden

This file was deleted.

21 changes: 0 additions & 21 deletions cmd/scw/testdata/test-all-usage-mnq-namespace-list-usage.golden

This file was deleted.

24 changes: 0 additions & 24 deletions cmd/scw/testdata/test-all-usage-mnq-namespace-usage.golden

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a Messaging and Queuing namespace, set to the desired protocol.
Create a NATS account associated with a Project.

USAGE:
scw mnq namespace create [arg=value ...]
scw mnq nats create-account [arg=value ...]

ARGS:
[name=<generated>] Namespace name
protocol Namespace protocol. You must specify a valid protocol (and not `unknown`) to avoid an error. (unknown | nats | sqs_sns)
[name=<generated>] NATS account name
[project-id] Project ID to use. If none is passed the default project ID will be used
[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
-h, --help help for create-account

GLOBAL FLAGS:
-c, --config string The path to the config file
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a set of credentials for a NATS account, specified by its NATS account ID.

USAGE:
scw mnq nats create-credentials [arg=value ...]

ARGS:
nats-account-id NATS account containing the credentials
[name=<generated>] Name of the credentials
[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-credentials

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a NATS account, specified by its NATS account ID. Note that deleting a NATS account is irreversible, and any credentials, streams, consumer and stored messages belonging to this NATS account will also be deleted.

USAGE:
scw mnq nats delete-account <nats-account-id ...> [arg=value ...]

ARGS:
nats-account-id ID of the NATS account to delete
[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-account

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a set of credentials, specified by their credentials ID. Deleting credentials is irreversible and cannot be undone. The credentials can no longer be used to access the NATS account, and active connections using this credentials will be closed.

USAGE:
scw mnq nats delete-credentials <nats-credentials-id ...> [arg=value ...]

ARGS:
nats-credentials-id ID of the credentials to delete
[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-credentials

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
@@ -1,16 +1,16 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Retrieve information about an existing Messaging and Queuing namespace, identified by its namespace ID. Its full details, including name, endpoint and protocol, are returned in the response.
Retrieve information about an existing NATS account identified by its NATS account ID. Its full details, including name and endpoint, are returned in the response.

USAGE:
scw mnq namespace get <namespace-id ...> [arg=value ...]
scw mnq nats get-account <nats-account-id ...> [arg=value ...]

ARGS:
namespace-id ID of the Namespace to get
nats-account-id ID of the NATS account to get
[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
-h, --help help for get-account

GLOBAL FLAGS:
-c, --config string The path to the config file
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Retrieve an existing set of credentials, identified by the `nats_credentials_id`. The credentials themselves are NOT returned, only their metadata (NATS account ID, credentials name, etc), are returned in the response.

USAGE:
scw mnq nats get-credentials <nats-credentials-id ...> [arg=value ...]

ARGS:
nats-credentials-id ID of the credentials to get
[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-credentials

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 all NATS accounts in the specified region, for a Scaleway Organization or Project. By default, the NATS accounts returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.

USAGE:
scw mnq nats list-accounts [arg=value ...]

ARGS:
[project-id] Include only NATS accounts in this Project
[order-by] Order in which to return results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc)
[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-accounts

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 existing credentials in the specified NATS account. The response contains only the metadata for the credentials, not the credentials themselves, which are only returned after a **Create Credentials** call.

USAGE:
scw mnq nats list-credentials [arg=value ...]

ARGS:
nats-account-id Include only credentials for this NATS account
[order-by] Order in which to return results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc)
[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-credentials

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
@@ -1,17 +1,17 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update the name of a Messaging and Queuing namespace, specified by its namespace ID.
Update the name of a NATS account, specified by its NATS account ID.

USAGE:
scw mnq namespace update <namespace-id ...> [arg=value ...]
scw mnq nats update-account <nats-account-id ...> [arg=value ...]

ARGS:
namespace-id ID of the Namespace to update
[name] Namespace name
nats-account-id ID of the NATS account to update
[name] NATS account name
[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
-h, --help help for update-account

GLOBAL FLAGS:
-c, --config string The path to the config file
Expand Down
28 changes: 28 additions & 0 deletions cmd/scw/testdata/test-all-usage-mnq-nats-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
MnQ NATS commands.

USAGE:
scw mnq nats <command>

AVAILABLE COMMANDS:
create-account Create a NATS account
create-credentials Create NATS credentials
delete-account Delete a NATS account
delete-credentials Delete NATS credentials
get-account Get a NATS account
get-credentials Get NATS credentials
list-accounts List NATS accounts
list-credentials List NATS credentials
update-account Update the name of a NATS account

FLAGS:
-h, --help help for nats

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 mnq nats [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a set of credentials, specified by their credential ID. Deleting credentials is irreversible and cannot be undone. The credentials can no longer be used to access the namespace.
Activate SNS for the specified Project ID. SNS must be activated before any usage. Activating SNS does not trigger any billing, and you can deactivate at any time.

USAGE:
scw mnq credential delete <credential-id ...> [arg=value ...]
scw mnq sns activate [arg=value ...]

ARGS:
credential-id ID of the credentials to delete
[project-id] Project ID to use. If none is passed the default project ID will be used
[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
-h, --help help for activate

GLOBAL FLAGS:
-c, --config string The path to the config file
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a set of credentials for SNS, specified by a Project ID. Credentials give the bearer access to topics, and the level of permissions can be defined granularly.

USAGE:
scw mnq sns create-credentials [arg=value ...]

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[name=<generated>] Name of the credentials
[permissions.can-publish] Defines whether the credentials bearer can publish messages to the service (publish to SNS topics)
[permissions.can-receive] Defines whether the credentials bearer can receive messages from the service (configure subscriptions)
[permissions.can-manage] Defines whether the credentials bearer can manage the associated SNS topics or subscriptions
[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-credentials

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
@@ -1,16 +1,16 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Retrieve an existing set of credentials, identified by the `credential_id`. The credentials themselves, as well as their metadata (protocol, namespace ID etc), are returned in the response.
Deactivate SNS for the specified Project ID.You must delete all topics and credentials before this call or you need to set the force_delete parameter.

USAGE:
scw mnq credential get <credential-id ...> [arg=value ...]
scw mnq sns deactivate [arg=value ...]

ARGS:
credential-id ID of the credentials to get
[project-id] Project ID to use. If none is passed the default project ID will be used
[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
-h, --help help for deactivate

GLOBAL FLAGS:
-c, --config string The path to the config file
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a set of SNS credentials, specified by their credentials ID. Deleting credentials is irreversible and cannot be undone. The credentials can then no longer be used to access SNS.

USAGE:
scw mnq sns delete-credentials <sns-credentials-id ...> [arg=value ...]

ARGS:
sns-credentials-id ID of the credentials to delete
[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-credentials

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Retrieve an existing set of credentials, identified by the `credentials_id`. The credentials themselves, as well as their metadata (name, project ID etc), are returned in the response.

USAGE:
scw mnq sns get-credentials <sns-credentials-id ...> [arg=value ...]

ARGS:
sns-credentials-id ID of the SNS credentials to get
[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-credentials

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
Loading

0 comments on commit 98e5b11

Please sign in to comment.