Skip to main content

vrack_networks

Creates, updates, deletes, gets or lists a vrack_networks resource.

Overview​

Namevrack_networks
TypeResource
Idovh.ip_loadbalancing.vrack_networks

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
farm_idarrayFarm Id your vrack network is attached to and their type (wire: farmId)
vrack_network_idintegerInternal Load Balancer identifier of the vRack private network description (wire: vrackNetworkId)
display_namestringHuman readable name for your vrack network (wire: displayName)
nat_ipstring (ip-block)An IP block used as a pool of IPs by this Load Balancer to connect to the servers in this private network. The block must be in the private network and reserved for the Load Balancer (example: 192.0.2.0/24) (wire: natIp)
subnetstring (ip-block)IP block of the private network in the vRack (example: 192.0.2.0/24)
vlanintegerVLAN of the private network in the vRack. 0 if the private network is not in a VLAN

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_name, vrack_network_idGet a private network (Beta version)
listselectservice_namesubnet, vlan, x_pagination_modeList private networks (Beta version)
createinsertservice_name, nat_ip, subnetCreate a private network (Beta version)
updateupdateservice_name, vrack_network_idUpdate a private network (Beta version)
deletedeleteservice_name, vrack_network_idDelete a private network. It must not be used by any farm server (Beta version)
update_farm_idexecserviceName, vrackNetworkId, farmIdUpdate the farm of a private network (Beta version)

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
serviceNamestringThe internal name of your IP load balancing
service_namestringThe internal name of your IP load balancing (wire: serviceName)
vrackNetworkIdintegerInternal Load Balancer identifier of the vRack private network description
vrack_network_idintegerInternal Load Balancer identifier of the vRack private network description (wire: vrackNetworkId)
subnetstring (ip-block)Filter the value of subnet property (=)
vlanintegerFilter the value of vlan property (=)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a private network (Beta version)

SELECT
farm_id,
vrack_network_id,
display_name,
nat_ip,
subnet,
vlan
FROM ovh.ip_loadbalancing.vrack_networks
WHERE service_name = '{{ service_name }}' -- required
AND vrack_network_id = '{{ vrack_network_id }}' -- required
;

INSERT examples​

Create a private network (Beta version)

INSERT INTO ovh.ip_loadbalancing.vrack_networks (
display_name,
farm_id,
nat_ip,
subnet,
vlan,
service_name
)
SELECT
'{{ display_name }}',
'{{ farm_id }}',
'{{ nat_ip }}' /* required */,
'{{ subnet }}' /* required */,
{{ vlan }},
'{{ service_name }}'
RETURNING
farm_id,
vrack_network_id,
display_name,
nat_ip,
subnet,
vlan
;

UPDATE examples​

Update a private network (Beta version)

UPDATE ovh.ip_loadbalancing.vrack_networks
SET
display_name = '{{ display_name }}',
nat_ip = '{{ nat_ip }}',
vlan = {{ vlan }}
WHERE
service_name = '{{ service_name }}' --required
AND vrack_network_id = '{{ vrack_network_id }}' --required;

DELETE examples​

Delete a private network. It must not be used by any farm server (Beta version)

DELETE FROM ovh.ip_loadbalancing.vrack_networks
WHERE service_name = '{{ service_name }}' --required
AND vrack_network_id = '{{ vrack_network_id }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Update the farm of a private network (Beta version)

EXEC ovh.ip_loadbalancing.vrack_networks.update_farm_id
@serviceName='{{ serviceName }}' --required,
@vrackNetworkId='{{ vrackNetworkId }}' --required
@@json=
'{
"farmId": "{{ farmId }}"
}'
;