diff --git a/cmd/scw/testdata/test-all-usage-webhosting-control-panel-list-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-control-panel-list-usage.golden index 7ae9454948..a24116f232 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-control-panel-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-control-panel-list-usage.golden @@ -6,7 +6,7 @@ USAGE: scw webhosting control-panel list [arg=value ...] ARGS: - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | all) + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-database-create-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-create-usage.golden new file mode 100644 index 0000000000..519c2185a1 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-create-usage.golden @@ -0,0 +1,23 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"Create a new database within your hosting plan". + +USAGE: + scw webhosting database create [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan where the database will be created + [database-name] Name of the database to be created + [new-user.username] + [new-user.password] + [existing-username] (Optional) Username to link an existing user to the database + [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-webhosting-database-delete-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-delete-usage.golden new file mode 100644 index 0000000000..b8101314ae --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-delete-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"Delete a database within your hosting plan". + +USAGE: + scw webhosting database delete [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + database-name Name of the database 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-webhosting-database-get-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-get-usage.golden new file mode 100644 index 0000000000..2387b0fc06 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-get-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"Get details of a database within your hosting plan". + +USAGE: + scw webhosting database get [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + database-name Name of the database + [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-webhosting-database-list-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-list-usage.golden new file mode 100644 index 0000000000..aab421949e --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-list-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"List all databases within your hosting plan". + +USAGE: + scw webhosting database list [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [order-by] Sort order of databases in the response (database_name_asc | database_name_desc) + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-database-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-usage.golden new file mode 100644 index 0000000000..b968fbd4ee --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-usage.golden @@ -0,0 +1,23 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Databases represent the databases you can create and manage within your Web Hosting plan. Supported types are MySQL and PostgreSQL. + +USAGE: + scw webhosting database + +AVAILABLE COMMANDS: + create "Create a new database within your hosting plan" + delete "Delete a database within your hosting plan" + get "Get details of a database within your hosting plan" + list "List all databases within your hosting plan" + +FLAGS: + -h, --help help for database + +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 webhosting database [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-webhosting-database-user-assign-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-user-assign-usage.golden new file mode 100644 index 0000000000..228ef07e34 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-user-assign-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"Assign a database user to a database". + +USAGE: + scw webhosting database-user assign [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [username] Name of the user to assign + database-name Name of the database to be assigned + [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 assign + +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-webhosting-database-user-change-password-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-user-change-password-usage.golden new file mode 100644 index 0000000000..82f629fa23 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-user-change-password-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"Change the password of a database user". + +USAGE: + scw webhosting database-user change-password [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + username Name of the user to update + [password] New password + [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 change-password + +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-webhosting-database-user-create-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-user-create-usage.golden new file mode 100644 index 0000000000..d5d7d9fad4 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-user-create-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"Create a new database user". + +USAGE: + scw webhosting database-user create [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [username] Name of the user to create + [password] Password of the user to create + [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-webhosting-database-user-delete-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-user-delete-usage.golden new file mode 100644 index 0000000000..cc62180232 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-user-delete-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"Delete a database user". + +USAGE: + scw webhosting database-user delete [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + username Name of the database user 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-webhosting-database-user-get-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-user-get-usage.golden new file mode 100644 index 0000000000..61060e15c4 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-user-get-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"Get details of a database user". + +USAGE: + scw webhosting database-user get [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + username Name of the database user to retrieve details + [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-webhosting-database-user-list-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-user-list-usage.golden new file mode 100644 index 0000000000..542d2d17c4 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-user-list-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"List all database users". + +USAGE: + scw webhosting database-user list [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [order-by] Sort order of database users in the response (username_asc | username_desc) + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-database-user-unassign-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-user-unassign-usage.golden new file mode 100644 index 0000000000..ad23355eac --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-user-unassign-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +"Unassign a database user from a database". + +USAGE: + scw webhosting database-user unassign [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [username] Name of the user to unassign + database-name Name of the database to be unassigned + [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 unassign + +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-webhosting-database-user-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-database-user-usage.golden new file mode 100644 index 0000000000..b57f619f0f --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-database-user-usage.golden @@ -0,0 +1,26 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Database users represent the users that can access and manage the databases in your Web Hosting plan. + +USAGE: + scw webhosting database-user + +AVAILABLE COMMANDS: + assign "Assign a database user to a database" + change-password "Change the password of a database user" + create "Create a new database user" + delete "Delete a database user" + get "Get details of a database user" + list "List all database users" + unassign "Unassign a database user from a database" + +FLAGS: + -h, --help help for database-user + +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 webhosting database-user [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-webhosting-dns-records-get-dns-records-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-dns-records-get-dns-records-usage.golden new file mode 100644 index 0000000000..dd480a204f --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-dns-records-get-dns-records-usage.golden @@ -0,0 +1,23 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain. + +USAGE: + scw webhosting dns-records get-dns-records [arg=value ...] + +EXAMPLES: + Get DNS records associated to the given domain + scw webhosting dns-records get-dns-records domain=foo.com + +ARGS: + domain Domain associated with the DNS records + [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-dns-records + +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-webhosting-dns-records-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-dns-records-usage.golden new file mode 100644 index 0000000000..e10ecb1d1b --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-dns-records-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +With a Scaleway Web Hosting plan, you can manage your domain, configure your web hosting services, manage your emails and more. Get dns records status and check if you own the domain with these calls. + +USAGE: + scw webhosting dns-records + +AVAILABLE COMMANDS: + get-dns-records Get DNS records + +FLAGS: + -h, --help help for dns-records + +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 webhosting dns-records [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-webhosting-domain-check-ownership-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-domain-check-ownership-usage.golden new file mode 100644 index 0000000000..f6f2c38293 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-domain-check-ownership-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Check whether you own this domain or not. + +USAGE: + scw webhosting domain check-ownership [arg=value ...] + +ARGS: + [project-id] Project ID to use. If none is passed the default project ID will be used + domain Domain for which ownership is to be verified. + [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 check-ownership + +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-webhosting-domain-sync-dns-records-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-domain-sync-dns-records-usage.golden new file mode 100644 index 0000000000..1e6c3c0e31 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-domain-sync-dns-records-usage.golden @@ -0,0 +1,25 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Synchronize your DNS records on the Elements Console and on cPanel. + +USAGE: + scw webhosting domain sync-dns-records [arg=value ...] + +ARGS: + domain Domain for which the DNS records will be synchronized. + [update-web-records] Whether or not to synchronize the web records. + [update-mail-records] Whether or not to synchronize the mail records. + [update-all-records] Whether or not to synchronize all types of records. This one has priority. + [update-nameservers] Whether or not to synchronize domain nameservers. + [custom-records.{index}.name] + [custom-records.{index}.type] (unknown_type | a | cname | mx | txt | ns | aaaa) + [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 sync-dns-records + +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-webhosting-domain-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-domain-usage.golden new file mode 100644 index 0000000000..0caf78d831 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-domain-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +With a Scaleway Web Hosting plan, you can manage your domain, configure your web hosting services, manage your emails and more. Get dns records status and check if you own the domain with these calls. + +USAGE: + scw webhosting domain + +AVAILABLE COMMANDS: + check-ownership Check whether you own this domain or not. + sync-dns-records Synchronize your DNS records on the Elements Console and on cPanel. + +FLAGS: + -h, --help help for domain + +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 webhosting domain [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-create-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-create-usage.golden new file mode 100644 index 0000000000..14bab2be57 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-create-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create a new FTP account within your hosting plan. + +USAGE: + scw webhosting ftp-account create [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [username] Username for the new FTP account + [path] Path for the new FTP account + [password] Password for the new FTP account + [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-webhosting-ftp-account-delete-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-delete-usage.golden new file mode 100644 index 0000000000..1d2b724e75 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-delete-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete a specific FTP account within your hosting plan. + +USAGE: + scw webhosting ftp-account delete [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + username Username of the FTP account to be deleted + [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-webhosting-ftp-account-list-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-list-usage.golden new file mode 100644 index 0000000000..90c25ae2b5 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-list-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List all FTP accounts within your hosting plan. + +USAGE: + scw webhosting ftp-account list [arg=value ...] + +ARGS: + [order-by] Sort order of FTP accounts in the response (username_asc | username_desc) + hosting-id UUID of the hosting plan + [domain] Domain to filter the FTP accounts + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-usage.golden new file mode 100644 index 0000000000..6eb8837e62 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-ftp-account-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +FTP accounts represent the access credentials for FTP (File Transfer Protocol) used to manage files on your web hosting plan. + +USAGE: + scw webhosting ftp-account + +AVAILABLE COMMANDS: + create Create a new FTP account within your hosting plan. + delete Delete a specific FTP account within your hosting plan. + list List all FTP accounts within your hosting plan. + +FLAGS: + -h, --help help for ftp-account + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use + +Use "scw webhosting ftp-account [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-webhosting-hosting-create-session-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-hosting-create-session-usage.golden index 1c082d2d99..7b37385b84 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-hosting-create-session-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-hosting-create-session-usage.golden @@ -7,7 +7,7 @@ USAGE: ARGS: hosting-id Hosting ID - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) + [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-session diff --git a/cmd/scw/testdata/test-all-usage-webhosting-hosting-create-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-hosting-create-usage.golden index b31e6ff32d..be880a3085 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-hosting-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-hosting-create-usage.golden @@ -11,13 +11,15 @@ ARGS: [email] Contact email for the Web Hosting client [tags.{index}] List of tags for the Web Hosting plan [domain] Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand - [option-ids.{index}] IDs of any selected additional options for the Web Hosting plan + [offer-options.{index}.id] Offer option ID + [offer-options.{index}.quantity] The option requested quantity to set for the Web Hosting plan [language] Default language for the control panel interface (unknown_language_code | en_US | fr_FR | de_DE) [domain-configuration.update-nameservers] [domain-configuration.update-web-record] [domain-configuration.update-mail-record] [domain-configuration.update-all-records] - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) + [skip-welcome-email] Indicates whether to skip a welcome email to the contact email containing hosting info. + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-hosting-delete-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-hosting-delete-usage.golden index 0b37c8194e..c5e53e7078 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-hosting-delete-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-hosting-delete-usage.golden @@ -11,7 +11,7 @@ EXAMPLES: ARGS: hosting-id Hosting ID - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-hosting-get-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-hosting-get-usage.golden index 95648d1df5..25f3a219ab 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-hosting-get-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-hosting-get-usage.golden @@ -11,7 +11,7 @@ EXAMPLES: ARGS: hosting-id Hosting ID - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-hosting-list-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-hosting-list-usage.golden index 973165e95a..ddf96956be 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-hosting-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-hosting-list-usage.golden @@ -17,7 +17,7 @@ ARGS: [project-id] Project ID to filter for, only Web Hosting plans from this Project will be returned [control-panels.{index}] Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned [organization-id] Organization ID to filter for, only Web Hosting plans from this Organization will be returned - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | all) + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-hosting-update-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-hosting-update-usage.golden index 0c77187ec6..33fd883882 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-hosting-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-hosting-update-usage.golden @@ -12,17 +12,15 @@ EXAMPLES: Overwrite tags of a given hosting scw webhosting hosting update hosting-id=11111111-1111-1111-1111-111111111111 tags.0=foo tags.1=bar - Overwrite options of a given hosting - scw webhosting hosting update hosting-id=11111111-1111-1111-1111-111111111111 option-ids.0=22222222-2222-2222-2222-222222222222 option-ids.1=33333333-3333-3333-3333-333333333333 - ARGS: - hosting-id Hosting ID - [email] New contact email for the Web Hosting plan - [tags.{index}] New tags for the Web Hosting plan - [option-ids.{index}] IDs of the new options for the Web Hosting plan - [offer-id] ID of the new offer for the Web Hosting plan - [protected] Whether the hosting is protected or not - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) + hosting-id Hosting ID + [email] New contact email for the Web Hosting plan + [tags.{index}] New tags for the Web Hosting plan + [offer-options.{index}.id] Offer option ID + [offer-options.{index}.quantity] The option requested quantity to set for the Web Hosting plan + [offer-id] ID of the new offer for the Web Hosting plan + [protected] Whether the hosting is protected or not + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-hosting-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-hosting-usage.golden index fee558229b..2e91bdb8e6 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-hosting-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-hosting-usage.golden @@ -6,14 +6,12 @@ USAGE: scw webhosting hosting AVAILABLE COMMANDS: - create Order a Web Hosting plan - create-session Create a user session - delete Delete a Web Hosting plan - get Get a Web Hosting plan - get-dns-records Get DNS records - list List all Web Hosting plans - restore Restore a Web Hosting plan - update Update a Web Hosting plan + create Order a Web Hosting plan + create-session Create a user session + delete Delete a Web Hosting plan + get Get a Web Hosting plan + list List all Web Hosting plans + update Update a Web Hosting plan FLAGS: -h, --help help for hosting diff --git a/cmd/scw/testdata/test-all-usage-webhosting-mail-account-change-password-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-change-password-usage.golden new file mode 100644 index 0000000000..2966e8e09e --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-change-password-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update the password of a mail account within your hosting plan. + +USAGE: + scw webhosting mail-account change-password [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [domain] Domain part of the mail account address + [username] Username part of the mail account address + [password] New password for the mail account + [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 change-password + +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-webhosting-mail-account-create-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-create-usage.golden new file mode 100644 index 0000000000..82d8fa4017 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-create-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create a new mail account within your hosting plan. + +USAGE: + scw webhosting mail-account create [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [domain] Domain part of the mail account address + [username] Username part address of the mail account address + [password] Password for the new mail account + [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-webhosting-mail-account-delete-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-delete-usage.golden new file mode 100644 index 0000000000..55f872b420 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-delete-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete a mail account within your hosting plan. + +USAGE: + scw webhosting mail-account delete [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [domain] Domain part of the mail account address + [username] Username part of the mail account address + [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-webhosting-mail-account-list-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-list-usage.golden new file mode 100644 index 0000000000..ccebd49e98 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-list-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List all mail accounts within your hosting plan. + +USAGE: + scw webhosting mail-account list [arg=value ...] + +ARGS: + [order-by] Sort order of mail accounts in the response (username_asc | username_desc | domain_asc | domain_desc) + hosting-id UUID of the hosting plan + [domain] Domain to filter the mail accounts + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-mail-account-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-usage.golden new file mode 100644 index 0000000000..3d9a7e40df --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-mail-account-usage.golden @@ -0,0 +1,23 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Mail accounts represent the email addresses you can create and manage within your Web Hosting plan. + +USAGE: + scw webhosting mail-account + +AVAILABLE COMMANDS: + change-password Update the password of a mail account within your hosting plan. + create Create a new mail account within your hosting plan. + delete Delete a mail account within your hosting plan. + list List all mail accounts within your hosting plan. + +FLAGS: + -h, --help help for mail-account + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use + +Use "scw webhosting mail-account [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-webhosting-offer-list-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-offer-list-usage.golden index f3b697f5a9..2f3131c71b 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-offer-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-offer-list-usage.golden @@ -1,27 +1,15 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -List the different Web Hosting offers, and their options, available to order from Scaleway. +List all available hosting offers along with their specific options. USAGE: scw webhosting offer list [arg=value ...] -EXAMPLES: - List all offers available for purchase - scw webhosting offer list hosting-id=a3244331-5d32-4e36-9bf9-b60233e201c7 - - List only offers, no options - scw webhosting offer list without-options=true - - List only options - scw webhosting offer list only-options=true - ARGS: - [order-by] Sort order of offers in the response (price_asc) - [without-options] Defines whether the response should consist of offers only, without options - [only-options] Defines whether the response should consist of options only, without offers - [hosting-id] ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan) - [control-panels.{index}] Name of the control panel to filter for - [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams) + [order-by] Sort order for Web Hosting offers in the response (price_asc) + [hosting-id] UUID of the hosting plan + [control-panels.{index}] Name of the control panel(s) to filter for + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-offer-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-offer-usage.golden index 9f43c11ccd..fa6a85eb7b 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-offer-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-offer-usage.golden @@ -1,12 +1,12 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Web Hosting offers represent the different types of Web Hosting plan available to order at Scaleway. +Offers represent the available Web Hosting plans and their associated options. USAGE: scw webhosting offer AVAILABLE COMMANDS: - list List all offers + list List all available hosting offers along with their specific options. FLAGS: -h, --help help for offer diff --git a/cmd/scw/testdata/test-all-usage-webhosting-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-usage.golden index fea9a62948..fd7fc1aa2c 100644 --- a/cmd/scw/testdata/test-all-usage-webhosting-usage.golden +++ b/cmd/scw/testdata/test-all-usage-webhosting-usage.golden @@ -7,8 +7,15 @@ USAGE: AVAILABLE COMMANDS: control-panel Control Panels + database Database + database-user Database User + dns-records Domain information commands + domain Domain information commands + ftp-account FTP Account hosting Hosting management commands - offer Offer management commands + mail-account Mail Account + offer Offer + website Website FLAGS: -h, --help help for webhosting diff --git a/cmd/scw/testdata/test-all-usage-webhosting-website-list-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-website-list-usage.golden new file mode 100644 index 0000000000..397ba98bf3 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-website-list-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List all websites for a specific hosting. + +USAGE: + scw webhosting website list [arg=value ...] + +ARGS: + hosting-id UUID of the hosting plan + [order-by] Sort order for Web Hosting websites in the response (domain_asc | domain_desc) + [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 diff --git a/cmd/scw/testdata/test-all-usage-webhosting-website-usage.golden b/cmd/scw/testdata/test-all-usage-webhosting-website-usage.golden new file mode 100644 index 0000000000..9d06da2300 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-webhosting-website-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Websites represent the domains and paths hosted within your Web Hosting plan. + +USAGE: + scw webhosting website + +AVAILABLE COMMANDS: + list List all websites for a specific hosting. + +FLAGS: + -h, --help help for website + +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 webhosting website [command] --help" for more information about a command. diff --git a/commands/commands.go b/commands/commands.go index 7a8cc5d69f..505d145067 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -49,7 +49,7 @@ import ( versionNamespace "github.com/scaleway/scaleway-cli/v2/internal/namespaces/version" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2" "github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v1" - webhosting "github.com/scaleway/scaleway-cli/v2/internal/namespaces/webhosting/v1alpha1" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/webhosting/v1" "github.com/scaleway/scaleway-sdk-go/scw" ) diff --git a/docs/commands/webhosting.md b/docs/commands/webhosting.md index 1d6a76da08..f600d21f99 100644 --- a/docs/commands/webhosting.md +++ b/docs/commands/webhosting.md @@ -4,17 +4,44 @@ This API allows you to manage your Web Hosting services. - [Control Panels](#control-panels) - ["List the control panels type: cpanel or plesk."](#"list-the-control-panels-type:-cpanel-or-plesk.") +- [Database](#database) + - ["Create a new database within your hosting plan"](#"create-a-new-database-within-your-hosting-plan") + - ["Delete a database within your hosting plan"](#"delete-a-database-within-your-hosting-plan") + - ["Get details of a database within your hosting plan"](#"get-details-of-a-database-within-your-hosting-plan") + - ["List all databases within your hosting plan"](#"list-all-databases-within-your-hosting-plan") +- [Database User](#database-user) + - ["Assign a database user to a database"](#"assign-a-database-user-to-a-database") + - ["Change the password of a database user"](#"change-the-password-of-a-database-user") + - ["Create a new database user"](#"create-a-new-database-user") + - ["Delete a database user"](#"delete-a-database-user") + - ["Get details of a database user"](#"get-details-of-a-database-user") + - ["List all database users"](#"list-all-database-users") + - ["Unassign a database user from a database"](#"unassign-a-database-user-from-a-database") +- [Domain information commands](#domain-information-commands) + - [Get DNS records](#get-dns-records) +- [Domain information commands](#domain-information-commands) + - [Check whether you own this domain or not.](#check-whether-you-own-this-domain-or-not.) + - [Synchronize your DNS records on the Elements Console and on cPanel.](#synchronize-your-dns-records-on-the-elements-console-and-on-cpanel.) +- [FTP Account](#ftp-account) + - [Create a new FTP account within your hosting plan.](#create-a-new-ftp-account-within-your-hosting-plan.) + - [Delete a specific FTP account within your hosting plan.](#delete-a-specific-ftp-account-within-your-hosting-plan.) + - [List all FTP accounts within your hosting plan.](#list-all-ftp-accounts-within-your-hosting-plan.) - [Hosting management commands](#hosting-management-commands) - [Order a Web Hosting plan](#order-a-web-hosting-plan) - [Create a user session](#create-a-user-session) - [Delete a Web Hosting plan](#delete-a-web-hosting-plan) - [Get a Web Hosting plan](#get-a-web-hosting-plan) - - [Get DNS records](#get-dns-records) - [List all Web Hosting plans](#list-all-web-hosting-plans) - - [Restore a Web Hosting plan](#restore-a-web-hosting-plan) - [Update a Web Hosting plan](#update-a-web-hosting-plan) -- [Offer management commands](#offer-management-commands) - - [List all offers](#list-all-offers) +- [Mail Account](#mail-account) + - [Update the password of a mail account within your hosting plan.](#update-the-password-of-a-mail-account-within-your-hosting-plan.) + - [Create a new mail account within your hosting plan.](#create-a-new-mail-account-within-your-hosting-plan.) + - [Delete a mail account within your hosting plan.](#delete-a-mail-account-within-your-hosting-plan.) + - [List all mail accounts within your hosting plan.](#list-all-mail-accounts-within-your-hosting-plan.) +- [Offer](#offer) + - [List all available hosting offers along with their specific options.](#list-all-available-hosting-offers-along-with-their-specific-options.) +- [Website](#website) + - [List all websites for a specific hosting.](#list-all-websites-for-a-specific-hosting.) ## Control Panels @@ -37,7 +64,413 @@ scw webhosting control-panel list [arg=value ...] | Name | | Description | |------|---|-------------| -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `all` | Region to target. If none is passed will use default region from the config | +| 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 | + + + +## Database + +Databases represent the databases you can create and manage within your Web Hosting plan. Supported types are MySQL and PostgreSQL. + + +### "Create a new database within your hosting plan" + +"Create a new database within your hosting plan". + +**Usage:** + +``` +scw webhosting database create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan where the database will be created | +| database-name | | Name of the database to be created | +| new-user.username | | | +| new-user.password | | | +| existing-username | | (Optional) Username to link an existing user to the database | +| 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 within your hosting plan" + +"Delete a database within your hosting plan". + +**Usage:** + +``` +scw webhosting database delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| database-name | Required | Name of the database 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 details of a database within your hosting plan" + +"Get details of a database within your hosting plan". + +**Usage:** + +``` +scw webhosting database get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| database-name | Required | Name of the database | +| 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 all databases within your hosting plan" + +"List all databases within your hosting plan". + +**Usage:** + +``` +scw webhosting database list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| order-by | One of: `database_name_asc`, `database_name_desc` | Sort order of databases in the response | +| 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 | + + + +## Database User + +Database users represent the users that can access and manage the databases in your Web Hosting plan. + + +### "Assign a database user to a database" + +"Assign a database user to a database". + +**Usage:** + +``` +scw webhosting database-user assign [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| username | | Name of the user to assign | +| database-name | Required | Name of the database to be assigned | +| 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 | + + + +### "Change the password of a database user" + +"Change the password of a database user". + +**Usage:** + +``` +scw webhosting database-user change-password [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| username | Required | Name of the user to update | +| password | | New password | +| 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 | + + + +### "Create a new database user" + +"Create a new database user". + +**Usage:** + +``` +scw webhosting database-user create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| username | | Name of the user to create | +| password | | Password of the user to create | +| 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 user" + +"Delete a database user". + +**Usage:** + +``` +scw webhosting database-user delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| username | Required | Name of the database user 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 details of a database user" + +"Get details of a database user". + +**Usage:** + +``` +scw webhosting database-user get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| username | Required | Name of the database user to retrieve details | +| 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 all database users" + +"List all database users". + +**Usage:** + +``` +scw webhosting database-user list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| order-by | One of: `username_asc`, `username_desc` | Sort order of database users in the response | +| 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 | + + + +### "Unassign a database user from a database" + +"Unassign a database user from a database". + +**Usage:** + +``` +scw webhosting database-user unassign [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| username | | Name of the user to unassign | +| database-name | Required | Name of the database to be unassigned | +| 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 | + + + +## Domain information commands + +With a Scaleway Web Hosting plan, you can manage your domain, configure your web hosting services, manage your emails and more. Get dns records status and check if you own the domain with these calls. + + +### Get DNS records + +Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain. + +**Usage:** + +``` +scw webhosting dns-records get-dns-records [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| domain | Required | Domain associated with the DNS records | +| 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 | + + +**Examples:** + + +Get DNS records associated to the given domain +``` +scw webhosting dns-records get-dns-records domain=foo.com +``` + + + + +## Domain information commands + +With a Scaleway Web Hosting plan, you can manage your domain, configure your web hosting services, manage your emails and more. Get dns records status and check if you own the domain with these calls. + + +### Check whether you own this domain or not. + +Check whether you own this domain or not. + +**Usage:** + +``` +scw webhosting domain check-ownership [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | +| domain | Required | Domain for which ownership is to be verified. | +| 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 | + + + +### Synchronize your DNS records on the Elements Console and on cPanel. + +Synchronize your DNS records on the Elements Console and on cPanel. + +**Usage:** + +``` +scw webhosting domain sync-dns-records [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| domain | Required | Domain for which the DNS records will be synchronized. | +| update-web-records | | Whether or not to synchronize the web records. | +| update-mail-records | | Whether or not to synchronize the mail records. | +| update-all-records | | Whether or not to synchronize all types of records. This one has priority. | +| update-nameservers | | Whether or not to synchronize domain nameservers. | +| custom-records.{index}.name | | | +| custom-records.{index}.type | One of: `unknown_type`, `a`, `cname`, `mx`, `txt`, `ns`, `aaaa` | | +| 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 | + + + +## FTP Account + +FTP accounts represent the access credentials for FTP (File Transfer Protocol) used to manage files on your web hosting plan. + + +### Create a new FTP account within your hosting plan. + +Create a new FTP account within your hosting plan. + +**Usage:** + +``` +scw webhosting ftp-account create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| username | | Username for the new FTP account | +| path | | Path for the new FTP account | +| password | | Password for the new FTP account | +| 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 specific FTP account within your hosting plan. + +Delete a specific FTP account within your hosting plan. + +**Usage:** + +``` +scw webhosting ftp-account delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| username | Required | Username of the FTP account to be deleted | +| 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 all FTP accounts within your hosting plan. + +List all FTP accounts within your hosting plan. + +**Usage:** + +``` +scw webhosting ftp-account list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `username_asc`, `username_desc` | Sort order of FTP accounts in the response | +| hosting-id | Required | UUID of the hosting plan | +| domain | | Domain to filter the FTP accounts | +| 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 | @@ -66,13 +499,15 @@ scw webhosting hosting create [arg=value ...] | email | | Contact email for the Web Hosting client | | tags.{index} | | List of tags for the Web Hosting plan | | domain | | Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand | -| option-ids.{index} | | IDs of any selected additional options for the Web Hosting plan | +| offer-options.{index}.id | | Offer option ID | +| offer-options.{index}.quantity | | The option requested quantity to set for the Web Hosting plan | | language | One of: `unknown_language_code`, `en_US`, `fr_FR`, `de_DE` | Default language for the control panel interface | | domain-configuration.update-nameservers | | | | domain-configuration.update-web-record | | | | domain-configuration.update-mail-record | | | | domain-configuration.update-all-records | | | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config | +| skip-welcome-email | | Indicates whether to skip a welcome email to the contact email containing hosting info. | +| 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 | @@ -92,7 +527,7 @@ scw webhosting hosting create-session [arg=value ...] | Name | | Description | |------|---|-------------| | hosting-id | Required | Hosting ID | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config | +| 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 | @@ -112,7 +547,7 @@ scw webhosting hosting delete [arg=value ...] | Name | | Description | |------|---|-------------| | hosting-id | Required | Hosting ID | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config | +| 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 | **Examples:** @@ -142,7 +577,7 @@ scw webhosting hosting get [arg=value ...] | Name | | Description | |------|---|-------------| | hosting-id | Required | Hosting ID | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config | +| 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 | **Examples:** @@ -156,14 +591,14 @@ scw webhosting hosting get hosting-id=a3244331-5d32-4e36-9bf9-b60233e201c7 -### Get DNS records +### List all Web Hosting plans -Get the set of DNS records of a specified domain associated with a Web Hosting plan. +List all of your existing Web Hosting plans. Various filters are available to limit the results, including filtering by domain, status, tag and Project ID. **Usage:** ``` -scw webhosting hosting get-dns-records [arg=value ...] +scw webhosting hosting list [arg=value ...] ``` @@ -171,29 +606,35 @@ scw webhosting hosting get-dns-records [arg=value ...] | Name | | Description | |------|---|-------------| -| domain | Required | Domain associated with the DNS records | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config | +| order-by | One of: `created_at_asc`, `created_at_desc` | Sort order for Web Hosting plans in the response | +| tags.{index} | | Tags to filter for, only Web Hosting plans with matching tags will be returned | +| statuses.{index} | One of: `unknown_status`, `delivering`, `ready`, `deleting`, `error`, `locked`, `migrating` | Statuses to filter for, only Web Hosting plans with matching statuses will be returned | +| domain | | Domain to filter for, only Web Hosting plans associated with this domain will be returned | +| project-id | | Project ID to filter for, only Web Hosting plans from this Project will be returned | +| control-panels.{index} | | Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned | +| organization-id | | Organization ID to filter for, only Web Hosting plans from this Organization will be returned | +| 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 | **Examples:** -Get DNS records associated to the given domain +List all hostings of a given project ID ``` -scw webhosting hosting get-dns-records domain=foo.com +scw webhosting hosting list project-id=a3244331-5d32-4e36-9bf9-b60233e201c7 organization-id=a3244331-5d32-4e36-9bf9-b60233e201c7 ``` -### List all Web Hosting plans +### Update a Web Hosting plan -List all of your existing Web Hosting plans. Various filters are available to limit the results, including filtering by domain, status, tag and Project ID. +Update the details of one of your existing Web Hosting plans, specified by its `hosting_id`. You can update parameters including the contact email address, tags, options and offer. **Usage:** ``` -scw webhosting hosting list [arg=value ...] +scw webhosting hosting update [arg=value ...] ``` @@ -201,35 +642,45 @@ scw webhosting hosting list [arg=value ...] | Name | | Description | |------|---|-------------| -| order-by | One of: `created_at_asc`, `created_at_desc` | Sort order for Web Hosting plans in the response | -| tags.{index} | | Tags to filter for, only Web Hosting plans with matching tags will be returned | -| statuses.{index} | One of: `unknown_status`, `delivering`, `ready`, `deleting`, `error`, `locked`, `migrating` | Statuses to filter for, only Web Hosting plans with matching statuses will be returned | -| domain | | Domain to filter for, only Web Hosting plans associated with this domain will be returned | -| project-id | | Project ID to filter for, only Web Hosting plans from this Project will be returned | -| control-panels.{index} | | Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned | -| organization-id | | Organization ID to filter for, only Web Hosting plans from this Organization will be returned | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `all` | Region to target. If none is passed will use default region from the config | +| hosting-id | Required | Hosting ID | +| email | | New contact email for the Web Hosting plan | +| tags.{index} | | New tags for the Web Hosting plan | +| offer-options.{index}.id | | Offer option ID | +| offer-options.{index}.quantity | | The option requested quantity to set for the Web Hosting plan | +| offer-id | | ID of the new offer for the Web Hosting plan | +| protected | | Whether the hosting is protected or not | +| 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 | **Examples:** -List all hostings of a given project ID +Update the contact email of a given hosting ``` -scw webhosting hosting list project-id=a3244331-5d32-4e36-9bf9-b60233e201c7 organization-id=a3244331-5d32-4e36-9bf9-b60233e201c7 +scw webhosting hosting update hosting-id=11111111-1111-1111-1111-111111111111 email=foobar@example.com +``` + +Overwrite tags of a given hosting ``` +scw webhosting hosting update hosting-id=11111111-1111-1111-1111-111111111111 tags.0=foo tags.1=bar +``` + + + +## Mail Account +Mail accounts represent the email addresses you can create and manage within your Web Hosting plan. -### Restore a Web Hosting plan +### Update the password of a mail account within your hosting plan. -When you [delete a Web Hosting plan](#path-hostings-delete-a-hosting), definitive deletion does not take place until the end of the calendar month. In the time between initiating the deletion, and definitive deletion at the end of the month, you can choose to **restore** the Web Hosting plan, using this endpoint and specifying its `hosting_id`. +Update the password of a mail account within your hosting plan. **Usage:** ``` -scw webhosting hosting restore [arg=value ...] +scw webhosting mail-account change-password [arg=value ...] ``` @@ -237,29 +688,45 @@ scw webhosting hosting restore [arg=value ...] | Name | | Description | |------|---|-------------| -| hosting-id | Required | Hosting ID | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config | +| hosting-id | Required | UUID of the hosting plan | +| domain | | Domain part of the mail account address | +| username | | Username part of the mail account address | +| password | | New password for the mail account | +| 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 | -**Examples:** +### Create a new mail account within your hosting plan. + +Create a new mail account within your hosting plan. + +**Usage:** -Restore a Hosting with the given ID ``` -scw webhosting hosting restore hosting-id=a3244331-5d32-4e36-9bf9-b60233e201c7 +scw webhosting mail-account create [arg=value ...] ``` +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| domain | | Domain part of the mail account address | +| username | | Username part address of the mail account address | +| password | | Password for the new mail account | +| 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 | + -### Update a Web Hosting plan +### Delete a mail account within your hosting plan. -Update the details of one of your existing Web Hosting plans, specified by its `hosting_id`. You can update parameters including the contact email address, tags, options and offer. +Delete a mail account within your hosting plan. **Usage:** ``` -scw webhosting hosting update [arg=value ...] +scw webhosting mail-account delete [arg=value ...] ``` @@ -267,44 +734,43 @@ scw webhosting hosting update [arg=value ...] | Name | | Description | |------|---|-------------| -| hosting-id | Required | Hosting ID | -| email | | New contact email for the Web Hosting plan | -| tags.{index} | | New tags for the Web Hosting plan | -| option-ids.{index} | | IDs of the new options for the Web Hosting plan | -| offer-id | | ID of the new offer for the Web Hosting plan | -| protected | | Whether the hosting is protected or not | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config | +| hosting-id | Required | UUID of the hosting plan | +| domain | | Domain part of the mail account address | +| username | | Username part of the mail account address | +| 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 | -**Examples:** +### List all mail accounts within your hosting plan. -Update the contact email of a given hosting -``` -scw webhosting hosting update hosting-id=11111111-1111-1111-1111-111111111111 email=foobar@example.com -``` +List all mail accounts within your hosting plan. -Overwrite tags of a given hosting -``` -scw webhosting hosting update hosting-id=11111111-1111-1111-1111-111111111111 tags.0=foo tags.1=bar -``` +**Usage:** -Overwrite options of a given hosting ``` -scw webhosting hosting update hosting-id=11111111-1111-1111-1111-111111111111 option-ids.0=22222222-2222-2222-2222-222222222222 option-ids.1=33333333-3333-3333-3333-333333333333 +scw webhosting mail-account list [arg=value ...] ``` +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `username_asc`, `username_desc`, `domain_asc`, `domain_desc` | Sort order of mail accounts in the response | +| hosting-id | Required | UUID of the hosting plan | +| domain | | Domain to filter the mail accounts | +| 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 | + -## Offer management commands +## Offer -Web Hosting offers represent the different types of Web Hosting plan available to order at Scaleway. +Offers represent the available Web Hosting plans and their associated options. -### List all offers +### List all available hosting offers along with their specific options. -List the different Web Hosting offers, and their options, available to order from Scaleway. +List all available hosting offers along with their specific options. **Usage:** @@ -317,32 +783,36 @@ scw webhosting offer list [arg=value ...] | Name | | Description | |------|---|-------------| -| order-by | One of: `price_asc` | Sort order of offers in the response | -| without-options | | Defines whether the response should consist of offers only, without options | -| only-options | | Defines whether the response should consist of options only, without offers | -| hosting-id | | ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan) | -| control-panels.{index} | | Name of the control panel to filter for | -| region | Default: `fr-par`
One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config | +| order-by | One of: `price_asc` | Sort order for Web Hosting offers in the response | +| hosting-id | | UUID of the hosting plan | +| control-panels.{index} | | Name of the control panel(s) to filter for | +| 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 | -**Examples:** +## Website -List all offers available for purchase -``` -scw webhosting offer list hosting-id=a3244331-5d32-4e36-9bf9-b60233e201c7 -``` +Websites represent the domains and paths hosted within your Web Hosting plan. -List only offers, no options -``` -scw webhosting offer list without-options=true -``` -List only options +### List all websites for a specific hosting. + +List all websites for a specific hosting. + +**Usage:** + ``` -scw webhosting offer list only-options=true +scw webhosting website list [arg=value ...] ``` +**Args:** + +| Name | | Description | +|------|---|-------------| +| hosting-id | Required | UUID of the hosting plan | +| order-by | One of: `domain_asc`, `domain_desc` | Sort order for Web Hosting websites in the response | +| 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 | + diff --git a/internal/namespaces/webhosting/v1alpha1/custom.go b/internal/namespaces/webhosting/v1/custom.go similarity index 89% rename from internal/namespaces/webhosting/v1alpha1/custom.go rename to internal/namespaces/webhosting/v1/custom.go index a2b839971f..e7800f9510 100644 --- a/internal/namespaces/webhosting/v1alpha1/custom.go +++ b/internal/namespaces/webhosting/v1/custom.go @@ -3,7 +3,7 @@ package webhosting import ( "github.com/scaleway/scaleway-cli/v2/core" "github.com/scaleway/scaleway-cli/v2/core/human" - webhosting "github.com/scaleway/scaleway-sdk-go/api/webhosting/v1alpha1" + "github.com/scaleway/scaleway-sdk-go/api/webhosting/v1" ) func GetCommands() *core.Commands { diff --git a/internal/namespaces/webhosting/v1alpha1/custom_hosting.go b/internal/namespaces/webhosting/v1/custom_hosting.go similarity index 82% rename from internal/namespaces/webhosting/v1alpha1/custom_hosting.go rename to internal/namespaces/webhosting/v1/custom_hosting.go index 9a40afce1b..9fdbf2c3ff 100644 --- a/internal/namespaces/webhosting/v1alpha1/custom_hosting.go +++ b/internal/namespaces/webhosting/v1/custom_hosting.go @@ -3,7 +3,7 @@ package webhosting import ( "github.com/fatih/color" "github.com/scaleway/scaleway-cli/v2/core/human" - webhosting "github.com/scaleway/scaleway-sdk-go/api/webhosting/v1alpha1" + "github.com/scaleway/scaleway-sdk-go/api/webhosting/v1" ) var ( @@ -16,8 +16,8 @@ var ( } hostingDNSMarshalSpecs = human.EnumMarshalSpecs{ - webhosting.HostingDNSStatusValid: &human.EnumMarshalSpec{Attribute: color.FgGreen}, - webhosting.HostingDNSStatusInvalid: &human.EnumMarshalSpec{Attribute: color.FgRed}, + webhosting.DNSRecordsStatusValid: &human.EnumMarshalSpec{Attribute: color.FgGreen}, + webhosting.DNSRecordsStatusInvalid: &human.EnumMarshalSpec{Attribute: color.FgRed}, } nameserverMarshalSpecs = human.EnumMarshalSpecs{ diff --git a/internal/namespaces/webhosting/v1alpha1/custom_offer.go b/internal/namespaces/webhosting/v1/custom_offer.go similarity index 100% rename from internal/namespaces/webhosting/v1alpha1/custom_offer.go rename to internal/namespaces/webhosting/v1/custom_offer.go diff --git a/internal/namespaces/webhosting/v1alpha1/custom_offer_test.go b/internal/namespaces/webhosting/v1/custom_offer_test.go similarity index 76% rename from internal/namespaces/webhosting/v1alpha1/custom_offer_test.go rename to internal/namespaces/webhosting/v1/custom_offer_test.go index 919a36d634..37460086c3 100644 --- a/internal/namespaces/webhosting/v1alpha1/custom_offer_test.go +++ b/internal/namespaces/webhosting/v1/custom_offer_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/scaleway/scaleway-cli/v2/core" - webhosting "github.com/scaleway/scaleway-cli/v2/internal/namespaces/webhosting/v1alpha1" + "github.com/scaleway/scaleway-cli/v2/internal/namespaces/webhosting/v1" ) func Test_ListOffer(t *testing.T) { diff --git a/internal/namespaces/webhosting/v1/testdata/test-list-offer-simple.cassette.yaml b/internal/namespaces/webhosting/v1/testdata/test-list-offer-simple.cassette.yaml new file mode 100644 index 0000000000..b29fbdd06c --- /dev/null +++ b/internal/namespaces/webhosting/v1/testdata/test-list-offer-simple.cassette.yaml @@ -0,0 +1,513 @@ +--- +version: 1 +interactions: +- request: + body: '{"total_count":8, "offers":[{"id":"4d5b119e-8ec9-11ee-b9d1-0242ac120002", + "name":"lite", "billing_operation_path":"/webhosting/plesk-lite/fr-par", "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name":"email_count", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":1, "nanos":0}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"4931090c-8ec9-11ee-b9d1-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/plesk-backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"b5331822-51c7-46fc-8125-6cf238189e34", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/plesk-dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name":"domain_count", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":500000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":5, "nanos":990000000}, + "available":true, "control_panel_name":"plesk", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"f5c2ae8f-7625-4bca-b711-b44bb3d08694", "name":"lite", "billing_operation_path":"/webhosting/lite/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", "name":"domain_count", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":500000000}}, {"id":"e500237a-a9e9-11ec-b909-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"a8f6702e-6d8c-11ee-b962-0242ac120002", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":5, "nanos":990000000}, + "available":true, "control_panel_name":"cpanel", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"d86c61a0-a9e9-11ec-b909-0242ac120002", "name":"personal", "billing_operation_path":"/webhosting/personal/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":50, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", "name":"domain_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":500000000}}, {"id":"e500237a-a9e9-11ec-b909-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"a8f6702e-6d8c-11ee-b962-0242ac120002", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":9, "nanos":990000000}, + "available":true, "control_panel_name":"cpanel", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"3d4ead38-8ec9-11ee-b9d1-0242ac120002", "name":"personal", "billing_operation_path":"/webhosting/plesk-personal/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":50, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"4931090c-8ec9-11ee-b9d1-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/plesk-backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"b5331822-51c7-46fc-8125-6cf238189e34", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/plesk-dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name":"domain_count", "billing_operation_path":"", "min_value":2, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":500000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":9, "nanos":990000000}, + "available":true, "control_panel_name":"plesk", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"41da9100-8ec9-11ee-b9d1-0242ac120002", "name":"professional", "billing_operation_path":"/webhosting/plesk-professional/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":100, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":4, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"4931090c-8ec9-11ee-b9d1-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/plesk-backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"b5331822-51c7-46fc-8125-6cf238189e34", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/plesk-dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name":"domain_count", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":500000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":18, "nanos":990000000}, + "available":true, "control_panel_name":"plesk", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"de2426b4-a9e9-11ec-b909-0242ac120002", "name":"professional", "billing_operation_path":"/webhosting/professional/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":100, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":4, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", "name":"domain_count", + "billing_operation_path":"", "min_value":5, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":500000000}}, {"id":"e500237a-a9e9-11ec-b909-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"a8f6702e-6d8c-11ee-b962-0242ac120002", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":18, "nanos":990000000}, + "available":true, "control_panel_name":"cpanel", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"e1c1e6c6-a9e9-11ec-b909-0242ac120002", "name":"ecommerce", "billing_operation_path":"/webhosting/ecommerce/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":25, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":250, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":8, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":8, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", "name":"domain_count", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":500000000}}, {"id":"e500237a-a9e9-11ec-b909-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"a8f6702e-6d8c-11ee-b962-0242ac120002", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":29, "nanos":990000000}, + "available":true, "control_panel_name":"cpanel", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"4626320a-8ec9-11ee-b9d1-0242ac120002", "name":"ecommerce", "billing_operation_path":"/webhosting/plesk-ecommerce/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":25, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":250, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":8, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":8, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"4931090c-8ec9-11ee-b9d1-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/plesk-backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"b5331822-51c7-46fc-8125-6cf238189e34", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/plesk-dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name":"domain_count", "billing_operation_path":"", "min_value":10, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":500000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":29, "nanos":990000000}, + "available":true, "control_panel_name":"plesk", "end_of_life":false, "quota_warning":"unknown_warning"}]}' + form: {} + headers: + User-Agent: + - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.24.0; darwin; arm64) cli-e2e-test + url: https://api.scaleway.com/webhosting/v1/regions/fr-par/offers?order_by=price_asc&page=1 + method: GET + response: + body: '{"total_count":8, "offers":[{"id":"4d5b119e-8ec9-11ee-b9d1-0242ac120002", + "name":"lite", "billing_operation_path":"/webhosting/plesk-lite/fr-par", "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name":"email_count", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":1, "nanos":0}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"4931090c-8ec9-11ee-b9d1-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/plesk-backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"b5331822-51c7-46fc-8125-6cf238189e34", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/plesk-dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name":"domain_count", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":500000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":5, "nanos":990000000}, + "available":true, "control_panel_name":"plesk", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"f5c2ae8f-7625-4bca-b711-b44bb3d08694", "name":"lite", "billing_operation_path":"/webhosting/lite/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", "name":"domain_count", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":500000000}}, {"id":"e500237a-a9e9-11ec-b909-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"a8f6702e-6d8c-11ee-b962-0242ac120002", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":5, "nanos":990000000}, + "available":true, "control_panel_name":"cpanel", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"d86c61a0-a9e9-11ec-b909-0242ac120002", "name":"personal", "billing_operation_path":"/webhosting/personal/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":50, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", "name":"domain_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":500000000}}, {"id":"e500237a-a9e9-11ec-b909-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"a8f6702e-6d8c-11ee-b962-0242ac120002", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":9, "nanos":990000000}, + "available":true, "control_panel_name":"cpanel", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"3d4ead38-8ec9-11ee-b9d1-0242ac120002", "name":"personal", "billing_operation_path":"/webhosting/plesk-personal/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":50, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":1, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"4931090c-8ec9-11ee-b9d1-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/plesk-backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"b5331822-51c7-46fc-8125-6cf238189e34", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/plesk-dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name":"domain_count", "billing_operation_path":"", "min_value":2, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":500000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":9, "nanos":990000000}, + "available":true, "control_panel_name":"plesk", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"41da9100-8ec9-11ee-b9d1-0242ac120002", "name":"professional", "billing_operation_path":"/webhosting/plesk-professional/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":100, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":4, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"4931090c-8ec9-11ee-b9d1-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/plesk-backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"b5331822-51c7-46fc-8125-6cf238189e34", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/plesk-dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name":"domain_count", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":500000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":18, "nanos":990000000}, + "available":true, "control_panel_name":"plesk", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"de2426b4-a9e9-11ec-b909-0242ac120002", "name":"professional", "billing_operation_path":"/webhosting/professional/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":100, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":4, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":2, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", "name":"domain_count", + "billing_operation_path":"", "min_value":5, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":500000000}}, {"id":"e500237a-a9e9-11ec-b909-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"a8f6702e-6d8c-11ee-b962-0242ac120002", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":18, "nanos":990000000}, + "available":true, "control_panel_name":"cpanel", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"e1c1e6c6-a9e9-11ec-b909-0242ac120002", "name":"ecommerce", "billing_operation_path":"/webhosting/ecommerce/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":25, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":250, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":8, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":8, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", "name":"domain_count", + "billing_operation_path":"", "min_value":10, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":500000000}}, {"id":"e500237a-a9e9-11ec-b909-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"a8f6702e-6d8c-11ee-b962-0242ac120002", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":29, "nanos":990000000}, + "available":true, "control_panel_name":"cpanel", "end_of_life":false, "quota_warning":"unknown_warning"}, + {"id":"4626320a-8ec9-11ee-b9d1-0242ac120002", "name":"ecommerce", "billing_operation_path":"/webhosting/plesk-ecommerce/fr-par", + "options":[{"id":"c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", "name":"email_count", + "billing_operation_path":"", "min_value":25, "current_value":0, "max_value":1000, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"226bd895-6167-4256-8c63-53c2d3f2391e", "name":"storage_gb", + "billing_operation_path":"", "min_value":250, "current_value":0, "max_value":500, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":0, + "nanos":150000000}}, {"id":"0262a5ad-9758-4c85-bc01-fc094f04376b", "name":"vcpu_count", + "billing_operation_path":"", "min_value":8, "current_value":0, "max_value":8, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", "name":"ram_gb", + "billing_operation_path":"", "min_value":8, "current_value":0, "max_value":16, + "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", "units":1, + "nanos":0}}, {"id":"4931090c-8ec9-11ee-b9d1-0242ac120002", "name":"backup", + "billing_operation_path":"/webhosting/plesk-backup/fr-par", "min_value":0, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":2, "nanos":990000000}}, {"id":"b5331822-51c7-46fc-8125-6cf238189e34", + "name":"dedicated_ip", "billing_operation_path":"/webhosting/plesk-dedicated-ip/fr-par", + "min_value":0, "current_value":0, "max_value":1, "quota_warning":"unknown_warning", + "price":{"currency_code":"EUR", "units":4, "nanos":990000000}}, {"id":"0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name":"domain_count", "billing_operation_path":"", "min_value":10, "current_value":0, + "max_value":1000, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":500000000}}, {"id":"e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name":"email_storage_gb", "billing_operation_path":"", "min_value":5, "current_value":0, + "max_value":12, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":150000000}}, {"id":"d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name":"support", "billing_operation_path":"", "min_value":1, "current_value":0, + "max_value":1, "quota_warning":"unknown_warning", "price":{"currency_code":"EUR", + "units":0, "nanos":0}}], "price":{"currency_code":"EUR", "units":29, "nanos":990000000}, + "available":true, "control_panel_name":"plesk", "end_of_life":false, "quota_warning":"unknown_warning"}]}' + headers: + Content-Length: + - "20378" + Content-Security-Policy: + - default-src 'none'; frame-ancestors 'none' + Content-Type: + - application/json + Date: + - Thu, 27 Feb 2025 10:28:45 GMT + Server: + - Scaleway API Gateway (fr-par-1;edge02) + Strict-Transport-Security: + - max-age=63072000 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Request-Id: + - 64f13d08-30c7-4244-8dbe-ef234faa8257 + status: 200 OK + code: 200 + duration: "" diff --git a/internal/namespaces/webhosting/v1/testdata/test-list-offer-simple.golden b/internal/namespaces/webhosting/v1/testdata/test-list-offer-simple.golden new file mode 100644 index 0000000000..511ce45c3f --- /dev/null +++ b/internal/namespaces/webhosting/v1/testdata/test-list-offer-simple.golden @@ -0,0 +1,1150 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +🟩🟩🟩 STDOUT️ 🟩🟩🟩️ +ID NAME BILLING OPERATION PATH OPTIONS PRICE AVAILABLE CONTROL PANEL NAME END OF LIFE QUOTA WARNING +4d5b119e-8ec9-11ee-b9d1-0242ac120002 lite /webhosting/plesk-lite/fr-par 9 € 5.99 true plesk false unknown_warning +f5c2ae8f-7625-4bca-b711-b44bb3d08694 lite /webhosting/lite/fr-par 9 € 5.99 true cpanel false unknown_warning +d86c61a0-a9e9-11ec-b909-0242ac120002 personal /webhosting/personal/fr-par 9 € 9.99 true cpanel false unknown_warning +3d4ead38-8ec9-11ee-b9d1-0242ac120002 personal /webhosting/plesk-personal/fr-par 9 € 9.99 true plesk false unknown_warning +41da9100-8ec9-11ee-b9d1-0242ac120002 professional /webhosting/plesk-professional/fr-par 9 € 18.99 true plesk false unknown_warning +de2426b4-a9e9-11ec-b909-0242ac120002 professional /webhosting/professional/fr-par 9 € 18.99 true cpanel false unknown_warning +e1c1e6c6-a9e9-11ec-b909-0242ac120002 ecommerce /webhosting/ecommerce/fr-par 9 € 29.99 true cpanel false unknown_warning +4626320a-8ec9-11ee-b9d1-0242ac120002 ecommerce /webhosting/plesk-ecommerce/fr-par 9 € 29.99 true plesk false unknown_warning +🟩🟩🟩 JSON STDOUT 🟩🟩🟩 +[ + { + "id": "4d5b119e-8ec9-11ee-b9d1-0242ac120002", + "name": "lite", + "billing_operation_path": "/webhosting/plesk-lite/fr-par", + "options": [ + { + "id": "c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name": "email_count", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "0262a5ad-9758-4c85-bc01-fc094f04376b", + "name": "vcpu_count", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 8, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", + "name": "ram_gb", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 16, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "226bd895-6167-4256-8c63-53c2d3f2391e", + "name": "storage_gb", + "billing_operation_path": "", + "min_value": 10, + "current_value": 0, + "max_value": 500, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "4931090c-8ec9-11ee-b9d1-0242ac120002", + "name": "backup", + "billing_operation_path": "/webhosting/plesk-backup/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 2, + "nanos": 990000000 + } + }, + { + "id": "b5331822-51c7-46fc-8125-6cf238189e34", + "name": "dedicated_ip", + "billing_operation_path": "/webhosting/plesk-dedicated-ip/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 4, + "nanos": 990000000 + } + }, + { + "id": "0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name": "domain_count", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 500000000 + } + }, + { + "id": "e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name": "email_storage_gb", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 12, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name": "support", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 0 + } + } + ], + "price": { + "currency_code": "EUR", + "units": 5, + "nanos": 990000000 + }, + "available": true, + "control_panel_name": "plesk", + "end_of_life": false, + "quota_warning": "unknown_warning" + }, + { + "id": "f5c2ae8f-7625-4bca-b711-b44bb3d08694", + "name": "lite", + "billing_operation_path": "/webhosting/lite/fr-par", + "options": [ + { + "id": "c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name": "email_count", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "0262a5ad-9758-4c85-bc01-fc094f04376b", + "name": "vcpu_count", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 8, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", + "name": "ram_gb", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 16, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "226bd895-6167-4256-8c63-53c2d3f2391e", + "name": "storage_gb", + "billing_operation_path": "", + "min_value": 10, + "current_value": 0, + "max_value": 500, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name": "domain_count", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 500000000 + } + }, + { + "id": "e500237a-a9e9-11ec-b909-0242ac120002", + "name": "backup", + "billing_operation_path": "/webhosting/backup/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 2, + "nanos": 990000000 + } + }, + { + "id": "a8f6702e-6d8c-11ee-b962-0242ac120002", + "name": "dedicated_ip", + "billing_operation_path": "/webhosting/dedicated-ip/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 4, + "nanos": 990000000 + } + }, + { + "id": "e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name": "email_storage_gb", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 12, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name": "support", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 0 + } + } + ], + "price": { + "currency_code": "EUR", + "units": 5, + "nanos": 990000000 + }, + "available": true, + "control_panel_name": "cpanel", + "end_of_life": false, + "quota_warning": "unknown_warning" + }, + { + "id": "d86c61a0-a9e9-11ec-b909-0242ac120002", + "name": "personal", + "billing_operation_path": "/webhosting/personal/fr-par", + "options": [ + { + "id": "c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name": "email_count", + "billing_operation_path": "", + "min_value": 2, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "226bd895-6167-4256-8c63-53c2d3f2391e", + "name": "storage_gb", + "billing_operation_path": "", + "min_value": 50, + "current_value": 0, + "max_value": 500, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "0262a5ad-9758-4c85-bc01-fc094f04376b", + "name": "vcpu_count", + "billing_operation_path": "", + "min_value": 2, + "current_value": 0, + "max_value": 8, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", + "name": "ram_gb", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 16, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name": "domain_count", + "billing_operation_path": "", + "min_value": 2, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 500000000 + } + }, + { + "id": "e500237a-a9e9-11ec-b909-0242ac120002", + "name": "backup", + "billing_operation_path": "/webhosting/backup/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 2, + "nanos": 990000000 + } + }, + { + "id": "a8f6702e-6d8c-11ee-b962-0242ac120002", + "name": "dedicated_ip", + "billing_operation_path": "/webhosting/dedicated-ip/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 4, + "nanos": 990000000 + } + }, + { + "id": "e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name": "email_storage_gb", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 12, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name": "support", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 0 + } + } + ], + "price": { + "currency_code": "EUR", + "units": 9, + "nanos": 990000000 + }, + "available": true, + "control_panel_name": "cpanel", + "end_of_life": false, + "quota_warning": "unknown_warning" + }, + { + "id": "3d4ead38-8ec9-11ee-b9d1-0242ac120002", + "name": "personal", + "billing_operation_path": "/webhosting/plesk-personal/fr-par", + "options": [ + { + "id": "c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name": "email_count", + "billing_operation_path": "", + "min_value": 2, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "226bd895-6167-4256-8c63-53c2d3f2391e", + "name": "storage_gb", + "billing_operation_path": "", + "min_value": 50, + "current_value": 0, + "max_value": 500, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "0262a5ad-9758-4c85-bc01-fc094f04376b", + "name": "vcpu_count", + "billing_operation_path": "", + "min_value": 2, + "current_value": 0, + "max_value": 8, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", + "name": "ram_gb", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 16, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "4931090c-8ec9-11ee-b9d1-0242ac120002", + "name": "backup", + "billing_operation_path": "/webhosting/plesk-backup/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 2, + "nanos": 990000000 + } + }, + { + "id": "b5331822-51c7-46fc-8125-6cf238189e34", + "name": "dedicated_ip", + "billing_operation_path": "/webhosting/plesk-dedicated-ip/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 4, + "nanos": 990000000 + } + }, + { + "id": "0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name": "domain_count", + "billing_operation_path": "", + "min_value": 2, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 500000000 + } + }, + { + "id": "e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name": "email_storage_gb", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 12, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name": "support", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 0 + } + } + ], + "price": { + "currency_code": "EUR", + "units": 9, + "nanos": 990000000 + }, + "available": true, + "control_panel_name": "plesk", + "end_of_life": false, + "quota_warning": "unknown_warning" + }, + { + "id": "41da9100-8ec9-11ee-b9d1-0242ac120002", + "name": "professional", + "billing_operation_path": "/webhosting/plesk-professional/fr-par", + "options": [ + { + "id": "c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name": "email_count", + "billing_operation_path": "", + "min_value": 10, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "226bd895-6167-4256-8c63-53c2d3f2391e", + "name": "storage_gb", + "billing_operation_path": "", + "min_value": 100, + "current_value": 0, + "max_value": 500, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "0262a5ad-9758-4c85-bc01-fc094f04376b", + "name": "vcpu_count", + "billing_operation_path": "", + "min_value": 4, + "current_value": 0, + "max_value": 8, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", + "name": "ram_gb", + "billing_operation_path": "", + "min_value": 2, + "current_value": 0, + "max_value": 16, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "4931090c-8ec9-11ee-b9d1-0242ac120002", + "name": "backup", + "billing_operation_path": "/webhosting/plesk-backup/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 2, + "nanos": 990000000 + } + }, + { + "id": "b5331822-51c7-46fc-8125-6cf238189e34", + "name": "dedicated_ip", + "billing_operation_path": "/webhosting/plesk-dedicated-ip/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 4, + "nanos": 990000000 + } + }, + { + "id": "0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name": "domain_count", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 500000000 + } + }, + { + "id": "e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name": "email_storage_gb", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 12, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name": "support", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 0 + } + } + ], + "price": { + "currency_code": "EUR", + "units": 18, + "nanos": 990000000 + }, + "available": true, + "control_panel_name": "plesk", + "end_of_life": false, + "quota_warning": "unknown_warning" + }, + { + "id": "de2426b4-a9e9-11ec-b909-0242ac120002", + "name": "professional", + "billing_operation_path": "/webhosting/professional/fr-par", + "options": [ + { + "id": "c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name": "email_count", + "billing_operation_path": "", + "min_value": 10, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "226bd895-6167-4256-8c63-53c2d3f2391e", + "name": "storage_gb", + "billing_operation_path": "", + "min_value": 100, + "current_value": 0, + "max_value": 500, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "0262a5ad-9758-4c85-bc01-fc094f04376b", + "name": "vcpu_count", + "billing_operation_path": "", + "min_value": 4, + "current_value": 0, + "max_value": 8, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", + "name": "ram_gb", + "billing_operation_path": "", + "min_value": 2, + "current_value": 0, + "max_value": 16, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name": "domain_count", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 500000000 + } + }, + { + "id": "e500237a-a9e9-11ec-b909-0242ac120002", + "name": "backup", + "billing_operation_path": "/webhosting/backup/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 2, + "nanos": 990000000 + } + }, + { + "id": "a8f6702e-6d8c-11ee-b962-0242ac120002", + "name": "dedicated_ip", + "billing_operation_path": "/webhosting/dedicated-ip/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 4, + "nanos": 990000000 + } + }, + { + "id": "e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name": "email_storage_gb", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 12, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name": "support", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 0 + } + } + ], + "price": { + "currency_code": "EUR", + "units": 18, + "nanos": 990000000 + }, + "available": true, + "control_panel_name": "cpanel", + "end_of_life": false, + "quota_warning": "unknown_warning" + }, + { + "id": "e1c1e6c6-a9e9-11ec-b909-0242ac120002", + "name": "ecommerce", + "billing_operation_path": "/webhosting/ecommerce/fr-par", + "options": [ + { + "id": "c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name": "email_count", + "billing_operation_path": "", + "min_value": 25, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "226bd895-6167-4256-8c63-53c2d3f2391e", + "name": "storage_gb", + "billing_operation_path": "", + "min_value": 250, + "current_value": 0, + "max_value": 500, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "0262a5ad-9758-4c85-bc01-fc094f04376b", + "name": "vcpu_count", + "billing_operation_path": "", + "min_value": 8, + "current_value": 0, + "max_value": 8, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", + "name": "ram_gb", + "billing_operation_path": "", + "min_value": 8, + "current_value": 0, + "max_value": 16, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name": "domain_count", + "billing_operation_path": "", + "min_value": 10, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 500000000 + } + }, + { + "id": "e500237a-a9e9-11ec-b909-0242ac120002", + "name": "backup", + "billing_operation_path": "/webhosting/backup/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 2, + "nanos": 990000000 + } + }, + { + "id": "a8f6702e-6d8c-11ee-b962-0242ac120002", + "name": "dedicated_ip", + "billing_operation_path": "/webhosting/dedicated-ip/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 4, + "nanos": 990000000 + } + }, + { + "id": "e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name": "email_storage_gb", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 12, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name": "support", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 0 + } + } + ], + "price": { + "currency_code": "EUR", + "units": 29, + "nanos": 990000000 + }, + "available": true, + "control_panel_name": "cpanel", + "end_of_life": false, + "quota_warning": "unknown_warning" + }, + { + "id": "4626320a-8ec9-11ee-b9d1-0242ac120002", + "name": "ecommerce", + "billing_operation_path": "/webhosting/plesk-ecommerce/fr-par", + "options": [ + { + "id": "c4ac6ef1-b6ff-4b49-b429-f7662f600ea2", + "name": "email_count", + "billing_operation_path": "", + "min_value": 25, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "226bd895-6167-4256-8c63-53c2d3f2391e", + "name": "storage_gb", + "billing_operation_path": "", + "min_value": 250, + "current_value": 0, + "max_value": 500, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "0262a5ad-9758-4c85-bc01-fc094f04376b", + "name": "vcpu_count", + "billing_operation_path": "", + "min_value": 8, + "current_value": 0, + "max_value": 8, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "d55130d5-33b0-4bd5-9e62-ca7cb91e04cb", + "name": "ram_gb", + "billing_operation_path": "", + "min_value": 8, + "current_value": 0, + "max_value": 16, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 1, + "nanos": 0 + } + }, + { + "id": "4931090c-8ec9-11ee-b9d1-0242ac120002", + "name": "backup", + "billing_operation_path": "/webhosting/plesk-backup/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 2, + "nanos": 990000000 + } + }, + { + "id": "b5331822-51c7-46fc-8125-6cf238189e34", + "name": "dedicated_ip", + "billing_operation_path": "/webhosting/plesk-dedicated-ip/fr-par", + "min_value": 0, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 4, + "nanos": 990000000 + } + }, + { + "id": "0c9ee1a0-1495-4ac8-8e7a-bc322ee45370", + "name": "domain_count", + "billing_operation_path": "", + "min_value": 10, + "current_value": 0, + "max_value": 1000, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 500000000 + } + }, + { + "id": "e6419570-47e2-45cc-b2fa-dd149cdd4887", + "name": "email_storage_gb", + "billing_operation_path": "", + "min_value": 5, + "current_value": 0, + "max_value": 12, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 150000000 + } + }, + { + "id": "d75904fc-0e0a-46d3-a097-92ca0200e7ea", + "name": "support", + "billing_operation_path": "", + "min_value": 1, + "current_value": 0, + "max_value": 1, + "quota_warning": "unknown_warning", + "price": { + "currency_code": "EUR", + "units": 0, + "nanos": 0 + } + } + ], + "price": { + "currency_code": "EUR", + "units": 29, + "nanos": 990000000 + }, + "available": true, + "control_panel_name": "plesk", + "end_of_life": false, + "quota_warning": "unknown_warning" + } +] diff --git a/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.cassette.yaml b/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.cassette.yaml deleted file mode 100644 index d2c4c36814..0000000000 --- a/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.cassette.yaml +++ /dev/null @@ -1,55 +0,0 @@ ---- -version: 1 -interactions: -- request: - body: "" - form: {} - headers: - User-Agent: - - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.19.5; darwin; amd64) cli-e2e-test - url: https://api.scaleway.com/webhosting/v1alpha1/regions/fr-par/offers?only_options=false&order_by=price_asc&without_options=false - method: GET - response: - body: '{"offers":[{"id":"e500237a-a9e9-11ec-b909-0242ac120002", "billing_operation_path":"/webhosting/backup/fr-par", - "product":{"name":"backup", "option":true, "email_accounts_quota":0, "email_storage_quota":0, - "databases_quota":0, "hosting_storage_quota":0, "support_included":false, "v_cpu":0, - "ram":0}, "price":{"currency_code":"EUR", "units":2, "nanos":990000000}, "available":true, - "quota_warnings":[]}, {"id":"f5c2ae8f-7625-4bca-b711-b44bb3d08694", "billing_operation_path":"/webhosting/lite/fr-par", - "product":{"name":"lite", "option":false, "email_accounts_quota":1, "email_storage_quota":5, - "databases_quota":1, "hosting_storage_quota":10, "support_included":true, "v_cpu":1, - "ram":1}, "price":{"currency_code":"EUR", "units":5, "nanos":990000000}, "available":true, - "quota_warnings":[]}, {"id":"d86c61a0-a9e9-11ec-b909-0242ac120002", "billing_operation_path":"/webhosting/personal/fr-par", - "product":{"name":"essential", "option":false, "email_accounts_quota":2, "email_storage_quota":5, - "databases_quota":-1, "hosting_storage_quota":50, "support_included":true, "v_cpu":2, - "ram":1}, "price":{"currency_code":"EUR", "units":9, "nanos":990000000}, "available":true, - "quota_warnings":[]}, {"id":"de2426b4-a9e9-11ec-b909-0242ac120002", "billing_operation_path":"/webhosting/professional/fr-par", - "product":{"name":"performance", "option":false, "email_accounts_quota":10, - "email_storage_quota":5, "databases_quota":-1, "hosting_storage_quota":100, - "support_included":true, "v_cpu":4, "ram":2}, "price":{"currency_code":"EUR", - "units":18, "nanos":990000000}, "available":true, "quota_warnings":[]}, {"id":"e1c1e6c6-a9e9-11ec-b909-0242ac120002", - "billing_operation_path":"/webhosting/ecommerce/fr-par", "product":{"name":"ecommerce", - "option":false, "email_accounts_quota":25, "email_storage_quota":5, "databases_quota":-1, - "hosting_storage_quota":250, "support_included":true, "v_cpu":8, "ram":8}, "price":{"currency_code":"EUR", - "units":29, "nanos":990000000}, "available":true, "quota_warnings":[]}]}' - headers: - Content-Length: - - "2002" - Content-Security-Policy: - - default-src 'none'; frame-ancestors 'none' - Content-Type: - - application/json - Date: - - Tue, 28 Mar 2023 12:32:25 GMT - Server: - - Scaleway API-Gateway - Strict-Transport-Security: - - max-age=63072000 - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - DENY - X-Request-Id: - - d471ce2b-9726-4f8a-9518-4112558dc493 - status: 200 OK - code: 200 - duration: "" diff --git a/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.golden b/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.golden deleted file mode 100644 index b1adf79702..0000000000 --- a/internal/namespaces/webhosting/v1alpha1/testdata/test-list-offer-simple.golden +++ /dev/null @@ -1,139 +0,0 @@ -🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 -🟩🟩🟩 STDOUT️ 🟩🟩🟩️ -Offers: -ID BILLING OPERATION PATH PRICE AVAILABLE QUOTA WARNINGS END OF LIFE CONTROL PANEL NAME -e500237a-a9e9-11ec-b909-0242ac120002 /webhosting/backup/fr-par € 2.99 true [] false - -f5c2ae8f-7625-4bca-b711-b44bb3d08694 /webhosting/lite/fr-par € 5.99 true [] false - -d86c61a0-a9e9-11ec-b909-0242ac120002 /webhosting/personal/fr-par € 9.99 true [] false - -de2426b4-a9e9-11ec-b909-0242ac120002 /webhosting/professional/fr-par € 18.99 true [] false - -e1c1e6c6-a9e9-11ec-b909-0242ac120002 /webhosting/ecommerce/fr-par € 29.99 true [] false - -🟩🟩🟩 JSON STDOUT 🟩🟩🟩 -{ - "offers": [ - { - "id": "e500237a-a9e9-11ec-b909-0242ac120002", - "billing_operation_path": "/webhosting/backup/fr-par", - "product": { - "name": "backup", - "option": true, - "email_accounts_quota": 0, - "email_storage_quota": 0, - "databases_quota": 0, - "hosting_storage_quota": 0, - "support_included": false, - "v_cpu": 0, - "ram": 0, - "max_addon_domains": 0 - }, - "price": { - "currency_code": "EUR", - "units": 2, - "nanos": 990000000 - }, - "available": true, - "quota_warnings": [], - "end_of_life": false, - "control_panel_name": "" - }, - { - "id": "f5c2ae8f-7625-4bca-b711-b44bb3d08694", - "billing_operation_path": "/webhosting/lite/fr-par", - "product": { - "name": "lite", - "option": false, - "email_accounts_quota": 1, - "email_storage_quota": 5, - "databases_quota": 1, - "hosting_storage_quota": 10, - "support_included": true, - "v_cpu": 1, - "ram": 1, - "max_addon_domains": 0 - }, - "price": { - "currency_code": "EUR", - "units": 5, - "nanos": 990000000 - }, - "available": true, - "quota_warnings": [], - "end_of_life": false, - "control_panel_name": "" - }, - { - "id": "d86c61a0-a9e9-11ec-b909-0242ac120002", - "billing_operation_path": "/webhosting/personal/fr-par", - "product": { - "name": "essential", - "option": false, - "email_accounts_quota": 2, - "email_storage_quota": 5, - "databases_quota": -1, - "hosting_storage_quota": 50, - "support_included": true, - "v_cpu": 2, - "ram": 1, - "max_addon_domains": 0 - }, - "price": { - "currency_code": "EUR", - "units": 9, - "nanos": 990000000 - }, - "available": true, - "quota_warnings": [], - "end_of_life": false, - "control_panel_name": "" - }, - { - "id": "de2426b4-a9e9-11ec-b909-0242ac120002", - "billing_operation_path": "/webhosting/professional/fr-par", - "product": { - "name": "performance", - "option": false, - "email_accounts_quota": 10, - "email_storage_quota": 5, - "databases_quota": -1, - "hosting_storage_quota": 100, - "support_included": true, - "v_cpu": 4, - "ram": 2, - "max_addon_domains": 0 - }, - "price": { - "currency_code": "EUR", - "units": 18, - "nanos": 990000000 - }, - "available": true, - "quota_warnings": [], - "end_of_life": false, - "control_panel_name": "" - }, - { - "id": "e1c1e6c6-a9e9-11ec-b909-0242ac120002", - "billing_operation_path": "/webhosting/ecommerce/fr-par", - "product": { - "name": "ecommerce", - "option": false, - "email_accounts_quota": 25, - "email_storage_quota": 5, - "databases_quota": -1, - "hosting_storage_quota": 250, - "support_included": true, - "v_cpu": 8, - "ram": 8, - "max_addon_domains": 0 - }, - "price": { - "currency_code": "EUR", - "units": 29, - "nanos": 990000000 - }, - "available": true, - "quota_warnings": [], - "end_of_life": false, - "control_panel_name": "" - } - ] -} diff --git a/internal/namespaces/webhosting/v1alpha1/webhosting_cli.go b/internal/namespaces/webhosting/v1alpha1/webhosting_cli.go deleted file mode 100644 index 9e72afc309..0000000000 --- a/internal/namespaces/webhosting/v1alpha1/webhosting_cli.go +++ /dev/null @@ -1,609 +0,0 @@ -// This file was automatically generated. DO NOT EDIT. -// If you have any remark or suggestion do not hesitate to open an issue. - -package webhosting - -import ( - "context" - "reflect" - - "github.com/scaleway/scaleway-cli/v2/core" - "github.com/scaleway/scaleway-sdk-go/api/webhosting/v1alpha1" - "github.com/scaleway/scaleway-sdk-go/scw" -) - -// always import dependencies -var ( - _ = scw.RegionFrPar -) - -func GetGeneratedCommands() *core.Commands { - return core.NewCommands( - webhostingRoot(), - webhostingHosting(), - webhostingOffer(), - webhostingControlPanel(), - webhostingHostingCreate(), - webhostingHostingList(), - webhostingHostingGet(), - webhostingHostingUpdate(), - webhostingHostingDelete(), - webhostingHostingRestore(), - webhostingHostingGetDNSRecords(), - webhostingOfferList(), - webhostingControlPanelList(), - webhostingHostingCreateSession(), - ) -} -func webhostingRoot() *core.Command { - return &core.Command{ - Short: `This API allows you to manage your Web Hosting services`, - Long: `This API allows you to manage your Web Hosting services.`, - Namespace: "webhosting", - } -} - -func webhostingHosting() *core.Command { - return &core.Command{ - Short: `Hosting management commands`, - Long: `With a Scaleway Web Hosting plan, you can manage your domain, configure your web hosting services, manage your emails and more. Create, list, update and delete your Web Hosting plans with these calls.`, - Namespace: "webhosting", - Resource: "hosting", - } -} - -func webhostingOffer() *core.Command { - return &core.Command{ - Short: `Offer management commands`, - Long: `Web Hosting offers represent the different types of Web Hosting plan available to order at Scaleway.`, - Namespace: "webhosting", - Resource: "offer", - } -} - -func webhostingControlPanel() *core.Command { - return &core.Command{ - Short: `Control Panels`, - Long: `Control panels represent the kind of administration panel to manage your Web Hosting plan, cPanel or plesk.`, - Namespace: "webhosting", - Resource: "control-panel", - } -} - -func webhostingHostingCreate() *core.Command { - return &core.Command{ - Short: `Order a Web Hosting plan`, - Long: `Order a Web Hosting plan, specifying the offer type required via the ` + "`" + `offer_id` + "`" + ` parameter.`, - Namespace: "webhosting", - Resource: "hosting", - Verb: "create", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.CreateHostingRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "offer-id", - Short: `ID of the selected offer for the Web Hosting plan`, - Required: false, - Deprecated: false, - Positional: false, - }, - core.ProjectIDArgSpec(), - { - Name: "email", - Short: `Contact email for the Web Hosting client`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "tags.{index}", - Short: `List of tags for the Web Hosting plan`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "domain", - Short: `Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "option-ids.{index}", - Short: `IDs of any selected additional options for the Web Hosting plan`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "language", - Short: `Default language for the control panel interface`, - Required: false, - Deprecated: false, - Positional: false, - EnumValues: []string{"unknown_language_code", "en_US", "fr_FR", "de_DE"}, - }, - { - Name: "domain-configuration.update-nameservers", - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "domain-configuration.update-web-record", - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "domain-configuration.update-mail-record", - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "domain-configuration.update-all-records", - Required: false, - Deprecated: false, - Positional: false, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.CreateHostingRequest) - - client := core.ExtractClient(ctx) - api := webhosting.NewAPI(client) - return api.CreateHosting(request) - - }, - } -} - -func webhostingHostingList() *core.Command { - return &core.Command{ - Short: `List all Web Hosting plans`, - Long: `List all of your existing Web Hosting plans. Various filters are available to limit the results, including filtering by domain, status, tag and Project ID.`, - Namespace: "webhosting", - Resource: "hosting", - Verb: "list", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.ListHostingsRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "order-by", - Short: `Sort order for Web Hosting plans in the response`, - Required: false, - Deprecated: false, - Positional: false, - EnumValues: []string{"created_at_asc", "created_at_desc"}, - }, - { - Name: "tags.{index}", - Short: `Tags to filter for, only Web Hosting plans with matching tags will be returned`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "statuses.{index}", - Short: `Statuses to filter for, only Web Hosting plans with matching statuses will be returned`, - Required: false, - Deprecated: false, - Positional: false, - EnumValues: []string{"unknown_status", "delivering", "ready", "deleting", "error", "locked", "migrating"}, - }, - { - Name: "domain", - Short: `Domain to filter for, only Web Hosting plans associated with this domain will be returned`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "project-id", - Short: `Project ID to filter for, only Web Hosting plans from this Project will be returned`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "control-panels.{index}", - Short: `Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "organization-id", - Short: `Organization ID to filter for, only Web Hosting plans from this Organization will be returned`, - Required: false, - Deprecated: false, - Positional: false, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.Region(core.AllLocalities)), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.ListHostingsRequest) - - client := core.ExtractClient(ctx) - api := webhosting.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.ListHostings(request, opts...) - if err != nil { - return nil, err - } - return resp.Hostings, nil - - }, - Examples: []*core.Example{ - { - Short: "List all hostings of a given project ID", - ArgsJSON: `{"organization_id":"a3244331-5d32-4e36-9bf9-b60233e201c7","project_id":"a3244331-5d32-4e36-9bf9-b60233e201c7"}`, - }, - }, - } -} - -func webhostingHostingGet() *core.Command { - return &core.Command{ - Short: `Get a Web Hosting plan`, - Long: `Get the details of one of your existing Web Hosting plans, specified by its ` + "`" + `hosting_id` + "`" + `.`, - Namespace: "webhosting", - Resource: "hosting", - Verb: "get", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.GetHostingRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "hosting-id", - Short: `Hosting ID`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.GetHostingRequest) - - client := core.ExtractClient(ctx) - api := webhosting.NewAPI(client) - return api.GetHosting(request) - - }, - Examples: []*core.Example{ - { - Short: "Get a Hosting with the given ID", - ArgsJSON: `{"hosting_id":"a3244331-5d32-4e36-9bf9-b60233e201c7"}`, - }, - }, - } -} - -func webhostingHostingUpdate() *core.Command { - return &core.Command{ - Short: `Update a Web Hosting plan`, - Long: `Update the details of one of your existing Web Hosting plans, specified by its ` + "`" + `hosting_id` + "`" + `. You can update parameters including the contact email address, tags, options and offer.`, - Namespace: "webhosting", - Resource: "hosting", - Verb: "update", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.UpdateHostingRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "hosting-id", - Short: `Hosting ID`, - Required: true, - Deprecated: false, - Positional: false, - }, - { - Name: "email", - Short: `New contact email for the Web Hosting plan`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "tags.{index}", - Short: `New tags for the Web Hosting plan`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "option-ids.{index}", - Short: `IDs of the new options for the Web Hosting plan`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "offer-id", - Short: `ID of the new offer for the Web Hosting plan`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "protected", - Short: `Whether the hosting is protected or not`, - Required: false, - Deprecated: false, - Positional: false, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.UpdateHostingRequest) - - client := core.ExtractClient(ctx) - api := webhosting.NewAPI(client) - return api.UpdateHosting(request) - - }, - Examples: []*core.Example{ - { - Short: "Update the contact email of a given hosting", - ArgsJSON: `{"email":"foobar@example.com","hosting_id":"11111111-1111-1111-1111-111111111111"}`, - }, - { - Short: "Overwrite tags of a given hosting", - ArgsJSON: `{"hosting_id":"11111111-1111-1111-1111-111111111111","tags":["foo","bar"]}`, - }, - { - Short: "Overwrite options of a given hosting", - ArgsJSON: `{"hosting_id":"11111111-1111-1111-1111-111111111111","option_ids":["22222222-2222-2222-2222-222222222222","33333333-3333-3333-3333-333333333333"]}`, - }, - }, - } -} - -func webhostingHostingDelete() *core.Command { - return &core.Command{ - Short: `Delete a Web Hosting plan`, - Long: `Delete a Web Hosting plan, specified by its ` + "`" + `hosting_id` + "`" + `. Note that deletion is not immediate: it will take place at the end of the calendar month, after which time your Web Hosting plan and all its data (files and emails) will be irreversibly lost.`, - Namespace: "webhosting", - Resource: "hosting", - Verb: "delete", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.DeleteHostingRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "hosting-id", - Short: `Hosting ID`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.DeleteHostingRequest) - - client := core.ExtractClient(ctx) - api := webhosting.NewAPI(client) - return api.DeleteHosting(request) - - }, - Examples: []*core.Example{ - { - Short: "Delete a Hosting with the given ID", - ArgsJSON: `{"hosting_id":"a3244331-5d32-4e36-9bf9-b60233e201c7"}`, - }, - }, - } -} - -func webhostingHostingRestore() *core.Command { - return &core.Command{ - Short: `Restore a Web Hosting plan`, - Long: `When you [delete a Web Hosting plan](#path-hostings-delete-a-hosting), definitive deletion does not take place until the end of the calendar month. In the time between initiating the deletion, and definitive deletion at the end of the month, you can choose to **restore** the Web Hosting plan, using this endpoint and specifying its ` + "`" + `hosting_id` + "`" + `.`, - Namespace: "webhosting", - Resource: "hosting", - Verb: "restore", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.RestoreHostingRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "hosting-id", - Short: `Hosting ID`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.RestoreHostingRequest) - - client := core.ExtractClient(ctx) - api := webhosting.NewAPI(client) - return api.RestoreHosting(request) - - }, - Examples: []*core.Example{ - { - Short: "Restore a Hosting with the given ID", - ArgsJSON: `{"hosting_id":"a3244331-5d32-4e36-9bf9-b60233e201c7"}`, - }, - }, - } -} - -func webhostingHostingGetDNSRecords() *core.Command { - return &core.Command{ - Short: `Get DNS records`, - Long: `Get the set of DNS records of a specified domain associated with a Web Hosting plan.`, - Namespace: "webhosting", - Resource: "hosting", - Verb: "get-dns-records", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.GetDomainDNSRecordsRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "domain", - Short: `Domain associated with the DNS records`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.GetDomainDNSRecordsRequest) - - client := core.ExtractClient(ctx) - api := webhosting.NewAPI(client) - return api.GetDomainDNSRecords(request) - - }, - Examples: []*core.Example{ - { - Short: "Get DNS records associated to the given domain", - ArgsJSON: `{"domain":"foo.com"}`, - }, - }, - } -} - -func webhostingOfferList() *core.Command { - return &core.Command{ - Short: `List all offers`, - Long: `List the different Web Hosting offers, and their options, available to order from Scaleway.`, - Namespace: "webhosting", - Resource: "offer", - Verb: "list", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.ListOffersRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "order-by", - Short: `Sort order of offers in the response`, - Required: false, - Deprecated: false, - Positional: false, - EnumValues: []string{"price_asc"}, - }, - { - Name: "without-options", - Short: `Defines whether the response should consist of offers only, without options`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "only-options", - Short: `Defines whether the response should consist of options only, without offers`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "hosting-id", - Short: `ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan)`, - Required: false, - Deprecated: false, - Positional: false, - }, - { - Name: "control-panels.{index}", - Short: `Name of the control panel to filter for`, - Required: false, - Deprecated: false, - Positional: false, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.ListOffersRequest) - - client := core.ExtractClient(ctx) - api := webhosting.NewAPI(client) - return api.ListOffers(request) - - }, - Examples: []*core.Example{ - { - Short: "List all offers available for purchase", - ArgsJSON: `{"hosting_id":"a3244331-5d32-4e36-9bf9-b60233e201c7","only_options":false,"without_options":false}`, - }, - { - Short: "List only offers, no options", - ArgsJSON: `{"only_options":false,"without_options":true}`, - }, - { - Short: "List only options", - ArgsJSON: `{"only_options":true,"without_options":false}`, - }, - }, - } -} - -func webhostingControlPanelList() *core.Command { - return &core.Command{ - Short: `"List the control panels type: cpanel or plesk."`, - Long: `"List the control panels type: cpanel or plesk.".`, - Namespace: "webhosting", - Resource: "control-panel", - Verb: "list", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.ListControlPanelsRequest{}), - ArgSpecs: core.ArgSpecs{ - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.Region(core.AllLocalities)), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.ListControlPanelsRequest) - - client := core.ExtractClient(ctx) - api := webhosting.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.ListControlPanels(request, opts...) - if err != nil { - return nil, err - } - return resp.ControlPanels, nil - - }, - } -} - -func webhostingHostingCreateSession() *core.Command { - return &core.Command{ - Short: `Create a user session`, - Long: `Create a user session.`, - Namespace: "webhosting", - Resource: "hosting", - Verb: "create-session", - // Deprecated: false, - ArgsType: reflect.TypeOf(webhosting.CreateSessionRequest{}), - ArgSpecs: core.ArgSpecs{ - { - Name: "hosting-id", - Short: `Hosting ID`, - Required: true, - Deprecated: false, - Positional: false, - }, - core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms), - }, - Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { - request := args.(*webhosting.CreateSessionRequest) - - client := core.ExtractClient(ctx) - api := webhosting.NewAPI(client) - return api.CreateSession(request) - - }, - } -}