Documentation for `scw instance`
The CLI documentation pages are currently under construction
The content is up to date. We're making improvements to the site over the next few weeks for a better experience.
This API allows you to manage your CPU and GPU Instances.
Image management commands
Images are backups of your Instances. One image will contain all the volumes of your Instance and can be used to restore your Instance and its data. You can also use it to create a series of Instances with a predefined configuration. To copy not all but only one specified volume of an Instance, you can use the snapshot feature instead.
Create an Instance image
Create an Instance image from the specified snapshot ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | Name of the image | Default: <generated> |
| snapshot-id | UUID of the snapshot that will be used as root volume in the image | Required |
| arch | Architecture of the image | Required One of: unknown_arch, x86_64, arm, arm64 |
| additional-volumes.{index}.id | UUID of the snapshot to add | |
| additional-volumes.{index}.name | Name of the additional snapshot | |
| additional-volumes.{index}.size | Size of the additional snapshot | |
| additional-volumes.{index}.volume-type | Underlying volume type of the additional snapshot | One of: l_ssd, b_ssd, unified, scratch, sbs_volume, sbs_snapshot |
| additional-volumes.{index}.project-id | Project ID that own the additional snapshot | |
| Organization ID that own the additional snapshot | Deprecated | |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| tags.{index} | Tags of the image | |
| public | True to create a public image | |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Create an image named 'foobar' for x86_64 Instances from the specified snapshot ID
Code
Delete an Instance image
Delete the image with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| image-id | UUID of the image you want to delete | Required |
| with-snapshots | Delete the snapshots attached to this image | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Delete an image in the default zone with the specified ID
Code
Delete an image in fr-par-1 zone with the specified ID
Code
Get an Instance image
Get details of an image with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| image-id | UUID of the image you want to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Get an image in the default zone with the specified ID
Code
Get an image in fr-par-1 zone with the specified ID
Code
List Instance images
List all existing Instance images.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | ||
| arch | ||
| project-id | ||
| tags | ||
| organization-id | ||
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
Examples:
List all public images in the default zone
Code
Update image
Update the properties of an image.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| image-id | UUID of the image | Required |
| name | Name of the image | |
| arch | Architecture of the image | One of: unknown_arch, x86_64, arm, arm64 |
| extra-volumes.{key}.id | UUID of the snapshot | |
| tags.{index} | Tags of the image | |
| public | True to set the image as public | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Wait for image to reach a stable state
Wait for image to reach a stable state. This is similar to using --wait flag on other action commands, but without requiring a new action on the image.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| image-id | ID of the image. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
| timeout | Timeout of the wait | Default: 1h0m0s |
Examples:
Wait for a image to reach a stable state
Code
IP management commands
A flexible IP address is an IP address which you hold independently of any Instance. You can attach it to any of your Instances and do live migration of the IP address between your Instances.
Note that attaching a flexible IP address to an Instance removes its previous public IP and interrupts any ongoing public connection to the Instance. This does not apply if you have migrated your server to the new Network stack and have at least one flexible IP attached to the Instance.
Attach an IP to a given server
Attach an IP to a given server.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| ip | IP or UUID of the IP. | Required |
| server-id | UUID of the server to attach the IP to | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Attach an IP to the given server
Code
Reserve a flexible IP
Reserve a flexible IP and attach it to the specified Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| tags.{index} | Tags of the IP | |
| server | UUID of the Instance you want to attach the IP to | |
| type | IP type to reserve (either 'routed_ipv4' or 'routed_ipv6') | One of: unknown_iptype, routed_ipv4, routed_ipv6 |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Create an IP in the default zone
Code
Create an IP in fr-par-1 zone
Code
Create an IP and attach it to the specified Instance
Code
Delete a flexible IP
Delete the IP with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| ip | ID or address of the IP to delete | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Delete an IP in the default zone with the specified ID
Code
Delete an IP in fr-par-1 zone with the specified ID
Code
Delete an IP using directly the specified IP address
Code
Detach an ip from its server
Detach an ip from its server.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| ip | IP or UUID of the IP. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Detach an IP by using its UUID
Code
Detach an IP by using its IP address
Code
Get a flexible IP
Get details of an IP with the specified ID or address.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| ip | IP ID or address to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Get an IP in the default zone with the specified ID
Code
Get an IP in fr-par-1 zone with the specified ID
Code
Get an IP, directly using the specified IP address
Code
List all flexible IPs
List all flexible IPs in a specified zone.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | Project ID in which the IPs are reserved | |
| tags | Filter IPs with these exact tags (to filter with several tags, use commas to separate them) | |
| name | Filter on the IP address (Works as a LIKE operation on the IP address) | |
| type | Filter on the IP Mobility IP type (whose value should be either 'routed_ipv4' or 'routed_ipv6') | |
| organization-id | Organization ID in which the IPs are reserved | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
Examples:
List all IPs in the default zone
Code
List all IPs in fr-par-1 zone
Code
Update a flexible IP
Update a flexible IP in the specified zone with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| ip | IP ID or IP address | Required |
| reverse | Reverse domain name | |
| type | Should have no effect | One of: unknown_iptype, routed_ipv4, routed_ipv6 |
| tags.{index} | An array of keywords you want to tag this IP with | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Update an IP in the default zone with the specified ID
Code
Update an IP in fr-par-1 zone with the specified ID
Code
Update an IP using directly the specified IP address
Code
Placement group management commands
Placement groups allow the user to express a preference regarding the physical position of a group of Instances. The feature lets the user choose to either group Instances on the same physical hardware for best network throughput and low latency or to spread Instances across physically distanced hardware to reduce the risk of physical failure.
The operating mode is selected by a policy_type. Two policy
types are available:
low_latencywill group Instances on the same hypervisorsmax_availabilitywill spread Instances across physically distanced hypervisors
The policy_type is set to max_availability by default.
For each policy types, one of the two policy_mode may be selected:
optionalwill start your Instances even if the constraint is not respectedenforcedguarantees that if the Instance starts, the constraint is respected
The policy_mode is set by default to optional.
Create a placement group
Create a new placement group in a specified Availability Zone.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | Name of the placement group | Default: <generated> |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| tags.{index} | Tags of the placement group | |
| policy-mode | Operating mode of the placement group | One of: optional, enforced |
| policy-type | Policy type of the placement group | One of: max_availability, low_latency |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Create a placement group with default name
Code
Create a placement group with the specified name
Code
Create an enforced placement group
Code
Create an optional placement group
Code
Create an optional low latency placement group
Code
Create an enforced low latency placement group
Code
Delete the specified placement group
Delete the specified placement group.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| placement-group-id | UUID of the placement group you want to delete | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Delete a placement group in the default zone with the specified ID
Code
Delete a placement group in fr-par-1 zone with the specified ID
Code
Get a placement group
Get the specified placement group.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| placement-group-id | UUID of the placement group you want to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Get a placement group with the specified ID
Code
Get placement group servers
Get all Instances belonging to the specified placement group.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| placement-group-id | UUID of the placement group you want to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
List placement groups
List all placement groups in a specified Availability Zone.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | List only placement groups of this Project ID | |
| tags | List placement groups with these exact tags (to filter with several tags, use commas to separate them) | |
| name | Filter placement groups by name (for eg. "cluster1" will return "cluster100" and "cluster1" but not "foo") | |
| organization-id | List only placement groups of this Organization ID | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
Examples:
List all placement groups in the default zone
Code
List placement groups that match a specified name ('cluster1' will return 'cluster100' and 'cluster1' but not 'foo')
Code
Set placement group
Set all parameters of the specified placement group.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| placement-group-id | Required | |
| name | ||
| policy-mode | One of: optional, enforced | |
| policy-type | One of: max_availability, low_latency | |
| project | Project ID to use. If none is passed the default project ID will be used | |
| tags.{index} | ||
| organization | Organization ID to use. If none is passed the default organization ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Set placement group servers
Set all Instances belonging to the specified placement group.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| placement-group-id | UUID of the placement group you want to set | Required |
| servers.{index} | An array of the Instances' UUIDs you want to configure | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Update the complete set of Instances in a specified placement group (all Instances must be shut down)
Code
Update a placement group
Update one or more parameter of the specified placement group.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| placement-group-id | UUID of the placement group | Required |
| name | Name of the placement group | |
| tags.{index} | Tags of the placement group | |
| policy-mode | Operating mode of the placement group | One of: optional, enforced |
| policy-type | Policy type of the placement group | One of: max_availability, low_latency |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Update the name of a placement group
Code
Update the policy mode of a placement group (all Instances in your placement group MUST be shut down)
Code
Update the policy type of a placement group (all Instances in your placement group MUST be shutdown)
Code
Update placement group servers
Update all Instances belonging to the specified placement group.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| placement-group-id | UUID of the placement group you want to update | Required |
| servers.{index} | An array of the Instances' UUIDs you want to configure | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Private NIC management commands
A Private NIC is the network interface that connects an Instance to a Private Network. An Instance can have multiple private NICs at the same time, but each NIC must belong to a different Private Network.
Create a private NIC connecting an Instance to a Private Network
Create a private NIC connecting an Instance to a Private Network.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the Instance the private NIC will be attached to | Required |
| private-network-id | UUID of the private network where the private NIC will be attached | Required |
| tags.{index} | Private NIC tags | |
| Ip_ids defined from IPAM | Deprecated | |
| ipam-ip-ids.{index} | UUID of IPAM ips, to be attached to the instance in the requested private network | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Delete a private NIC
Delete a private NIC.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Instance to which the private NIC is attached | Required |
| private-nic-id | Private NIC unique ID | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Get a private NIC
Get private NIC properties.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Instance to which the private NIC is attached | Required |
| private-nic-id | The private NIC unique ID or MAC address | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
List all private NICs
List all private NICs of a specified Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Instance to which the private NIC is attached | Required |
| tags | Private NIC tags | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
Examples:
List all private NICs on a specified server
Code
List private NICs of the Instance ID 'my_server_id'
Code
Update a private NIC
Update one or more parameter(s) of a specified private NIC.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the Instance the private NIC will be attached to | Required |
| private-nic-id | Private NIC unique ID | Required |
| tags.{index} | Tags used to select private NIC/s | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Update tags of a private NIC
Code
Security group management commands
A security group is a set of firewall rules on a set of Instances. Security groups enable you to create rules that either drop or allow incoming traffic from certain ports of your Instances.
Security groups are stateful by default which means return traffic is automatically allowed, regardless of any rules. As a contrary, you have to switch in a stateless mode to define explicitly allowed.
Remove all rules of a security group
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | ID of the security group to reset. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Remove all rules of the given security group
Code
Create a security group
Create a security group with a specified name and description.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | Name of the security group | Required Default: <generated> |
| description | Description of the security group | |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| tags.{index} | Tags of the security group | |
| Defines whether this security group becomes the default security group for new Instances | Deprecated | |
| project-default | Whether this security group becomes the default security group for new Instances | |
| stateful | Whether the security group is stateful or not | Default: true |
| inbound-default-policy | Default policy for inbound rules | Default: acceptOne of: unknown_policy, accept, drop |
| outbound-default-policy | Default policy for outbound rules | Default: acceptOne of: unknown_policy, accept, drop |
| enable-default-security | True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable | |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Create a security group with a specified name and description
Code
Create a security group that will be applied as default on all Instances of this Project
Code
Create a security group that will have a default drop inbound policy (traffic your Instance receives)
Code
Create a security group that will have a default drop outbound policy (traffic your Instance transmits)
Code
Create a stateless security group
Code
Create rule
Create a rule in the specified security group ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | UUID of the security group | Required |
| protocol | Required One of: unknown_protocol, TCP, UDP, ICMP, ANY | |
| direction | Required One of: unknown_direction, inbound, outbound | |
| action | Required One of: unknown_action, accept, drop | |
| ip-range | Required Default: 0.0.0.0/0 | |
| dest-port-from | Beginning of the range of ports to apply this rule to (inclusive) | |
| dest-port-to | End of the range of ports to apply this rule to (inclusive) | |
| position | Position of this rule in the security group rules list | |
| editable | Indicates if this rule is editable (will be ignored) | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Allow incoming SSH
Code
Allow HTTP
Code
Allow HTTPS
Code
Allow a specified IP range
Code
Allow FTP
Code
Delete a security group
Delete a security group with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | UUID of the security group you want to delete | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Delete the security group with the specified ID
Code
Delete rule
Delete a security group rule with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | Required | |
| security-group-rule-id | Required | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Delete a security group rule with the specified ID
Code
Edit all rules of a security group
This command starts your default editor to edit a marshaled version of your resource Default editor will be taken from $VISUAL, then $EDITOR or an editor based on your system
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | ID of the security group to reset. | Required |
| mode | marshaling used when editing data | Default: yamlOne of: yaml, json |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Get a security group
Get the details of a security group with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | UUID of the security group you want to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Get a security group with the specified ID
Code
Get rule
Get details of a security group rule with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | Required | |
| security-group-rule-id | Required | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Get details of a security group rule with the specified ID
Code
List security groups
List all existing security groups.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | Name of the security group | |
| project-id | Security group Project ID | |
| tags | List security groups with these exact tags (to filter with several tags, use commas to separate them) | |
| project-default | Filter security groups with this value for project_default | |
| organization-id | Security group Organization ID | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
Examples:
List all security groups that match the specified name
Code
Get default rules
Lists the default rules applied to all the security groups.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
List rules
List the rules of the a specified security group ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | UUID of the security group | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
Update all the rules of a security group
Replaces the existing rules of the security group with the rules provided. This endpoint supports the update of existing rules, creation of new rules and deletion of existing rules when they are not passed in the request.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | UUID of the security group to update the rules on | Required |
| rules.{index}.id | UUID of the security rule to update. If no value is provided, a new rule will be created | |
| rules.{index}.action | Action to apply when the rule matches a packet | One of: unknown_action, accept, drop |
| rules.{index}.protocol | Protocol family this rule applies to | One of: unknown_protocol, TCP, UDP, ICMP, ANY |
| rules.{index}.direction | Direction the rule applies to | One of: unknown_direction, inbound, outbound |
| rules.{index}.ip-range | Range of IP addresses these rules apply to | |
| rules.{index}.dest-port-from | Beginning of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY | |
| rules.{index}.dest-port-to | End of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY, or if it is equal to dest_port_from | |
| rules.{index}.position | Position of this rule in the security group rules list. If several rules are passed with the same position, the resulting order is undefined | |
| rules.{index}.editable | Indicates if this rule is editable. Rules with the value false will be ignored | |
| rules.{index}.zone | Zone of the rule. This field is ignored | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Update a security group
Update the properties of security group.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | UUID of the security group | Required |
| name | Name of the security group | |
| description | Description of the security group | |
| enable-default-security | True to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable | |
| inbound-default-policy | Default inbound policy | One of: unknown_policy, accept, drop |
| tags.{index} | Tags of the security group | |
| Please use project_default instead | Deprecated | |
| project-default | True use this security group for future Instances created in this project | |
| outbound-default-policy | Default outbound policy | One of: unknown_policy, accept, drop |
| stateful | True to set the security group as stateful | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Update security group rule
Update the properties of a rule from a specified security group.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | UUID of the security group | Required |
| security-group-rule-id | UUID of the rule | Required |
| protocol | Protocol family this rule applies to | One of: unknown_protocol, TCP, UDP, ICMP, ANY |
| direction | Direction the rule applies to | One of: unknown_direction, inbound, outbound |
| action | Action to apply when the rule matches a packet | One of: unknown_action, accept, drop |
| ip-range | Range of IP addresses these rules apply to | |
| dest-port-from | Beginning of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter. | |
| dest-port-to | End of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter. | |
| position | Position of this rule in the security group rules list | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Instance management commands
Instances are computing units providing resources to run your applications on. Scaleway offers various Instance types including Virtual Instances and dedicated GPU Instances. Note: Instances can be referenced as "servers" in API endpoints.
Perform a raw API action on a server
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| action | The raw API action to perform, as listed with 'scw instance server list-actions' | Required |
| server-id | ID of the server affected by the action. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Start a server in the default zone with a given id
Code
Attach a filesystem volume to an Instance
Attach a filesystem volume to an Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Required | |
| filesystem-id | ||
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Attach an IP to a server
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server | Required |
| ip | UUID of the IP to attach or its UUID | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Attach an IP to a server
Code
Attach an IP to a server
Code
Attach a volume to an Instance
Attach a volume to an Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Required | |
| volume-id | ||
| volume-type | One of: unknown_volume_type, l_ssd, b_ssd, sbs_volume | |
| boot | ||
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Backup server
Create a new image based on the server.
This command:
- creates a snapshot of all attached volumes.
- creates an image based on all these snapshots.
Once your image is ready you will be able to create a new server based on this image.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server to backup. | Required |
| name | Name of your backup. | Default: <generated> |
| unified | Whether or not the type of the snapshot is unified. | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Create a new image based on a server
Code
Connect to the serial console of an instance
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Server ID to connect to | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
| ws-url | WebSocket URL to connect to (overrides default) |
Create server
Create an instance server.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| image | Image ID or label of the server | Required Default: ubuntu_jammy |
| type | Server commercial type (help: https://www.scaleway.com/en/docs/compute/instances/reference-content/choosing-instance-type/Open in new context) | Required |
| name | Server name | Default: <generated> |
| root-volume | Local root volume of the server | |
| additional-volumes.{index} | Additional local and block volumes attached to your server | |
| ip | Either an IP, an IP ID, ('new', 'ipv4', 'ipv6' or 'both') to create new IPs, 'dynamic' to use a dynamic IP or 'none' for no public IP (new | ipv4 |
| dynamic-ip-required | Define if a dynamic IPv4 is required for the Instance. If server has no IPv4, a dynamic one will be allocated. | Default: true |
| tags.{index} | Server tags | |
| ipv6 | Enable IPv6, to be used with routed-ip-enabled=false | |
| stopped | Do not start server after its creation | |
| security-group-id | The security group ID used for this server | |
| placement-group-id | The placement group ID in which the server has to be created | |
| cloud-init | The cloud-init script to use | |
| boot-type | The boot type to use, if empty the local boot will be used. Will be overwritten to bootscript if bootscript-id is set. | Default: localOne of: local, bootscript, rescue |
| admin-password-encryption-ssh-key-id | ID of the IAM SSH Key used to encrypt generated admin password. Required when creating a windows server. | |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used |
Examples:
Create and start an instance on Ubuntu Focal
Code
Create a GP1-XS instance, give it a name and add tags
Code
Create an instance with 2 additional block volumes (50GB and 100GB)
Code
Create an instance with 2 local volumes (10GB and 10GB)
Code
Create an instance with a SBS root volume (100GB and 15000 iops)
Code
Create an instance with volumes from snapshots
Code
Create and start an instance from a snapshot
Code
Create and start an instance using existing volume
Code
Use an existing IP
Code
Delete server
Delete a server with the given ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Required | |
| with-volumes | Delete the volumes attached to the server | Default: allOne of: none, local, block, root, all |
| with-ip | Delete the IP attached to the server | |
| force-shutdown | Force shutdown of the instance server before deleting it | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Delete a server in the default zone with a given id
Code
Delete a server in fr-par-1 zone with a given id
Code
Detach a filesystem volume from an Instance
Detach a filesystem volume from an Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Required | |
| filesystem-id | ||
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Detach an IP from a server
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the server. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Detach IP from a given server
Code
Detach a volume from an Instance
Detach a volume from an Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Required | |
| volume-id | ||
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Migrate server to IP mobility
Enable routed IP for this server and migrate the nat public IP to routed Server will reboot ! https://www.scaleway.com/en/docs/compute/instances/api-cli/using-ip-mobility/Open in new context
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server affected by the action. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Migrate a server with legacy network to IP mobility
Code
Get an Instance
Get the details of a specified Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the Instance you want to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Get the Instance with its specified ID
Code
Get Instance compatible types
Get compatible commercial types that can be used to update the Instance. The compatibility of an Instance offer is based on:
- the CPU architecture
- the OS type
- the required l_ssd storage size
- the required scratch storage size If the specified Instance offer is flagged as end of service, the best compatible offer is the first returned.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the Instance you want to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Get your server rdp password and decrypt it using your ssh key
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Server ID to connect to | Required |
| key | Path of the SSH key used to decrypt the rdp password | Default: ~/.ssh/id_rsa |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1 |
List all Instances
List all Instances in a specified Availability Zone, e.g. fr-par-1.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | List only Instances of this Project ID | |
| name | Filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo") | |
| List Instances by private_ip | Deprecated | |
| without-ip | List Instances that are not attached to a public IP | |
| with-ip | List Instances by IP (both private_ip and public_ip are supported) | |
| commercial-type | List Instances of this commercial type | |
| state | List Instances in this state | One of: running, stopped, stopped in place, starting, stopping, locked |
| tags | List Instances with these exact tags (to filter with several tags, use commas to separate them) | |
| private-network | List Instances in this Private Network | |
| order | Define the order of the returned servers | One of: creation_date_desc, creation_date_asc, modification_date_desc, modification_date_asc |
| private-networks | List Instances from the given Private Networks (use commas to separate them) | |
| private-nic-mac-address | List Instances associated with the given private NIC MAC address | |
| servers | List Instances from these server ids (use commas to separate them) | |
| organization-id | List only Instances of this Organization ID | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
Examples:
List all Instances on your default zone
Code
List Instances of this commercial type
Code
List Instances that are not attached to a public IP
Code
List Instances that match the specified name ('server1' will return 'server100' and 'server1' but not 'foo')
Code
List Instance actions
List all actions (e.g. power on, power off, reboot) that can currently be performed on an Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Required | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Reboot server
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server affected by the action. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Reboot a server in the default zone with a given id
Code
Reboot a server in fr-par-1 zone with a given id
Code
SSH into a server
Connect to distant server via the SSH protocol.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Server ID to SSH into | Required |
| username | Username used for the SSH connection | Default: root |
| port | Port used for the SSH connection | Default: 22 |
| command | Command to execute on the remote server | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Put server in standby mode
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server affected by the action. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Put in standby a server in the default zone with a given id
Code
Put in standby a server in fr-par-1 zone with a given id
Code
Power on server
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server affected by the action. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Start a server in the default zone with a given id
Code
Start a server in fr-par-1 zone with a given id
Code
Power off server
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server affected by the action. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Stop a server in the default zone with a given id
Code
Stop a server in fr-par-1 zone with a given id
Code
Terminate server
Terminates a server with the given ID and all of its volumes.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Required | |
| with-ip | Delete the IP attached to the server | |
| with-block | Delete the Block Storage volumes attached to the server | Default: promptOne of: prompt, true, false |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Terminate a server in the default zone with a given id
Code
Terminate a server in fr-par-1 zone with a given id
Code
Terminate a server and also delete its flexible IPs
Code
Update an Instance
Update the Instance information, such as name, boot mode, or tags.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the Instance | Required |
| name | Name of the Instance | |
| ip | IP that should be attached to the server (use ip=none to detach) | |
| cloud-init | The cloud-init script to use | |
| boot-type | One of: local, bootscript, rescue | |
| tags.{index} | Tags of the Instance | |
| volumes.{key}.boot | Force the Instance to boot on this volume | Default: false |
| volumes.{key}.base-snapshot | ID of the snapshot on which this volume will be based | |
| volumes.{key}.project | Project ID of the volume | |
| volumes.{key}.organization | Organization ID of the volume | |
| dynamic-ip-required | ||
| True to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False) | Deprecated | |
| public-ips.{index} | A list of reserved IP IDs to attach to the Instance | |
| Deprecated | ||
| protected | True to activate server protection option | |
| security-group-id | ||
| volume-ids.{index} | Will update ALL volume IDs at once, including the root volume of the server (use volume-ids=none to detach all volumes) | |
| placement-group-id | Placement group ID if Instance must be part of a placement group | |
| private-nics.{index} | Instance private NICs | |
| commercial-type | Set the commercial_type for this Instance. | |
| admin-password-encryption-ssh-key-id | UUID of the SSH RSA key that will be used to encrypt the initial admin password for OS requiring it. Mandatory for Windows OS. | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Update the name of a specified Instance
Code
Switch a specified Instance to rescue mode (reboot is required to access rescue mode)
Code
Overwrite tags of a specified Instance
Code
Apply the specified security group to a specified server
Code
Put a specified Instance in the specified placement group. Instance must be off
Code
Boot an Instance from a specific volume
Code
Wait for server to reach a stable state
Wait for server to reach a stable state. This is similar to using --wait flag on other action commands, but without requiring a new action on the server.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| timeout | Timeout of the wait | Default: 10m0s |
| server-id | ID of the server affected by the action. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Wait for a server to reach a stable state
Code
Instance type management commands
All Instance types available in a specified zone. Each type contains all the features of the Instance (CPU, RAM, Storage) as well as their associated pricing.
Get availability
Get availability for all Instance types.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
List Instance types
List available Instance types and their technical details.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
List all server-types in the default zone
Code
List all server-types in fr-par-1 zone
Code
Snapshot management commands
Snapshots contain the data of a specified volume at a particular point in time. The data can include the Instance's operating system, configuration information and/or files stored on the volume.
A snapshot can be done from a specified volume, e.g. you have one Instance with a volume containing the OS and another one containing the application data, and you want to use different snapshot strategies on both volumes.
Volumes can be created from snapshots of their own type.
Migrate a volume and/or snapshots to SBS (Scaleway Block Storage)
To be used, the call to this endpoint must be preceded by a call to the Get a volume or snapshot's migration plan endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | The snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to the Get a volume or snapshot's migration plan endpoint. | |
| validation-key | A value to be retrieved from a call to the Get a volume or snapshot's migration plan endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Create a snapshot from a specified volume or from a QCOW2 file
Create a snapshot from a specified volume or from a QCOW2 file in a specified Availability Zone.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | Name of the snapshot | Default: <generated> |
| volume-id | UUID of the volume | |
| unified | Whether a snapshot is unified or not. | |
| tags.{index} | Tags of the snapshot | |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| bucket | Bucket name for snapshot imports | |
| key | Object key for snapshot imports | |
| size | Imported snapshot size, must be a multiple of 512 | |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Create a snapshot in the default zone from the specified volume ID
Code
Create a snapshot in fr-par-1 zone from the specified volume ID
Code
Create a named snapshot from the specified volume ID
Code
Import a QCOW file as an Instance snapshot
Code
Delete a snapshot
Delete the snapshot with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | UUID of the snapshot you want to delete | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Delete a snapshot in the default zone with the specified ID
Code
Delete a snapshot in fr-par-1 zone with the specified ID
Code
Export a snapshot
Export a snapshot to a specified Object Storage bucket in the same region.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| bucket | Object Storage bucket name | |
| key | Object key | |
| snapshot-id | Snapshot ID | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Export a snapshot to an Object Storage bucket
Code
Get a snapshot
Get details of a snapshot with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | UUID of the snapshot you want to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Get a snapshot in the default zone with the specified ID
Code
Get a snapshot in fr-par-1 zone with the specified ID
Code
List snapshots
List all snapshots of an Organization in a specified Availability Zone.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | List snapshots only for this Project ID | |
| name | List snapshots of the requested name | |
| tags | List snapshots that have the requested tag | |
| base-volume-id | List snapshots originating only from this volume | |
| organization-id | List snapshots only for this Organization ID | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
Examples:
List all snapshots in the default zone
Code
List all snapshots in fr-par-1 zone
Code
Get a volume or snapshot's migration plan
Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the Migrate a volume and/or snapshots to SBS endpoint afterward. The endpoint returns the resources that should be migrated together:
- the volume and any snapshots created from the volume, if the call was made to plan a volume migration.
- the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration. The endpoint also returns the validation_key, which must be provided to the Migrate a volume and/or snapshots to SBS endpoint to confirm that all resources listed in the plan should be migrated.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | The snapshot for which the migration plan will be generated. | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Update a snapshot
Update the properties of a snapshot.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | UUID of the snapshot | Required |
| name | Name of the snapshot | |
| tags.{index} | Tags of the snapshot | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Wait for snapshot to reach a stable state
Wait for snapshot to reach a stable state. This is similar to using --wait flag on other action commands, but without requiring a new action on the snapshot.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | ID of the snapshot. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
| timeout | Timeout of the wait | Default: 1h0m0s |
Examples:
Wait for a snapshot to reach a stable state
Code
SSH Utilities
Command utilities around server SSH
- Manage keys per server
- Generate ssh config
Add a public key to a server
Key will be added to server's tags and added to root user on next restart. Key is expected in openssh format "(format) (key) (comment)". The comment will be used as key name or generated Lookup /root/.ssh/authorized_keys on your server for more information
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Server to add your key to | |
| public-key | Public key you want to add to your server | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Fetch SSH keys from the console and install them on multiple servers
Keys registered via the Scaleway Console will be propagated to the selected servers.
The command 'ssh
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | Fetch the keys on all servers in the given Project | |
| username | Username used for the SSH connection | Default: root |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Install a ssh config with all your servers as host
It generate hosts for instance servers, baremetal, apple-silicon and bastions
Path of the config will be $HOME/.ssh/scaleway.config
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
List manually added public keys
List only keys added manually to a server using tags. The key comment is used as key name or generated Lookup /root/.ssh/authorized_keys on your server for more information
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Server which keys are to be listed | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Remove a manually added public key from a server
Key will be remove from server's tags and removed from root user on next restart. Keys are identified by their comment as in openssh format. Lookup /root/.ssh/authorized_keys on your server for more information
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Server to add your key to | Required |
| name | Name of the key you want to remove, has to be the key comment or the index | |
| public-key | Public key you want to remove | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Template management commands
Templates are blueprints for creating Instances with predefined configurations. A template includes specifications such as Instance type, attached volumes, security groups, placement groups, private networks, and public IP settings. Using templates allows you to standardize and automate Instance deployment across your infrastructure.
Check a template
Validate that a template is usable.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| template-id | Unique ID of the template to check | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Create a template
Create a new template from an Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| name | Name of the template | Default: <generated> |
| tags.{index} | Tags to associate with the template | |
| server-tags.{index} | Tags to associate with servers created from the template | |
| server-type | Commercial type of the server defined by the template | Required |
| security-group-id | Security group ID for the template | |
| placement-group-id | Placement group ID for the template | |
| volumes.{index}.volume-type | Type of the volume | One of: unknown_volume_type, l_ssd, sbs, scratch |
| volumes.{index}.name | Name of the volume | |
| volumes.{index}.tags.{index} | Tags associated with the volume | |
| volumes.{index}.size | Size of the volume in bytes | |
| volumes.{index}.base-snapshot-id | ID of the base snapshot for the volume | |
| volumes.{index}.image-label | Label of the image used as base for the volume | |
| volumes.{index}.perf-iops | Performance IOPS for the volume | |
| private-networks.{index}.private-network-id | ID of the private network | |
| filesystem-ids.{index} | List of filesystem IDs to associate with the template | |
| public-ipv4-count | Number of IPv4 public IPs to attach to servers created from this template | |
| public-ipv6-count | Number of IPv6 public IPs to attach to servers created from this template | |
| windows-rdp-ssh-key-id | IAM ID of the SSH key used to encrypt the Windows Administrator password for RDP use | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Create a server from a template
Create a new Instance using a specified template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| template-id | Unique ID of the template to use | Required |
| name | Name of the new server | Default: <generated> |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Delete a template
Delete a specified template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| template-id | Unique ID of the template to delete | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Delete template user data
Delete a specific user data key of a template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| template-id | Unique ID of the template | Required |
| key | Key of the user data to delete | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Get a template
Get details of a specified template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| template-id | Unique ID of the template to retrieve | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Get template cloud-init
Get the cloud-init configuration of a template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| template-id | Unique ID of the template | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Get template user data
Get a specific user data key of a template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| template-id | Unique ID of the template | Required |
| key | Key of the user data to retrieve | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
List templates
List all available templates.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Token for pagination | |
| page-size | Number of items to return per page | |
| order-by | Field to sort results by | One of: created_at_desc, created_at_asc, updated_at_desc, updated_at_asc |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| template-ids.{index} | Filter by specific template IDs | |
| name | Filter by template name | |
| tags.{index} | Filter by tags | |
| server-tags.{index} | Filter by server tags | |
| security-group-ids.{index} | Filter by security group IDs | |
| placement-group-ids.{index} | Filter by placement group IDs | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
List template user data keys
List all user data keys of a template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Token for pagination | |
| page-size | Number of items to return per page | |
| template-id | Unique ID of the template | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Set template cloud-init
Set the cloud-init configuration of a template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| template-id | Unique ID of the template | Required |
| content | Cloud-init configuration content | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Set template user data
Set a user data key of a template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| template-id | Unique ID of the template | Required |
| key | Key of the user data to set | Required |
| content | Content of the user data | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Update a template
Update the properties of a template.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | New name for the template | |
| template-id | Unique ID of the template to update | Required |
| tags.{index} | New tags for the template | |
| server-tags.{index} | New server tags for the template | |
| server-type | New server type for the template | |
| security-group-id | New security group ID for the template | |
| placement-group-id | New placement group ID for the template | |
| volumes.{index}.volume-type | Type of the volume | One of: unknown_volume_type, l_ssd, sbs, scratch |
| volumes.{index}.name | Name of the volume | |
| volumes.{index}.tags.{index} | Tags associated with the volume | |
| volumes.{index}.size | Size of the volume in bytes | |
| volumes.{index}.base-snapshot-id | ID of the base snapshot for the volume | |
| volumes.{index}.image-label | Label of the image used as base for the volume | |
| volumes.{index}.perf-iops | Performance IOPS for the volume | |
| private-networks.{index}.private-network-id | ID of the private network | |
| filesystem-ids.{index} | New list of filesystem IDs for the template | |
| public-ipv4-count | New number of IPv4 public IPs to attach to servers | |
| public-ipv6-count | New number of IPv6 public IPs to attach to servers | |
| windows-rdp-ssh-key-id | New IAM ID of the SSH key used to encrypt the Windows Administrator password for RDP use | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
User data management commands
User data is a key/value store you can use to provide your instance with introspective data.
As an example of use, Scaleway images contain the scw-generate-ssh-keys script, which generates the SSH server’s host keys, then stores their fingerprints as user data under the ssh-host-fingerprints key.
This way, before connecting to the instance using SSH, one can query the fingerprints to ensure that the remote host is the expected one, thus avoiding any man-in-the-middle attack.
There are two ways of accessing user data:
- From within a running Instance, by requesting the Metadata API at http://169.254.42.42/user_dataOpen in new context (or http://[fd00:42::42]/user_data using IPv6).
The
scaleway-ecosystempackage, installed by default on all OS images provided by Scaleway, ships with thescw-userdatahelper command that allows you to easily query the user data from the instance. For security reasons, viewing and editing user data is only allowed to queries originating from a port below 1024 (by default, only the super-user can bind to ports below 1024). To specify the source port with cURL, use the--local-portoption (e.g.curl --local-port 1-1023 http://169.254.42.42/user_data). - From the Instance API by using the methods described below.
Delete user data
Delete the specified key from an Instance's user data.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the Instance | Required |
| key | Key of the user data to delete | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Get user data
Get the content of a user data with the specified key on an Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the Instance | Required |
| key | Key of the user data to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
List user data
List all user data keys registered on a specified Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the Instance | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Add/set user data
Add or update a user data with the specified key on an Instance.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | UUID of the Instance | Required |
| key | Key of the user data to set | Required |
| content | Content of the user data | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Volume management commands
A volume is where you store your data inside your Instance. It appears as a block device on Linux that you can use to create a filesystem and mount it.
The Instance API only supports local (l_ssd) and scratch volume types.
Block storage volumes can also be attached to Instances, these volumes are
managed by the SBS API (https://www.scaleway.com/en/developers/api/block/Open in new context).
Minimum and maximum volume sizes for each volume types can be queried
from the zone /products/volumes API endpoint. I.e for:
fr-par-1use https://api.scaleway.com/instance/v1/zones/fr-par-1/products/volumesOpen in new contextnl-ams-1use https://api.scaleway.com/instance/v1/zones/nl-ams-1/products/volumesOpen in new context
Each type of volume is also subject to a global quota for the sum of all the volumes. This quota depends of the level of support and may be changed on demand.
When using multiple block devices, it's advised to mount them by
using their UUID instead of their device name. A device name is
subject to change depending on the volumes order. Block devices
UUIDs can be found in /dev/disk/by-id/.
Migrate a volume and/or snapshots to SBS (Scaleway Block Storage)
To be used, the call to this endpoint must be preceded by a call to the Get a volume or snapshot's migration plan endpoint. To migrate all resources mentioned in the migration plan, the validation_key returned in the plan must be provided.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| volume-id | The volume to migrate, along with potentially other resources, according to the migration plan generated with a call to the Get a volume or snapshot's migration plan endpoint. | |
| validation-key | A value to be retrieved from a call to the Get a volume or snapshot's migration plan endpoint, to confirm that the volume and/or snapshots specified in said plan should be migrated. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Create a volume
Create a volume of a specified type in an Availability Zone.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | Volume name | Default: <generated> |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| tags.{index} | Volume tags | |
| volume-type | Volume type | One of: l_ssd, b_ssd, unified, scratch, sbs_volume, sbs_snapshot |
| size | Volume disk size, must be a multiple of 512 | |
| base-snapshot | ID of the snapshot on which this volume will be based | |
| organization-id | Organization ID to use. If none is passed the default organization ID will be used | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Create a volume called 'my-volume'
Code
Create a volume with a size of 50GB
Code
Delete a volume
Delete the volume with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| volume-id | UUID of the volume you want to delete | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Delete a volume with the specified ID
Code
Get a volume
Get details of a volume with the specified ID.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| volume-id | UUID of the volume you want to get | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Get a volume with the specified ID
Code
List volumes
List volumes in the specified Availability Zone. You can filter the output by volume type.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| volume-type | Filter by volume type | One of: l_ssd, b_ssd, unified, scratch, sbs_volume, sbs_snapshot |
| project-id | Filter volume by Project ID | |
| tags | Filter volumes with these exact tags (to filter with several tags, use commas to separate them) | |
| name | Filter volume by name (for eg. "vol" will return "myvolume" but not "data") | |
| organization-id | Filter volume by Organization ID | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1, all |
Examples:
List all volumes
Code
List all volumes that match a name
Code
Get a volume or snapshot's migration plan
Given a volume or snapshot, returns the migration plan but does not perform the actual migration. To perform the migration, you have to call the Migrate a volume and/or snapshots to SBS endpoint afterward. The endpoint returns the resources that should be migrated together:
- the volume and any snapshots created from the volume, if the call was made to plan a volume migration.
- the base volume of the snapshot (if the volume is not deleted) and its related snapshots, if the call was made to plan a snapshot migration. The endpoint also returns the validation_key, which must be provided to the Migrate a volume and/or snapshots to SBS endpoint to confirm that all resources listed in the plan should be migrated.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| volume-id | The volume for which the migration plan will be generated. | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Update a volume
Replace the name and/or size properties of a volume specified by its ID, with the specified value(s).
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| volume-id | UUID of the volume | Required |
| name | Volume name | |
| tags.{index} | Tags of the volume | |
| size | Volume disk size, must be a multiple of 512 | |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Change the volume name
Code
Change the volume disk size (bytes)
Code
Change the volume name and disk size
Code
Wait for volume to reach a stable state
Wait for volume to reach a stable state. This is similar to using --wait flag on other action commands, but without requiring a new action on the volume.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| timeout | Timeout of the wait | Default: 10m0s |
| volume-id | ID of the volume affected by the action. | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
Wait for a volume to reach a stable state
Code
Volume type management commands
All volume types available in a specified zone. Each of these types will contains all the capabilities and constraints of the volume (min size, max size, snapshot).
List volume types
List all volume types and their technical details.
Usage:
Code
Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1One of: fr-par-1, fr-par-2, fr-par-3, nl-ams-1, nl-ams-2, nl-ams-3, pl-waw-1, pl-waw-2, pl-waw-3, it-mil-1 |
Examples:
List all volume-types in the default zone
Code
List all volume-types in fr-par-1 zone
Code