ip_failovers
Creates, updates, deletes, gets or lists an ip_failovers resource.
Overview​
| Name | ip_failovers |
| Type | Resource |
| Id | ovh.cloud_network.ip_failovers |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Ip id |
block | string (ip-block) | IP block (example: 192.0.2.0/24) |
continent_code | string | Ip continent (wire: continentCode) |
geoloc | string | Ip location |
ip | string (ipv4) | Ip (example: 192.0.2.0) |
progress | integer | Current operation progress in percent |
routed_to | string | Instance where ip is routed to (wire: routedTo) |
status | string | Ip status (ok, operationPending) |
sub_type | string | IP sub type (cloud, ovh) (wire: subType) |
FailoverIp
| Name | Datatype | Description |
|---|---|---|
id | string | Ip id |
block | string (ip-block) | IP block (example: 192.0.2.0/24) |
continent_code | string | Ip continent (wire: continentCode) |
geoloc | string | Ip location |
ip | string (ipv4) | Ip (example: 192.0.2.0) |
progress | integer | Current operation progress in percent |
routed_to | string | Instance where ip is routed to (wire: routedTo) |
status | string | Ip status (ok, operationPending) |
sub_type | string | IP sub type (cloud, ovh) (wire: subType) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, service_name | Get failover ip | |
list | select | service_name | Get failover ips | |
attach | exec | id, service_name, instanceId | Attach failover ip to an instance |
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"}}) |
id | string | Id |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
SELECT examples​
- get
- list
Get failover ip
SELECT
id,
block,
continent_code,
geoloc,
ip,
progress,
routed_to,
status,
sub_type
FROM ovh.cloud_network.ip_failovers
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Get failover ips
SELECT
id,
block,
continent_code,
geoloc,
ip,
progress,
routed_to,
status,
sub_type
FROM ovh.cloud_network.ip_failovers
WHERE service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- attach
Attach failover ip to an instance
EXEC ovh.cloud_network.ip_failovers.attach
@id='{{ id }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"instanceId": "{{ instanceId }}"
}'
;