Skip to main content

access_restriction_ips

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

Overview​

Nameaccess_restriction_ips
TypeResource
Idovh.me.access_restriction_ips

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerThe Id of the restriction
ipstring (ip-block)An IP range where we will apply the rule (example: 192.0.2.0/24)
rulestringAccept or deny IP access (accept, deny)
warningbooleanSend an email if someone try to access with this IP address

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectidGet this object properties
listselectx_pagination_modeList of IP restrictions
createinsertip, rule, warningAdd an IP access restriction
updateupdateidAlter this object properties
deletedeleteidDelete 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.

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"}})
idintegerThe Id of the restriction
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 this object properties

SELECT
id,
ip,
rule,
warning
FROM ovh.me.access_restriction_ips
WHERE id = '{{ id }}' -- required
;

INSERT examples​

Add an IP access restriction

INSERT INTO ovh.me.access_restriction_ips (
ip,
rule,
warning
)
SELECT
'{{ ip }}' /* required */,
'{{ rule }}' /* required */,
{{ warning }} /* required */
;

UPDATE examples​

Alter this object properties

UPDATE ovh.me.access_restriction_ips
SET
rule = '{{ rule }}',
warning = {{ warning }}
WHERE
id = '{{ id }}' --required;

DELETE examples​

Delete this restriction rule

DELETE FROM ovh.me.access_restriction_ips
WHERE id = '{{ id }}' --required
;