diff --git a/docs/commands/fip.md b/docs/commands/fip.md new file mode 100644 index 0000000000..818710413a --- /dev/null +++ b/docs/commands/fip.md @@ -0,0 +1,245 @@ + +# Documentation for `scw fip` +Flexible IP API + +- [Flexible IP management commands](#flexible-ip-management-commands) + - [Attach a Flexible IP to a server](#attach-a-flexible-ip-to-a-server) + - [Create a Flexible IP](#create-a-flexible-ip) + - [Delete a Flexible IP](#delete-a-flexible-ip) + - [Detach a Flexible IP from a server](#detach-a-flexible-ip-from-a-server) + - [Get a Flexible IP](#get-a-flexible-ip) + - [List Flexible IPs](#list-flexible-ips) + - [Update a Flexible IP](#update-a-flexible-ip) +- [MAC address management commands](#mac-address-management-commands) + - [Generate a virtual MAC on a given Flexible IP](#generate-a-virtual-mac-on-a-given-flexible-ip) + - [Remove a virtual MAC from a Flexible IP](#remove-a-virtual-mac-from-a-flexible-ip) + - [Duplicate a Virtual MAC](#duplicate-a-virtual-mac) + + +## Flexible IP management commands + +A Flexible IP can be attached to any server in the same zone. +A server can be linked with multiple Flexible IPs attached to it. + + + +### Attach a Flexible IP to a server + +Attach a Flexible IP to a server. + +**Usage:** + +``` +scw fip ip attach [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| fips-ids.{index} | Required | A list of Flexible IP IDs to attach | +| server-id | Required | A server ID on which to attach the Flexible IPs | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Create a Flexible IP + +Create a Flexible IP. + +**Usage:** + +``` +scw fip ip create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | +| description | | Description to associate with the Flexible IP, max 255 characters | +| tags.{index} | | Tags to associate to the Flexible IP | +| server-id | | Server ID on which to attach the created Flexible IP | +| reverse | | Reverse DNS value | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Delete a Flexible IP + +Delete a Flexible IP. + +**Usage:** + +``` +scw fip ip delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| fip-id | Required | ID of the Flexible IP to delete | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Detach a Flexible IP from a server + +Detach a Flexible IP from a server. + +**Usage:** + +``` +scw fip ip detach [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| fips-ids.{index} | Required | A list of Flexible IP IDs to detach | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Get a Flexible IP + +Get a Flexible IP. + +**Usage:** + +``` +scw fip ip get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| fip-id | Required | Flexible IP ID | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + +### List Flexible IPs + +List Flexible IPs. + +**Usage:** + +``` +scw fip ip list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `created_at_asc`, `created_at_desc` | The sort order of the returned Flexible IPs | +| tags.{index} | | Filter Flexible IPs with one or more matching tags | +| status.{index} | One of: `unknown`, `ready`, `updating`, `attached`, `error`, `detaching`, `locked` | Filter Flexible IPs by status | +| server-ids.{index} | | Filter Flexible IPs by server IDs | +| project-id | | Filter Flexible IPs by project ID | +| organization-id | | Filter Flexible IPs by organization ID | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Update a Flexible IP + +Update a Flexible IP. + +**Usage:** + +``` +scw fip ip update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| fip-id | Required | ID of the Flexible IP to update | +| description | | Description to associate with the Flexible IP, max 255 characters | +| tags.{index} | | Tags to associate with the Flexible IP | +| reverse | | Reverse DNS value | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + +## MAC address management commands + +MAC address management commands. + + +### Generate a virtual MAC on a given Flexible IP + +Generate a virtual MAC on a given Flexible IP. + +**Usage:** + +``` +scw fip mac create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| fip-id | Required | Flexible IP ID on which to generate a Virtual MAC | +| mac-type | Required
One of: `unknown_type`, `vmware`, `xen`, `kvm` | TODO | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Remove a virtual MAC from a Flexible IP + +Remove a virtual MAC from a Flexible IP. + +**Usage:** + +``` +scw fip mac delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| fip-id | Required | Flexible IP ID from which to delete the Virtual MAC | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + +### Duplicate a Virtual MAC + +Duplicate a Virtual MAC from a given Flexible IP onto another attached on the same server. + +**Usage:** + +``` +scw fip mac duplicate [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| fip-id | Required | Flexible IP ID on which to duplicate the Virtual MAC | +| duplicate-from-fip-id | Required | Flexible IP ID to duplicate the Virtual MAC from | +| zone | Default: `fr-par-1`
One of: `fr-par-2` | Zone to target. If none is passed will use default zone from the config | + + + diff --git a/docs/commands/function.md b/docs/commands/function.md new file mode 100644 index 0000000000..2a8034d2d5 --- /dev/null +++ b/docs/commands/function.md @@ -0,0 +1,449 @@ + +# Documentation for `scw function` +Function as a Service API + +- [Cron management commands](#cron-management-commands) + - [Delete an existing cron](#delete-an-existing-cron) + - [Get a cron](#get-a-cron) + - [List all your crons](#list-all-your-crons) +- [Function management commands](#function-management-commands) + - [Create a new function](#create-a-new-function) + - [Delete a function](#delete-a-function) + - [Deploy a function](#deploy-a-function) + - [Get a function](#get-a-function) + - [Get a download URL of a function](#get-a-download-url-of-a-function) + - [Get an upload URL of a function](#get-an-upload-url-of-a-function) + - [List all your functions](#list-all-your-functions) + - [Update an existing function](#update-an-existing-function) +- [Logs management commands](#logs-management-commands) + - [List your application logs](#list-your-application-logs) +- [Function namespace management commands](#function-namespace-management-commands) + - [Create a new namespace](#create-a-new-namespace) + - [Delete an existing namespace](#delete-an-existing-namespace) + - [Get a namespace](#get-a-namespace) + - [List all your namespaces](#list-all-your-namespaces) + - [Update an existing namespace](#update-an-existing-namespace) +- [Runtime management commands](#runtime-management-commands) + - [List function runtimes](#list-function-runtimes) + + +## Cron management commands + +Cron management commands. + + +### Delete an existing cron + +Delete the cron associated with the given id. + +**Usage:** + +``` +scw function cron delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| cron-id | Required | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Get a cron + +Get the cron associated with the given id. + +**Usage:** + +``` +scw function cron get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| cron-id | Required | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### List all your crons + +List all your crons. + +**Usage:** + +``` +scw function cron list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `created_at_asc`, `created_at_desc` | | +| function-id | | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +## Function management commands + +Function management commands. + + +### Create a new function + +Create a new function. + +**Usage:** + +``` +scw function function create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| name | Default: `` | | +| namespace-id | | | +| environment-variables.value.{key} | | | +| min-scale | | | +| max-scale | | | +| runtime | One of: `unknown_runtime`, `golang`, `python`, `python3`, `node8`, `node10`, `node14` | | +| memory-limit | | | +| timeout.seconds | | | +| timeout.nanos | | | +| handler | | | +| privacy | One of: `unknown_privacy`, `public`, `private` | | +| description | | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Delete a function + +Delete the function associated with the given id. + +**Usage:** + +``` +scw function function delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| function-id | Required | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Deploy a function + +Deploy a function associated with the given id. + +**Usage:** + +``` +scw function function deploy [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| function-id | Required | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Get a function + +Get the function associated with the given id. + +**Usage:** + +``` +scw function function get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| function-id | Required | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Get a download URL of a function + +Get a download URL for a function associated with the given id. + +**Usage:** + +``` +scw function function get-download-url [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| function-id | Required | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Get an upload URL of a function + +Get an upload URL of a function associated with the given id. + +**Usage:** + +``` +scw function function get-upload-url [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| function-id | Required | | +| content-length | | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### List all your functions + +List all your functions. + +**Usage:** + +``` +scw function function list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | | +| namespace-id | | | +| name | | | +| project-id | | | +| organization-id | | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Update an existing function + +Update the function associated with the given id. + +**Usage:** + +``` +scw function function update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| function-id | Required | | +| environment-variables.value.{key} | | | +| min-scale | | | +| max-scale | | | +| memory-limit | | | +| timeout.seconds | | | +| timeout.nanos | | | +| redeploy | | | +| handler | | | +| privacy | One of: `unknown_privacy`, `public`, `private` | | +| description | | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +## Logs management commands + +Logs management commands. + + +### List your application logs + +List your application logs. + +**Usage:** + +``` +scw function logs list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| function-id | Required | | +| order-by | One of: `timestamp_desc`, `timestamp_asc` | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +## Function namespace management commands + +Function namespace management commands. + + +### Create a new namespace + +Create a new namespace. + +**Usage:** + +``` +scw function namespace create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| name | Default: `` | | +| environment-variables.value.{key} | | | +| project-id | | Project ID to use. If none is passed the default project ID will be used | +| description | | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Delete an existing namespace + +Delete the namespace associated with the given id. + +**Usage:** + +``` +scw function namespace delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| namespace-id | Required | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Get a namespace + +Get the namespace associated with the given id. + +**Usage:** + +``` +scw function namespace get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| namespace-id | Required | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### List all your namespaces + +List all your namespaces. + +**Usage:** + +``` +scw function namespace list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | | +| name | | | +| project-id | | | +| organization-id | | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +### Update an existing namespace + +Update the space associated with the given id. + +**Usage:** + +``` +scw function namespace update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| namespace-id | Required | | +| environment-variables.value.{key} | | | +| description | | | +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + + +## Runtime management commands + +Runtime management commands. + + +### List function runtimes + +List available function runtimes. + +**Usage:** + +``` +scw function runtime list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| region | Default: `fr-par`
One of: `fr-par` | Region to target. If none is passed will use default region from the config | + + +