ByCloud Docs
GuidesCLIAPISDK

PHP 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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->listFloatingIPs();
print_r($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

<?php
use 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);
GET

getFloatingIP()

Get floating IP

Parameters

floating_ip_id

string

required

- Floating IP ID

Example

<?php
use 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);
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

<?php
use 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);
DELETE

deleteFloatingIP()

Delete floating IP

Parameters

floating_ip_id

string

required

- Floating IP ID

Example

<?php
use 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);
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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->listNetworks();
print_r($result);
POST

createNetwork()

Create network

Parameters

name

string

required
description

string

mtu

integer

port_security_enabled

boolean

dns_domain

string

tags

array

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->createNetwork([
'name' => 'private-network'
]);
print_r($result);
GET

getNetwork()

Get network

Parameters

network_id

string

required

- Network ID

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->getNetwork([
'network_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->updateNetwork([
'network_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($result);
DELETE

deleteNetwork()

Delete network

Parameters

network_id

string

required

- Network ID

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->deleteNetwork([
'network_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->listPorts();
print_r($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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->createPort([
'network_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($result);
GET

getPort()

Get port

Parameters

port_id

string

required

- Port ID

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->getPort([
'port_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->updatePort([
'port_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($result);
DELETE

deletePort()

Delete port

Parameters

port_id

string

required

- Port ID

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->deletePort([
'port_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->listRouters();
print_r($result);
POST

createRouter()

Create router

Parameters

name

string

required
description

string

external_gateway_info

object

tags

array

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->createRouter([
'name' => 'main-router'
]);
print_r($result);
GET

getRouter()

Get router

Parameters

router_id

string

required

- Router ID

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->getRouter([
'router_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->updateRouter([
'router_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($result);
DELETE

deleteRouter()

Delete router

Parameters

router_id

string

required

- Router ID

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->deleteRouter([
'router_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->addRouterInterface([
'router_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($result);
POST

removeRouterInterface()

Remove router interface

Parameters

router_id

string

required

- Router ID

subnet_id

string

port_id

string

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->removeRouterInterface([
'router_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->listSecurityGroupRules();
print_r($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

<?php
use 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);
GET

getSecurityGroupRule()

Get security group rule

Parameters

security_group_rule_id

string

required

- Security Group Rule ID

Example

<?php
use 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);
DELETE

deleteSecurityGroupRule()

Delete security group rule

Parameters

security_group_rule_id

string

required

- Security Group Rule ID

Example

<?php
use 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);
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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->listSecurityGroups();
print_r($result);
POST

createSecurityGroup()

Create security group

Parameters

name

string

required
description

string

tags

array

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->createSecurityGroup([
'name' => 'web-servers'
]);
print_r($result);
GET

getSecurityGroup()

Get security group

Parameters

security_group_id

string

required

- Security Group ID

Example

<?php
use 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);
PATCH

updateSecurityGroup()

Update security group

Parameters

security_group_id

string

required

- Security Group ID

name

string

description

string

tags

array

Example

<?php
use 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);
DELETE

deleteSecurityGroup()

Delete security group

Parameters

security_group_id

string

required

- Security Group ID

Example

<?php
use 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);
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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->listSubnets();
print_r($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

<?php
use 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);
GET

getSubnet()

Get subnet

Parameters

subnet_id

string

required

- Subnet ID

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->getSubnet([
'subnet_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($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

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->updateSubnet([
'subnet_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($result);
DELETE

deleteSubnet()

Delete subnet

Parameters

subnet_id

string

required

- Subnet ID

Example

<?php
use ByCloud\SDK\ByCloud;
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
$result = $client->networking->deleteSubnet([
'subnet_id' => '550e8400-e29b-41d4-a716-446655440000'
]);
print_r($result);