region_gateway_interfaces
Creates, updates, deletes, gets or lists a region_gateway_interfaces resource.
Overview​
| Name | region_gateway_interfaces |
| Type | Resource |
| Id | ovh.cloud_network.region_gateway_interfaces |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | ID of the interface |
network_id | string (uuid) | Network ID of the interface (wire: networkId) |
subnet_id | string (uuid) | Subnet ID of the interface (wire: subnetId) |
ip | string (ipv4) | IP of the interface (example: 192.0.2.0) |
subnet | object | Gateway subnet |
Interface of the gateway
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | ID of the interface |
network_id | string (uuid) | Network ID of the interface (wire: networkId) |
subnet_id | string (uuid) | Subnet ID of the interface (wire: subnetId) |
ip | string (ipv4) | IP of the interface (example: 192.0.2.0) |
subnet | object | Gateway subnet |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, interface_id, region_name, service_name | Get interface | |
list | select | id, region_name, service_name | List interfaces | |
create | insert | id, region_name, service_name, subnet_id | Create gateway interface | |
delete | delete | id, interface_id, region_name, service_name | Delete 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.
| 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 (uuid) | Id |
interface_id | string (uuid) | Interface ID (wire: interfaceId) |
region_name | string | Region name (wire: regionName) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
SELECT examples​
- get
- list
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
;
List interfaces
SELECT
id,
network_id,
subnet_id,
ip,
subnet
FROM ovh.cloud_network.region_gateway_interfaces
WHERE id = '{{ id }}' -- required
AND region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: region_gateway_interfaces
props:
- name: id
value: "{{ id }}"
description: Required parameter for the region_gateway_interfaces resource.
- name: region_name
value: "{{ region_name }}"
description: Required parameter for the region_gateway_interfaces resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the region_gateway_interfaces resource.
- name: subnet_id
value: "{{ subnet_id }}"
description: |
Subnet id to add
DELETE examples​
- delete
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
;