From 5aba982c24c47a1d20ee5692a927d4ff4aa2253c Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Mon, 25 Oct 2021 13:55:02 +0000 Subject: [PATCH 1/2] feat: update generated cli --- .../container/v1beta1/container_cli.go | 701 ++++++++++++++++++ internal/namespaces/rdb/v1/rdb_cli.go | 2 +- 2 files changed, 702 insertions(+), 1 deletion(-) create mode 100644 internal/namespaces/container/v1beta1/container_cli.go diff --git a/internal/namespaces/container/v1beta1/container_cli.go b/internal/namespaces/container/v1beta1/container_cli.go new file mode 100644 index 0000000000..df605c5790 --- /dev/null +++ b/internal/namespaces/container/v1beta1/container_cli.go @@ -0,0 +1,701 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. + +package container + +import ( + "context" + "reflect" + + "github.com/scaleway/scaleway-cli/internal/core" + "github.com/scaleway/scaleway-sdk-go/api/container/v1beta1" + "github.com/scaleway/scaleway-sdk-go/scw" +) + +// always import dependencies +var ( + _ = scw.RegionFrPar +) + +func GetGeneratedCommands() *core.Commands { + return core.NewCommands( + containerRoot(), + containerNamespace(), + containerContainer(), + containerCron(), + containerNamespaceList(), + containerNamespaceGet(), + containerNamespaceCreate(), + containerNamespaceUpdate(), + containerNamespaceDelete(), + containerContainerList(), + containerContainerGet(), + containerContainerCreate(), + containerContainerUpdate(), + containerContainerDelete(), + containerCronList(), + containerCronGet(), + containerCronDelete(), + ) +} +func containerRoot() *core.Command { + return &core.Command{ + Short: `Container as a Service API`, + Long: ``, + Namespace: "container", + } +} + +func containerNamespace() *core.Command { + return &core.Command{ + Short: `Namespace management commands`, + Long: `Namespace management commands.`, + Namespace: "container", + Resource: "namespace", + } +} + +func containerContainer() *core.Command { + return &core.Command{ + Short: `Container management commands`, + Long: `Container management commands.`, + Namespace: "container", + Resource: "container", + } +} + +func containerCron() *core.Command { + return &core.Command{ + Short: `Cron management commands`, + Long: `Cron management commands.`, + Namespace: "container", + Resource: "cron", + } +} + +func containerNamespaceList() *core.Command { + return &core.Command{ + Short: `List all your namespaces`, + Long: `List all your namespaces.`, + Namespace: "container", + Resource: "namespace", + Verb: "list", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.ListNamespacesRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "order-by", + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"created_at_asc", "created_at_desc", "name_asc", "name_desc"}, + }, + { + Name: "name", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "project-id", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "organization-id", + Required: false, + Deprecated: false, + Positional: false, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.ListNamespacesRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + resp, err := api.ListNamespaces(request, scw.WithAllPages()) + if err != nil { + return nil, err + } + return resp.Namespaces, nil + + }, + } +} + +func containerNamespaceGet() *core.Command { + return &core.Command{ + Short: `Get a namespace`, + Long: `Get the namespace associated with the given id.`, + Namespace: "container", + Resource: "namespace", + Verb: "get", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.GetNamespaceRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "namespace-id", + Required: true, + Deprecated: false, + Positional: true, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.GetNamespaceRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.GetNamespace(request) + + }, + } +} + +func containerNamespaceCreate() *core.Command { + return &core.Command{ + Short: `Create a new namespace`, + Long: `Create a new namespace.`, + Namespace: "container", + Resource: "namespace", + Verb: "create", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.CreateNamespaceRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "name", + Required: false, + Deprecated: false, + Positional: false, + Default: core.RandomValueGenerator("cns"), + }, + { + Name: "environment-variables.value.{key}", + Required: false, + Deprecated: false, + Positional: false, + }, + core.ProjectIDArgSpec(), + { + Name: "description", + Required: false, + Deprecated: false, + Positional: false, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.CreateNamespaceRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.CreateNamespace(request) + + }, + } +} + +func containerNamespaceUpdate() *core.Command { + return &core.Command{ + Short: `Update an existing namespace`, + Long: `Update the space associated with the given id.`, + Namespace: "container", + Resource: "namespace", + Verb: "update", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.UpdateNamespaceRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "namespace-id", + Required: true, + Deprecated: false, + Positional: true, + }, + { + Name: "environment-variables.value.{key}", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "description", + Required: false, + Deprecated: false, + Positional: false, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.UpdateNamespaceRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.UpdateNamespace(request) + + }, + } +} + +func containerNamespaceDelete() *core.Command { + return &core.Command{ + Short: `Delete an existing namespace`, + Long: `Delete the namespace associated with the given id.`, + Namespace: "container", + Resource: "namespace", + Verb: "delete", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.DeleteNamespaceRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "namespace-id", + Required: true, + Deprecated: false, + Positional: true, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.DeleteNamespaceRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.DeleteNamespace(request) + + }, + } +} + +func containerContainerList() *core.Command { + return &core.Command{ + Short: `List all your containers`, + Long: `List all your containers.`, + Namespace: "container", + Resource: "container", + Verb: "list", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.ListContainersRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "order-by", + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"created_at_asc", "created_at_desc", "name_asc", "name_desc"}, + }, + { + Name: "namespace-id", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "name", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "project-id", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "organization-id", + Required: false, + Deprecated: false, + Positional: false, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.ListContainersRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + resp, err := api.ListContainers(request, scw.WithAllPages()) + if err != nil { + return nil, err + } + return resp.Containers, nil + + }, + } +} + +func containerContainerGet() *core.Command { + return &core.Command{ + Short: `Get a container`, + Long: `Get the container associated with the given id.`, + Namespace: "container", + Resource: "container", + Verb: "get", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.GetContainerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "container-id", + Required: true, + Deprecated: false, + Positional: true, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.GetContainerRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.GetContainer(request) + + }, + } +} + +func containerContainerCreate() *core.Command { + return &core.Command{ + Short: `Create a new container`, + Long: `Create a new container.`, + Namespace: "container", + Resource: "container", + Verb: "create", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.CreateContainerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "namespace-id", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "name", + Required: false, + Deprecated: false, + Positional: false, + Default: core.RandomValueGenerator("ctnr"), + }, + { + Name: "environment-variables.value.{key}", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "min-scale", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "max-scale", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "memory-limit", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "timeout.seconds", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "timeout.nanos", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "privacy", + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"unknown_privacy", "public", "private"}, + }, + { + Name: "description", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "registry-image", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "max-concurrency", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "domain-name", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "protocol", + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"unknown_protocol", "http1", "h2c"}, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.CreateContainerRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.CreateContainer(request) + + }, + } +} + +func containerContainerUpdate() *core.Command { + return &core.Command{ + Short: `Update an existing container`, + Long: `Update the container associated with the given id.`, + Namespace: "container", + Resource: "container", + Verb: "update", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.UpdateContainerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "container-id", + Required: true, + Deprecated: false, + Positional: true, + }, + { + Name: "environment-variables.value.{key}", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "min-scale", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "max-scale", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "memory-limit", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "timeout.seconds", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "timeout.nanos", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "redeploy", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "privacy", + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"unknown_privacy", "public", "private"}, + }, + { + Name: "description", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "registry-image", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "max-concurrency", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "domain-name", + Required: false, + Deprecated: false, + Positional: false, + }, + { + Name: "protocol", + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"unknown_protocol", "http1", "h2c"}, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.UpdateContainerRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.UpdateContainer(request) + + }, + } +} + +func containerContainerDelete() *core.Command { + return &core.Command{ + Short: `Delete a container`, + Long: `Delete the container associated with the given id.`, + Namespace: "container", + Resource: "container", + Verb: "delete", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.DeleteContainerRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "container-id", + Required: true, + Deprecated: false, + Positional: true, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.DeleteContainerRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.DeleteContainer(request) + + }, + } +} + +func containerCronList() *core.Command { + return &core.Command{ + Short: `List all your crons`, + Long: `List all your crons.`, + Namespace: "container", + Resource: "cron", + Verb: "list", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.ListCronsRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "order-by", + Required: false, + Deprecated: false, + Positional: false, + EnumValues: []string{"created_at_asc", "created_at_desc"}, + }, + { + Name: "container-id", + Required: false, + Deprecated: false, + Positional: false, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.ListCronsRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + resp, err := api.ListCrons(request, scw.WithAllPages()) + if err != nil { + return nil, err + } + return resp.Crons, nil + + }, + } +} + +func containerCronGet() *core.Command { + return &core.Command{ + Short: `Get a cron`, + Long: `Get the cron associated with the given id.`, + Namespace: "container", + Resource: "cron", + Verb: "get", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.GetCronRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "cron-id", + Required: true, + Deprecated: false, + Positional: true, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.GetCronRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.GetCron(request) + + }, + } +} + +func containerCronDelete() *core.Command { + return &core.Command{ + Short: `Delete an existing cron`, + Long: `Delete the cron associated with the given id.`, + Namespace: "container", + Resource: "cron", + Verb: "delete", + // Deprecated: false, + ArgsType: reflect.TypeOf(container.DeleteCronRequest{}), + ArgSpecs: core.ArgSpecs{ + { + Name: "cron-id", + Required: true, + Deprecated: false, + Positional: true, + }, + core.RegionArgSpec(scw.RegionFrPar), + }, + Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { + request := args.(*container.DeleteCronRequest) + + client := core.ExtractClient(ctx) + api := container.NewAPI(client) + return api.DeleteCron(request) + + }, + } +} diff --git a/internal/namespaces/rdb/v1/rdb_cli.go b/internal/namespaces/rdb/v1/rdb_cli.go index d188f2449b..07b07a01c0 100644 --- a/internal/namespaces/rdb/v1/rdb_cli.go +++ b/internal/namespaces/rdb/v1/rdb_cli.go @@ -893,7 +893,7 @@ func rdbInstanceUpdate() *core.Command { }, { Name: "logs-policy.max-age-retention", - Short: `Max age of remote logs to keep on the database instance`, + Short: `Max age (in day) of remote logs to keep on the database instance`, Required: false, Deprecated: false, Positional: false, From fd8f803267d6316329d2e932c4e77d97e9c54b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Tue, 26 Oct 2021 16:15:56 +0200 Subject: [PATCH 2/2] Fix documentation --- docs/commands/fip.md | 245 +++++++++++++++++++++ docs/commands/function.md | 449 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 694 insertions(+) create mode 100644 docs/commands/fip.md create mode 100644 docs/commands/function.md 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 | + + +