vrack_networks
Creates, updates, deletes, gets or lists a vrack_networks resource.
Overview​
| Name | vrack_networks |
| Type | Resource |
| Id | ovh.ip_loadbalancing.vrack_networks |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
farm_id | array | Farm Id your vrack network is attached to and their type (wire: farmId) |
vrack_network_id | integer | Internal Load Balancer identifier of the vRack private network description (wire: vrackNetworkId) |
display_name | string | Human readable name for your vrack network (wire: displayName) |
nat_ip | string (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) |
subnet | string (ip-block) | IP block of the private network in the vRack (example: 192.0.2.0/24) |
vlan | integer | VLAN of the private network in the vRack. 0 if the private network is not in a VLAN |
Represents a private network in the vRack
| Name | Datatype | Description |
|---|---|---|
farm_id | array | Farm Id your vrack network is attached to and their type (wire: farmId) |
vrack_network_id | integer | Internal Load Balancer identifier of the vRack private network description (wire: vrackNetworkId) |
display_name | string | Human readable name for your vrack network (wire: displayName) |
nat_ip | string (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) |
subnet | string (ip-block) | IP block of the private network in the vRack (example: 192.0.2.0/24) |
vlan | integer | VLAN 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name, vrack_network_id | Get a private network (Beta version) | |
list | select | service_name | subnet, vlan, x_pagination_mode | List private networks (Beta version) |
create | insert | service_name, nat_ip, subnet | Create a private network (Beta version) | |
update | update | service_name, vrack_network_id | Update a private network (Beta version) | |
delete | delete | service_name, vrack_network_id | Delete a private network. It must not be used by any farm server (Beta version) | |
update_farm_id | exec | serviceName, vrackNetworkId, farmId | Update 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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"}}) |
serviceName | string | The internal name of your IP load balancing |
service_name | string | The internal name of your IP load balancing (wire: serviceName) |
vrackNetworkId | integer | Internal Load Balancer identifier of the vRack private network description |
vrack_network_id | integer | Internal Load Balancer identifier of the vRack private network description (wire: vrackNetworkId) |
subnet | string (ip-block) | Filter the value of subnet property (=) |
vlan | integer | Filter the value of vlan property (=) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
List private networks (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 subnet = '{{ subnet }}'
AND vlan = '{{ vlan }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: vrack_networks
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the vrack_networks resource.
- name: display_name
value: "{{ display_name }}"
description: |
Human readable name for your vrack network
- name: farm_id
value:
- {{ farm_id }}
description: |
Farm Id you want to attach to that vrack network
- name: nat_ip
value: "{{ nat_ip }}"
description: |
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
- name: subnet
value: "{{ subnet }}"
description: |
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
- name: vlan
value: {{ vlan }}
description: |
VLAN of the private network in the vRack. 0 if the private network is not in a VLAN
UPDATE examples​
- update
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
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_farm_id
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 }}"
}'
;