Skip to main content

ip_failovers

Creates, updates, deletes, gets or lists an ip_failovers resource.

Overview​

Nameip_failovers
TypeResource
Idovh.cloud_network.ip_failovers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringIp id
blockstring (ip-block)IP block (example: 192.0.2.0/24)
continent_codestringIp continent (wire: continentCode)
geolocstringIp location
ipstring (ipv4)Ip (example: 192.0.2.0)
progressintegerCurrent operation progress in percent
routed_tostringInstance where ip is routed to (wire: routedTo)
statusstringIp status (ok, operationPending)
sub_typestringIP sub type (cloud, ovh) (wire: subType)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, service_nameGet failover ip
listselectservice_nameGet failover ips
attachexecid, service_name, instanceIdAttach 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.

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"}})
idstringId
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.

SELECT examples​

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
;

Lifecycle Methods​

EXEC variables use wire (API) names.

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 }}"
}'
;