VPC Public Gateway API
- DHCP configuration management
- DHCP entries management
- VPC Public Gateway management
- Gateway Networks management
- IP address management
- PAT rules management
DHCP configuration allows you to set parameters for assignment of IP addresses to devices on a Private Network attached to a VPC Public Gateway (subnet, lease time etc).
Create a DHCP configuration.
Usage:
scw vpc-gw dhcp create [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| subnet | Subnet for the DHCP server | |
| address | Address of the DHCP server. This will be the gateway's address in the private network. Defaults to the first address of the subnet | |
| pool-low | Low IP (included) of the dynamic address pool | |
| pool-high | High IP (included) of the dynamic address pool | |
| enable-dynamic | Whether to enable dynamic pooling of IPs | |
| valid-lifetime.seconds | ||
| valid-lifetime.nanos | ||
| renew-timer.seconds | ||
| renew-timer.nanos | ||
| rebind-timer.seconds | ||
| rebind-timer.nanos | ||
| push-default-route | Whether the gateway should push a default route to DHCP clients or only hand out IPs. Defaults to true | |
| push-dns-server | Whether the gateway should push custom DNS servers to clients | |
| dns-servers-override.{index} | Override the DNS server list pushed to DHCP clients, instead of the gateway itself | |
| dns-search.{index} | Additional DNS search paths | |
| dns-local-name | TLD given to hosts in the Private Network | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Delete a DHCP configuration.
Usage:
scw vpc-gw dhcp delete <dhcpid ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| dhcpid | Required | DHCP config id to delete |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Get a DHCP configuration.
Usage:
scw vpc-gw dhcp get <dhcpid ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| dhcpid | Required | ID of the DHCP config to fetch |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
List DHCP configurations.
Usage:
scw vpc-gw dhcp list [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, subnet_asc, subnet_desc |
Order in which to return results |
| project-id | Include only DHCPs in this project | |
| address | Filter on gateway address | |
| has-address | Filter on subnets containing address | |
| organization-id | Include only DHCPs in this organization | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Update a DHCP configuration.
Usage:
scw vpc-gw dhcp update <dhcpid ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| dhcpid | Required | DHCP config to update |
| subnet | Subnet for the DHCP server | |
| address | Address of the DHCP server. This will be the gateway's address in the private network | |
| pool-low | Low IP (included) of the dynamic address pool | |
| pool-high | High IP (included) of the dynamic address pool | |
| enable-dynamic | Whether to enable dynamic pooling of IPs | |
| valid-lifetime.seconds | ||
| valid-lifetime.nanos | ||
| renew-timer.seconds | ||
| renew-timer.nanos | ||
| rebind-timer.seconds | ||
| rebind-timer.nanos | ||
| push-default-route | Whether the gateway should push a default route to DHCP clients or only hand out IPs | |
| push-dns-server | Whether the gateway should push custom DNS servers to clients | |
| dns-servers-override.{index} | Override the DNS server list pushed to DHCP clients, instead of the gateway itself | |
| dns-search.{index} | Additional DNS search paths | |
| dns-local-name | TLD given to hosts in the Private Network | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
DHCP entries hold both dynamic DHCP leases (IP addresses dynamically assigned by the gateway to instances) and static user-created DHCP reservations.
Create a static DHCP reservation.
Usage:
scw vpc-gw dhcp-entry create [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-network-id | GatewayNetwork on which to create a DHCP reservation | |
| mac-address | MAC address to give a static entry to | |
| ip-address | IP address to give to the machine | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Delete a DHCP reservation.
Usage:
scw vpc-gw dhcp-entry delete <dhcp-entry-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| dhcp-entry-id | Required | DHCP entry ID to delete |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Get DHCP entries.
Usage:
scw vpc-gw dhcp-entry get <dhcp-entry-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| dhcp-entry-id | Required | ID of the DHCP entry to fetch |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
List DHCP entries.
Usage:
scw vpc-gw dhcp-entry list [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, ip_address_asc, ip_address_desc, hostname_asc, hostname_desc |
Order in which to return results |
| gateway-network-id | Filter entries based on the gateway network they are on | |
| mac-address | Filter entries on their MAC address | |
| ip-address | Filter entries on their IP address | |
| hostname | Filter entries on their hostname substring | |
| type | One of: unknown, reservation, lease |
Filter entries on their type |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Set the list of DHCP reservations attached to a Gateway Network. Reservations are identified by their MAC address, and will sync the current DHCP entry list to the given list, creating, updating or deleting DHCP entries.
Usage:
scw vpc-gw dhcp-entry set [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-network-id | Gateway Network on which to set DHCP reservation list | |
| dhcp-entries.{index}.mac-address | MAC address to give a static entry to | |
| dhcp-entries.{index}.ip-address | IP address to give to the machine | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Update a DHCP entry.
Usage:
scw vpc-gw dhcp-entry update <dhcp-entry-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| dhcp-entry-id | Required | DHCP entry ID to update |
| ip-address | New IP address to give to the machine | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
The VPC Public Gateway is a building block for your infrastructure on Scaleway's shared public cloud. It provides a set of managed network services and features for Scaleway's Private Networks such as DHCP, NAT and routing.
Create a VPC Public Gateway.
Usage:
scw vpc-gw gateway create [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| name | Default: <generated> |
Name of the gateway |
| tags.{index} | Tags for the gateway | |
| type | Default: VPC-GW-S |
Gateway type |
| upstream-dns-servers.{index} | Override the gateway's default recursive DNS servers, if DNS features are enabled | |
| ip-id | Attach an existing IP to the gateway | |
| enable-smtp | Allow SMTP traffic to pass through the gateway | |
| enable-bastion | Enable SSH bastion on the gateway | |
| bastion-port | Port of the SSH bastion | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Delete a VPC Public Gateway.
Usage:
scw vpc-gw gateway delete <gateway-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-id | Required | ID of the gateway to delete |
| cleanup-dhcp | Whether to cleanup attached DHCP configurations | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Get a VPC Public Gateway.
Usage:
scw vpc-gw gateway get <gateway-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-id | Required | ID of the gateway to fetch |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
List VPC Public Gateways.
Usage:
scw vpc-gw gateway list [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, name_asc, name_desc, type_asc, type_desc, status_asc, status_desc |
Order in which to return results |
| project-id | Include only gateways in this project | |
| name | Filter gateways including this name | |
| tags.{index} | Filter gateways with these tags | |
| type | Filter gateways of this type | |
| status | One of: unknown, stopped, allocating, configuring, running, stopping, failed, deleting, deleted, locked |
Filter gateways in this status (unknown for any) |
| private-network-id | Filter gateways attached to this private network | |
| organization-id | Include only gateways in this organization | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Update a VPC Public Gateway.
Usage:
scw vpc-gw gateway update <gateway-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-id | Required | ID of the gateway to update |
| name | Name fo the gateway | |
| tags.{index} | Tags for the gateway | |
| upstream-dns-servers.{index} | Override the gateway's default recursive DNS servers, if DNS features are enabled | |
| enable-bastion | Enable SSH bastion on the gateway | |
| bastion-port | Port of the SSH bastion | |
| enable-smtp | Allow SMTP traffic to pass through the gateway | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Upgrade a VPC Public Gateway to the latest version.
Usage:
scw vpc-gw gateway upgrade <gateway-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-id | Required | ID of the gateway to upgrade |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
A Gateway Network represents the connection of a Private Network to a VPC Public Gateway. It holds configuration options relative to this specific connection, such as the DHCP configuration.
Attach a gateway to a Private Network.
Usage:
scw vpc-gw gateway-network create [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-id | Gateway to connect | |
| private-network-id | Private Network to connect | |
| enable-masquerade | Whether to enable masquerade on this network | |
| dhcpid | Existing configuration | |
| address | Static IP address in CIDR format to to use without DHCP | |
| enable-dhcp | Whether to enable DHCP on this Private Network | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Detach a gateway from a Private Network.
Usage:
scw vpc-gw gateway-network delete <gateway-network-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-network-id | Required | GatewayNetwork to delete |
| cleanup-dhcp | Whether to cleanup the attached DHCP configuration | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Get a gateway connection to a Private Network.
Usage:
scw vpc-gw gateway-network get <gateway-network-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-network-id | Required | ID of the GatewayNetwork to fetch |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
List gateway connections to Private Networks.
Usage:
scw vpc-gw gateway-network list [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, status_asc, status_desc |
Order in which to return results |
| gateway-id | Filter by gateway | |
| private-network-id | Filter by private network | |
| enable-masquerade | Filter by masquerade enablement | |
| dhcpid | Filter by DHCP configuration | |
| status | One of: unknown, created, attaching, configuring, ready, detaching, deleted |
Filter GatewayNetworks by this status (unknown for any) |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Update a gateway connection to a Private Network.
Usage:
scw vpc-gw gateway-network update <gateway-network-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-network-id | Required | ID of the GatewayNetwork to update |
| enable-masquerade | New masquerade enablement | |
| dhcpid | New DHCP configuration | |
| enable-dhcp | Whether to enable DHCP on the connected Private Network | |
| address | New static IP address | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Gateways come in multiple shapes and size, which are described by the various gateway types.
List VPC Public Gateway types.
Usage:
scw vpc-gw gateway-type list [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
A VPC Public Gateway has a public IP address, allowing it to reach the public internet, as well as forward (masquerade) traffic from member instances of attached Private Networks.
Reserve an IP.
Usage:
scw vpc-gw ip create [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| project-id | Project ID to use. If none is passed the default project ID will be used | |
| tags.{index} | Tags to give to the IP | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Delete an IP.
Usage:
scw vpc-gw ip delete <ip-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| ip-id | Required | ID of the IP to delete |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Get an IP.
Usage:
scw vpc-gw ip get <ip-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| ip-id | Required | ID of the IP to get |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
List IPs.
Usage:
scw vpc-gw ip list [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, ip_asc, ip_desc, reverse_asc, reverse_desc |
Order in which to return results |
| project-id | Include only IPs in this project | |
| tags.{index} | Filter IPs with these tags | |
| reverse | Filter by reverse containing this string | |
| is-free | Filter whether the IP is attached to a gateway or not | |
| organization-id | Include only IPs in this organization | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Update an IP.
Usage:
scw vpc-gw ip update <ip-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| ip-id | Required | ID of the IP to update |
| tags.{index} | Tags to give to the IP | |
| reverse | Reverse to set on the IP. Empty string to unset | |
| gateway-id | Gateway to attach the IP to. Empty string to detach | |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
PAT (Port Address Translation) rules are global to a gateway. They define the forwarding of a public port to a specific instance on a Private Network.
Create a PAT rule.
Usage:
scw vpc-gw pat-rule create [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-id | Gateway on which to attach the rule to | |
| public-port | Public port to listen on | |
| private-ip | Private IP to forward data to | |
| private-port | Private port to translate to | |
| protocol | One of: unknown, both, tcp, udp |
Protocol the rule should apply to |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Delete a PAT rule.
Usage:
scw vpc-gw pat-rule delete <pat-rule-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| pat-rule-id | Required | PAT rule to delete |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Get a PAT rule.
Usage:
scw vpc-gw pat-rule get <pat-rule-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| pat-rule-id | Required | PAT rule to get |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
List PAT rules.
Usage:
scw vpc-gw pat-rule list [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| order-by | One of: created_at_asc, created_at_desc, public_port_asc, public_port_desc |
Order in which to return results |
| gateway-id | Fetch rules for this gateway | |
| private-ip | Fetch rules targeting this private ip | |
| protocol | One of: unknown, both, tcp, udp |
Fetch rules for this protocol |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Set the list of PAT rules attached to a Gateway. Rules are identified by their public port and protocol. This will sync the current PAT rule list with the givent list, creating, updating or deleting PAT rules.
Usage:
scw vpc-gw pat-rule set [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| gateway-id | Gateway on which to set the PAT rules | |
| pat-rules.{index}.public-port | Public port to listen on | |
| pat-rules.{index}.private-ip | Private IP to forward data to | |
| pat-rules.{index}.private-port | Private port to translate to | |
| pat-rules.{index}.protocol | One of: unknown, both, tcp, udp |
Protocol the rule should apply to |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |
Update a PAT rule.
Usage:
scw vpc-gw pat-rule update <pat-rule-id ...> [arg=value ...]
Args:
| Name | Description | |
|---|---|---|
| pat-rule-id | Required | PAT rule to update |
| public-port | Public port to listen on | |
| private-ip | Private IP to forward data to | |
| private-port | Private port to translate to | |
| protocol | One of: unknown, both, tcp, udp |
Protocol the rule should apply to |
| zone | Default: fr-par-1One of: fr-par-1, fr-par-2, nl-ams-1, pl-waw-1 |
Zone to target. If none is passed will use default zone from the config |