PHP 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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->listFloatingIPs();print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->createFloatingIP(['floating_network_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
getFloatingIP()
Get floating IP
Parameters
floating_ip_idstring
required- Floating IP ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->getFloatingIP(['floating_ip_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->updateFloatingIP(['floating_ip_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
deleteFloatingIP()
Delete floating IP
Parameters
floating_ip_idstring
required- Floating IP ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->deleteFloatingIP(['floating_ip_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->listNetworks();print_r($result);
createNetwork()
Create network
Parameters
namestring
requireddescriptionstring
mtuinteger
port_security_enabledboolean
dns_domainstring
tagsarray
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->createNetwork(['name' => 'private-network']);print_r($result);
getNetwork()
Get network
Parameters
network_idstring
required- Network ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->getNetwork(['network_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
updateNetwork()
Update network
Parameters
network_idstring
required- Network ID
namestring
descriptionstring
mtuinteger
port_security_enabledboolean
dns_domainstring
tagsarray
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->updateNetwork(['network_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
deleteNetwork()
Delete network
Parameters
network_idstring
required- Network ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->deleteNetwork(['network_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->listPorts();print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->createPort(['network_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
getPort()
Get port
Parameters
port_idstring
required- Port ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->getPort(['port_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->updatePort(['port_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
deletePort()
Delete port
Parameters
port_idstring
required- Port ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->deletePort(['port_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->listRouters();print_r($result);
createRouter()
Create router
Parameters
namestring
requireddescriptionstring
external_gateway_infoobject
tagsarray
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->createRouter(['name' => 'main-router']);print_r($result);
getRouter()
Get router
Parameters
router_idstring
required- Router ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->getRouter(['router_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
updateRouter()
Update router
Parameters
router_idstring
required- Router ID
namestring
descriptionstring
external_gateway_infoobject
routesarray
tagsarray
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->updateRouter(['router_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
deleteRouter()
Delete router
Parameters
router_idstring
required- Router ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->deleteRouter(['router_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->addRouterInterface(['router_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
removeRouterInterface()
Remove router interface
Parameters
router_idstring
required- Router ID
subnet_idstring
port_idstring
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->removeRouterInterface(['router_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->listSecurityGroupRules();print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->createSecurityGroupRule(['security_group_id' => '550e8400-e29b-41d4-a716-446655440000','direction' => 'ingress']);print_r($result);
getSecurityGroupRule()
Get security group rule
Parameters
security_group_rule_idstring
required- Security Group Rule ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->getSecurityGroupRule(['security_group_rule_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
deleteSecurityGroupRule()
Delete security group rule
Parameters
security_group_rule_idstring
required- Security Group Rule ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->deleteSecurityGroupRule(['security_group_rule_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->listSecurityGroups();print_r($result);
createSecurityGroup()
Create security group
Parameters
namestring
requireddescriptionstring
tagsarray
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->createSecurityGroup(['name' => 'web-servers']);print_r($result);
getSecurityGroup()
Get security group
Parameters
security_group_idstring
required- Security Group ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->getSecurityGroup(['security_group_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
updateSecurityGroup()
Update security group
Parameters
security_group_idstring
required- Security Group ID
namestring
descriptionstring
tagsarray
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->updateSecurityGroup(['security_group_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
deleteSecurityGroup()
Delete security group
Parameters
security_group_idstring
required- Security Group ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->deleteSecurityGroup(['security_group_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->listSubnets();print_r($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
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->createSubnet(['network_id' => '550e8400-e29b-41d4-a716-446655440000','ip_version' => 4,'cidr' => '192.168.1.0/24']);print_r($result);
getSubnet()
Get subnet
Parameters
subnet_idstring
required- Subnet ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->getSubnet(['subnet_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
updateSubnet()
Update subnet
Parameters
subnet_idstring
required- Subnet ID
namestring
descriptionstring
gateway_ipstring
dns_nameserversarray
allocation_poolsarray
host_routesarray
enable_dhcpboolean
tagsarray
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->updateSubnet(['subnet_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);
deleteSubnet()
Delete subnet
Parameters
subnet_idstring
required- Subnet ID
Example
<?phpuse ByCloud\SDK\ByCloud;$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);$result = $client->networking->deleteSubnet(['subnet_id' => '550e8400-e29b-41d4-a716-446655440000']);print_r($result);