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
@@ -0,0 +1,33 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a new trigger for a specified container.

USAGE:
scw container trigger create [arg=value ...]

ARGS:
[name]
[description]
[container-id]
[scw-sqs-config.mnq-namespace-id]
[scw-sqs-config.queue]
[scw-sqs-config.mnq-project-id]
[scw-sqs-config.mnq-region]
[sqs-config.endpoint]
[sqs-config.queue-url]
[sqs-config.access-key]
[sqs-config.secret-key]
[scw-nats-config.mnq-namespace-id]
[scw-nats-config.subject]
[scw-nats-config.mnq-project-id]
[scw-nats-config.mnq-region]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a trigger with a specified ID.

USAGE:
scw container trigger delete [arg=value ...]

ARGS:
trigger-id
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get a trigger with a specified ID.

USAGE:
scw container trigger get [arg=value ...]

ARGS:
trigger-id
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

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,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List all triggers belonging to a specified Organization or Project.

USAGE:
scw container trigger list [arg=value ...]

ARGS:
[order-by] (created_at_asc | created_at_desc)
[container-id]
[namespace-id]
[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 | nl-ams | pl-waw | 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,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update a trigger with a specified ID.

USAGE:
scw container trigger update [arg=value ...]

ARGS:
trigger-id
[name]
[description]
[sqs-config.access-key]
[sqs-config.secret-key]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

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
11 changes: 10 additions & 1 deletion cmd/scw/testdata/test-all-usage-container-trigger-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
Trigger management commands.

USAGE:
scw container trigger
scw container trigger <command>

AVAILABLE COMMANDS:
create Create a trigger
delete Delete a trigger
get Get a trigger
list List all triggers
update Update a trigger

FLAGS:
-h, --help help for trigger
Expand All @@ -13,3 +20,5 @@ GLOBAL FLAGS:
-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 container trigger [command] --help" for more information about a command.
121 changes: 119 additions & 2 deletions docs/commands/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ Serverless Containers API.
- [Get a token](#get-a-token)
- [List all tokens](#list-all-tokens)
- [Trigger management commands](#trigger-management-commands)
- [Create a trigger](#create-a-trigger)
- [Delete a trigger](#delete-a-trigger)
- [Get a trigger](#get-a-trigger)
- [List all triggers](#list-all-triggers)
- [Update a trigger](#update-a-trigger)


## Container management commands
Expand Down Expand Up @@ -662,13 +667,125 @@ scw container token list [arg=value ...]

Trigger management commands.

Trigger management commands.

### Create a trigger

Create a new trigger for a specified container.

**Usage:**

```
scw container trigger create [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| name | | |
| description | | |
| container-id | | |
| scw-sqs-config.mnq-namespace-id | | |
| scw-sqs-config.queue | | |
| scw-sqs-config.mnq-project-id | | |
| scw-sqs-config.mnq-region | | |
| sqs-config.endpoint | | |
| sqs-config.queue-url | | |
| sqs-config.access-key | | |
| sqs-config.secret-key | | |
| scw-nats-config.mnq-namespace-id | | |
| scw-nats-config.subject | | |
| scw-nats-config.mnq-project-id | | |
| scw-nats-config.mnq-region | | |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |



### Delete a trigger

Delete a trigger with a specified ID.

**Usage:**

```
scw container trigger
scw container trigger delete [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| trigger-id | Required | |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |



### Get a trigger

Get a trigger with a specified ID.

**Usage:**

```
scw container trigger get [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| trigger-id | Required | |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |



### List all triggers

List all triggers belonging to a specified Organization or Project.

**Usage:**

```
scw container trigger list [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| order-by | One of: `created_at_asc`, `created_at_desc` | |
| container-id | | |
| namespace-id | | |
| 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`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |



### Update a trigger

Update a trigger with a specified ID.

**Usage:**

```
scw container trigger update [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| trigger-id | Required | |
| name | | |
| description | | |
| sqs-config.access-key | | |
| sqs-config.secret-key | | |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |



2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/moby/buildkit v0.11.6
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230627164403-94bffe557ac1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230628143333-619bcccc12cb
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230627164403-94bffe557ac1 h1:0/vHPLfzS8YqfSXZyGGHdaMcn1GgR/HJHxbAqlTtfbk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230627164403-94bffe557ac1/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230628143333-619bcccc12cb h1:F8FZZ+yLKUg52b6DhOGVgkb8xdpQB4SEocO54z2t/Mc=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230628143333-619bcccc12cb/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
Expand Down
Loading