JavaScript SDK
Networking
Networks, subnets, routers, floating IPs, and security groups
36 methods
listFloatingIPs()
List floating IPs
Parameters
limitinteger
- Maximum number of items to return
markerstring
- ID of the last item from the previous page (for pagination)
statusstring
- Filter by status
tagsstring
- Filter by tags (comma-separated)
floating_network_idstring
- Filter by floating network ID
floating_ip_addressstring
- Filter by floating IP address
port_idstring
- 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);
createFloatingIP()
Create floating IP
Parameters
floating_network_idstring
required- External network to allocate from
descriptionstring
floating_ip_addressstring
- Specific IP to allocate (if available)
subnet_idstring
- Subnet to allocate from
port_idstring
- Port to associate with
fixed_ip_addressstring
- Fixed IP to associate with (if port has multiple IPs)
dns_domainstring
dns_namestring
tagsarray
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);
getFloatingIP()
Get floating IP
Parameters
floating_ip_idstring
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);
updateFloatingIP()
Update floating IP
Parameters
floating_ip_idstring
required- Floating IP ID
descriptionstring
port_idstring
- Port to associate (null to disassociate)
fixed_ip_addressstring
tagsarray
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);
deleteFloatingIP()
Delete floating IP
Parameters
floating_ip_idstring
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);
listNetworks()
List networks
Parameters
limitinteger
- Maximum number of items to return
markerstring
- ID of the last item from the previous page (for pagination)
namestring
- Filter by name (exact match or prefix with *)
statusstring
- Filter by status
tagsstring
- Filter by tags (comma-separated)
sharedboolean
- Filter by shared status
externalboolean
- 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);
createNetwork()
Create network
Parameters
namestring
requireddescriptionstring
mtuinteger
port_security_enabledboolean
dns_domainstring
tagsarray
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);
getNetwork()
Get network
Parameters
network_idstring
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);
updateNetwork()
Update network
Parameters
network_idstring
required- Network ID
namestring
descriptionstring
mtuinteger
port_security_enabledboolean
dns_domainstring
tagsarray
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);
deleteNetwork()
Delete network
Parameters
network_idstring
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);
listPorts()
List ports
Parameters
limitinteger
- Maximum number of items to return
markerstring
- ID of the last item from the previous page (for pagination)
namestring
- Filter by name (exact match or prefix with *)
statusstring
- Filter by status
tagsstring
- Filter by tags (comma-separated)
network_idstring
- Filter by network ID
device_idstring
- Filter by device ID (instance, router, etc.)
device_ownerstring
- Filter by device owner
mac_addressstring
- 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);
createPort()
Create port
Parameters
namestring
descriptionstring
network_idstring
requiredmac_addressstring
- MAC address (auto-generated if omitted)
fixed_ipsarray
security_groupsarray
port_security_enabledboolean
allowed_address_pairsarray
dns_namestring
tagsarray
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);
getPort()
Get port
Parameters
port_idstring
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);
updatePort()
Update port
Parameters
port_idstring
required- Port ID
namestring
descriptionstring
fixed_ipsarray
security_groupsarray
port_security_enabledboolean
allowed_address_pairsarray
dns_namestring
tagsarray
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);
deletePort()
Delete port
Parameters
port_idstring
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);
listRouters()
List routers
Parameters
limitinteger
- Maximum number of items to return
markerstring
- ID of the last item from the previous page (for pagination)
namestring
- Filter by name (exact match or prefix with *)
statusstring
- Filter by status
tagsstring
- 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);
createRouter()
Create router
Parameters
namestring
requireddescriptionstring
external_gateway_infoobject
tagsarray
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);
getRouter()
Get router
Parameters
router_idstring
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);
updateRouter()
Update router
Parameters
router_idstring
required- Router ID
namestring
descriptionstring
external_gateway_infoobject
routesarray
tagsarray
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);
deleteRouter()
Delete router
Parameters
router_idstring
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);
addRouterInterface()
Add router interface
Parameters
router_idstring
required- Router ID
subnet_idstring
- Subnet to connect (mutually exclusive with port_id)
port_idstring
- 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);
removeRouterInterface()
Remove router interface
Parameters
router_idstring
required- Router ID
subnet_idstring
port_idstring
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);
listSecurityGroupRules()
List security group rules
Parameters
limitinteger
- Maximum number of items to return
markerstring
- ID of the last item from the previous page (for pagination)
security_group_idstring
- Filter by security group ID
directionstring
- Filter by direction
protocolstring
- Filter by protocol
ethertypestring
- 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);
createSecurityGroupRule()
Create security group rule
Parameters
security_group_idstring
requireddirectionstring
requiredethertypestring
protocolstring
port_range_mininteger
port_range_maxinteger
remote_ip_prefixstring
remote_group_idstring
descriptionstring
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);
getSecurityGroupRule()
Get security group rule
Parameters
security_group_rule_idstring
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);
deleteSecurityGroupRule()
Delete security group rule
Parameters
security_group_rule_idstring
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);
listSecurityGroups()
List security groups
Parameters
limitinteger
- Maximum number of items to return
markerstring
- ID of the last item from the previous page (for pagination)
namestring
- Filter by name (exact match or prefix with *)
tagsstring
- 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);
createSecurityGroup()
Create security group
Parameters
namestring
requireddescriptionstring
tagsarray
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);
getSecurityGroup()
Get security group
Parameters
security_group_idstring
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);
updateSecurityGroup()
Update security group
Parameters
security_group_idstring
required- Security Group ID
namestring
descriptionstring
tagsarray
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);
deleteSecurityGroup()
Delete security group
Parameters
security_group_idstring
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);
listSubnets()
List subnets
Parameters
limitinteger
- Maximum number of items to return
markerstring
- ID of the last item from the previous page (for pagination)
namestring
- Filter by name (exact match or prefix with *)
tagsstring
- Filter by tags (comma-separated)
network_idstring
- Filter by network ID
ip_versioninteger
- Filter by IP version
cidrstring
- 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);
createSubnet()
Create subnet
Parameters
namestring
descriptionstring
network_idstring
requiredip_versioninteger
requiredcidrstring
requiredgateway_ipstring
- Gateway IP (auto-assigned if omitted, null to disable)
dns_nameserversarray
allocation_poolsarray
host_routesarray
enable_dhcpboolean
ipv6_ra_modestring
ipv6_address_modestring
tagsarray
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);
getSubnet()
Get subnet
Parameters
subnet_idstring
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);
updateSubnet()
Update subnet
Parameters
subnet_idstring
required- Subnet ID
namestring
descriptionstring
gateway_ipstring
dns_nameserversarray
allocation_poolsarray
host_routesarray
enable_dhcpboolean
tagsarray
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);
deleteSubnet()
Delete subnet
Parameters
subnet_idstring
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);