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
Original file line number Diff line number Diff line change
@@ -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=<generated>] 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=<generated>] 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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <credential-id ...> [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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <credential-id ...> [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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <credential-id ...> [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:
Expand Down
6 changes: 3 additions & 3 deletions cmd/scw/testdata/test-all-usage-mnq-credential-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ USAGE:
scw mnq credential <command>

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
Expand Down
Original file line number Diff line number Diff line change
@@ -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=<generated>] 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)

Expand Down
Original file line number Diff line number Diff line change
@@ -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 <namespace-id ...> [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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <namespace-id ...> [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <namespace-id ...> [arg=value ...]
Expand Down
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-main-usage-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
70 changes: 35 additions & 35 deletions docs/commands/mnq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:**

Expand All @@ -36,18 +36,18 @@ scw mnq credential create [arg=value ...]

| Name | | Description |
|------|---|-------------|
| namespace-id | Required | Namespace containing the Credential |
| name | Default: `<generated>` | 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: `<generated>` | 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`<br />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:**

Expand All @@ -60,14 +60,14 @@ scw mnq credential delete <credential-id ...> [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`<br />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:**

Expand All @@ -80,14 +80,14 @@ scw mnq credential get <credential-id ...> [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`<br />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:**

Expand All @@ -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`<br />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:**

Expand All @@ -121,11 +121,11 @@ scw mnq credential update <credential-id ...> [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`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |


Expand All @@ -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:**

Expand All @@ -151,15 +151,15 @@ scw mnq namespace create [arg=value ...]
| Name | | Description |
|------|---|-------------|
| name | Default: `<generated>` | Namespace name |
| protocol | Required<br />One of: `unknown`, `nats`, `sqs_sns` | Namespace protocol |
| protocol | Required<br />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`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### 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:**

Expand All @@ -172,14 +172,14 @@ scw mnq namespace delete <namespace-id ...> [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`<br />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:**

Expand All @@ -199,7 +199,7 @@ scw mnq namespace get <namespace-id ...> [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:**

Expand All @@ -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`<br />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:**

Expand Down
Loading