access_restriction_ips
Creates, updates, deletes, gets or lists an access_restriction_ips resource.
Overview​
| Name | access_restriction_ips |
| Type | Resource |
| Id | ovh.me.access_restriction_ips |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | The Id of the restriction |
ip | string (ip-block) | An IP range where we will apply the rule (example: 192.0.2.0/24) |
rule | string | Accept or deny IP access (accept, deny) |
warning | boolean | Send an email if someone try to access with this IP address |
List of all IP Restrictions
| Name | Datatype | Description |
|---|---|---|
id | integer | The Id of the restriction |
ip | string (ip-block) | An IP range where we will apply the rule (example: 192.0.2.0/24) |
rule | string | Accept or deny IP access (accept, deny) |
warning | boolean | Send an email if someone try to access with this IP address |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id | Get this object properties | |
list | select | x_pagination_mode | List of IP restrictions | |
create | insert | ip, rule, warning | Add an IP access restriction | |
update | update | id | Alter this object properties | |
delete | delete | id | Delete this restriction rule |
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 | integer | The Id of the restriction |
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 this object properties
SELECT
id,
ip,
rule,
warning
FROM ovh.me.access_restriction_ips
WHERE id = '{{ id }}' -- required
;
List of IP restrictions
SELECT
id,
ip,
rule,
warning
FROM ovh.me.access_restriction_ips
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Add an IP access restriction
INSERT INTO ovh.me.access_restriction_ips (
ip,
rule,
warning
)
SELECT
'{{ ip }}' /* required */,
'{{ rule }}' /* required */,
{{ warning }} /* required */
;
# Description fields are for documentation purposes
- name: access_restriction_ips
props:
- name: ip
value: "{{ ip }}"
description: |
An IP range where we will apply the rule
- name: rule
value: "{{ rule }}"
description: |
Accept or deny IP access
valid_values: ['accept', 'deny']
- name: warning
value: {{ warning }}
description: |
Send an email if someone try to access with this IP address
UPDATE examples​
- update
Alter this object properties
UPDATE ovh.me.access_restriction_ips
SET
rule = '{{ rule }}',
warning = {{ warning }}
WHERE
id = '{{ id }}' --required;
DELETE examples​
- delete
Delete this restriction rule
DELETE FROM ovh.me.access_restriction_ips
WHERE id = '{{ id }}' --required
;