Scaleway logo
Instance API

Instance API

Scaleway Instances are virtual machines in the cloud. Different Instance typesOpen in new context offer different technical specifications in terms of vCPU, RAM, bandwidth, and storage. Once you have created your Instance and installed your image of choice (e.g. an operating system), you can connect to your Instance via SSHOpen in new context to use it as you wish. When you are done using the Instance, you can delete it from your account.

Tip

To retrieve information about the different images available to install on Scaleway Instances, check out our Marketplace APIOpen in new context.

Concepts

Refer to our dedicated concepts pageOpen in new context to find definitions of all concepts and terminology related to Instances.

Requirement

Tags
Resource Counts
Provides a summary of your current resource usage within a project or organization. The response includes counts for various Instance-related resources such as numbers of Instances, GPU Instances, Security groups, Placement groups, Snapshots, Volumes, and Private Network interfaces.
Instances
Instances are computing units providing resources to run your applications on. Scaleway offers various Instance types including CPU Instances and GPU Instances. Note: Instances can be referenced as "servers" in API endpoints.
Instance Types
All Instance types available in a specified zone. Each type contains all the features of the Instance (CPU, RAM, storage).
Private Network Interfaces
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.
Placement Groups
Placement groups allow the user to express a preference regarding the physical position of a group of Instances. The feature lets the user choose to either group Instances on the same physical hardware for best network throughput and low latency, or 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_latency will group Instances on the same hypervisors
  • max_availability will spread Instances across physically distanced hypervisors
The policy_type is set to max_availability by default.
Security Groups
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.
User Data
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-ecosystem package, installed by default on all OS images provided by Scaleway, ships with the scw-userdata helper 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-port option (e.g. curl --local-port 1-1023 http://169.254.42.42/user_data).
  • From the Instance API by using the methods described below.
Templates
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.