From e6e7920f36c481423909ca0e6f1e0c81a900bbb5 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 23 Mar 2023 13:10:55 +0000 Subject: [PATCH] feat: update generated APIs --- ...l-usage-cockpit-alert-disable-usage.golden | 18 ++ ...ll-usage-cockpit-alert-enable-usage.golden | 18 ++ ...-all-usage-cockpit-alert-test-usage.golden | 18 ++ .../test-all-usage-cockpit-alert-usage.golden | 22 ++ ...-usage-cockpit-contact-create-usage.golden | 19 ++ ...-usage-cockpit-contact-delete-usage.golden | 19 ++ ...ll-usage-cockpit-contact-list-usage.golden | 18 ++ ...est-all-usage-cockpit-contact-usage.golden | 22 ++ .../test-all-usage-cockpit-usage.golden | 2 + ...-container-container-get-logs-usage.golden | 20 ++ ...all-usage-container-container-usage.golden | 1 + ...ge-function-function-get-logs-usage.golden | 20 ++ ...t-all-usage-function-function-usage.golden | 1 + .../test-all-usage-function-usage.golden | 1 - ...ge-lb-backend-list-statistics-usage.golden | 19 ++ .../test-all-usage-lb-backend-usage.golden | 1 + ...ll-usage-lb-subscriber-create-usage.golden | 23 ++ ...ll-usage-lb-subscriber-delete-usage.golden | 19 ++ ...t-all-usage-lb-subscriber-get-usage.golden | 19 ++ ...-all-usage-lb-subscriber-list-usage.golden | 22 ++ ...usage-lb-subscriber-subscribe-usage.golden | 20 ++ ...age-lb-subscriber-unsubscribe-usage.golden | 19 ++ ...ll-usage-lb-subscriber-update-usage.golden | 22 ++ .../test-all-usage-lb-subscriber-usage.golden | 26 ++ .../testdata/test-all-usage-lb-usage.golden | 1 + ...sage-marketplace-category-get-usage.golden | 18 ++ ...age-marketplace-category-list-usage.golden | 15 ++ ...ll-usage-marketplace-category-usage.golden | 21 ++ ...e-marketplace-local-image-get-usage.golden | 18 ++ ...usage-marketplace-local-image-usage.golden | 1 + .../test-all-usage-marketplace-usage.golden | 2 + ...usage-marketplace-version-get-usage.golden | 18 ++ ...sage-marketplace-version-list-usage.golden | 19 ++ ...all-usage-marketplace-version-usage.golden | 21 ++ .../test-all-usage-rdb-acl-set-usage.golden | 21 ++ .../test-all-usage-rdb-acl-usage.golden | 1 + ...all-usage-rdb-endpoint-create-usage.golden | 21 ++ ...all-usage-rdb-endpoint-delete-usage.golden | 19 ++ ...st-all-usage-rdb-endpoint-get-usage.golden | 19 ++ ...ll-usage-rdb-endpoint-migrate-usage.golden | 20 ++ .../test-all-usage-rdb-endpoint-usage.golden | 29 +++ ...sage-rdb-instance-get-metrics-usage.golden | 22 ++ .../test-all-usage-rdb-instance-usage.golden | 1 + ...est-all-usage-rdb-setting-add-usage.golden | 21 ++ ...-all-usage-rdb-setting-delete-usage.golden | 20 ++ ...est-all-usage-rdb-setting-set-usage.golden | 21 ++ .../test-all-usage-rdb-setting-usage.golden | 26 ++ .../testdata/test-all-usage-rdb-usage.golden | 2 + docs/commands/cockpit.md | 134 +++++++++++ docs/commands/container.md | 22 ++ docs/commands/function.md | 50 ++-- docs/commands/lb.md | 185 ++++++++++++++ docs/commands/marketplace.md | 106 ++++++++ docs/commands/rdb.md | 226 ++++++++++++++++++ go.mod | 2 +- go.sum | 4 +- .../container/v1beta1/container_cli.go | 46 ++++ .../function/v1beta1/function_cli.go | 20 +- 58 files changed, 1514 insertions(+), 47 deletions(-) create mode 100644 cmd/scw/testdata/test-all-usage-cockpit-alert-disable-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-cockpit-alert-enable-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-cockpit-alert-test-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-cockpit-alert-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-cockpit-contact-create-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-cockpit-contact-delete-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-cockpit-contact-list-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-cockpit-contact-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-container-container-get-logs-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-function-function-get-logs-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-lb-backend-list-statistics-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-lb-subscriber-create-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-lb-subscriber-delete-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-lb-subscriber-get-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-lb-subscriber-list-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-lb-subscriber-subscribe-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-lb-subscriber-unsubscribe-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-lb-subscriber-update-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-lb-subscriber-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-marketplace-category-get-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-marketplace-category-list-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-marketplace-category-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-marketplace-local-image-get-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-marketplace-version-get-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-marketplace-version-list-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-marketplace-version-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-acl-set-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-endpoint-create-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-endpoint-delete-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-endpoint-get-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-endpoint-migrate-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-endpoint-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-instance-get-metrics-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-setting-add-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-setting-delete-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-setting-set-usage.golden create mode 100644 cmd/scw/testdata/test-all-usage-rdb-setting-usage.golden diff --git a/cmd/scw/testdata/test-all-usage-cockpit-alert-disable-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-alert-disable-usage.golden new file mode 100644 index 0000000000..a49027a3ee --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-cockpit-alert-disable-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Disable managed alerts. + +USAGE: + scw cockpit alert disable [arg=value ...] + +ARGS: + [project-id] Project ID to use. If none is passed the default project ID will be used + +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 diff --git a/cmd/scw/testdata/test-all-usage-cockpit-alert-enable-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-alert-enable-usage.golden new file mode 100644 index 0000000000..58879150d9 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-cockpit-alert-enable-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Enable managed alerts. + +USAGE: + scw cockpit alert enable [arg=value ...] + +ARGS: + [project-id] Project ID to use. If none is passed the default project ID will be used + +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 diff --git a/cmd/scw/testdata/test-all-usage-cockpit-alert-test-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-alert-test-usage.golden new file mode 100644 index 0000000000..6d11347b1f --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-cockpit-alert-test-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Trigger a test alert to all receivers. + +USAGE: + scw cockpit alert test [arg=value ...] + +ARGS: + [project-id] Project ID to use. If none is passed the default project ID will be used + +FLAGS: + -h, --help help for test + +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 diff --git a/cmd/scw/testdata/test-all-usage-cockpit-alert-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-alert-usage.golden new file mode 100644 index 0000000000..2cadb0fe85 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-cockpit-alert-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Managed alerts management commands. + +USAGE: + scw cockpit alert + +AVAILABLE COMMANDS: + disable Disable managed alerts + enable Enable managed alerts + test Trigger a test alert + +FLAGS: + -h, --help help for alert + +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 cockpit alert [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-cockpit-contact-create-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-contact-create-usage.golden new file mode 100644 index 0000000000..15e9cf4b26 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-cockpit-contact-create-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create an alert contact point for the default receiver. + +USAGE: + scw cockpit contact create [arg=value ...] + +ARGS: + [project-id] Project ID to use. If none is passed the default project ID will be used + [contact-point.email.to] + +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 diff --git a/cmd/scw/testdata/test-all-usage-cockpit-contact-delete-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-contact-delete-usage.golden new file mode 100644 index 0000000000..280a844ab8 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-cockpit-contact-delete-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete an alert contact point for the default receiver. + +USAGE: + scw cockpit contact delete [arg=value ...] + +ARGS: + [project-id] Project ID to use. If none is passed the default project ID will be used + [contact-point.email.to] + +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 diff --git a/cmd/scw/testdata/test-all-usage-cockpit-contact-list-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-contact-list-usage.golden new file mode 100644 index 0000000000..15d6431f6f --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-cockpit-contact-list-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List alert contact points associated with the given cockpit ID. + +USAGE: + scw cockpit contact list [arg=value ...] + +ARGS: + [project-id] Project ID to use. If none is passed the default project ID will be used + +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 diff --git a/cmd/scw/testdata/test-all-usage-cockpit-contact-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-contact-usage.golden new file mode 100644 index 0000000000..d5d3197a30 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-cockpit-contact-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Contacts management commands. + +USAGE: + scw cockpit contact + +AVAILABLE COMMANDS: + create Create an alert contact point + delete Delete an alert contact point + list List alert contact points + +FLAGS: + -h, --help help for contact + +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 cockpit contact [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-cockpit-usage.golden b/cmd/scw/testdata/test-all-usage-cockpit-usage.golden index 48eaffbd76..9784e31b36 100644 --- a/cmd/scw/testdata/test-all-usage-cockpit-usage.golden +++ b/cmd/scw/testdata/test-all-usage-cockpit-usage.golden @@ -6,7 +6,9 @@ USAGE: scw cockpit AVAILABLE COMMANDS: + alert Managed alerts management commands cockpit Cockpit management commands + contact Contacts management commands grafana-user Grafana user management commands token Token management commands diff --git a/cmd/scw/testdata/test-all-usage-container-container-get-logs-usage.golden b/cmd/scw/testdata/test-all-usage-container-container-get-logs-usage.golden new file mode 100644 index 0000000000..8c0cdb2b1c --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-container-container-get-logs-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List your container logs. + +USAGE: + scw container container get-logs [arg=value ...] + +ARGS: + container-id + [order-by] (timestamp_desc | timestamp_asc) + [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 get-logs + +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 diff --git a/cmd/scw/testdata/test-all-usage-container-container-usage.golden b/cmd/scw/testdata/test-all-usage-container-container-usage.golden index aea18c6bde..31f335798d 100644 --- a/cmd/scw/testdata/test-all-usage-container-container-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-container-usage.golden @@ -10,6 +10,7 @@ AVAILABLE COMMANDS: delete Delete a container deploy Deploy a container get Get a container + get-logs List your container logs list List all your containers update Update an existing container diff --git a/cmd/scw/testdata/test-all-usage-function-function-get-logs-usage.golden b/cmd/scw/testdata/test-all-usage-function-function-get-logs-usage.golden new file mode 100644 index 0000000000..4650fcf1fc --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-function-function-get-logs-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List your application logs. + +USAGE: + scw function function get-logs [arg=value ...] + +ARGS: + function-id + [order-by] (timestamp_desc | timestamp_asc) + [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 get-logs + +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 diff --git a/cmd/scw/testdata/test-all-usage-function-function-usage.golden b/cmd/scw/testdata/test-all-usage-function-function-usage.golden index a6f30d7ebd..a2a0777ddc 100644 --- a/cmd/scw/testdata/test-all-usage-function-function-usage.golden +++ b/cmd/scw/testdata/test-all-usage-function-function-usage.golden @@ -11,6 +11,7 @@ AVAILABLE COMMANDS: deploy Deploy a function get Get a function get-download-url Get a download URL of a function + get-logs List your application logs get-upload-url Get an upload URL of a function list List all your functions update Update an existing function diff --git a/cmd/scw/testdata/test-all-usage-function-usage.golden b/cmd/scw/testdata/test-all-usage-function-usage.golden index 18c00f7355..378ef783b8 100644 --- a/cmd/scw/testdata/test-all-usage-function-usage.golden +++ b/cmd/scw/testdata/test-all-usage-function-usage.golden @@ -9,7 +9,6 @@ AVAILABLE COMMANDS: cron Cron management commands domain Domain management commands function Function management commands - logs Logs management commands namespace Function namespace management commands runtime Runtime management commands token Token management commands diff --git a/cmd/scw/testdata/test-all-usage-lb-backend-list-statistics-usage.golden b/cmd/scw/testdata/test-all-usage-lb-backend-list-statistics-usage.golden new file mode 100644 index 0000000000..a4960579ad --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-lb-backend-list-statistics-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List information about your backend servers, including their state and the result of their last health check. + +USAGE: + scw lb backend list-statistics [arg=value ...] + +ARGS: + lb-id Load Balancer ID + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2 | all) + +FLAGS: + -h, --help help for list-statistics + +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 diff --git a/cmd/scw/testdata/test-all-usage-lb-backend-usage.golden b/cmd/scw/testdata/test-all-usage-lb-backend-usage.golden index 7fc6108772..77865fcd05 100644 --- a/cmd/scw/testdata/test-all-usage-lb-backend-usage.golden +++ b/cmd/scw/testdata/test-all-usage-lb-backend-usage.golden @@ -11,6 +11,7 @@ AVAILABLE COMMANDS: delete Delete a backend of a given Load Balancer get Get a backend of a given Load Balancer list List the backends of a given Load Balancer + list-statistics List backend server statistics remove-servers Remove a set of servers for a given backend set-servers Define all backend servers for a given backend update Update a backend of a given Load Balancer diff --git a/cmd/scw/testdata/test-all-usage-lb-subscriber-create-usage.golden b/cmd/scw/testdata/test-all-usage-lb-subscriber-create-usage.golden new file mode 100644 index 0000000000..9e853ffa26 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-lb-subscriber-create-usage.golden @@ -0,0 +1,23 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create a new subscriber, either with an email configuration or a webhook configuration, for a specified Scaleway Project. + +USAGE: + scw lb subscriber create [arg=value ...] + +ARGS: + name Subscriber name + email-config.email Email address to send alerts to + webhook-config.uri URI to receive POST requests + [project-id] Project ID to use. If none is passed the default project ID will be used + [organization-id] Organization ID to use. If none is passed the default organization ID will be used + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2) + +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 diff --git a/cmd/scw/testdata/test-all-usage-lb-subscriber-delete-usage.golden b/cmd/scw/testdata/test-all-usage-lb-subscriber-delete-usage.golden new file mode 100644 index 0000000000..9abe9a7eec --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-lb-subscriber-delete-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete an existing subscriber, specified by its subscriber ID. Deleting a subscriber is permanent, and cannot be undone. + +USAGE: + scw lb subscriber delete [arg=value ...] + +ARGS: + subscriber-id Subscriber ID + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2) + +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 diff --git a/cmd/scw/testdata/test-all-usage-lb-subscriber-get-usage.golden b/cmd/scw/testdata/test-all-usage-lb-subscriber-get-usage.golden new file mode 100644 index 0000000000..03e0f86815 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-lb-subscriber-get-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Retrieve information about an existing subscriber, specified by its subscriber ID. Its full details, including name and email/webhook configuration, are returned in the response object. + +USAGE: + scw lb subscriber get [arg=value ...] + +ARGS: + subscriber-id Subscriber ID + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2) + +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 diff --git a/cmd/scw/testdata/test-all-usage-lb-subscriber-list-usage.golden b/cmd/scw/testdata/test-all-usage-lb-subscriber-list-usage.golden new file mode 100644 index 0000000000..aa1d2f2cc7 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-lb-subscriber-list-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List all subscribers to Load Balancer alerts. By default, returns all subscribers to Load Balancer alerts for the Organization associated with the authentication token used for the request. + +USAGE: + scw lb subscriber list [arg=value ...] + +ARGS: + [order-by] Sort order of subscribers in the response (created_at_asc | created_at_desc | name_asc | name_desc) + name Subscriber name to search for + [project-id] Filter subscribers by Project ID + [organization-id] Filter subscribers by Organization ID + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2 | 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 diff --git a/cmd/scw/testdata/test-all-usage-lb-subscriber-subscribe-usage.golden b/cmd/scw/testdata/test-all-usage-lb-subscriber-subscribe-usage.golden new file mode 100644 index 0000000000..5bf9382ea0 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-lb-subscriber-subscribe-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Subscribe an existing subscriber to alerts for a given Load Balancer. + +USAGE: + scw lb subscriber subscribe [arg=value ...] + +ARGS: + lb-id Load Balancer ID + subscriber-id Subscriber ID + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2) + +FLAGS: + -h, --help help for subscribe + +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 diff --git a/cmd/scw/testdata/test-all-usage-lb-subscriber-unsubscribe-usage.golden b/cmd/scw/testdata/test-all-usage-lb-subscriber-unsubscribe-usage.golden new file mode 100644 index 0000000000..3dd5134f79 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-lb-subscriber-unsubscribe-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Unsubscribe a subscriber from alerts for a given Load Balancer. The subscriber is not deleted, and can be resubscribed in the future if necessary. + +USAGE: + scw lb subscriber unsubscribe [arg=value ...] + +ARGS: + lb-id Load Balancer ID + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2) + +FLAGS: + -h, --help help for unsubscribe + +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 diff --git a/cmd/scw/testdata/test-all-usage-lb-subscriber-update-usage.golden b/cmd/scw/testdata/test-all-usage-lb-subscriber-update-usage.golden new file mode 100644 index 0000000000..68b96e548b --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-lb-subscriber-update-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update the parameters of a given subscriber (e.g. name, webhook configuration, email configuration), specified by its subscriber ID. + +USAGE: + scw lb subscriber update [arg=value ...] + +ARGS: + subscriber-id Subscriber ID + name Subscriber name + email-config.email Email address to send alerts to + webhook-config.uri URI to receive POST requests + [zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | pl-waw-1 | pl-waw-2) + +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 diff --git a/cmd/scw/testdata/test-all-usage-lb-subscriber-usage.golden b/cmd/scw/testdata/test-all-usage-lb-subscriber-usage.golden new file mode 100644 index 0000000000..c408e9c2e7 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-lb-subscriber-usage.golden @@ -0,0 +1,26 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Subscriber management commands. + +USAGE: + scw lb subscriber + +AVAILABLE COMMANDS: + create Create a subscriber + delete Delete a subscriber + get Get a subscriber + list List all subscribers + subscribe Subscribe a subscriber to alerts for a given Load Balancer + unsubscribe Unsubscribe a subscriber from alerts for a given Load Balancer + update Update a subscriber + +FLAGS: + -h, --help help for subscriber + +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 lb subscriber [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-lb-usage.golden b/cmd/scw/testdata/test-all-usage-lb-usage.golden index 58c04ab797..06ce0b56b8 100644 --- a/cmd/scw/testdata/test-all-usage-lb-usage.golden +++ b/cmd/scw/testdata/test-all-usage-lb-usage.golden @@ -15,6 +15,7 @@ AVAILABLE COMMANDS: lb-types Load balancer types management commands private-network Private networks management commands route Route rules management commands + subscriber Subscriber management commands FLAGS: -h, --help help for lb diff --git a/cmd/scw/testdata/test-all-usage-marketplace-category-get-usage.golden b/cmd/scw/testdata/test-all-usage-marketplace-category-get-usage.golden new file mode 100644 index 0000000000..11f6ab84a3 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-marketplace-category-get-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get marketplace resources. + +USAGE: + scw marketplace category get [arg=value ...] + +ARGS: + category-id + +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 diff --git a/cmd/scw/testdata/test-all-usage-marketplace-category-list-usage.golden b/cmd/scw/testdata/test-all-usage-marketplace-category-list-usage.golden new file mode 100644 index 0000000000..ac4905564e --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-marketplace-category-list-usage.golden @@ -0,0 +1,15 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List marketplace resources. + +USAGE: + scw marketplace category list + +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 diff --git a/cmd/scw/testdata/test-all-usage-marketplace-category-usage.golden b/cmd/scw/testdata/test-all-usage-marketplace-category-usage.golden new file mode 100644 index 0000000000..1703d430f6 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-marketplace-category-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Marketplace category management commands. + +USAGE: + scw marketplace category + +AVAILABLE COMMANDS: + get Get marketplace resources + list List marketplace resources + +FLAGS: + -h, --help help for category + +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 marketplace category [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-marketplace-local-image-get-usage.golden b/cmd/scw/testdata/test-all-usage-marketplace-local-image-get-usage.golden new file mode 100644 index 0000000000..898a3563f9 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-marketplace-local-image-get-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get marketplace resources. + +USAGE: + scw marketplace local-image get [arg=value ...] + +ARGS: + local-image-id + +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 diff --git a/cmd/scw/testdata/test-all-usage-marketplace-local-image-usage.golden b/cmd/scw/testdata/test-all-usage-marketplace-local-image-usage.golden index 546e678c9f..58684ab19d 100644 --- a/cmd/scw/testdata/test-all-usage-marketplace-local-image-usage.golden +++ b/cmd/scw/testdata/test-all-usage-marketplace-local-image-usage.golden @@ -6,6 +6,7 @@ USAGE: scw marketplace local-image AVAILABLE COMMANDS: + get Get marketplace resources list List local images from a specific image or version FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-marketplace-usage.golden b/cmd/scw/testdata/test-all-usage-marketplace-usage.golden index df21e4fdea..18ec6b6da1 100644 --- a/cmd/scw/testdata/test-all-usage-marketplace-usage.golden +++ b/cmd/scw/testdata/test-all-usage-marketplace-usage.golden @@ -6,8 +6,10 @@ USAGE: scw marketplace AVAILABLE COMMANDS: + category Marketplace category management commands image Marketplace images management commands local-image Marketplace Local Images management commands + version Marketplace version management commands FLAGS: -h, --help help for marketplace diff --git a/cmd/scw/testdata/test-all-usage-marketplace-version-get-usage.golden b/cmd/scw/testdata/test-all-usage-marketplace-version-get-usage.golden new file mode 100644 index 0000000000..19fcb21171 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-marketplace-version-get-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get marketplace resources. + +USAGE: + scw marketplace version get [arg=value ...] + +ARGS: + version-id + +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 diff --git a/cmd/scw/testdata/test-all-usage-marketplace-version-list-usage.golden b/cmd/scw/testdata/test-all-usage-marketplace-version-list-usage.golden new file mode 100644 index 0000000000..28c02d1987 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-marketplace-version-list-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List marketplace resources. + +USAGE: + scw marketplace version list [arg=value ...] + +ARGS: + [image-id] + [order-by] (created_at_asc | created_at_desc) + +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 diff --git a/cmd/scw/testdata/test-all-usage-marketplace-version-usage.golden b/cmd/scw/testdata/test-all-usage-marketplace-version-usage.golden new file mode 100644 index 0000000000..e6afa2c1c6 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-marketplace-version-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Marketplace version management commands. + +USAGE: + scw marketplace version + +AVAILABLE COMMANDS: + get Get marketplace resources + list List marketplace resources + +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 marketplace version [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-rdb-acl-set-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-acl-set-usage.golden new file mode 100644 index 0000000000..a79fdd1966 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-acl-set-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Replace all the ACL rules of a Database Instance. + +USAGE: + scw rdb acl set [arg=value ...] + +ARGS: + instance-id UUID of the Database Instance where the ACL rules must be set + [rules.{index}.ip] + [rules.{index}.description] + [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 set + +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 diff --git a/cmd/scw/testdata/test-all-usage-rdb-acl-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-acl-usage.golden index 635afe00f6..3fac5f0405 100644 --- a/cmd/scw/testdata/test-all-usage-rdb-acl-usage.golden +++ b/cmd/scw/testdata/test-all-usage-rdb-acl-usage.golden @@ -9,6 +9,7 @@ AVAILABLE COMMANDS: add Add an ACL rule to a Database Instance delete Delete ACL rules of a Database Instance list List ACL rules of a Database Instance + set Set ACL rules for a Database Instance FLAGS: -h, --help help for acl diff --git a/cmd/scw/testdata/test-all-usage-rdb-endpoint-create-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-endpoint-create-usage.golden new file mode 100644 index 0000000000..b9a0ccef16 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-endpoint-create-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create a new endpoint for a Database Instance. You can add `load_balancer` and `private_network` specifications to the body of the request. Note that this action replaces your current endpoint, which means you might need to update any environment configurations that point to the old endpoint. + +USAGE: + scw rdb endpoint create [arg=value ...] + +ARGS: + instance-id UUID of the Database Instance you to which you want to add an endpoint + [endpoint-spec.private-network.private-network-id] UUID of the Private Network to be connected to the Database Instance + [endpoint-spec.private-network.service-ip] Endpoint IPv4 address with a CIDR notation. Refer to the official Scaleway documentation to learn more about IP and subnet limitations. + [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 diff --git a/cmd/scw/testdata/test-all-usage-rdb-endpoint-delete-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-endpoint-delete-usage.golden new file mode 100644 index 0000000000..5708af3aff --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-endpoint-delete-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete the endpoint of a Database Instance. You must specify the `region` and `endpoint_id` parameters of the endpoint you want to delete. Note that might need to update any environment configurations that point to the deleted endpoint. + +USAGE: + scw rdb endpoint delete [arg=value ...] + +ARGS: + endpoint-id UUID of the endpoint you want 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: + -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 diff --git a/cmd/scw/testdata/test-all-usage-rdb-endpoint-get-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-endpoint-get-usage.golden new file mode 100644 index 0000000000..6051e7632d --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-endpoint-get-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Retrieve information about a Database Instance endpoint. Full details about the endpoint, like `ip`, `port`, `private_network` and `load_balancer` specifications are returned in the response. + +USAGE: + scw rdb endpoint get [arg=value ...] + +ARGS: + endpoint-id UUID of the endpoint you want 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: + -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 diff --git a/cmd/scw/testdata/test-all-usage-rdb-endpoint-migrate-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-endpoint-migrate-usage.golden new file mode 100644 index 0000000000..5cb1774136 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-endpoint-migrate-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Migrate an existing instance endpoint to another instance. + +USAGE: + scw rdb endpoint migrate [arg=value ...] + +ARGS: + endpoint-id UUID of the endpoint you want to migrate + instance-id UUID of the instance you want to attach the endpoint to + [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 migrate + +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 diff --git a/cmd/scw/testdata/test-all-usage-rdb-endpoint-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-endpoint-usage.golden new file mode 100644 index 0000000000..2918a20545 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-endpoint-usage.golden @@ -0,0 +1,29 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +A point of connection to a Database Instance. The endpoint is associated with an IPv4 address and a port. It contains the information about whether the endpoint is read-write or not. The endpoints always point to the main node of a Database Instance. + +All endpoints have TLS enabled. You can use TLS to make your data and your passwords unreadable in transit to anyone but you. + +For added security, you can set up ACL rules to restrict access to your endpoint to a set of trusted hosts or networks of your choice. + +Load Balancers are used to forward traffic to the right node based on the node state (active/hot standby). The Load Balancers' configuration is set to cut off inactive connections if no TCP traffic is sent within a 6-hour timeframe. We recommend using connection pooling on the application side to renew database connections regularly. + +USAGE: + scw rdb endpoint + +AVAILABLE COMMANDS: + create Create a new Database Instance endpoint + delete Delete a Database Instance endpoint + get Get a Database Instance endpoint + migrate Migrate an existing instance endpoint to another instance + +FLAGS: + -h, --help help for endpoint + +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 rdb endpoint [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-rdb-instance-get-metrics-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-instance-get-metrics-usage.golden new file mode 100644 index 0000000000..8349256c3d --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-instance-get-metrics-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Retrieve the time series metrics of a given Database Instance. You can define the period from which to retrieve metrics by specifying the `start_date` and `end_date`. + +USAGE: + scw rdb instance get-metrics [arg=value ...] + +ARGS: + instance-id UUID of the Database Instance + [start-date] Start date to gather metrics from + [end-date] End date to gather metrics from + [metric-name] Name of the metric to gather + [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-metrics + +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 diff --git a/cmd/scw/testdata/test-all-usage-rdb-instance-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-instance-usage.golden index be1128e0fd..36058d5814 100644 --- a/cmd/scw/testdata/test-all-usage-rdb-instance-usage.golden +++ b/cmd/scw/testdata/test-all-usage-rdb-instance-usage.golden @@ -16,6 +16,7 @@ AVAILABLE COMMANDS: delete Delete a Database Instance get Get a Database Instance get-certificate Get the TLS certificate of a Database Instance + get-metrics Get Database Instance metrics list List Database Instances renew-certificate Renew the TLS certificate of a Database Instance restart Restart Database Instance diff --git a/cmd/scw/testdata/test-all-usage-rdb-setting-add-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-setting-add-usage.golden new file mode 100644 index 0000000000..f4fceba6c0 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-setting-add-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Add an advanced setting to a Database Instance. You must set the `name` and the `value` of each setting. + +USAGE: + scw rdb setting add [arg=value ...] + +ARGS: + instance-id UUID of the Database Instance you want to add settings to + [settings.{index}.name] + [settings.{index}.value] + [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 add + +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 diff --git a/cmd/scw/testdata/test-all-usage-rdb-setting-delete-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-setting-delete-usage.golden new file mode 100644 index 0000000000..f5252bd43f --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-setting-delete-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete an advanced setting in a Database Instance. You must specify the names of the settings you want to delete in the request. + +USAGE: + scw rdb setting delete [arg=value ...] + +ARGS: + instance-id UUID of the Database Instance to delete settings from + setting-names.{index} Settings names 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: + -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 diff --git a/cmd/scw/testdata/test-all-usage-rdb-setting-set-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-setting-set-usage.golden new file mode 100644 index 0000000000..d887481402 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-setting-set-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update an advanced setting for a Database Instance. Settings added upon database engine initalization can only be defined once, and cannot, therefore, be updated. + +USAGE: + scw rdb setting set [arg=value ...] + +ARGS: + instance-id UUID of the Database Instance where the settings must be set + [settings.{index}.name] + [settings.{index}.value] + [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 set + +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 diff --git a/cmd/scw/testdata/test-all-usage-rdb-setting-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-setting-usage.golden new file mode 100644 index 0000000000..9c61fd618f --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-rdb-setting-usage.golden @@ -0,0 +1,26 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Advanced Database Instance settings allow you to tune the behavior of your database engines to better fit your needs. + +Available settings depend on the database engine and its version. Note that some settings can only be defined upon database engine initialization. These are called init settings. You can find a full list of the settings available in the response body of the [list available database engines](https://developers.scaleway.com/en/products/rdb/api/#get-1eafb7) endpoint. + +Each advanced setting entry has a default value that users can override. The deletion of a setting entry will restore the setting to default value. Some of the defaults values can be different from the engine's defaults, as we optimize them to the Scaleway platform. + +USAGE: + scw rdb setting + +AVAILABLE COMMANDS: + add Add Database Instance advanced settings + delete Delete Database Instance advanced settings + set Set Database Instance advanced settings + +FLAGS: + -h, --help help for setting + +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 rdb setting [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-rdb-usage.golden b/cmd/scw/testdata/test-all-usage-rdb-usage.golden index 8ff15acb1a..221a18b598 100644 --- a/cmd/scw/testdata/test-all-usage-rdb-usage.golden +++ b/cmd/scw/testdata/test-all-usage-rdb-usage.golden @@ -9,12 +9,14 @@ AVAILABLE COMMANDS: acl Access Control List (ACL) management commands backup Backup management commands database Database management commands + endpoint Endpoint management engine Database engines commands instance Instance management commands log Instance logs management commands node-type Node types management commands privilege User privileges management commands read-replica Read replica management + setting Setting management snapshot Block snapshot management user User management commands diff --git a/docs/commands/cockpit.md b/docs/commands/cockpit.md index 2492dac166..0285da2032 100644 --- a/docs/commands/cockpit.md +++ b/docs/commands/cockpit.md @@ -2,12 +2,20 @@ # Documentation for `scw cockpit` Cockpit API. +- [Managed alerts management commands](#managed-alerts-management-commands) + - [Disable managed alerts](#disable-managed-alerts) + - [Enable managed alerts](#enable-managed-alerts) + - [Trigger a test alert](#trigger-a-test-alert) - [Cockpit management commands](#cockpit-management-commands) - [Activate a cockpit](#activate-a-cockpit) - [Deactivate a cockpit](#deactivate-a-cockpit) - [Get cockpit](#get-cockpit) - [Reset Grafana](#reset-grafana) - [Wait for a cockpit to reach a stable state (installation)](#wait-for-a-cockpit-to-reach-a-stable-state-(installation)) +- [Contacts management commands](#contacts-management-commands) + - [Create an alert contact point](#create-an-alert-contact-point) + - [Delete an alert contact point](#delete-an-alert-contact-point) + - [List alert contact points](#list-alert-contact-points) - [Grafana user management commands](#grafana-user-management-commands) - [Create a grafana user](#create-a-grafana-user) - [Delete a grafana user](#delete-a-grafana-user) @@ -20,6 +28,68 @@ Cockpit API. - [List tokens](#list-tokens) +## Managed alerts management commands + +Managed alerts management commands. + + +### Disable managed alerts + +Disable managed alerts. + +**Usage:** + +``` +scw cockpit alert disable [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | + + + +### Enable managed alerts + +Enable managed alerts. + +**Usage:** + +``` +scw cockpit alert enable [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | + + + +### Trigger a test alert + +Trigger a test alert to all receivers. + +**Usage:** + +``` +scw cockpit alert test [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | + + + ## Cockpit management commands Cockpit management commands. @@ -130,6 +200,70 @@ scw cockpit cockpit wait 11111111-1111-1111-1111-111111111111 +## Contacts management commands + +Contacts management commands. + + +### Create an alert contact point + +Create an alert contact point for the default receiver. + +**Usage:** + +``` +scw cockpit contact create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | +| contact-point.email.to | | | + + + +### Delete an alert contact point + +Delete an alert contact point for the default receiver. + +**Usage:** + +``` +scw cockpit contact delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | +| contact-point.email.to | | | + + + +### List alert contact points + +List alert contact points associated with the given cockpit ID. + +**Usage:** + +``` +scw cockpit contact list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | + + + ## Grafana user management commands Grafana user management commands. diff --git a/docs/commands/container.md b/docs/commands/container.md index ba056b9533..5ba640418c 100644 --- a/docs/commands/container.md +++ b/docs/commands/container.md @@ -7,6 +7,7 @@ Containers API. - [Delete a container](#delete-a-container) - [Deploy a container](#deploy-a-container) - [Get a container](#get-a-container) + - [List your container logs](#list-your-container-logs) - [List all your containers](#list-all-your-containers) - [Update an existing container](#update-an-existing-container) - [Cron management commands](#cron-management-commands) @@ -134,6 +135,27 @@ scw container container get [arg=value ...] +### List your container logs + +List your container logs. + +**Usage:** + +``` +scw container container get-logs [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| container-id | Required | | +| order-by | One of: `timestamp_desc`, `timestamp_asc` | | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config | + + + ### List all your containers List all your containers. diff --git a/docs/commands/function.md b/docs/commands/function.md index 3c2b6013fb..3dfbf44598 100644 --- a/docs/commands/function.md +++ b/docs/commands/function.md @@ -19,11 +19,10 @@ Functions API. - [Deploy a function](#deploy-a-function) - [Get a function](#get-a-function) - [Get a download URL of a function](#get-a-download-url-of-a-function) + - [List your application logs](#list-your-application-logs) - [Get an upload URL of a function](#get-an-upload-url-of-a-function) - [List all your functions](#list-all-your-functions) - [Update an existing function](#update-an-existing-function) -- [Logs management commands](#logs-management-commands) - - [List your application logs](#list-your-application-logs) - [Function namespace management commands](#function-namespace-management-commands) - [Create a new namespace](#create-a-new-namespace) - [Delete an existing namespace](#delete-an-existing-namespace) @@ -358,6 +357,27 @@ scw function function get-download-url [arg=value ...] +### List your application logs + +List your application logs. + +**Usage:** + +``` +scw function function get-logs [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| function-id | Required | | +| order-by | One of: `timestamp_desc`, `timestamp_asc` | | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config | + + + ### Get an upload URL of a function Get an upload URL of a function associated with the given id. @@ -437,32 +457,6 @@ scw function function update [arg=value ...] -## Logs management commands - -Logs management commands. - - -### List your application logs - -List your application logs. - -**Usage:** - -``` -scw function logs list [arg=value ...] -``` - - -**Args:** - -| Name | | Description | -|------|---|-------------| -| function-id | Required | | -| order-by | One of: `timestamp_desc`, `timestamp_asc` | | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config | - - - ## Function namespace management commands Function namespace management commands. diff --git a/docs/commands/lb.md b/docs/commands/lb.md index 17f12b0837..a5ecb9f4c5 100644 --- a/docs/commands/lb.md +++ b/docs/commands/lb.md @@ -15,6 +15,7 @@ Load Balancer API. - [Delete a backend of a given Load Balancer](#delete-a-backend-of-a-given-load-balancer) - [Get a backend of a given Load Balancer](#get-a-backend-of-a-given-load-balancer) - [List the backends of a given Load Balancer](#list-the-backends-of-a-given-load-balancer) + - [List backend server statistics](#list-backend-server-statistics) - [Remove a set of servers for a given backend](#remove-a-set-of-servers-for-a-given-backend) - [Define all backend servers for a given backend](#define-all-backend-servers-for-a-given-backend) - [Update a backend of a given Load Balancer](#update-a-backend-of-a-given-load-balancer) @@ -58,6 +59,14 @@ Load Balancer API. - [Get a route](#get-a-route) - [List all routes](#list-all-routes) - [Update a route](#update-a-route) +- [Subscriber management commands](#subscriber-management-commands) + - [Create a subscriber](#create-a-subscriber) + - [Delete a subscriber](#delete-a-subscriber) + - [Get a subscriber](#get-a-subscriber) + - [List all subscribers](#list-all-subscribers) + - [Subscribe a subscriber to alerts for a given Load Balancer](#subscribe-a-subscriber-to-alerts-for-a-given-load-balancer) + - [Unsubscribe a subscriber from alerts for a given Load Balancer](#unsubscribe-a-subscriber-from-alerts-for-a-given-load-balancer) + - [Update a subscriber](#update-a-subscriber) ## Access Control List (ACL) management commands @@ -373,6 +382,26 @@ scw lb backend list [arg=value ...] +### List backend server statistics + +List information about your backend servers, including their state and the result of their last health check. + +**Usage:** + +``` +scw lb backend list-statistics [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| lb-id | Required | Load Balancer ID | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2`, `all` | Zone to target. If none is passed will use default zone from the config | + + + ### Remove a set of servers for a given backend For a given backend specified by its backend ID, remove the specified backend servers (identified by their IP addresses) so that it no longer forwards traffic to them. @@ -1235,3 +1264,159 @@ scw lb route update [arg=value ...] +## Subscriber management commands + +Subscriber management commands. + + +### Create a subscriber + +Create a new subscriber, either with an email configuration or a webhook configuration, for a specified Scaleway Project. + +**Usage:** + +``` +scw lb subscriber create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| name | Required | Subscriber name | +| email-config.email | Required | Email address to send alerts to | +| webhook-config.uri | Required | URI to receive POST requests | +| project-id | | Project ID to use. If none is passed the default project ID will be used | +| organization-id | | Organization ID to use. If none is passed the default organization ID will be used | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Delete a subscriber + +Delete an existing subscriber, specified by its subscriber ID. Deleting a subscriber is permanent, and cannot be undone. + +**Usage:** + +``` +scw lb subscriber delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| subscriber-id | Required | Subscriber ID | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Get a subscriber + +Retrieve information about an existing subscriber, specified by its subscriber ID. Its full details, including name and email/webhook configuration, are returned in the response object. + +**Usage:** + +``` +scw lb subscriber get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| subscriber-id | Required | Subscriber ID | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config | + + + +### List all subscribers + +List all subscribers to Load Balancer alerts. By default, returns all subscribers to Load Balancer alerts for the Organization associated with the authentication token used for the request. + +**Usage:** + +``` +scw lb subscriber list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | Sort order of subscribers in the response | +| name | Required | Subscriber name to search for | +| project-id | | Filter subscribers by Project ID | +| organization-id | | Filter subscribers by Organization ID | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2`, `all` | Zone to target. If none is passed will use default zone from the config | + + + +### Subscribe a subscriber to alerts for a given Load Balancer + +Subscribe an existing subscriber to alerts for a given Load Balancer. + +**Usage:** + +``` +scw lb subscriber subscribe [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| lb-id | Required | Load Balancer ID | +| subscriber-id | Required | Subscriber ID | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Unsubscribe a subscriber from alerts for a given Load Balancer + +Unsubscribe a subscriber from alerts for a given Load Balancer. The subscriber is not deleted, and can be resubscribed in the future if necessary. + +**Usage:** + +``` +scw lb subscriber unsubscribe [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| lb-id | Required | Load Balancer ID | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Update a subscriber + +Update the parameters of a given subscriber (e.g. name, webhook configuration, email configuration), specified by its subscriber ID. + +**Usage:** + +``` +scw lb subscriber update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| subscriber-id | Required | Subscriber ID | +| name | Required | Subscriber name | +| email-config.email | Required | Email address to send alerts to | +| webhook-config.uri | Required | URI to receive POST requests | +| zone | Default: `fr-par-1`
One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config | + + + diff --git a/docs/commands/marketplace.md b/docs/commands/marketplace.md index 74b2f8e8b1..b094903ee0 100644 --- a/docs/commands/marketplace.md +++ b/docs/commands/marketplace.md @@ -2,13 +2,56 @@ # Documentation for `scw marketplace` Marketplace API. +- [Marketplace category management commands](#marketplace-category-management-commands) + - [Get marketplace resources](#get-marketplace-resources) + - [List marketplace resources](#list-marketplace-resources) - [Marketplace images management commands](#marketplace-images-management-commands) - [Get a specific marketplace image](#get-a-specific-marketplace-image) - [List marketplace images](#list-marketplace-images) - [Marketplace Local Images management commands](#marketplace-local-images-management-commands) + - [Get marketplace resources](#get-marketplace-resources) - [List local images from a specific image or version](#list-local-images-from-a-specific-image-or-version) +- [Marketplace version management commands](#marketplace-version-management-commands) + - [Get marketplace resources](#get-marketplace-resources) + - [List marketplace resources](#list-marketplace-resources) +## Marketplace category management commands + +Marketplace category management commands. + + +### Get marketplace resources + +Get marketplace resources. + +**Usage:** + +``` +scw marketplace category get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| category-id | Required | | + + + +### List marketplace resources + +List marketplace resources. + +**Usage:** + +``` +scw marketplace category list +``` + + + ## Marketplace images management commands Marketplace images management commands. @@ -60,6 +103,25 @@ scw marketplace image list [arg=value ...] Marketplace Local Images management commands. +### Get marketplace resources + +Get marketplace resources. + +**Usage:** + +``` +scw marketplace local-image get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| local-image-id | Required | | + + + ### List local images from a specific image or version List local images from a specific image or version. @@ -83,3 +145,47 @@ scw marketplace local-image list [arg=value ...] +## Marketplace version management commands + +Marketplace version management commands. + + +### Get marketplace resources + +Get marketplace resources. + +**Usage:** + +``` +scw marketplace version get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| version-id | Required | | + + + +### List marketplace resources + +List marketplace resources. + +**Usage:** + +``` +scw marketplace version list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| image-id | | | +| order-by | One of: `created_at_asc`, `created_at_desc` | | + + + diff --git a/docs/commands/rdb.md b/docs/commands/rdb.md index ef24ae6626..dc25e4425b 100644 --- a/docs/commands/rdb.md +++ b/docs/commands/rdb.md @@ -6,6 +6,7 @@ Managed Database for PostgreSQL and MySQL API. - [Add an ACL rule to a Database Instance](#add-an-acl-rule-to-a-database-instance) - [Delete ACL rules of a Database Instance](#delete-acl-rules-of-a-database-instance) - [List ACL rules of a Database Instance](#list-acl-rules-of-a-database-instance) + - [Set ACL rules for a Database Instance](#set-acl-rules-for-a-database-instance) - [Backup management commands](#backup-management-commands) - [Create a database backup](#create-a-database-backup) - [Delete a database backup](#delete-a-database-backup) @@ -20,6 +21,11 @@ Managed Database for PostgreSQL and MySQL API. - [Create a database in a Database Instance](#create-a-database-in-a-database-instance) - [Delete a database in a Database Instance](#delete-a-database-in-a-database-instance) - [List databases in a Database Instance](#list-databases-in-a-database-instance) +- [Endpoint management](#endpoint-management) + - [Create a new Database Instance endpoint](#create-a-new-database-instance-endpoint) + - [Delete a Database Instance endpoint](#delete-a-database-instance-endpoint) + - [Get a Database Instance endpoint](#get-a-database-instance-endpoint) + - [Migrate an existing instance endpoint to another instance](#migrate-an-existing-instance-endpoint-to-another-instance) - [Database engines commands](#database-engines-commands) - [List available database engines](#list-available-database-engines) - [List available settings from an engine.](#list-available-settings-from-an-engine.) @@ -30,6 +36,7 @@ Managed Database for PostgreSQL and MySQL API. - [Delete a Database Instance](#delete-a-database-instance) - [Get a Database Instance](#get-a-database-instance) - [Get the TLS certificate of a Database Instance](#get-the-tls-certificate-of-a-database-instance) + - [Get Database Instance metrics](#get-database-instance-metrics) - [List Database Instances](#list-database-instances) - [Renew the TLS certificate of a Database Instance](#renew-the-tls-certificate-of-a-database-instance) - [Restart Database Instance](#restart-database-instance) @@ -53,6 +60,10 @@ Managed Database for PostgreSQL and MySQL API. - [Delete a Read Replica](#delete-a-read-replica) - [Get a Read Replica](#get-a-read-replica) - [Resync a Read Replica](#resync-a-read-replica) +- [Setting management](#setting-management) + - [Add Database Instance advanced settings](#add-database-instance-advanced-settings) + - [Delete Database Instance advanced settings](#delete-database-instance-advanced-settings) + - [Set Database Instance advanced settings](#set-database-instance-advanced-settings) - [Block snapshot management](#block-snapshot-management) - [Create a Database Instance snapshot](#create-a-database-instance-snapshot) - [Delete a Database Instance snapshot](#delete-a-database-instance-snapshot) @@ -136,6 +147,28 @@ scw rdb acl list [arg=value ...] +### Set ACL rules for a Database Instance + +Replace all the ACL rules of a Database Instance. + +**Usage:** + +``` +scw rdb acl set [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| instance-id | Required | UUID of the Database Instance where the ACL rules must be set | +| rules.{index}.ip | | | +| rules.{index}.description | | | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | + + + ## Backup management commands A database backup is a dated export of a Database Instance stored on an offsite backend located in a different region than your database, by default. Once a backup is created, it can be used to restore the database. Each logical database in a Database Instance is backed up and can be restored separately. @@ -426,6 +459,101 @@ scw rdb database list [arg=value ...] +## Endpoint management + +A point of connection to a Database Instance. The endpoint is associated with an IPv4 address and a port. It contains the information about whether the endpoint is read-write or not. The endpoints always point to the main node of a Database Instance. + +All endpoints have TLS enabled. You can use TLS to make your data and your passwords unreadable in transit to anyone but you. + +For added security, you can set up ACL rules to restrict access to your endpoint to a set of trusted hosts or networks of your choice. + +Load Balancers are used to forward traffic to the right node based on the node state (active/hot standby). The Load Balancers' configuration is set to cut off inactive connections if no TCP traffic is sent within a 6-hour timeframe. We recommend using connection pooling on the application side to renew database connections regularly. + + + +### Create a new Database Instance endpoint + +Create a new endpoint for a Database Instance. You can add `load_balancer` and `private_network` specifications to the body of the request. Note that this action replaces your current endpoint, which means you might need to update any environment configurations that point to the old endpoint. + +**Usage:** + +``` +scw rdb endpoint create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| instance-id | Required | UUID of the Database Instance you to which you want to add an endpoint | +| endpoint-spec.private-network.private-network-id | | UUID of the Private Network to be connected to the Database Instance | +| endpoint-spec.private-network.service-ip | | Endpoint IPv4 address with a CIDR notation. Refer to the official Scaleway documentation to learn more about IP and subnet limitations. | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | + + + +### Delete a Database Instance endpoint + +Delete the endpoint of a Database Instance. You must specify the `region` and `endpoint_id` parameters of the endpoint you want to delete. Note that might need to update any environment configurations that point to the deleted endpoint. + +**Usage:** + +``` +scw rdb endpoint delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| endpoint-id | Required | UUID of the endpoint you want to delete | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | + + + +### Get a Database Instance endpoint + +Retrieve information about a Database Instance endpoint. Full details about the endpoint, like `ip`, `port`, `private_network` and `load_balancer` specifications are returned in the response. + +**Usage:** + +``` +scw rdb endpoint get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| endpoint-id | Required | UUID of the endpoint you want to get | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | + + + +### Migrate an existing instance endpoint to another instance + +Migrate an existing instance endpoint to another instance. + +**Usage:** + +``` +scw rdb endpoint migrate [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| endpoint-id | Required | UUID of the endpoint you want to migrate | +| instance-id | Required | UUID of the instance you want to attach the endpoint to | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | + + + ## Database engines commands A database engine is the software component that stores and retrieves your data from a database. Currently PostgreSQL 11, 12, 13 and 14 are available. MySQL is available in version 8. @@ -635,6 +763,29 @@ scw rdb instance get-certificate [arg=value ...] +### Get Database Instance metrics + +Retrieve the time series metrics of a given Database Instance. You can define the period from which to retrieve metrics by specifying the `start_date` and `end_date`. + +**Usage:** + +``` +scw rdb instance get-metrics [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| instance-id | Required | UUID of the Database Instance | +| start-date | | Start date to gather metrics from | +| end-date | | End date to gather metrics from | +| metric-name | | Name of the metric to gather | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | + + + ### List Database Instances List all Database Instances in the specified region, for a given Scaleway Organization or Scaleway Project. By default, the Database Instances returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `tags` and `name`. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter. @@ -1124,6 +1275,81 @@ scw rdb read-replica reset [arg=value ...] +## Setting management + +Advanced Database Instance settings allow you to tune the behavior of your database engines to better fit your needs. + +Available settings depend on the database engine and its version. Note that some settings can only be defined upon database engine initialization. These are called init settings. You can find a full list of the settings available in the response body of the [list available database engines](https://developers.scaleway.com/en/products/rdb/api/#get-1eafb7) endpoint. + +Each advanced setting entry has a default value that users can override. The deletion of a setting entry will restore the setting to default value. Some of the defaults values can be different from the engine's defaults, as we optimize them to the Scaleway platform. + + + +### Add Database Instance advanced settings + +Add an advanced setting to a Database Instance. You must set the `name` and the `value` of each setting. + +**Usage:** + +``` +scw rdb setting add [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| instance-id | Required | UUID of the Database Instance you want to add settings to | +| settings.{index}.name | | | +| settings.{index}.value | | | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | + + + +### Delete Database Instance advanced settings + +Delete an advanced setting in a Database Instance. You must specify the names of the settings you want to delete in the request. + +**Usage:** + +``` +scw rdb setting delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| instance-id | Required | UUID of the Database Instance to delete settings from | +| setting-names.{index} | Required | Settings names to delete | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | + + + +### Set Database Instance advanced settings + +Update an advanced setting for a Database Instance. Settings added upon database engine initalization can only be defined once, and cannot, therefore, be updated. + +**Usage:** + +``` +scw rdb setting set [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| instance-id | Required | UUID of the Database Instance where the settings must be set | +| settings.{index}.name | | | +| settings.{index}.value | | | +| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | + + + ## Block snapshot management A snapshot is a consistent, instantaneous copy of the Block Storage volume of your Database Instance at a certain point in time. They are designed to recover your data in case of failure or accidental alterations of the data by a user. They allow you to quickly create a new Instance from a previous state of your database, regardless of the size of the volume. Their limitation is that, unlike backups, snapshots can only be stored in the same location as the original data. diff --git a/go.mod b/go.mod index 5d378a0fd5..d165d5249b 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/moby/buildkit v0.11.4 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.15.0.20230322175238-aa881483e689 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230323101524-c017498bf616 github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 diff --git a/go.sum b/go.sum index 37c942ffc0..dfeb00a174 100644 --- a/go.sum +++ b/go.sum @@ -192,8 +192,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230322175238-aa881483e689 h1:QPpApIAOwB3/9ZPu+SOu5bjoN7keDalTCpyCf2VYx4w= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230322175238-aa881483e689/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230323101524-c017498bf616 h1:7zcfy2f51uoLQyFzguQXa5rxDzyy8md6eWTuwFn3sis= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15.0.20230323101524-c017498bf616/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= diff --git a/internal/namespaces/container/v1beta1/container_cli.go b/internal/namespaces/container/v1beta1/container_cli.go index eb1c4c5d22..e36258cfee 100644 --- a/internal/namespaces/container/v1beta1/container_cli.go +++ b/internal/namespaces/container/v1beta1/container_cli.go @@ -41,6 +41,7 @@ func GetGeneratedCommands() *core.Commands { containerCronCreate(), containerCronUpdate(), containerCronDelete(), + containerContainerGetLogs(), containerDomainList(), containerDomainGet(), containerDomainCreate(), @@ -941,6 +942,51 @@ func containerCronDelete() *core.Command { } } +func containerContainerGetLogs() *core.Command { + return &core.Command{ + Short: `List your container logs`, + Long: `List your container logs.`, + Namespace: "container", + Resource: "container", + Verb: "get-logs", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.ListLogsRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "container-id", + Required: true, + Deprecated: false, + Positional: true, + }, + { + Name: "order-by", + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"timestamp_desc", "timestamp_asc"}, + }, + core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw, scw.Region(core.AllLocalities)), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.ListLogsRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + opts := []scw.RequestOption{scw.WithAllPages()} + if request.Region == scw.Region(core.AllLocalities) { + opts = append(opts, scw.WithRegions(api.Regions()...)) + request.Region = "" + } + resp, err := api.ListLogs(request, opts...) + if err != nil { + return nil, err + } + return resp.Logs, nil + + }, + } +} + func containerDomainList() *core.Command { return &core.Command{ Short: `List all domain name bindings`, diff --git a/internal/namespaces/function/v1beta1/function_cli.go b/internal/namespaces/function/v1beta1/function_cli.go index fa24284a41..74ee746813 100644 --- a/internal/namespaces/function/v1beta1/function_cli.go +++ b/internal/namespaces/function/v1beta1/function_cli.go @@ -24,7 +24,6 @@ func GetGeneratedCommands() *core.Commands { functionFunction(), functionCron(), functionRuntime(), - functionLogs(), functionDomain(), functionToken(), functionNamespaceList(), @@ -46,7 +45,7 @@ func GetGeneratedCommands() *core.Commands { functionCronCreate(), functionCronUpdate(), functionCronDelete(), - functionLogsList(), + functionFunctionGetLogs(), functionDomainList(), functionDomainGet(), functionDomainCreate(), @@ -101,15 +100,6 @@ func functionRuntime() *core.Command { } } -func functionLogs() *core.Command { - return &core.Command{ - Short: `Logs management commands`, - Long: `Logs management commands.`, - Namespace: "function", - Resource: "logs", - } -} - func functionDomain() *core.Command { return &core.Command{ Short: `Domain management commands`, @@ -1063,13 +1053,13 @@ func functionCronDelete() *core.Command { } } -func functionLogsList() *core.Command { +func functionFunctionGetLogs() *core.Command { return &core.Command{ Short: `List your application logs`, Long: `List your application logs.`, Namespace: "function", - Resource: "logs", - Verb: "list", + Resource: "function", + Verb: "get-logs", // Deprecated: false, ArgsType: reflect.TypeOf(function.ListLogsRequest{}), ArgSpecs: core.ArgSpecs{ @@ -1077,7 +1067,7 @@ func functionLogsList() *core.Command { Name: "function-id", Required: true, Deprecated: false, - Positional: false, + Positional: true, }, { Name: "order-by",