This API allows you to manage your CPU and GPU Instances.
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 from the specified snapshot ID.
Usage:
scw instance image create [arg=value ...]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
scw instance server image create name=foobar snapshot-id=11111111-1111-1111-1111-111111111111 arch=x86_64Delete the image with the specified ID.
Usage:
scw instance image delete <image-id ...> [arg=value ...]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
scw instance image delete 11111111-1111-1111-1111-111111111111Delete an image in fr-par-1 zone with the specified ID
scw instance image delete 11111111-1111-1111-1111-111111111111 zone=fr-par-1Get details of an image with the specified ID.
Usage:
scw instance image get <image-id ...> [arg=value ...]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
scw instance image get 11111111-1111-1111-1111-111111111111Get an image in fr-par-1 zone with the specified ID
scw instance image get 11111111-1111-1111-1111-111111111111 zone=fr-par-1List all existing Instance images.
Usage:
scw instance image list [arg=value ...]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
scw instance image listUpdate the properties of an image.
Usage:
scw instance image update <image-id ...> [arg=value ...]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. This is similar to using --wait flag on other action commands, but without requiring a new action on the image.
Usage:
scw instance image wait <image-id ...> [arg=value ...]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
scw instance image wait 11111111-1111-1111-1111-111111111111A 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.
Usage:
scw instance ip attach <ip ...> [arg=value ...]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
scw instance ip attach 1.2.3.4 server-id=11111111-1111-1111-1111-111111111111Reserve a flexible IP and attach it to the specified Instance.
Usage:
scw instance ip create [arg=value ...]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
scw instance ip createCreate an IP in fr-par-1 zone
scw instance ip create zone=fr-par-1Create an IP and attach it to the specified Instance
scw instance ip create server=11111111-1111-1111-1111-111111111111Delete the IP with the specified ID.
Usage:
scw instance ip delete <ip ...> [arg=value ...]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
scw instance ip delete 11111111-1111-1111-1111-111111111111Delete an IP in fr-par-1 zone with the specified ID
scw instance ip delete 11111111-1111-1111-1111-111111111111 zone=fr-par-1Delete an IP using directly the specified IP address
scw instance ip delete 51.15.253.183Detach an ip from its server.
Usage:
scw instance ip detach <ip ...> [arg=value ...]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
scw instance ip detach 11111111-1111-1111-1111-111111111111Detach an IP by using its IP address
scw instance ip detach 1.2.3.4Get details of an IP with the specified ID or address.
Usage:
scw instance ip get <ip ...> [arg=value ...]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
scw instance ip get 11111111-1111-1111-1111-111111111111Get an IP in fr-par-1 zone with the specified ID
scw instance ip get 11111111-1111-1111-1111-111111111111 zone=fr-par-1Get an IP, directly using the specified IP address
scw instance ip get 51.15.253.183List all flexible IPs in a specified zone.
Usage:
scw instance ip list [arg=value ...]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') | |
| server | ||
| detached | ||
| 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
scw instance ip listList all IPs in fr-par-1 zone
scw instance ip list zone=fr-par-1Update a flexible IP in the specified zone with the specified ID.
Usage:
scw instance ip update <ip ...> [arg=value ...]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
scw instance ip update 11111111-1111-1111-1111-111111111111 reverse=example.comUpdate an IP in fr-par-1 zone with the specified ID
scw instance ip update 11111111-1111-1111-1111-111111111111 zone=fr-par-1 reverse=example.comUpdate an IP using directly the specified IP address
scw instance ip update 51.15.253.183 reverse=example.comPlacement 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 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.
Create a new placement group.
Usage:
scw instance placement-group create [arg=value ...]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 placement group | Default: <generated> |
| policy-type | Policy type of the placement group | Default: max_availabilityOne of: unknown_policy_type, low_latency, max_availability, max_availability_enforced |
| tags.{index} | Tags of the placement group | |
| 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, it-mil-2, it-mil-3 |
Examples:
Create a max availability placement group with default name
scw instance placement-group createCreate a max availability placement group with the specified name
scw instance placement-group create name=foobarCreate a low latency placement group
scw instance placement-group create policy-type=low_latencyCreate a max availability placement group with tags
scw instance placement-group create tags.0=foo tags.1=barDelete a specified placement group.
Usage:
scw instance placement-group delete <placement-group-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Examples:
Delete a placement group in the default zone with the specified ID
scw instance placement-group delete 11111111-1111-1111-1111-111111111111Delete a placement group in nl-ams-1 zone with the specified ID
scw instance placement-group delete 11111111-1111-1111-1111-111111111111 zone=nl-ams-1Get a specified placement group.
Usage:
scw instance placement-group get <placement-group-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| placement-group-id | UUID of the placement group you want to get | Required |
| list-servers | Whether to list the servers in the Placement Group or not. | Default: true |
| 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, it-mil-2, it-mil-3 |
Examples:
Get a placement group with the specified ID
scw instance placement-group get 6c15f411-3b6f-402d-8eba-ae24ef9254e9Get all Instances belonging to the specified placement group.
Usage:
scw instance placement-group get-servers <placement-group-id ...> [arg=value ...]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 all placement groups.
Usage:
scw instance placement-group list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | The initial pagination token to start from | |
| page-size | The maximum number of placement groups to return | |
| order-by | The field by which to order the result list | 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 | |
| placement-group-ids.{index} | List only placement groups with these IDs | |
| name | Filter placement groups by name | |
| tags.{index} | List placement groups with these exact 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, it-mil-2, it-mil-3 |
Examples:
List all placement groups in the default zone
scw instance placement-group listList placement groups that match a specified name ('cluster1' will return 'cluster100' and 'cluster1' but not 'foo')
scw instance placement-group list name=cluster1Set all parameters of the specified placement group.
Usage:
scw instance placement-group set [arg=value ...]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 all Instances belonging to the specified placement group.
Usage:
scw instance placement-group set-servers [arg=value ...]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)
scw instance placement-group set-servers placement-group-id=ced0fd4d-bcf0-4479-85b6-7027e54456e6 servers.0=5a250608-24ec-4c31-9631-b3ded8c861cb servers.1=e54fd249-0787-4794-ab14-af6ee74df274Update the properties of a specified placement group.
Usage:
scw instance placement-group update <placement-group-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| placement-group-id | UUID of the placement group | Required |
| name | Name of the placement group | |
| policy-type | Policy type of the placement group | One of: unknown_policy_type, low_latency, max_availability, max_availability_enforced |
| tags.{index} | Tags of the placement group | |
| 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, it-mil-2, it-mil-3 |
Examples:
Update the name of a placement group
scw instance placement-group update 95053f33-cd3c-4cdc-b2b0-57d2dda97b13 name=foobarUpdate the policy type of a placement group (all Instances in your placement group MUST be shutdown)
scw instance placement-group update 0954ec26-9917-47b6-8c5c-7bc81d7bb9d2 policy-type=low_latencyUpdate the tags of a placement group
scw instance placement-group update 1f883434-8c2d-40f0-b686-d0754b3a7bc0 tags.0=update-tagUpdate all Instances belonging to the specified placement group.
Usage:
scw instance placement-group update-servers [arg=value ...]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 |
A Private Network Interface is the network interface that connects an Instance to a Private Network. An Instance can have multiple private network interfaces at the same time, but each private network interface must belong to a different Private Network.
Create a private network interface linked to a Private Network. It can be attached to an Instance.
Usage:
scw instance private-network-interface create [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| private-network-id | ID of the Private Network to attach to | Required |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| server-id | ID of the Instance to attach the interface to | |
| security-group-id | ID of the security group to associate with the interface | |
| ip-ids.{index} | List of IP IDs to attach to the interface | |
| tags.{index} | Tags to assign to the private network interface | |
| 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, it-mil-2, it-mil-3 |
Delete a specified private network interface.
Usage:
scw instance private-network-interface delete <private-network-interface-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| private-network-interface-id | ID of the private network interface 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, it-mil-2, it-mil-3 |
Get details of a specified private network interface. You can get private network interfaces either by ID or by MAC address. When using the latter, it is recommended to also provide the server-id and/or the private-network-id to narrow search results, depending on the volume of PNIs in the scope.
Usage:
scw instance private-network-interface get <private-network-interface-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| private-network-interface-id | The Private Network Interface ID or MAC address | Required |
| server-id | The ID of the server to filter list results when getting a PNI by MAC address. | |
| private-network-id | The ID of the private network to filter list results when getting a PNI by MAC address. | |
| 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, it-mil-2, it-mil-3 |
List all private network interfaces.
Usage:
scw instance private-network-interface list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Token for pagination | |
| page-size | Number of items to return per page | |
| order-by | Field to order 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 | |
| server-ids.{index} | Filter by server IDs | |
| security-group-ids.{index} | Filter by security group IDs | |
| private-network-ids.{index} | Filter by Private Network IDs | |
| tags.{index} | Filter by 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, it-mil-2, it-mil-3 |
Update the properties of a specified private network interface.
Usage:
scw instance private-network-interface update <private-network-interface-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| private-network-interface-id | ID of the private network interface to update | Required |
| security-group-id | New security group ID to associate with the interface | |
| tags.{index} | New tags to assign to the private network interface | |
| 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, it-mil-2, it-mil-3 |
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 that return traffic is automatically allowed, regardless of any rules. You can switch to a stateless mode if you want to only allow explicitly defined traffic. That mode may be difficult to use when filtering outgoing flows.
Add one or more rules to a security group.
Usage:
scw instance security-group add-rules <security-group-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | ID of the security group to add rules to | Required |
| rules.{index}.protocol | Protocol for the rule | One of: unknown_protocol, tcp, udp, icmp, any |
| rules.{index}.direction | Direction of traffic for the rule | One of: unknown_direction, inbound, outbound, both |
| rules.{index}.action | Action to take when the rule matches | One of: unknown_action, accept, drop |
| rules.{index}.source-ip-range | Source IP range for the rule | |
| rules.{index}.destination-ip-range | Destination IP range for the rule | |
| rules.{index}.source-ports.start | Start of the port range | |
| rules.{index}.source-ports.end | End of the port range | |
| rules.{index}.destination-ports.start | Start of the port range | |
| rules.{index}.destination-ports.end | End of the port range | |
| rules.{index}.position | Position of this rule in the rule list, starting at 1 | |
| 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, it-mil-2, it-mil-3 |
Usage:
scw instance security-group clear <security-group-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Examples:
Remove all rules of the given security group
scw instance security-group clear 11111111-1111-1111-1111-111111111111Create a security group with a specified name and description.
Usage:
scw instance security-group create [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| name | Name of the security group | Required Default: <generated> |
| description | Description of the security group | |
| disable-default-rules | Whether to disable default rules | Default: false |
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| tags.{index} | Tags for the security group | |
| project-default | Whether this should be the default security group for the project | |
| inbound-default-action | Default action for inbound rules | Default: acceptOne of: unknown_action, accept, drop |
| outbound-default-action | Default action for outbound rules | Default: acceptOne of: unknown_action, accept, drop |
| stateless | Whether the security group should be stateless | Default: 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, it-mil-2, it-mil-3 |
Examples:
Create a security group with a specified name and description
scw instance security-group create name=foobar description="foobar foobar"Create a security group that will be applied as default on all Instances of this Project
scw instance security-group create project-default=trueCreate a security group that will have a default drop inbound policy (traffic your Instance receives)
scw instance security-group create inbound-default-action=dropCreate a security group that will have a default drop outbound policy (traffic your Instance transmits)
scw instance security-group create outbound-default-action=dropCreate a stateless security group
scw instance security-group create stateless=trueCreate a rule in the specified security group ID.
Usage:
scw instance security-group create-rule [arg=value ...]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
scw instance security-group create-rule security-group-id=1248283f-17de-464a-b03b-3f975ada3fa8 protocol=TCP direction=inbound action=accept ip-range=<nil> dest-port-from=22Allow HTTP
scw instance security-group create-rule security-group-id=e8ba77c1-9ccb-4c0c-b08d-555cfd7f57e4 protocol=TCP direction=inbound action=accept ip-range=<nil> dest-port-from=80Allow HTTPS
scw instance security-group create-rule security-group-id=e5906437-8650-4fe2-8ca7-32e1d7320c1b protocol=TCP direction=inbound action=accept ip-range=<nil> dest-port-from=443Allow a specified IP range
scw instance security-group create-rule security-group-id=b6a58155-a2f8-48bd-9da9-3ff9783fa0d4 protocol=ANY direction=inbound action=accept ip-range=10.0.0.0/16Allow FTP
scw instance security-group create-rule security-group-id=9c46df03-83c2-46fb-936c-16ecb44860e1 protocol=TCP direction=inbound action=accept ip-range=<nil> dest-port-from=20 dest-port-to=21Delete a specified security group.
Usage:
scw instance security-group delete <security-group-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | ID of the security group 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, it-mil-2, it-mil-3 |
Examples:
Delete the security group with the specified ID
scw instance security-group delete 11111111-1111-1111-1111-111111111111Delete a security group rule with the specified ID.
Usage:
scw instance security-group delete-rule [arg=value ...]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
scw instance security-group delete-rule security-group-id=a01a36e5-5c0c-42c1-ae06-167e587b7ac4 security-group-rule-id=b8c773ef-a6ea-4b50-a7c1-737864290a3fDelete specified security groups.
Usage:
scw instance security-group delete-rules [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-rule-ids.{index} | List of rule IDs to delete | |
| 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, it-mil-2, it-mil-3 |
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:
scw instance security-group edit <security-group-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Get the details of a specified security group.
Usage:
scw instance security-group get <security-group-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | ID of the security group 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, it-mil-2, it-mil-3 |
Examples:
Get a security group with the specified ID
scw instance security-group get 11111111-1111-1111-1111-111111111111Get details of a security group rule with the specified ID.
Usage:
scw instance security-group get-rule [arg=value ...]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
scw instance security-group get-rule security-group-id=d900fa38-2f0d-4b09-b6d7-f3e46a13f34c security-group-rule-id=1f9a16a5-7229-4c03-9327-253e257cf38aList all security groups.
Usage:
scw instance security-group list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Token for pagination | |
| page-size | Number of items to return per page | |
| order-by | Field and direction to sort 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 | |
| name | Filter by name | |
| tags.{index} | Filter by tags | |
| security-group-ids.{index} | Filter by specific security 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, it-mil-2, it-mil-3 |
Examples:
List all security groups that match the specified name
scw instance security-group list name=foobarLists the default rules applied to all the security groups.
Usage:
scw instance security-group list-default-rules [arg=value ...]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 the rules of the a specified security group ID.
Usage:
scw instance security-group list-rules [arg=value ...]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 |
Replace all rules of a specified security group with the provided rules.
Usage:
scw instance security-group set-rules <security-group-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | ID of the security group to set rules for | Required |
| rules.{index}.protocol | Protocol for the rule | One of: unknown_protocol, tcp, udp, icmp, any |
| rules.{index}.direction | Direction of traffic for the rule | One of: unknown_direction, inbound, outbound, both |
| rules.{index}.action | Action to take when the rule matches | One of: unknown_action, accept, drop |
| rules.{index}.source-ip-range | Source IP range for the rule | |
| rules.{index}.destination-ip-range | Destination IP range for the rule | |
| rules.{index}.source-ports.start | Start of the port range | |
| rules.{index}.source-ports.end | End of the port range | |
| rules.{index}.destination-ports.start | Start of the port range | |
| rules.{index}.destination-ports.end | End of the port range | |
| rules.{index}.position | Position of this rule in the rule list, starting at 1 | |
| 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, it-mil-2, it-mil-3 |
Update the properties of a security group.
Usage:
scw instance security-group update <security-group-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-id | ID of the security group to update | Required |
| name | New name for the security group | |
| description | New description for the security group | |
| disable-default-rules | Whether to disable default rules | |
| tags.{index} | New tags for the security group | |
| project-default | Whether this should be the default security group for the project | |
| inbound-default-action | New default action for inbound rules | One of: unknown_action, accept, drop |
| outbound-default-action | New default action for outbound rules | One of: unknown_action, accept, drop |
| stateless | Whether the security group should be stateless | |
| 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, it-mil-2, it-mil-3 |
Update the properties of a rule from a specified security group.
Usage:
scw instance security-group update-rule <security-group-rule-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| security-group-rule-id | ID of the rule to update | Required |
| protocol | New protocol for the rule | One of: unknown_protocol, tcp, udp, icmp, any |
| direction | New direction for the rule | One of: unknown_direction, inbound, outbound, both |
| action | New action for the rule | One of: unknown_action, accept, drop |
| source-ip-range | New source IP range for the rule | |
| destination-ip-range | New destination IP range for the rule | |
| source-ports.start | Start of the port range | |
| source-ports.end | End of the port range | |
| destination-ports.start | Start of the port range | |
| destination-ports.end | End of the port range | |
| position | New position for the rule | |
| 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, it-mil-2, it-mil-3 |
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.
Usage:
scw instance server action <server-id ...> [arg=value ...]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
scw instance server action 11111111-1111-1111-1111-111111111111 action=poweronAttach a filesystem volume to an Instance.
Usage:
scw instance server attach-filesystem [arg=value ...]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 |
Usage:
scw instance server attach-ip <server-id ...> [arg=value ...]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
scw instance server attach-ip 11111111-1111-1111-1111-111111111111 ip=11111111-1111-1111-1111-111111111111Attach an IP to a server
scw instance server attach-ip 11111111-1111-1111-1111-111111111111 ip=1.2.3.4Attach a volume to an Instance.
Usage:
scw instance server attach-volume [arg=value ...]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 |
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:
scw instance server backup <server-id ...> [arg=value ...]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
scw instance server backup 11111111-1111-1111-1111-111111111111Usage:
scw instance server cockpit <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | Server ID | Required |
| zone | Zone to target. If none is passed will use default zone from the config | Default: fr-par-1 |
Usage:
scw instance server console <server-id ...> [arg=value ...]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 an instance server.
Usage:
scw instance server create [arg=value ...]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/) | 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 | ipv6 | both | dynamic | none | | ) | Default: new |
| 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
scw instance server create image=ubuntu_focalCreate a GP1-XS instance, give it a name and add tags
scw instance server create image=ubuntu_focal type=GP1-XS name=foo tags.0=prod tags.1=blueCreate an instance with 2 additional block volumes (50GB and 100GB)
scw instance server create image=ubuntu_focal additional-volumes.0=block:50GB additional-volumes.1=block:100GBCreate an instance with 2 local volumes (10GB and 10GB)
scw instance server create image=ubuntu_focal root-volume=local:10GB additional-volumes.0=local:10GBCreate an instance with a SBS root volume (100GB and 15000 iops)
scw instance server create image=ubuntu_focal root-volume=sbs:100GB:15000Create an instance with volumes from snapshots
scw instance server create image=ubuntu_focal root-volume=local:<snapshot_id> additional-volumes.0=block:<snapshot_id>Create and start an instance from a snapshot
scw instance server create image=none root-volume=local:<snapshot_id>Create and start an instance using existing volume
scw instance server create image=ubuntu_focal additional-volumes.0=<volume_id>Use an existing IP
ip=$(scw instance ip create | grep id | awk '{ print $2 }')
scw instance server create image=ubuntu_focal ip=$ipDelete a server with the given ID.
Usage:
scw instance server delete <server-id ...> [arg=value ...]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
scw instance server delete 11111111-1111-1111-1111-111111111111Delete a server in fr-par-1 zone with a given id
scw instance server delete 11111111-1111-1111-1111-111111111111 zone=fr-par-1Detach a filesystem volume from an Instance.
Usage:
scw instance server detach-filesystem [arg=value ...]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 |
Usage:
scw instance server detach-ip <server-id ...> [arg=value ...]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
scw instance server detach-ip 11111111-1111-1111-1111-111111111111Detach a volume from an Instance.
Usage:
scw instance server detach-volume [arg=value ...]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 |
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/
Usage:
scw instance server enable-routed-ip <server-id ...> [arg=value ...]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
scw instance server enable-routed-ip 11111111-1111-1111-1111-111111111111Get the details of a specified Instance.
Usage:
scw instance server get <server-id ...> [arg=value ...]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
scw instance server get 94ededdf-358d-4019-9886-d754f8a2e78dList the Instance types that a given instance could be converted to.
Usage:
scw instance server get-compatible-types <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Token for pagination | |
| page-size | Number of server types to return per page | |
| server-id | ID 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, it-mil-2, it-mil-3 |
Examples:
List the 10 first compatible server types for a given instance
scw instance server get-compatible-types 11111111-1111-1111-1111-111111111111 page-size=10Usage:
scw instance server get-rdp-password <server-id ...> [arg=value ...]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 in a specified Availability Zone, e.g. fr-par-1.
Usage:
scw instance server list [arg=value ...]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
scw instance server listList Instances of this commercial type
scw instance server list commercial-type=DEV1-SList Instances that are not attached to a public IP
scw instance server list without-ip=trueList Instances that match the specified name ('server1' will return 'server100' and 'server1' but not 'foo')
scw instance server list name=server1List all actions (e.g. power on, power off, reboot) that can currently be performed on an Instance.
Usage:
scw instance server list-actions [arg=value ...]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 |
Pause a running Instance.
Usage:
scw instance server pause <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server to pause | 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, it-mil-2, it-mil-3 |
Examples:
Pause a server in the default zone with a given id
scw instance server pause 11111111-1111-1111-1111-111111111111Pause a server in fr-par-1 zone with a given id
scw instance server pause 11111111-1111-1111-1111-111111111111 zone=fr-par-1Reboot a running or paused Instance.
Usage:
scw instance server reboot <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server to reboot | 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, it-mil-2, it-mil-3 |
Examples:
Reboot a server in the default zone with a given id
scw instance server reboot 11111111-1111-1111-1111-111111111111Reboot a server in fr-par-1 zone with a given id
scw instance server reboot 11111111-1111-1111-1111-111111111111 zone=fr-par-1Connect to distant server via the SSH protocol.
Usage:
scw instance server ssh <server-id ...> [arg=value ...]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 |
Usage:
scw instance server standby <server-id ...> [arg=value ...]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
scw instance server standby 11111111-1111-1111-1111-111111111111Put in standby a server in fr-par-1 zone with a given id
scw instance server standby 11111111-1111-1111-1111-111111111111 zone=fr-par-1Start a stopped or paused Instance.
Usage:
scw instance server start <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server to start | 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, it-mil-2, it-mil-3 |
Examples:
Start a server in the default zone with a given id
scw instance server start 11111111-1111-1111-1111-111111111111Start a server in fr-par-1 zone with a given id
scw instance server start 11111111-1111-1111-1111-111111111111 zone=fr-par-1Spot instances are billed at a discount compared to regular instances. However, they can be interrupted at any time.
Usage:
scw instance server start-spot <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server to start as spot 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, it-mil-2, it-mil-3 |
Stop a running or paused Instance.
Usage:
scw instance server stop <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server to stop | 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, it-mil-2, it-mil-3 |
Examples:
Stop a server in the default zone with a given id
scw instance server stop 11111111-1111-1111-1111-111111111111Stop a server in fr-par-1 zone with a given id
scw instance server stop 11111111-1111-1111-1111-111111111111 zone=fr-par-1Stop and delete a running or paused Instance.
Usage:
scw instance server stop-and-delete <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | ID of the server to stop and delete | Required |
| delete-all-ips | Whether to delete all IPs attached to the server | |
| delete-ip-ids.{index} | List of IP IDs to delete | |
| delete-all-volumes | Whether to delete all volumes attached to the server | |
| delete-volume-ids.{index} | List of volume IDs to delete | |
| keep-all-private-nics | Whether to keep all private network interfaces | |
| delete-private-nic-ids.{index} | List of private network interface IDs to delete | |
| 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, it-mil-2, it-mil-3 |
Examples:
Stop and delete a server in the default zone with a given id
scw instance server stop-and-delete 11111111-1111-1111-1111-111111111111Stop and delete a server in fr-par-1 zone with a given id
scw instance server stop-and-delete 11111111-1111-1111-1111-111111111111 zone=fr-par-1Terminates a server with the given ID and all of its volumes.
Usage:
scw instance server terminate <server-id ...> [arg=value ...]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
scw instance server terminate 11111111-1111-1111-1111-111111111111Terminate a server in fr-par-1 zone with a given id
scw instance server terminate 11111111-1111-1111-1111-111111111111 zone=fr-par-1Terminate a server and also delete its flexible IPs
scw instance server terminate 11111111-1111-1111-1111-111111111111 with-ip=trueUpdate the Instance information, such as name, boot mode, or tags.
Usage:
scw instance server update <server-id ...> [arg=value ...]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
scw instance server update 11111111-1111-1111-1111-111111111111 name=foobarSwitch a specified Instance to rescue mode (reboot is required to access rescue mode)
scw instance server update 11111111-1111-1111-1111-111111111111 boot-type=rescueOverwrite tags of a specified Instance
scw instance server update 11111111-1111-1111-1111-111111111111 tags.0=foo tags.1=barApply the specified security group to a specified server
scw instance server server update 11111111-1111-1111-1111-111111111111 security-group-id=11111111-1111-1111-1111-111111111111Put a specified Instance in the specified placement group. Instance must be off
scw instance server server update 11111111-1111-1111-1111-111111111111 placement-group-id=11111111-1111-1111-1111-111111111111Boot an Instance from a specific volume
scw instance server update 11111111-1111-1111-1111-111111111111 volumes.0.id=11111111-1111-1111-1111-111111111111 volumes.0.boot=trueWait 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:
scw instance server wait <server-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Examples:
Wait for a server to reach a stable state
scw instance server wait 11111111-1111-1111-1111-111111111111All Instance types available in a specified zone. Each type contains all the features of the Instance (CPU, RAM, storage).
Get availability for all Instance types.
Usage:
scw instance server-type get [arg=value ...]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 available Instance types and their technical details.
Usage:
scw instance server-type list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Token for pagination | |
| page-size | Number of server types to return per page | |
| 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, it-mil-2, it-mil-3 |
Examples:
List all server-types in the default zone
scw instance server-type listList all server-types in fr-par-1 zone
scw instance server-type list zone=fr-par-1Snapshots contain the data of a specified l_ssd 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.
l_ssd volumes can be created from snapshots.
Create a snapshot from a specified l_ssd volume.
Usage:
scw instance snapshot create [arg=value ...]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 snapshot | Default: <generated> |
| tags.{index} | Tags associated with the snapshot | |
| base-volume-id | ID of the base volume | |
| ID of the base volume, please use base-volume-id instead | Deprecated | |
| public | Whether the snapshot should be 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 |
Examples:
Create a snapshot in the default zone from a specified volume ID
scw instance snapshot create base-volume-id=11111111-1111-1111-1111-111111111111Create a snapshot in fr-par-1 zone from a specified volume ID
scw instance snapshot create zone=fr-par-1 base-volume-id=11111111-1111-1111-1111-111111111111Create a named snapshot from a specified volume ID
scw instance snapshot create name=foobar base-volume-id=11111111-1111-1111-1111-111111111111Delete a specified snapshot.
Usage:
scw instance snapshot delete <snapshot-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | ID of the snapshot 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 specified snapshot in the default zone
scw instance snapshot delete 11111111-1111-1111-1111-111111111111Delete a specified snapshot in fr-par-1 zone
scw instance snapshot delete 11111111-1111-1111-1111-111111111111 zone=fr-par-1Export a snapshot to a specified Object Storage bucket in the same region.
Usage:
scw instance snapshot export-to-object-storage <snapshot-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | ID of the snapshot to export | Required |
| bucket | Object Storage bucket name | |
| object-key | Object key | |
| 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
scw instance snapshot export-to-object-storage 11111111-1111-1111-1111-111111111111 zone=fr-par-1 bucket=my-bucket object-key=my-qcow2-file-nameGet details of a specified snapshot.
Usage:
scw instance snapshot get <snapshot-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | ID of the snapshot 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 |
Examples:
Get a specified snapshot in the default zone
scw instance snapshot get 11111111-1111-1111-1111-111111111111Get a specified snapshot in fr-par-1 zone
scw instance snapshot get 11111111-1111-1111-1111-111111111111 zone=fr-par-1Import a snapshot from a QCOW2 file stored in Object Storage.
Usage:
scw instance snapshot import-from-object-storage [arg=value ...]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 snapshot | |
| tags.{index} | Tags associated with the snapshot | |
| bucket | Object Storage bucket name | |
| object-key | Object key | |
| size | Size of the imported snapshot in bytes | |
| volume-type | Volume type of the snapshot | Default: l_ssdOne of: unknown_volume_type, l_ssd |
| 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:
Import a snapshot from a QCOW2 file in Object Storage
scw instance snapshot import-from-object-storage zone=fr-par-1 name=imported-snapshot bucket=my-bucket object-key=my-qcow2-file-name volume-type=l_ssdList all snapshots of an Organization.
Usage:
scw instance snapshot list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Token for pagination | |
| page-size | Number of snapshots to return per page | |
| order-by | Field to sort 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 | |
| snapshot-ids.{index} | Filter by specific snapshot IDs | |
| name | Filter by name | |
| tags.{index} | Filter by tags | |
| base-volume-id | Filter by base 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 |
Examples:
List all snapshots in the default zone
scw instance snapshot listList all snapshots in fr-par-1 zone
scw instance snapshot list zone=fr-par-1Update the properties of a snapshot.
Usage:
scw instance snapshot update <snapshot-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| snapshot-id | ID of the snapshot to update | Required |
| name | New name for the snapshot | |
| tags.{index} | New tags for the snapshot | |
| public | Whether the snapshot should be 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 |
Examples:
Change the snapshot name
scw instance snapshot update 11111111-1111-1111-1111-111111111111 name=my-new-nameWait 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:
scw instance snapshot wait <snapshot-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
| timeout | Timeout of the wait | Default: 1h0m0s |
Examples:
Wait for a snapshot to reach a stable state
scw instance snapshot wait 11111111-1111-1111-1111-111111111111Command utilities around server SSH
- Manage keys per server
- Generate ssh config
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:
scw instance ssh add-key [arg=value ...]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 |
Keys registered via the Scaleway Console will be propagated to the selected servers. The command 'ssh -t -l scw-fetch-ssh-keys --upgrade' will be run on the servers matching the zone and project filters. Keep in mind that you need to be able to connect to your server with another key than the one you want to add. Keep in mind that SSH keys are scoped by project.
Usage:
scw instance ssh fetch-keys [arg=value ...]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 |
It generate hosts for instance servers, baremetal, apple-silicon and bastions
Path of the config will be $HOME/.ssh/scaleway.config
Usage:
scw instance ssh install-config [arg=value ...]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 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:
scw instance ssh list-keys <server-id ...> [arg=value ...]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 |
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:
scw instance ssh remove-key [arg=value ...]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 |
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.
Validate that a template is usable.
Usage:
scw instance template check <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Create a new template from an Instance.
Usage:
scw instance template create [arg=value ...]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 | |
| private-networks.{index}.security-group-id | ID of the security group for 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, it-mil-2, it-mil-3 |
Create a new Instance using a specified template.
Usage:
scw instance template create-server <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Delete a specified template.
Usage:
scw instance template delete <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Delete a specific user data key of a template.
Usage:
scw instance template delete-user-data <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Get details of a specified template.
Usage:
scw instance template get <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Get the cloud-init configuration of a template.
Usage:
scw instance template get-cloud-init <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Get a specific user data key of a template.
Usage:
scw instance template get-user-data <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
List all available templates.
Usage:
scw instance template list [arg=value ...]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, it-mil-2, it-mil-3 |
List all user data keys of a template.
Usage:
scw instance template list-user-data-keys <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Set the cloud-init configuration of a template.
Usage:
scw instance template set-cloud-init <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Set a user data key of a template.
Usage:
scw instance template set-user-data <template-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Update the properties of a template.
Usage:
scw instance template update <template-id ...> [arg=value ...]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 | |
| update-private-networks.private-networks.{index}.security-group-id | ID of the security group for 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, it-mil-2, it-mil-3 |
User data is a key/value store you can use to provide your Instance with introspective data.
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_data (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 a specified key from an Instance's user data.
Usage:
scw instance user-data delete <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | The ID of the server | Required |
| key | The 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, it-mil-2, it-mil-3 |
Get the content of a user data with a specified key on an Instance.
Usage:
scw instance user-data get <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | The ID of the server | Required |
| key | The 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, it-mil-2, it-mil-3 |
Get the cloud-init configuration of a specified Instance.
Usage:
scw instance user-data get-cloud-init <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | The ID 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, it-mil-2, it-mil-3 |
List all user data keys registered on a specified Instance.
Usage:
scw instance user-data list <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Page token for pagination | |
| page-size | Number of items to return per page | |
| server-id | The ID 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, it-mil-2, it-mil-3 |
Add or update a user data with a specified key on an Instance.
Usage:
scw instance user-data set <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | The ID of the server | Required |
| key | The key of the user data to set | Required |
| content | The content to set for 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, it-mil-2, it-mil-3 |
Set the cloud-init configuration for a specified Instance.
Usage:
scw instance user-data set-cloud-init <server-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| server-id | The ID of the server | Required |
| content | The cloud-init configuration content | 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, it-mil-2, it-mil-3 |
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 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/).
Minimum and maximum volume sizes for each volume type can be queried
from the zone /volume-types API endpoint.
Each type of volume is also subject to a global quota for the sum of all the volumes. This quota depends on 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/.
Create a volume of a specified type.
Usage:
scw instance volume create [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| name | Volume name | Default: <generated> |
| tags.{index} | Tags associated with the volume | |
| size | Volume size in bytes | |
| base-snapshot-id | ID of the base snapshot used for this volume | |
| volume-type | Type of the volume | One of: unknown_volume_type, l_ssd, scratch |
| 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'
scw instance volume create name=my-volumeCreate a volume with a size of 50GB
scw instance volume create size=50GBDelete a specified volume.
Usage:
scw instance volume delete <volume-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| volume-id | ID of the volume 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 specified volume
scw instance volume delete 11111111-1111-1111-1111-111111111111Get a specified volume.
Usage:
scw instance volume get <volume-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| volume-id | ID of the volume 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 |
Examples:
Get a specified volume
scw instance volume get 11111111-1111-1111-1111-111111111111List volumes.
Usage:
scw instance volume list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Token for pagination | |
| page-size | Number of items to return per page | |
| order-by | Field to order the 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 | |
| volume-ids.{index} | Filter by specific volume IDs | |
| name | Filter by volume name | |
| tags.{index} | Filter by tags | |
| volume-type | Filter by volume type | One of: unknown_volume_type, l_ssd, scratch |
| 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 volumes
scw instance volume listList all volumes that match a name
scw instance volume list name=foobarUpdate the properties of a specified volume.
Usage:
scw instance volume update <volume-id ...> [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| volume-id | ID of the volume to update | Required |
| name | New name for the volume | |
| tags.{index} | New tags for the volume | |
| size | New size for the volume | |
| 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
scw instance volume update 11111111-1111-1111-1111-111111111111 name=my-new-nameChange the volume disk size (bytes)
scw instance volume update 11111111-1111-1111-1111-111111111111 size=60GBChange the volume name and disk size
scw instance volume update 11111111-1111-1111-1111-111111111111 name=a-new-name size=70GBWait 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:
scw instance volume wait <volume-id ...> [arg=value ...]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, it-mil-2, it-mil-3 |
Examples:
Wait for a volume to reach a stable state
scw instance volume wait 11111111-1111-1111-1111-111111111111All volume types available in a specified zone. Each of these types will contain all the capabilities and constraints of the volume (min size, max size, snapshot).
List all volume types and their technical details.
Usage:
scw instance volume-type list [arg=value ...]Arguments:
| Name | Description | Argument Specifications |
|---|---|---|
| page-token | Token for pagination | |
| page-size | Number of items to return per page | |
| 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
scw instance volume-type listList all volume-types in fr-par-1 zone
scw instance volume-type list zone=fr-par-1