ips
Creates, updates, deletes, gets or lists an ips resource.
Overview​
| Name | ips |
| Type | Resource |
| Id | ovh.vrack.ips |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
gateway | string (ip-block) | Your gateway (example: 192.0.2.0/24) |
ip | string (ip-block) | Your IP block (example: 192.0.2.0/24) |
public_routing_type | string | Mode in which gateway is configured (wire: publicRoutingType) |
region | string | Where you want your block announced on the network |
IP block in vrack
| Name | Datatype | Description |
|---|---|---|
gateway | string (ip-block) | Your gateway (example: 192.0.2.0/24) |
ip | string (ip-block) | Your IP block (example: 192.0.2.0/24) |
public_routing_type | string | Mode in which gateway is configured (wire: publicRoutingType) |
region | string | Where you want your block announced on the network |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ip, service_name | Get a block. Returns the Additional IPv4 block, its gateway, its region and its public routing type. | |
list | select | service_name | x_pagination_mode | List blocks. Returns the Additional IPv4 blocks routed in the vRack. |
create | insert | service_name, block | Attach a block. Routes an Additional IPv4 block in the vRack, in the given region. Returns the task that performs it. | |
delete | delete | ip, service_name | Detach a block. Removes the Additional IPv4 block from the vRack. Returns the task that performs it. |
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"}}) |
ip | string (ip-block) | Your IP block |
service_name | string | The internal name of your vrack (wire: serviceName) |
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 block. Returns the Additional IPv4 block, its gateway, its region and its public routing type.
SELECT
gateway,
ip,
public_routing_type,
region
FROM ovh.vrack.ips
WHERE ip = '{{ ip }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List blocks. Returns the Additional IPv4 blocks routed in the vRack.
SELECT
gateway,
ip,
public_routing_type,
region
FROM ovh.vrack.ips
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Attach a block. Routes an Additional IPv4 block in the vRack, in the given region. Returns the task that performs it.
INSERT INTO ovh.vrack.ips (
block,
region,
service_name
)
SELECT
'{{ block }}' /* required */,
'{{ region }}',
'{{ service_name }}'
RETURNING
id,
order_id,
service_name,
function,
last_update,
status,
target_domain,
todo_date
;
# Description fields are for documentation purposes
- name: ips
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the ips resource.
- name: block
value: "{{ block }}"
description: |
IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
- name: region
value: "{{ region }}"
description: |
Choose the region in which to route the block
DELETE examples​
- delete
Detach a block. Removes the Additional IPv4 block from the vRack. Returns the task that performs it.
DELETE FROM ovh.vrack.ips
WHERE ip = '{{ ip }}' --required
AND service_name = '{{ service_name }}' --required
;