Skip to content

Commit

Permalink
docs(webhosting): fix webhosting docs for new site (#3108)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot committed May 10, 2023
1 parent 1c467ba commit 800c15f
Show file tree
Hide file tree
Showing 16 changed files with 128 additions and 132 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a hosting.
Order a Web Hosting plan, specifying the offer type required via the `offer_id` parameter.

USAGE:
scw webhosting hosting create [arg=value ...]

ARGS:
[offer-id] ID of the selected offer for the hosting
[offer-id] ID of the selected offer for the Web Hosting plan
[project-id] Project ID to use. If none is passed the default project ID will be used
[email] Contact email of the client for the hosting
[tags.{index}] The tags of the hosting
[domain] The domain name of the hosting
[option-ids.{index}] IDs of the selected options for the hosting
[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
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a hosting with the given ID.
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.

USAGE:
scw webhosting hosting delete [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
The set of DNS record of a specific domain associated to a hosting.
Get the set of DNS records of a specified domain associated with a Web Hosting plan.

USAGE:
scw webhosting hosting get-dns-records [arg=value ...]
Expand All @@ -10,7 +10,7 @@ EXAMPLES:
scw webhosting hosting get-dns-records domain=foo.com

ARGS:
domain Domain associated to the DNS records
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)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get the details of a Hosting with the given ID.
Get the details of one of your existing Web Hosting plans, specified by its `hosting_id`.

USAGE:
scw webhosting hosting get [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List all hostings.
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 list [arg=value ...]
Expand All @@ -10,12 +10,12 @@ EXAMPLES:
scw webhosting hosting list project-id=a3244331-5d32-4e36-9bf9-b60233e201c7 organization-id=a3244331-5d32-4e36-9bf9-b60233e201c7

ARGS:
[order-by] Define the order of the returned hostings (created_at_asc | created_at_desc)
[tags.{index}] Return hostings with these tags
[statuses.{index}] Return hostings with these statuses (unknown_status | delivering | ready | deleting | error | locked)
[domain] Return hostings with this domain
[project-id] Return hostings from this project ID
[organization-id] Return hostings from this organization ID
[order-by] Sort order for Web Hosting plans in the response (created_at_asc | created_at_desc)
[tags.{index}] Tags to filter for, only Web Hosting plans with matching tags will be returned
[statuses.{index}] Statuses to filter for, only Web Hosting plans with matching statuses will be returned (unknown_status | delivering | ready | deleting | error | locked)
[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
[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 | all)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Restore a hosting with the given ID.
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`.

USAGE:
scw webhosting hosting restore [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update a hosting.
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 update [arg=value ...]
Expand All @@ -17,10 +17,10 @@ EXAMPLES:

ARGS:
hosting-id Hosting ID
[email] New contact email for the hosting
[tags.{index}] New tags for the hosting
[option-ids.{index}] New options IDs for the hosting
[offer-id] New offer ID for the hosting
[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
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
Expand Down
16 changes: 8 additions & 8 deletions cmd/scw/testdata/test-all-usage-webhosting-hosting-usage.golden
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
A Scaleway web hosting associated with a domain name.
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.

USAGE:
scw webhosting hosting <command>

AVAILABLE COMMANDS:
create Create a hosting
delete Delete a hosting
get Get a hosting
get-dns-records Get the DNS records
list List all hostings
restore Restore a hosting
update Update a hosting
create Order a Web Hosting plan
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

FLAGS:
-h, --help help for hosting
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List all offers.
List the different Web Hosting offers, and their options, available to order from Scaleway.

USAGE:
scw webhosting offer list [arg=value ...]
Expand All @@ -16,10 +16,10 @@ EXAMPLES:
scw webhosting offer list only-options=true

ARGS:
[order-by] Define the order of the returned hostings (price_asc)
[without-options] Select only offers, no options
[only-options] Select only options
[hosting-id] Define a specific hosting id (optional)
[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)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
A hosting offer, with a set of features, available for purchase.
Web Hosting offers represent the different types of Web Hosting plan available to order at Scaleway.

USAGE:
scw webhosting offer <command>
Expand Down
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-webhosting-usage.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Webhosting API.
Web Hosting API.

USAGE:
scw webhosting <command>
Expand Down
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-main-usage-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ AVAILABLE COMMANDS:
tem Transactional Email API
vpc VPC API
vpc-gw Public Gateways API
webhosting Webhosting API
webhosting Web Hosting API

CONFIGURATION COMMANDS:
alias Alias related commands
Expand Down
92 changes: 45 additions & 47 deletions docs/commands/webhosting.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<!-- DO NOT EDIT: this file is automatically generated using scw-doc-gen -->
# Documentation for `scw webhosting`
Webhosting API.
Web Hosting API.

- [Hosting management commands](#hosting-management-commands)
- [Create a hosting](#create-a-hosting)
- [Delete a hosting](#delete-a-hosting)
- [Get a hosting](#get-a-hosting)
- [Get the DNS records](#get-the-dns-records)
- [List all hostings](#list-all-hostings)
- [Restore a hosting](#restore-a-hosting)
- [Update a hosting](#update-a-hosting)
- [Order a Web Hosting plan](#order-a-web-hosting-plan)
- [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)


## Hosting management commands

A Scaleway web hosting associated with a domain name.
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.


### Order a Web Hosting plan

### Create a hosting

Create a hosting.
Order a Web Hosting plan, specifying the offer type required via the `offer_id` parameter.

**Usage:**

Expand All @@ -35,19 +34,19 @@ scw webhosting hosting create [arg=value ...]

| Name | | Description |
|------|---|-------------|
| offer-id | | ID of the selected offer for the hosting |
| offer-id | | ID of the selected offer for the Web Hosting plan |
| project-id | | Project ID to use. If none is passed the default project ID will be used |
| email | | Contact email of the client for the hosting |
| tags.{index} | | The tags of the hosting |
| domain | | The domain name of the hosting |
| option-ids.{index} | | IDs of the selected options for the hosting |
| 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 |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |



### Delete a hosting
### Delete a Web Hosting plan

Delete a hosting with the given ID.
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.

**Usage:**

Expand Down Expand Up @@ -75,9 +74,9 @@ scw webhosting hosting delete hosting-id=a3244331-5d32-4e36-9bf9-b60233e201c7



### Get a hosting
### Get a Web Hosting plan

Get the details of a Hosting with the given ID.
Get the details of one of your existing Web Hosting plans, specified by its `hosting_id`.

**Usage:**

Expand Down Expand Up @@ -105,9 +104,9 @@ scw webhosting hosting get hosting-id=a3244331-5d32-4e36-9bf9-b60233e201c7



### Get the DNS records
### Get DNS records

The set of DNS record of a specific domain associated to a hosting.
Get the set of DNS records of a specified domain associated with a Web Hosting plan.

**Usage:**

Expand All @@ -120,7 +119,7 @@ scw webhosting hosting get-dns-records [arg=value ...]

| Name | | Description |
|------|---|-------------|
| domain | Required | Domain associated to the DNS records |
| domain | Required | Domain associated with the DNS records |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |


Expand All @@ -135,9 +134,9 @@ scw webhosting hosting get-dns-records domain=foo.com



### List all hostings
### List all Web Hosting plans

List all hostings.
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:**

Expand All @@ -150,12 +149,12 @@ scw webhosting hosting list [arg=value ...]

| Name | | Description |
|------|---|-------------|
| order-by | One of: `created_at_asc`, `created_at_desc` | Define the order of the returned hostings |
| tags.{index} | | Return hostings with these tags |
| statuses.{index} | One of: `unknown_status`, `delivering`, `ready`, `deleting`, `error`, `locked` | Return hostings with these statuses |
| domain | | Return hostings with this domain |
| project-id | | Return hostings from this project ID |
| organization-id | | Return hostings from this organization ID |
| 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` | 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 |
| organization-id | | Organization ID to filter for, only Web Hosting plans from this Organization will be returned |
| region | Default: `fr-par`<br />One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config |


Expand All @@ -170,9 +169,9 @@ scw webhosting hosting list project-id=a3244331-5d32-4e36-9bf9-b60233e201c7 orga



### Restore a hosting
### Restore a Web Hosting plan

Restore a hosting with the given ID.
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`.

**Usage:**

Expand Down Expand Up @@ -200,9 +199,9 @@ scw webhosting hosting restore hosting-id=a3244331-5d32-4e36-9bf9-b60233e201c7



### Update a hosting
### Update a Web Hosting plan

Update a hosting.
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:**

Expand All @@ -216,10 +215,10 @@ scw webhosting hosting update [arg=value ...]
| Name | | Description |
|------|---|-------------|
| hosting-id | Required | Hosting ID |
| email | | New contact email for the hosting |
| tags.{index} | | New tags for the hosting |
| option-ids.{index} | | New options IDs for the hosting |
| offer-id | | New offer ID for the hosting |
| 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 |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |


Expand All @@ -246,13 +245,12 @@ scw webhosting hosting update hosting-id=11111111-1111-1111-1111-111111111111 op

## Offer management commands

A hosting offer, with a set of features, available for purchase.

Web Hosting offers represent the different types of Web Hosting plan available to order at Scaleway.


### List all offers

List all offers.
List the different Web Hosting offers, and their options, available to order from Scaleway.

**Usage:**

Expand All @@ -265,10 +263,10 @@ scw webhosting offer list [arg=value ...]

| Name | | Description |
|------|---|-------------|
| order-by | One of: `price_asc` | Define the order of the returned hostings |
| without-options | | Select only offers, no options |
| only-options | | Select only options |
| hosting-id | | Define a specific hosting id (optional) |
| 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) |
| region | Default: `fr-par`<br />One of: `fr-par` | Region to target. If none is passed will use default region from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/moby/buildkit v0.11.6
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16.0.20230428130141-a5694ebc2375
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16.0.20230509101251-6bff51802440
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.2
Expand Down

0 comments on commit 800c15f

Please sign in to comment.