Scaleway logo
Commands

Documentation for `scw vpc`

The CLI documentation pages are currently under construction

The content is up to date. We're making improvements to the site over the next few weeks for a better experience.

This API allows you to manage your Virtual Private Clouds (VPCs) and Private Networks.

Ingress rule management command

Ingress rules.

Create an ingress rule

Create an ingress rule in the specified region.

Usage:

TerminalCode
scw vpc ingress-rule create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-idID of the VPC this rule will belong toRequired
sourceSource network to match ingress traffic on. Can be IPv6 or IPv4Required
nexthop-resource-ipIP of the local resource to redirect ingress traffic to. IP version must be consistent with the source networkRequired
nexthop-private-network-idID of the Private Network the destination resource is inRequired
descriptionDescription for this ingress rule
tags.{index}Tags for this ingress rule
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Delete an ingress rule

Delete an ingress rule specified by its ingress rule ID.

Usage:

TerminalCode
scw vpc ingress-rule delete <rule-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
rule-idID of the ingress rule to deleteRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Get an ingress rule

Retrieve details of an existing ingress rule, specified by its ingress rule ID.

Usage:

TerminalCode
scw vpc ingress-rule get <rule-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
rule-idID of the ingress rule to returnRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

List ingress rules

List existing ingress rules in the specified region.

Usage:

TerminalCode
scw vpc ingress-rule list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-bySort order of the returned ingress rulesOne of: created_at_asc, created_at_desc, source_asc, source_desc, prefix_len_asc, prefix_len_desc
vpc-idID of the VPC to filter for
nexthop-resource-ipNext hop IP to filter for
nexthop-private-network-idNext hop Private Network ID to filter for. Only ingress rules with this Private Network as next hop will be returned
is-ipv6Whether to return only IPv4 or IPv6 ingress rules
tags.{index}Tags to filter for. Only ingress rules with one or more matching tags will be returned
project-idProject ID to filter for. Only ingress rules belonging to this Project will be returned
organization-idOrganization ID to filter for. Only ingress rules belonging to this Organization will be returned
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw, all

Update an ingress rule

Update an ingress rule specified by its ingress rule ID.

Usage:

TerminalCode
scw vpc ingress-rule update <rule-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
rule-idID of the ingress rule to updateRequired
sourceSource network to match ingress traffic on. Can be IPv4 or IPv6
nexthop-resource-ipIP of the local resource to redirect ingress traffic to. IP version must be consistent with the source network
nexthop-private-network-idID of the Private Network the destination resource is in
descriptionDescription to set for this ingress rule
tags.{index}Tags to set for this ingress rule
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Private network management command

A Private Network allows you to interconnect your Scaleway resources in an isolated and private network. Network reachability is limited to resources that are on the same Private Network. Note that a resource can be a part of multiple private networks.

Create a Private Network

Create a new Private Network. Once created, you can attach Scaleway resources which are in the same region.

Usage:

TerminalCode
scw vpc private-network create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
nameName for the Private NetworkRequired
Default: <generated>
project-idProject ID to use. If none is passed the default project ID will be used
tags.{index}Tags for the Private Network
subnets.{index}Private Network subnets CIDR
vpc-idVPC in which to create the Private Network
default-route-propagation-enabledDefines whether default v4 and v6 routes are propagated for this Private Network
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Delete a Private Network

Delete an existing Private Network. Note that you must first detach all resources from the network, in order to delete it.

Usage:

TerminalCode
scw vpc private-network delete <private-network-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
private-network-idPrivate Network IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Enable DHCP on a Private Network

Enable DHCP managed on an existing Private Network. Note that you will not be able to deactivate it afterwards.

Usage:

TerminalCode
scw vpc private-network enable-dhcp [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
private-network-idPrivate Network IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Get a Private Network

Retrieve information about an existing Private Network, specified by its Private Network ID. Its full details are returned in the response object.

Usage:

TerminalCode
scw vpc private-network get <private-network-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
private-network-idPrivate Network IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

List Private Networks

List existing Private Networks in the specified region. By default, the Private Networks returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.

Usage:

TerminalCode
scw vpc private-network list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-bySort order of the returned Private NetworksOne of: created_at_asc, created_at_desc, name_asc, name_desc
nameName to filter for. Only Private Networks with names containing this string will be returned
tags.{index}Tags to filter for. Only Private Networks with one or more matching tags will be returned
project-idProject ID to filter for. Only Private Networks belonging to this Project will be returned
private-network-ids.{index}Private Network IDs to filter for. Only Private Networks with one of these IDs will be returned
vpc-idVPC ID to filter for. Only Private Networks belonging to this VPC will be returned
dhcp-enabledDHCP status to filter for. When true, only Private Networks with managed DHCP enabled will be returned
object-storage-private-access-enabledFilter by whether Object Storage private access is enabled. When set, only matching Private Networks will be returned
organization-idOrganization ID to filter for. Only Private Networks belonging to this Organization will be returned
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw, all

Update Private Network

Update parameters (such as name or tags) of an existing Private Network, specified by its Private Network ID.

Usage:

TerminalCode
scw vpc private-network update <private-network-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
private-network-idPrivate Network IDRequired
nameName for the Private Network
tags.{index}Tags for the Private Network
default-route-propagation-enabledDefines whether default v4 and v6 routes are propagated for this Private Network
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Route management command

Custom routes.

Create a Route

Create a new custom Route.

Usage:

TerminalCode
scw vpc route create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
descriptionRoute description
tags.{index}Tags of the Route
vpc-idVPC the Route belongs to
destinationDestination of the Route
nexthop-resource-idID of the nexthop resource
nexthop-private-network-idID of the nexthop private network
nexthop-vpc-connector-idID of the nexthop VPC Connector
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Delete a Route

Delete a Route specified by its Route ID.

Usage:

TerminalCode
scw vpc route delete <route-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
route-idRoute IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Enable routing on a VPC

Enable routing on an existing VPC. Note that you will not be able to deactivate it afterwards.

Usage:

TerminalCode
scw vpc route enable-routing <vpc-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-idVPC IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Get a Route

Retrieve details of an existing Route, specified by its Route ID.

Usage:

TerminalCode
scw vpc route get <route-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
route-idRoute IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Return routes with associated next hop data

Return routes with associated next hop data.

Usage:

TerminalCode
scw vpc route list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-bySort order of the returned routesOne of: created_at_asc, created_at_desc, destination_asc, destination_desc, prefix_len_asc, prefix_len_desc
vpc-idVPC to filter for. Only routes within this VPC will be returned
nexthop-resource-idNext hop resource ID to filter for. Only routes with a matching next hop resource ID will be returned
nexthop-private-network-idNext hop private network ID to filter for. Only routes with a matching next hop private network ID will be returned
nexthop-resource-typeNext hop resource type to filter for. Only Routes with a matching next hop resource type will be returnedOne of: unknown_type, vpc_gateway_network, instance_private_nic, baremetal_private_nic, apple_silicon_private_nic, vpn_gateway
nexthop-vpc-connector-idNext hop VPC connector ID to filter for. Only routes with a matching next hop VPC connector ID will be returned
containsOnly routes whose destination is contained in this subnet will be returned
tags.{index}Tags to filter for, only routes with one or more matching tags will be returned
is-ipv6Only routes with an IPv6 destination will be returned
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: all

Update Route

Update parameters of the specified Route.

Usage:

TerminalCode
scw vpc route update <route-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
route-idRoute IDRequired
descriptionRoute description
tags.{index}Tags of the Route
destinationDestination of the Route
nexthop-resource-idID of the nexthop resource
nexthop-private-network-idID of the nexthop private network
nexthop-vpc-connector-idID of the nexthop VPC connector
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Rule management command

ACL Rules.

Edit all ACL rules of a VPC

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:

TerminalCode
scw vpc rule edit [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-idID of the Network ACL's VPCRequired
is-ipv6Defines whether this set of ACL rules is for IPv6 (false = IPv4). Each Network ACL can have rules for only one IP type
default-policyAction to take for packets which do not match any rules
modemarshaling used when editing dataDefault: yaml
One of: yaml, json
regionRegion to target. If none is passed will use default region from the configDefault: fr-par

Get ACL Rules for VPC

Retrieve a list of ACL rules for a VPC, specified by its VPC ID.

Usage:

TerminalCode
scw vpc rule get [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-idID of the Network ACL's VPCRequired
is-ipv6Defines whether this set of ACL rules is for IPv6 (false = IPv4). Each Network ACL can have rules for only one IP type.Required
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Set VPC ACL rules

Set the list of ACL rules and the default routing policy for a VPC.

Usage:

TerminalCode
scw vpc rule set [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-idID of the Network ACL's VPCRequired
rules.{index}.protocolProtocol to which this rule appliesRequired
One of: ANY, TCP, UDP, ICMP
rules.{index}.sourceSource IP range to which this rule applies (CIDR notation with subnet mask)Required
rules.{index}.src-port-lowStarting port of the source port range to which this rule applies (inclusive)Required
rules.{index}.src-port-highEnding port of the source port range to which this rule applies (inclusive)Required
rules.{index}.destinationDestination IP range to which this rule applies (CIDR notation with subnet mask)Required
rules.{index}.dst-port-lowStarting port of the destination port range to which this rule applies (inclusive)Required
rules.{index}.dst-port-highEnding port of the destination port range to which this rule applies (inclusive)Required
rules.{index}.actionPolicy to apply to the packetRequired
One of: unknown_action, accept, drop
rules.{index}.descriptionRule descriptionRequired
is-ipv6Defines whether this set of ACL rules is for IPv6 (false = IPv4). Each Network ACL can have rules for only one IP type.Required
default-policyAction to take for packets which do not match any rulesRequired
One of: unknown_action, accept, drop
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

VPC management command

A Virtual Private Cloud (VPC) allows you to group your regional Private Networks together. Note that a Private Network can be a part of only one VPC.

Create a VPC

Create a new VPC in the specified region.

Usage:

TerminalCode
scw vpc vpc create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
nameName for the VPCRequired
Default: <generated>
project-idProject ID to use. If none is passed the default project ID will be used
tags.{index}Tags for the VPC
enable-routingEnable routing between Private Networks in the VPC
enable-transitivityEnable packets from peered VPCs to transit through this VPC
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Delete a VPC

Delete a VPC specified by its VPC ID.

Usage:

TerminalCode
scw vpc vpc delete <vpc-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-idVPC IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Get a VPC

Retrieve details of an existing VPC, specified by its VPC ID.

Usage:

TerminalCode
scw vpc vpc get <vpc-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-idVPC IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

List VPCs

List existing VPCs in the specified region.

Usage:

TerminalCode
scw vpc vpc list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-bySort order of the returned VPCsOne of: created_at_asc, created_at_desc, name_asc, name_desc
nameName to filter for. Only VPCs with names containing this string will be returned
tags.{index}Tags to filter for. Only VPCs with one or more matching tags will be returned
project-idProject ID to filter for. Only VPCs belonging to this Project will be returned
is-defaultDefines whether to filter only for VPCs which are the default one for their Project
routing-enabledDefines whether to filter only for VPCs which route traffic between their Private Networks
object-storage-private-access-enabledDefines whether to filter only for VPCs with Object Storage private access enabled
organization-idOrganization ID to filter for. Only VPCs belonging to this Organization will be returned
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw, all

Update VPC

Update parameters including name and tags of the specified VPC.

Usage:

TerminalCode
scw vpc vpc update <vpc-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-idVPC IDRequired
nameName for the VPC
tags.{index}Tags for the VPC
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

VPC connector management command

VPC peering connectors.

Create a VPC connector

Create a new VPC connector in the specified region.

Usage:

TerminalCode
scw vpc vpc-connector create [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
nameName for the VPC connectorRequired
Default: <generated>
tags.{index}Tags for the VPC connector
vpc-idVPC ID to filter for. Only connectors belonging to this VPC will be returned
target-vpc-idTarget VPC ID to filter for. Only connectors belonging to this target VPC will be returned
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Delete a VPC connector

Delete a VPC connector specified by its VPC connector ID.

Usage:

TerminalCode
scw vpc vpc-connector delete <vpc-connector-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-connector-idVPC connector IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

Get a VPC connector

Retrieve details of an existing VPC connector, specified by its VPC connector ID.

Usage:

TerminalCode
scw vpc vpc-connector get <vpc-connector-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-connector-idVPC connector IDRequired
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw

List VPC connectors

List existing VPC connectors in the specified region.

Usage:

TerminalCode
scw vpc vpc-connector list [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
order-bySort order of the returned VPC connectorsOne of: created_at_asc, created_at_desc, name_asc, name_desc
nameName to filter for. Only connectors with names containing this string will be returned
tags.{index}Tags to filter for. Only connectors with one or more matching tags will be returned
project-idProject ID to filter for. Only connectors belonging to this Project will be returned
vpc-idVPC ID to filter for. Only connectors belonging to this VPC will be returned
target-vpc-idTarget VPC ID to filter for. Only connectors belonging to this target VPC will be returned
statusStatus of the VPC connectorOne of: unknown_vpc_connector_status, orphan, peered, conflict
organization-idOrganization ID to filter for. Only connectors belonging to this Organization will be returned
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw, all

Update VPC connector

Update parameters including name and tags of the specified VPC connector.

Usage:

TerminalCode
scw vpc vpc-connector update <vpc-connector-id ...> [arg=value ...]

Arguments:

NameDescriptionArgument Specifications
vpc-connector-idVPC connector IDRequired
nameName for the VPC connector
tags.{index}Tags for the VPC connector
regionRegion to target. If none is passed will use default region from the configDefault: fr-par
One of: fr-par, it-mil, nl-ams, pl-waw