Skip to main content

region_gateway_interfaces

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

Overview​

Nameregion_gateway_interfaces
TypeResource
Idovh.cloud_network.region_gateway_interfaces

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)ID of the interface
network_idstring (uuid)Network ID of the interface (wire: networkId)
subnet_idstring (uuid)Subnet ID of the interface (wire: subnetId)
ipstring (ipv4)IP of the interface (example: 192.0.2.0)
subnetobjectGateway subnet

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, interface_id, region_name, service_nameGet interface
listselectid, region_name, service_nameList interfaces
createinsertid, region_name, service_name, subnet_idCreate gateway interface
deletedeleteid, interface_id, region_name, service_nameDelete gateway interface

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"}})
idstring (uuid)Id
interface_idstring (uuid)Interface ID (wire: interfaceId)
region_namestringRegion name (wire: regionName)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.

SELECT examples​

Get interface

SELECT
id,
network_id,
subnet_id,
ip,
subnet
FROM ovh.cloud_network.region_gateway_interfaces
WHERE id = '{{ id }}' -- required
AND interface_id = '{{ interface_id }}' -- required
AND region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create gateway interface

INSERT INTO ovh.cloud_network.region_gateway_interfaces (
subnet_id,
id,
region_name,
service_name
)
SELECT
'{{ subnet_id }}' /* required */,
'{{ id }}',
'{{ region_name }}',
'{{ service_name }}'
RETURNING
id,
network_id,
subnet_id,
ip,
subnet
;

DELETE examples​

Delete gateway interface

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