From e5fb7ea9d3023ce4263bff33a64b519f7697cfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Tue, 18 Apr 2023 17:58:46 +0200 Subject: [PATCH] fix --- ...-usage-container-token-delete-usage.golden | 4 +- ...all-usage-container-token-get-usage.golden | 4 +- ...ll-usage-container-token-list-usage.golden | 8 +-- ...l-usage-mnq-credential-create-usage.golden | 12 ++-- ...l-usage-mnq-credential-delete-usage.golden | 4 +- ...-all-usage-mnq-credential-get-usage.golden | 4 +- ...all-usage-mnq-credential-list-usage.golden | 6 +- ...l-usage-mnq-credential-update-usage.golden | 12 ++-- ...test-all-usage-mnq-credential-usage.golden | 6 +- ...ll-usage-mnq-namespace-create-usage.golden | 4 +- ...ll-usage-mnq-namespace-delete-usage.golden | 4 +- ...t-all-usage-mnq-namespace-get-usage.golden | 2 +- ...-all-usage-mnq-namespace-list-usage.golden | 8 +-- ...ll-usage-mnq-namespace-update-usage.golden | 2 +- cmd/scw/testdata/test-main-usage-usage.golden | 2 +- docs/commands/mnq.md | 70 +++++++++---------- internal/namespaces/mnq/v1alpha1/mnq_cli.go | 66 ++++++++--------- 17 files changed, 109 insertions(+), 109 deletions(-) diff --git a/cmd/scw/testdata/test-all-usage-container-token-delete-usage.golden b/cmd/scw/testdata/test-all-usage-container-token-delete-usage.golden index 9fd68bcaae..b7fb4acc80 100644 --- a/cmd/scw/testdata/test-all-usage-container-token-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-token-delete-usage.golden @@ -1,12 +1,12 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Delete a token. +Delete a token with a specified ID. USAGE: scw container token delete [arg=value ...] ARGS: - token-id + token-id UUID of the token to delete [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-container-token-get-usage.golden b/cmd/scw/testdata/test-all-usage-container-token-get-usage.golden index 64820e1396..35ea5ab9f6 100644 --- a/cmd/scw/testdata/test-all-usage-container-token-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-token-get-usage.golden @@ -1,12 +1,12 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Get a token. +Get a token with a specified ID. USAGE: scw container token get [arg=value ...] ARGS: - token-id + token-id UUID of the token to get [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-container-token-list-usage.golden b/cmd/scw/testdata/test-all-usage-container-token-list-usage.golden index a2d175bf3b..7e4b809e33 100644 --- a/cmd/scw/testdata/test-all-usage-container-token-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-token-list-usage.golden @@ -1,14 +1,14 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -List all tokens. +List all tokens belonging to a specified Organization or Project. USAGE: scw container token list [arg=value ...] ARGS: - [order-by] (created_at_asc | created_at_desc) - [container-id] - [namespace-id] + [order-by] Order of the tokens (created_at_asc | created_at_desc) + [container-id] UUID of the container the token belongs to + [namespace-id] UUID of the namespace the token belongs to [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-mnq-credential-create-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-credential-create-usage.golden index 14d1f0b045..e2456d7790 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-credential-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-credential-create-usage.golden @@ -1,16 +1,16 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Create a set of credentials for a specific namespace. +Create a set of credentials for a Messaging and Queuing namespace, specified by its namespace ID. If creating credentials for a NATS namespace, the `permissions` object must not be included in the request. If creating credentials for an SQS/SNS namespace, the `permissions` object is required, with all three of its child attributes. USAGE: scw mnq credential create [arg=value ...] ARGS: - namespace-id Namespace containing the Credential - [name=] Credential name - [permissions.can-publish] Defines if user can publish messages to the service - [permissions.can-receive] Defines if user can receive messages from the service - [permissions.can-manage] Defines if user can manage the associated resource(s) + namespace-id Namespace containing the credentials + [name=] Name of the credentials + [permissions.can-publish] Defines whether the credentials bearer can publish messages to the service (send messages to SQS queues or publish to SNS topics) + [permissions.can-receive] Defines whether the credentials bearer can receive messages from the service + [permissions.can-manage] Defines whether the credentials bearer can manage the associated resources (SQS queues or SNS topics or subscriptions) [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-mnq-credential-delete-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-credential-delete-usage.golden index 7cc6da7f05..61490a1601 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-credential-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-credential-delete-usage.golden @@ -1,12 +1,12 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Delete credentials. +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. USAGE: scw mnq credential delete [arg=value ...] ARGS: - credential-id ID of the Credential to delete + credential-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: diff --git a/cmd/scw/testdata/test-all-usage-mnq-credential-get-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-credential-get-usage.golden index 09530ea784..4da82d6396 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-credential-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-credential-get-usage.golden @@ -1,12 +1,12 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Get a set of credentials. +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. USAGE: scw mnq credential get [arg=value ...] ARGS: - credential-id ID of the Credential to get + credential-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: diff --git a/cmd/scw/testdata/test-all-usage-mnq-credential-list-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-credential-list-usage.golden index dafed95092..e60fa1f4da 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-credential-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-credential-list-usage.golden @@ -1,13 +1,13 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -List credentials. +List existing credentials in the specified region. The response contains only the metadata for the credentials, not the credentials themselves (for this, use **Get Credentials**). USAGE: scw mnq credential list [arg=value ...] ARGS: - [namespace-id] Namespace containing the Credential - [order-by] Field used for sorting results (id_asc | id_desc | name_asc | name_desc) + [namespace-id] Namespace containing the credentials + [order-by] Order in which to return results (id_asc | id_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: diff --git a/cmd/scw/testdata/test-all-usage-mnq-credential-update-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-credential-update-usage.golden index 172b9eeb21..5686aaab46 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-credential-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-credential-update-usage.golden @@ -1,16 +1,16 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Update a set of credentials. +Update a set of credentials. You can update the credentials' name, or (in the case of SQS/SNS credentials only) their permissions. To update the name of NATS credentials, do not include the `permissions` object in your request. USAGE: scw mnq credential update [arg=value ...] ARGS: - credential-id ID of the Credential to update - [name] Credential name - [permissions.can-publish] Defines if user can publish messages to the service - [permissions.can-receive] Defines if user can receive messages from the service - [permissions.can-manage] Defines if user can manage the associated resource(s) + credential-id ID of the credentials to update + [name] Name of the credentials + [permissions.can-publish] Defines whether the credentials bearer can publish messages to the service (send messages to SQS queues or publish to SNS topics) + [permissions.can-receive] Defines whether the credentials bearer can receive messages from the service + [permissions.can-manage] Defines whether the credentials bearer can manage the associated resources (SQS queues or SNS topics or subscriptions) [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-mnq-credential-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-credential-usage.golden index b110547340..2f7ad9318f 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-credential-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-credential-usage.golden @@ -6,11 +6,11 @@ USAGE: scw mnq credential AVAILABLE COMMANDS: - create Create a set of credentials + create Create credentials delete Delete credentials - get Get a set of credentials + get Get credentials list List credentials - update Update a set of credentials + update Update credentials FLAGS: -h, --help help for credential diff --git a/cmd/scw/testdata/test-all-usage-mnq-namespace-create-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-namespace-create-usage.golden index d0cd9fda1e..143f00b573 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-namespace-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-namespace-create-usage.golden @@ -1,13 +1,13 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Create a namespace. +Create a Messaging and Queuing namespace, set to the desired protocol. USAGE: scw mnq namespace create [arg=value ...] ARGS: [name=] Namespace name - protocol Namespace protocol (unknown | nats | sqs_sns) + protocol Namespace protocol. You must specify a valid protocol (and not `unknown`) to avoid an error. (unknown | nats | sqs_sns) [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) diff --git a/cmd/scw/testdata/test-all-usage-mnq-namespace-delete-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-namespace-delete-usage.golden index dc6fb0d94f..42b694aa4d 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-namespace-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-namespace-delete-usage.golden @@ -1,12 +1,12 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Delete a namespace. +Delete a Messaging and Queuing namespace, specified by its namespace ID. Note that deleting a namespace is irreversible, and any URLs, credentials and queued messages belonging to this namespace will also be deleted. USAGE: scw mnq namespace delete [arg=value ...] ARGS: - namespace-id ID of the Namespace to delete + namespace-id ID of the namespace to delete [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-mnq-namespace-get-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-namespace-get-usage.golden index d74ec8e2b1..ac32fb6677 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-namespace-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-namespace-get-usage.golden @@ -1,6 +1,6 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Get a namespace. +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. USAGE: scw mnq namespace get [arg=value ...] diff --git a/cmd/scw/testdata/test-all-usage-mnq-namespace-list-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-namespace-list-usage.golden index 3772068628..c7d7991951 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-namespace-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-namespace-list-usage.golden @@ -1,14 +1,14 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -List namespaces. +List all Messaging and Queuing namespaces in the specified region, for a Scaleway Organization or Project. By default, the namespaces 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 namespace list [arg=value ...] ARGS: - [project-id] Will list only the Namespaces contained into the specified project - [order-by] Field used for sorting results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | id_asc | id_desc | name_asc | name_desc | project_id_asc | project_id_desc) - [organization-id] Will list only the Namespaces owned by the specified organization + [project-id] Include only namespaces in this Project + [order-by] Order in which to return results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | id_asc | id_desc | name_asc | name_desc | project_id_asc | project_id_desc) + [organization-id] Include only namespaces in this Organization [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all) FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-mnq-namespace-update-usage.golden b/cmd/scw/testdata/test-all-usage-mnq-namespace-update-usage.golden index fc4726c1c5..3f8c413311 100644 --- a/cmd/scw/testdata/test-all-usage-mnq-namespace-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-mnq-namespace-update-usage.golden @@ -1,6 +1,6 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Update the name of a namespace. +Update the name of a Messaging and Queuing namespace, specified by its namespace ID. USAGE: scw mnq namespace update [arg=value ...] diff --git a/cmd/scw/testdata/test-main-usage-usage.golden b/cmd/scw/testdata/test-main-usage-usage.golden index 908dfb21e1..bbb69af752 100644 --- a/cmd/scw/testdata/test-main-usage-usage.golden +++ b/cmd/scw/testdata/test-main-usage-usage.golden @@ -20,7 +20,7 @@ AVAILABLE COMMANDS: k8s Kapsule API lb This API allows you to manage your Scaleway Load Balancer services marketplace Marketplace API - mnq This API allows you to manage Messaging or Queueing brokers + mnq This API allows you to manage Scaleway Messaging and Queueing brokers object Object-storage utils rdb Managed Database for PostgreSQL and MySQL API redis Managed Database for Redisβ„’ API diff --git a/docs/commands/mnq.md b/docs/commands/mnq.md index 1467ec89dc..0a3fff4d6e 100644 --- a/docs/commands/mnq.md +++ b/docs/commands/mnq.md @@ -3,11 +3,11 @@ MnQ API (beta). - [MnQ Credentials commands](#mnq-credentials-commands) - - [Create a set of credentials](#create-a-set-of-credentials) + - [Create credentials](#create-credentials) - [Delete credentials](#delete-credentials) - - [Get a set of credentials](#get-a-set-of-credentials) + - [Get credentials](#get-credentials) - [List credentials](#list-credentials) - - [Update a set of credentials](#update-a-set-of-credentials) + - [Update credentials](#update-credentials) - [MnQ Namespace commands](#mnq-namespace-commands) - [Create a namespace](#create-a-namespace) - [Delete a namespace](#delete-a-namespace) @@ -21,9 +21,9 @@ MnQ API (beta). MnQ Credentials commands. -### Create a set of credentials +### Create credentials -Create a set of credentials for a specific namespace. +Create a set of credentials for a Messaging and Queuing namespace, specified by its namespace ID. If creating credentials for a NATS namespace, the `permissions` object must not be included in the request. If creating credentials for an SQS/SNS namespace, the `permissions` object is required, with all three of its child attributes. **Usage:** @@ -36,18 +36,18 @@ scw mnq credential create [arg=value ...] | Name | | Description | |------|---|-------------| -| namespace-id | Required | Namespace containing the Credential | -| name | Default: `` | Credential name | -| permissions.can-publish | | Defines if user can publish messages to the service | -| permissions.can-receive | | Defines if user can receive messages from the service | -| permissions.can-manage | | Defines if user can manage the associated resource(s) | +| namespace-id | Required | Namespace containing the credentials | +| name | Default: `` | Name of the credentials | +| permissions.can-publish | | Defines whether the credentials bearer can publish messages to the service (send messages to SQS queues or publish to SNS topics) | +| permissions.can-receive | | Defines whether the credentials bearer can receive messages from the service | +| permissions.can-manage | | Defines whether the credentials bearer can manage the associated resources (SQS queues or SNS topics or subscriptions) | | region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | ### Delete credentials -Delete credentials. +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. **Usage:** @@ -60,14 +60,14 @@ scw mnq credential delete [arg=value ...] | Name | | Description | |------|---|-------------| -| credential-id | Required | ID of the Credential to delete | +| credential-id | Required | ID of the credentials to delete | | region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | -### Get a set of credentials +### Get credentials -Get a set of credentials. +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. **Usage:** @@ -80,14 +80,14 @@ scw mnq credential get [arg=value ...] | Name | | Description | |------|---|-------------| -| credential-id | Required | ID of the Credential to get | +| credential-id | Required | ID of the credentials to get | | region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | ### List credentials -List credentials. +List existing credentials in the specified region. The response contains only the metadata for the credentials, not the credentials themselves (for this, use **Get Credentials**). **Usage:** @@ -100,15 +100,15 @@ scw mnq credential list [arg=value ...] | Name | | Description | |------|---|-------------| -| namespace-id | | Namespace containing the Credential | -| order-by | One of: `id_asc`, `id_desc`, `name_asc`, `name_desc` | Field used for sorting results | +| namespace-id | | Namespace containing the credentials | +| order-by | One of: `id_asc`, `id_desc`, `name_asc`, `name_desc` | Order in which to return results | | region | Default: `fr-par`
One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config | -### Update a set of credentials +### Update credentials -Update a set of credentials. +Update a set of credentials. You can update the credentials' name, or (in the case of SQS/SNS credentials only) their permissions. To update the name of NATS credentials, do not include the `permissions` object in your request. **Usage:** @@ -121,11 +121,11 @@ scw mnq credential update [arg=value ...] | Name | | Description | |------|---|-------------| -| credential-id | Required | ID of the Credential to update | -| name | | Credential name | -| permissions.can-publish | | Defines if user can publish messages to the service | -| permissions.can-receive | | Defines if user can receive messages from the service | -| permissions.can-manage | | Defines if user can manage the associated resource(s) | +| credential-id | Required | ID of the credentials to update | +| name | | Name of the credentials | +| permissions.can-publish | | Defines whether the credentials bearer can publish messages to the service (send messages to SQS queues or publish to SNS topics) | +| permissions.can-receive | | Defines whether the credentials bearer can receive messages from the service | +| permissions.can-manage | | Defines whether the credentials bearer can manage the associated resources (SQS queues or SNS topics or subscriptions) | | region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | @@ -137,7 +137,7 @@ MnQ Namespace commands. ### Create a namespace -Create a namespace. +Create a Messaging and Queuing namespace, set to the desired protocol. **Usage:** @@ -151,7 +151,7 @@ scw mnq namespace create [arg=value ...] | Name | | Description | |------|---|-------------| | name | Default: `` | Namespace name | -| protocol | Required
One of: `unknown`, `nats`, `sqs_sns` | Namespace protocol | +| protocol | Required
One of: `unknown`, `nats`, `sqs_sns` | Namespace protocol. You must specify a valid protocol (and not `unknown`) to avoid an error. | | project-id | | Project ID to use. If none is passed the default project ID will be used | | region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | @@ -159,7 +159,7 @@ scw mnq namespace create [arg=value ...] ### Delete a namespace -Delete a namespace. +Delete a Messaging and Queuing namespace, specified by its namespace ID. Note that deleting a namespace is irreversible, and any URLs, credentials and queued messages belonging to this namespace will also be deleted. **Usage:** @@ -172,14 +172,14 @@ scw mnq namespace delete [arg=value ...] | Name | | Description | |------|---|-------------| -| namespace-id | Required | ID of the Namespace to delete | +| namespace-id | Required | ID of the namespace to delete | | region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | ### Get a namespace -Get a namespace. +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. **Usage:** @@ -199,7 +199,7 @@ scw mnq namespace get [arg=value ...] ### List namespaces -List namespaces. +List all Messaging and Queuing namespaces in the specified region, for a Scaleway Organization or Project. By default, the namespaces returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field. **Usage:** @@ -212,16 +212,16 @@ scw mnq namespace list [arg=value ...] | Name | | Description | |------|---|-------------| -| project-id | | Will list only the Namespaces contained into the specified project | -| order-by | One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `id_asc`, `id_desc`, `name_asc`, `name_desc`, `project_id_asc`, `project_id_desc` | Field used for sorting results | -| organization-id | | Will list only the Namespaces owned by the specified organization | +| project-id | | Include only namespaces in this Project | +| order-by | One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `id_asc`, `id_desc`, `name_asc`, `name_desc`, `project_id_asc`, `project_id_desc` | Order in which to return results | +| organization-id | | Include only namespaces in this Organization | | region | Default: `fr-par`
One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config | ### Update the name of a namespace -Update the name of a namespace. +Update the name of a Messaging and Queuing namespace, specified by its namespace ID. **Usage:** diff --git a/internal/namespaces/mnq/v1alpha1/mnq_cli.go b/internal/namespaces/mnq/v1alpha1/mnq_cli.go index 461071f119..387ad96521 100644 --- a/internal/namespaces/mnq/v1alpha1/mnq_cli.go +++ b/internal/namespaces/mnq/v1alpha1/mnq_cli.go @@ -36,7 +36,7 @@ func GetGeneratedCommands() *core.Commands { } func mnqRoot() *core.Command { return &core.Command{ - Short: `This API allows you to manage Messaging or Queueing brokers`, + Short: `This API allows you to manage Scaleway Messaging and Queueing brokers`, Long: `MnQ API (beta).`, Namespace: "mnq", } @@ -63,7 +63,7 @@ func mnqCredential() *core.Command { func mnqNamespaceList() *core.Command { return &core.Command{ Short: `List namespaces`, - Long: `List namespaces.`, + Long: `List all Messaging and Queuing namespaces in the specified region, for a Scaleway Organization or Project. By default, the namespaces returned in the list are ordered by creation date in ascending order, though this can be modified via the ` + "`" + `order_by` + "`" + ` field.`, Namespace: "mnq", Resource: "namespace", Verb: "list", @@ -72,14 +72,14 @@ func mnqNamespaceList() *core.Command { ArgSpecs: core.ArgSpecs{ { Name: "project-id", - Short: `Will list only the Namespaces contained into the specified project`, + Short: `Include only namespaces in this Project`, Required: false, Deprecated: false, Positional: false, }, { Name: "order-by", - Short: `Field used for sorting results`, + Short: `Order in which to return results`, Required: false, Deprecated: false, Positional: false, @@ -87,7 +87,7 @@ func mnqNamespaceList() *core.Command { }, { Name: "organization-id", - Short: `Will list only the Namespaces owned by the specified organization`, + Short: `Include only namespaces in this Organization`, Required: false, Deprecated: false, Positional: false, @@ -117,7 +117,7 @@ func mnqNamespaceList() *core.Command { func mnqNamespaceCreate() *core.Command { return &core.Command{ Short: `Create a namespace`, - Long: `Create a namespace.`, + Long: `Create a Messaging and Queuing namespace, set to the desired protocol.`, Namespace: "mnq", Resource: "namespace", Verb: "create", @@ -134,7 +134,7 @@ func mnqNamespaceCreate() *core.Command { }, { Name: "protocol", - Short: `Namespace protocol`, + Short: `Namespace protocol. You must specify a valid protocol (and not ` + "`" + `unknown` + "`" + `) to avoid an error.`, Required: true, Deprecated: false, Positional: false, @@ -157,7 +157,7 @@ func mnqNamespaceCreate() *core.Command { func mnqNamespaceUpdate() *core.Command { return &core.Command{ Short: `Update the name of a namespace`, - Long: `Update the name of a namespace.`, + Long: `Update the name of a Messaging and Queuing namespace, specified by its namespace ID.`, Namespace: "mnq", Resource: "namespace", Verb: "update", @@ -194,7 +194,7 @@ func mnqNamespaceUpdate() *core.Command { func mnqNamespaceGet() *core.Command { return &core.Command{ Short: `Get a namespace`, - Long: `Get a namespace.`, + Long: `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.`, Namespace: "mnq", Resource: "namespace", Verb: "get", @@ -224,7 +224,7 @@ func mnqNamespaceGet() *core.Command { func mnqNamespaceDelete() *core.Command { return &core.Command{ Short: `Delete a namespace`, - Long: `Delete a namespace.`, + Long: `Delete a Messaging and Queuing namespace, specified by its namespace ID. Note that deleting a namespace is irreversible, and any URLs, credentials and queued messages belonging to this namespace will also be deleted.`, Namespace: "mnq", Resource: "namespace", Verb: "delete", @@ -233,7 +233,7 @@ func mnqNamespaceDelete() *core.Command { ArgSpecs: core.ArgSpecs{ { Name: "namespace-id", - Short: `ID of the Namespace to delete`, + Short: `ID of the namespace to delete`, Required: true, Deprecated: false, Positional: true, @@ -259,8 +259,8 @@ func mnqNamespaceDelete() *core.Command { func mnqCredentialCreate() *core.Command { return &core.Command{ - Short: `Create a set of credentials`, - Long: `Create a set of credentials for a specific namespace.`, + Short: `Create credentials`, + Long: `Create a set of credentials for a Messaging and Queuing namespace, specified by its namespace ID. If creating credentials for a NATS namespace, the ` + "`" + `permissions` + "`" + ` object must not be included in the request. If creating credentials for an SQS/SNS namespace, the ` + "`" + `permissions` + "`" + ` object is required, with all three of its child attributes.`, Namespace: "mnq", Resource: "credential", Verb: "create", @@ -269,14 +269,14 @@ func mnqCredentialCreate() *core.Command { ArgSpecs: core.ArgSpecs{ { Name: "namespace-id", - Short: `Namespace containing the Credential`, + Short: `Namespace containing the credentials`, Required: true, Deprecated: false, Positional: false, }, { Name: "name", - Short: `Credential name`, + Short: `Name of the credentials`, Required: false, Deprecated: false, Positional: false, @@ -284,21 +284,21 @@ func mnqCredentialCreate() *core.Command { }, { Name: "permissions.can-publish", - Short: `Defines if user can publish messages to the service`, + Short: `Defines whether the credentials bearer can publish messages to the service (send messages to SQS queues or publish to SNS topics)`, Required: false, Deprecated: false, Positional: false, }, { Name: "permissions.can-receive", - Short: `Defines if user can receive messages from the service`, + Short: `Defines whether the credentials bearer can receive messages from the service`, Required: false, Deprecated: false, Positional: false, }, { Name: "permissions.can-manage", - Short: `Defines if user can manage the associated resource(s)`, + Short: `Defines whether the credentials bearer can manage the associated resources (SQS queues or SNS topics or subscriptions)`, Required: false, Deprecated: false, Positional: false, @@ -319,7 +319,7 @@ func mnqCredentialCreate() *core.Command { func mnqCredentialDelete() *core.Command { return &core.Command{ Short: `Delete credentials`, - Long: `Delete credentials.`, + Long: `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.`, Namespace: "mnq", Resource: "credential", Verb: "delete", @@ -328,7 +328,7 @@ func mnqCredentialDelete() *core.Command { ArgSpecs: core.ArgSpecs{ { Name: "credential-id", - Short: `ID of the Credential to delete`, + Short: `ID of the credentials to delete`, Required: true, Deprecated: false, Positional: true, @@ -355,7 +355,7 @@ func mnqCredentialDelete() *core.Command { func mnqCredentialList() *core.Command { return &core.Command{ Short: `List credentials`, - Long: `List credentials.`, + Long: `List existing credentials in the specified region. The response contains only the metadata for the credentials, not the credentials themselves (for this, use **Get Credentials**).`, Namespace: "mnq", Resource: "credential", Verb: "list", @@ -364,14 +364,14 @@ func mnqCredentialList() *core.Command { ArgSpecs: core.ArgSpecs{ { Name: "namespace-id", - Short: `Namespace containing the Credential`, + Short: `Namespace containing the credentials`, Required: false, Deprecated: false, Positional: false, }, { Name: "order-by", - Short: `Field used for sorting results`, + Short: `Order in which to return results`, Required: false, Deprecated: false, Positional: false, @@ -401,8 +401,8 @@ func mnqCredentialList() *core.Command { func mnqCredentialUpdate() *core.Command { return &core.Command{ - Short: `Update a set of credentials`, - Long: `Update a set of credentials.`, + Short: `Update credentials`, + Long: `Update a set of credentials. You can update the credentials' name, or (in the case of SQS/SNS credentials only) their permissions. To update the name of NATS credentials, do not include the ` + "`" + `permissions` + "`" + ` object in your request.`, Namespace: "mnq", Resource: "credential", Verb: "update", @@ -411,35 +411,35 @@ func mnqCredentialUpdate() *core.Command { ArgSpecs: core.ArgSpecs{ { Name: "credential-id", - Short: `ID of the Credential to update`, + Short: `ID of the credentials to update`, Required: true, Deprecated: false, Positional: true, }, { Name: "name", - Short: `Credential name`, + Short: `Name of the credentials`, Required: false, Deprecated: false, Positional: false, }, { Name: "permissions.can-publish", - Short: `Defines if user can publish messages to the service`, + Short: `Defines whether the credentials bearer can publish messages to the service (send messages to SQS queues or publish to SNS topics)`, Required: false, Deprecated: false, Positional: false, }, { Name: "permissions.can-receive", - Short: `Defines if user can receive messages from the service`, + Short: `Defines whether the credentials bearer can receive messages from the service`, Required: false, Deprecated: false, Positional: false, }, { Name: "permissions.can-manage", - Short: `Defines if user can manage the associated resource(s)`, + Short: `Defines whether the credentials bearer can manage the associated resources (SQS queues or SNS topics or subscriptions)`, Required: false, Deprecated: false, Positional: false, @@ -459,8 +459,8 @@ func mnqCredentialUpdate() *core.Command { func mnqCredentialGet() *core.Command { return &core.Command{ - Short: `Get a set of credentials`, - Long: `Get a set of credentials.`, + Short: `Get credentials`, + Long: `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.`, Namespace: "mnq", Resource: "credential", Verb: "get", @@ -469,7 +469,7 @@ func mnqCredentialGet() *core.Command { ArgSpecs: core.ArgSpecs{ { Name: "credential-id", - Short: `ID of the Credential to get`, + Short: `ID of the credentials to get`, Required: true, Deprecated: false, Positional: true,