Python SDK
Networking
Networks, subnets, routers, floating IPs, and security groups
36 methods
list_floating_ips()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.list_floating_ips()print(result)
create_floating_ip()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.create_floating_ip(floating_network_id="550e8400-e29b-41d4-a716-446655440000")print(result)
get_floating_ip()
Get floating IP
Parameters
floating_ip_idstring
required- Floating IP ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.get_floating_ip(floating_ip_id="550e8400-e29b-41d4-a716-446655440000")print(result)
update_floating_ip()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.update_floating_ip(floating_ip_id="550e8400-e29b-41d4-a716-446655440000")print(result)
delete_floating_ip()
Delete floating IP
Parameters
floating_ip_idstring
required- Floating IP ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.delete_floating_ip(floating_ip_id="550e8400-e29b-41d4-a716-446655440000")print(result)
list_networks()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.list_networks()print(result)
create_network()
Create network
Parameters
namestring
requireddescriptionstring
mtuinteger
port_security_enabledboolean
dns_domainstring
tagsarray
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.create_network(name="private-network")print(result)
get_network()
Get network
Parameters
network_idstring
required- Network ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.get_network(network_id="550e8400-e29b-41d4-a716-446655440000")print(result)
update_network()
Update network
Parameters
network_idstring
required- Network ID
namestring
descriptionstring
mtuinteger
port_security_enabledboolean
dns_domainstring
tagsarray
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.update_network(network_id="550e8400-e29b-41d4-a716-446655440000")print(result)
delete_network()
Delete network
Parameters
network_idstring
required- Network ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.delete_network(network_id="550e8400-e29b-41d4-a716-446655440000")print(result)
list_ports()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.list_ports()print(result)
create_port()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.create_port(network_id="550e8400-e29b-41d4-a716-446655440000")print(result)
get_port()
Get port
Parameters
port_idstring
required- Port ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.get_port(port_id="550e8400-e29b-41d4-a716-446655440000")print(result)
update_port()
Update port
Parameters
port_idstring
required- Port ID
namestring
descriptionstring
fixed_ipsarray
security_groupsarray
port_security_enabledboolean
allowed_address_pairsarray
dns_namestring
tagsarray
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.update_port(port_id="550e8400-e29b-41d4-a716-446655440000")print(result)
delete_port()
Delete port
Parameters
port_idstring
required- Port ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.delete_port(port_id="550e8400-e29b-41d4-a716-446655440000")print(result)
list_routers()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.list_routers()print(result)
create_router()
Create router
Parameters
namestring
requireddescriptionstring
external_gateway_infoobject
tagsarray
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.create_router(name="main-router")print(result)
get_router()
Get router
Parameters
router_idstring
required- Router ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.get_router(router_id="550e8400-e29b-41d4-a716-446655440000")print(result)
update_router()
Update router
Parameters
router_idstring
required- Router ID
namestring
descriptionstring
external_gateway_infoobject
routesarray
tagsarray
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.update_router(router_id="550e8400-e29b-41d4-a716-446655440000")print(result)
delete_router()
Delete router
Parameters
router_idstring
required- Router ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.delete_router(router_id="550e8400-e29b-41d4-a716-446655440000")print(result)
add_router_interface()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.add_router_interface(router_id="550e8400-e29b-41d4-a716-446655440000")print(result)
remove_router_interface()
Remove router interface
Parameters
router_idstring
required- Router ID
subnet_idstring
port_idstring
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.remove_router_interface(router_id="550e8400-e29b-41d4-a716-446655440000")print(result)
list_security_group_rules()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.list_security_group_rules()print(result)
create_security_group_rule()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.create_security_group_rule(security_group_id="550e8400-e29b-41d4-a716-446655440000", direction="ingress")print(result)
get_security_group_rule()
Get security group rule
Parameters
security_group_rule_idstring
required- Security Group Rule ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.get_security_group_rule(security_group_rule_id="550e8400-e29b-41d4-a716-446655440000")print(result)
delete_security_group_rule()
Delete security group rule
Parameters
security_group_rule_idstring
required- Security Group Rule ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.delete_security_group_rule(security_group_rule_id="550e8400-e29b-41d4-a716-446655440000")print(result)
list_security_groups()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.list_security_groups()print(result)
create_security_group()
Create security group
Parameters
namestring
requireddescriptionstring
tagsarray
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.create_security_group(name="web-servers")print(result)
get_security_group()
Get security group
Parameters
security_group_idstring
required- Security Group ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.get_security_group(security_group_id="550e8400-e29b-41d4-a716-446655440000")print(result)
update_security_group()
Update security group
Parameters
security_group_idstring
required- Security Group ID
namestring
descriptionstring
tagsarray
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.update_security_group(security_group_id="550e8400-e29b-41d4-a716-446655440000")print(result)
delete_security_group()
Delete security group
Parameters
security_group_idstring
required- Security Group ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.delete_security_group(security_group_id="550e8400-e29b-41d4-a716-446655440000")print(result)
list_subnets()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.list_subnets()print(result)
create_subnet()
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
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.create_subnet(network_id="550e8400-e29b-41d4-a716-446655440000", ip_version=4, cidr="192.168.1.0/24")print(result)
get_subnet()
Get subnet
Parameters
subnet_idstring
required- Subnet ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.get_subnet(subnet_id="550e8400-e29b-41d4-a716-446655440000")print(result)
update_subnet()
Update subnet
Parameters
subnet_idstring
required- Subnet ID
namestring
descriptionstring
gateway_ipstring
dns_nameserversarray
allocation_poolsarray
host_routesarray
enable_dhcpboolean
tagsarray
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.update_subnet(subnet_id="550e8400-e29b-41d4-a716-446655440000")print(result)
delete_subnet()
Delete subnet
Parameters
subnet_idstring
required- Subnet ID
Example
from bycloud import ByCloudclient = ByCloud(token="YOUR_ACCESS_TOKEN")result = client.networking.delete_subnet(subnet_id="550e8400-e29b-41d4-a716-446655440000")print(result)