allowed_networks
Creates, updates, deletes, gets or lists an allowed_networks resource.
Overview​
| Name | allowed_networks |
| Type | Resource |
| Id | ovh.dedicated_cloud.allowed_networks |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
network_access_id | integer | (wire: networkAccessId) |
description | string | |
network | string (ipv4-block) | Network name, e.g. 123.100.200.0/32 (example: 192.0.2.0/24) |
state | string | All states an Allowed Network can be in (allowed, toDelete, toUpdate) |
Network allowed on infrastructure firewall
| Name | Datatype | Description |
|---|---|---|
network_access_id | integer | (wire: networkAccessId) |
description | string | |
network | string (ipv4-block) | Network name, e.g. 123.100.200.0/32 (example: 192.0.2.0/24) |
state | string | All states an Allowed Network can be in (allowed, toDelete, toUpdate) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | network_access_id, service_name | Get an allowed network | |
list | select | service_name | x_pagination_mode | List allowed networks |
create | insert | service_name, network | Create an allowed network. Allows a network, in CIDR notation, through the infrastructure firewall. Returns a task to track progress. | |
update | update | network_access_id, service_name | Update an allowed network | |
delete | delete | network_access_id, service_name | Delete 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.
| 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"}}) |
network_access_id | integer | (wire: networkAccessId) |
service_name | string | Domain of the service (wire: serviceName) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
List allowed networks
SELECT
network_access_id,
description,
network,
state
FROM ovh.dedicated_cloud.allowed_networks
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: allowed_networks
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the allowed_networks resource.
- name: description
value: "{{ description }}"
description: |
Description for your ACL
- name: network
value: "{{ network }}"
description: |
Network name, e.g. 123.100.200.0/32
UPDATE examples​
- update
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
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
;