Skip to main content

region_floatingips

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

Overview​

Nameregion_floatingips
TypeResource
Idovh.cloud_network.region_floatingips

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)ID of the floating ip
network_idstring (uuid)ID of the network (wire: networkId)
associated_entityobjectAssociated entity with the floating ip (wire: associatedEntity)
ipstring (ipv4)Value of the floating ip (example: 192.0.2.0)
regionstringFloating ip region
statusstringStatus of the floating ip (active, down, error)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfloating_ip_id, region_name, service_nameGet a floating ip on a specific region for a public cloud project
listselectregion_name, service_nameList floating ips on a specific region for a public cloud project
deletedeletefloating_ip_id, region_name, service_nameDelete a floating ip on a specific region for a public cloud project
detachexecfloatingIpId, regionName, service_nameDetach your floating ip

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"}})
floatingIpIdstring (uuid)Floating ip ID
floating_ip_idstring (uuid)Floating ip ID (wire: floatingIpId)
regionNamestringRegion name
region_namestringRegion name (wire: regionName)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.

SELECT examples​

Get a floating ip on a specific region for a public cloud project

SELECT
id,
network_id,
associated_entity,
ip,
region,
status
FROM ovh.cloud_network.region_floatingips
WHERE floating_ip_id = '{{ floating_ip_id }}' -- required
AND region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

DELETE examples​

Delete a floating ip on a specific region for a public cloud project

DELETE FROM ovh.cloud_network.region_floatingips
WHERE floating_ip_id = '{{ floating_ip_id }}' --required
AND region_name = '{{ region_name }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Detach your floating ip

EXEC ovh.cloud_network.region_floatingips.detach
@floatingIpId='{{ floatingIpId }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;