Skip to main content

allowed_networks

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

Overview​

Nameallowed_networks
TypeResource
Idovh.dedicated_cloud.allowed_networks

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
network_access_idinteger (wire: networkAccessId)
descriptionstring
networkstring (ipv4-block)Network name, e.g. 123.100.200.0/32 (example: 192.0.2.0/24)
statestringAll states an Allowed Network can be in (allowed, toDelete, toUpdate)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectnetwork_access_id, service_nameGet an allowed network
listselectservice_namex_pagination_modeList allowed networks
createinsertservice_name, networkCreate an allowed network. Allows a network, in CIDR notation, through the infrastructure firewall. Returns a task to track progress.
updateupdatenetwork_access_id, service_nameUpdate an allowed network
deletedeletenetwork_access_id, service_nameDelete an allowed network. Removes the network from the infrastructure firewall. Returns a task to track progress.

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"}})
network_access_idinteger (wire: networkAccessId)
service_namestringDomain of the service (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get an allowed network

SELECT
network_access_id,
description,
network,
state
FROM ovh.dedicated_cloud.allowed_networks
WHERE network_access_id = '{{ network_access_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create an allowed network. Allows a network, in CIDR notation, through the infrastructure firewall. Returns a task to track progress.

INSERT INTO ovh.dedicated_cloud.allowed_networks (
description,
network,
service_name
)
SELECT
'{{ description }}',
'{{ network }}' /* required */,
'{{ service_name }}'
RETURNING
name,
datacenter_id,
filer_id,
host_id,
network_access_id,
order_id,
parent_task_id,
task_id,
user_id,
vlan_id,
created_by,
created_from,
description,
end_date,
execution_date,
last_modification_date,
maintenance_date_from,
maintenance_date_to,
network,
progress,
state,
type
;

UPDATE examples​

Update an allowed network

UPDATE ovh.dedicated_cloud.allowed_networks
SET
description = '{{ description }}',
network = '{{ network }}'
WHERE
network_access_id = '{{ network_access_id }}' --required
AND service_name = '{{ service_name }}' --required
RETURNING
name,
datacenter_id,
filer_id,
host_id,
network_access_id,
order_id,
parent_task_id,
task_id,
user_id,
vlan_id,
created_by,
created_from,
description,
end_date,
execution_date,
last_modification_date,
maintenance_date_from,
maintenance_date_to,
network,
progress,
state,
type;

DELETE examples​

Delete an allowed network. Removes the network from the infrastructure firewall. Returns a task to track progress.

DELETE FROM ovh.dedicated_cloud.allowed_networks
WHERE network_access_id = '{{ network_access_id }}' --required
AND service_name = '{{ service_name }}' --required
;