ByCloud Docs
GuidesCLIAPISDK

JavaScript SDK

Networking

Networks, subnets, routers, floating IPs, and security groups

36 methods

GET

listFloatingIPs()

List floating IPs

Parameters

limit

integer

- Maximum number of items to return

marker

string

- ID of the last item from the previous page (for pagination)

status

string

- Filter by status

tags

string

- Filter by tags (comma-separated)

floating_network_id

string

- Filter by floating network ID

floating_ip_address

string

- Filter by floating IP address

port_id

string

- Filter by associated port ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.listFloatingIPs();
console.log(result);
POST

createFloatingIP()

Create floating IP

Parameters

floating_network_id

string

required

- External network to allocate from

description

string

floating_ip_address

string

- Specific IP to allocate (if available)

subnet_id

string

- Subnet to allocate from

port_id

string

- Port to associate with

fixed_ip_address

string

- Fixed IP to associate with (if port has multiple IPs)

dns_domain

string

dns_name

string

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.createFloatingIP({
floating_network_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

getFloatingIP()

Get floating IP

Parameters

floating_ip_id

string

required

- Floating IP ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.getFloatingIP({
floating_ip_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
PATCH

updateFloatingIP()

Update floating IP

Parameters

floating_ip_id

string

required

- Floating IP ID

description

string

port_id

string

- Port to associate (null to disassociate)

fixed_ip_address

string

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.updateFloatingIP({
floating_ip_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
DELETE

deleteFloatingIP()

Delete floating IP

Parameters

floating_ip_id

string

required

- Floating IP ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.deleteFloatingIP({
floating_ip_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

listNetworks()

List networks

Parameters

limit

integer

- Maximum number of items to return

marker

string

- ID of the last item from the previous page (for pagination)

name

string

- Filter by name (exact match or prefix with *)

status

string

- Filter by status

tags

string

- Filter by tags (comma-separated)

shared

boolean

- Filter by shared status

external

boolean

- Filter by external network status

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.listNetworks();
console.log(result);
POST

createNetwork()

Create network

Parameters

name

string

required
description

string

mtu

integer

port_security_enabled

boolean

dns_domain

string

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.createNetwork({
name: "private-network"
});
console.log(result);
GET

getNetwork()

Get network

Parameters

network_id

string

required

- Network ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.getNetwork({
network_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
PATCH

updateNetwork()

Update network

Parameters

network_id

string

required

- Network ID

name

string

description

string

mtu

integer

port_security_enabled

boolean

dns_domain

string

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.updateNetwork({
network_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
DELETE

deleteNetwork()

Delete network

Parameters

network_id

string

required

- Network ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.deleteNetwork({
network_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

listPorts()

List ports

Parameters

limit

integer

- Maximum number of items to return

marker

string

- ID of the last item from the previous page (for pagination)

name

string

- Filter by name (exact match or prefix with *)

status

string

- Filter by status

tags

string

- Filter by tags (comma-separated)

network_id

string

- Filter by network ID

device_id

string

- Filter by device ID (instance, router, etc.)

device_owner

string

- Filter by device owner

mac_address

string

- Filter by MAC address

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.listPorts();
console.log(result);
POST

createPort()

Create port

Parameters

name

string

description

string

network_id

string

required
mac_address

string

- MAC address (auto-generated if omitted)

fixed_ips

array

security_groups

array

port_security_enabled

boolean

allowed_address_pairs

array

dns_name

string

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.createPort({
network_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

getPort()

Get port

Parameters

port_id

string

required

- Port ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.getPort({
port_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
PATCH

updatePort()

Update port

Parameters

port_id

string

required

- Port ID

name

string

description

string

fixed_ips

array

security_groups

array

port_security_enabled

boolean

allowed_address_pairs

array

dns_name

string

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.updatePort({
port_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
DELETE

deletePort()

Delete port

Parameters

port_id

string

required

- Port ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.deletePort({
port_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

listRouters()

List routers

Parameters

limit

integer

- Maximum number of items to return

marker

string

- ID of the last item from the previous page (for pagination)

name

string

- Filter by name (exact match or prefix with *)

status

string

- Filter by status

tags

string

- Filter by tags (comma-separated)

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.listRouters();
console.log(result);
POST

createRouter()

Create router

Parameters

name

string

required
description

string

external_gateway_info

object

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.createRouter({
name: "main-router"
});
console.log(result);
GET

getRouter()

Get router

Parameters

router_id

string

required

- Router ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.getRouter({
router_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
PATCH

updateRouter()

Update router

Parameters

router_id

string

required

- Router ID

name

string

description

string

external_gateway_info

object

routes

array

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.updateRouter({
router_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
DELETE

deleteRouter()

Delete router

Parameters

router_id

string

required

- Router ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.deleteRouter({
router_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
POST

addRouterInterface()

Add router interface

Parameters

router_id

string

required

- Router ID

subnet_id

string

- Subnet to connect (mutually exclusive with port_id)

port_id

string

- Port to connect (mutually exclusive with subnet_id)

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.addRouterInterface({
router_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
POST

removeRouterInterface()

Remove router interface

Parameters

router_id

string

required

- Router ID

subnet_id

string

port_id

string

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.removeRouterInterface({
router_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

listSecurityGroupRules()

List security group rules

Parameters

limit

integer

- Maximum number of items to return

marker

string

- ID of the last item from the previous page (for pagination)

security_group_id

string

- Filter by security group ID

direction

string

- Filter by direction

protocol

string

- Filter by protocol

ethertype

string

- Filter by ethertype

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.listSecurityGroupRules();
console.log(result);
POST

createSecurityGroupRule()

Create security group rule

Parameters

security_group_id

string

required
direction

string

required
ethertype

string

protocol

string

port_range_min

integer

port_range_max

integer

remote_ip_prefix

string

remote_group_id

string

description

string

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.createSecurityGroupRule({
security_group_id: "550e8400-e29b-41d4-a716-446655440000",
direction: "ingress"
});
console.log(result);
GET

getSecurityGroupRule()

Get security group rule

Parameters

security_group_rule_id

string

required

- Security Group Rule ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.getSecurityGroupRule({
security_group_rule_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
DELETE

deleteSecurityGroupRule()

Delete security group rule

Parameters

security_group_rule_id

string

required

- Security Group Rule ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.deleteSecurityGroupRule({
security_group_rule_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

listSecurityGroups()

List security groups

Parameters

limit

integer

- Maximum number of items to return

marker

string

- ID of the last item from the previous page (for pagination)

name

string

- Filter by name (exact match or prefix with *)

tags

string

- Filter by tags (comma-separated)

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.listSecurityGroups();
console.log(result);
POST

createSecurityGroup()

Create security group

Parameters

name

string

required
description

string

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.createSecurityGroup({
name: "web-servers"
});
console.log(result);
GET

getSecurityGroup()

Get security group

Parameters

security_group_id

string

required

- Security Group ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.getSecurityGroup({
security_group_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
PATCH

updateSecurityGroup()

Update security group

Parameters

security_group_id

string

required

- Security Group ID

name

string

description

string

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.updateSecurityGroup({
security_group_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
DELETE

deleteSecurityGroup()

Delete security group

Parameters

security_group_id

string

required

- Security Group ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.deleteSecurityGroup({
security_group_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
GET

listSubnets()

List subnets

Parameters

limit

integer

- Maximum number of items to return

marker

string

- ID of the last item from the previous page (for pagination)

name

string

- Filter by name (exact match or prefix with *)

tags

string

- Filter by tags (comma-separated)

network_id

string

- Filter by network ID

ip_version

integer

- Filter by IP version

cidr

string

- Filter by CIDR

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.listSubnets();
console.log(result);
POST

createSubnet()

Create subnet

Parameters

name

string

description

string

network_id

string

required
ip_version

integer

required
cidr

string

required
gateway_ip

string

- Gateway IP (auto-assigned if omitted, null to disable)

dns_nameservers

array

allocation_pools

array

host_routes

array

enable_dhcp

boolean

ipv6_ra_mode

string

ipv6_address_mode

string

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.createSubnet({
network_id: "550e8400-e29b-41d4-a716-446655440000",
ip_version: 4,
cidr: "192.168.1.0/24"
});
console.log(result);
GET

getSubnet()

Get subnet

Parameters

subnet_id

string

required

- Subnet ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.getSubnet({
subnet_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
PATCH

updateSubnet()

Update subnet

Parameters

subnet_id

string

required

- Subnet ID

name

string

description

string

gateway_ip

string

dns_nameservers

array

allocation_pools

array

host_routes

array

enable_dhcp

boolean

tags

array

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.updateSubnet({
subnet_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);
DELETE

deleteSubnet()

Delete subnet

Parameters

subnet_id

string

required

- Subnet ID

Example

import { ByCloud } from "@bycoded/bycloud-sdk";
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
const result = await client.networking.deleteSubnet({
subnet_id: "550e8400-e29b-41d4-a716-446655440000"
});
console.log(result);