Skip to main content

service_authorized_ips

Creates, updates, deletes, gets or lists a service_authorized_ips resource.

Overview​

Nameservice_authorized_ips
TypeResource
Idovh.email_exchange.service_authorized_ips

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
display_namestringdisplay name (wire: displayName)
creation_datestring (date-time)Creation date (wire: creationDate)
httpsbooleanWebmail,outlook,web Service(EWS) and active sync access (port 443) (wire: HTTPS)
imapbooleanIMAP access (port 143) (wire: IMAP)
imapsbooleanIMAPS access (port 993) (wire: IMAPS)
ipstring (ipv4-block)Allowed IP (example: 192.0.2.0/24)
popbooleanPOP access (port 110) (wire: POP)
popsbooleanPOPS access (port 995) (wire: POPS)
smtpbooleanSMTP access (port 25) (wire: SMTP)
smtpsbooleanSMTPS access (port 587) (wire: SMTPS)
statusstringAuthorized IP status (creating, deleting, ok)
update_datestring (date-time)Last update date (wire: updateDate)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, ip, organization_nameGet an authorized IP. Returns the display name and status of the IP block, and the accesses it is allowed: HTTPS, IMAP, IMAPS, POP, POPS, SMTP and SMTPS.
listselectexchange_service, organization_namex_pagination_modeList authorized IPs. Returns the IP blocks allowed to access the service over POP, IMAP, SMTP or HTTPS, with or without SSL.
createinsertexchange_service, organization_name, ipAdd an authorized IP. Allows an IP block to access the service over the selected protocols: HTTPS, IMAP, IMAPS, POP, POPS, SMTP and SMTPS. Returns the task.
updateupdateexchange_service, ip, organization_nameUpdate an authorized IP. Updates the display name of the IP block and the accesses it is allowed: HTTPS, IMAP, IMAPS, POP, POPS, SMTP and SMTPS.
deletedeleteexchange_service, ip, organization_nameDelete an authorized IP. Removes the IP block from the IPs allowed to reach the service, and returns the task.

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"}})
exchange_servicestringThe internal name of your exchange service (wire: exchangeService)
ipstring (ipv4-block)Allowed IP
organization_namestringThe internal name of your exchange organization (wire: organizationName)
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 authorized IP. Returns the display name and status of the IP block, and the accesses it is allowed: HTTPS, IMAP, IMAPS, POP, POPS, SMTP and SMTPS.

SELECT
display_name,
creation_date,
https,
imap,
imaps,
ip,
pop,
pops,
smtp,
smtps,
status,
update_date
FROM ovh.email_exchange.service_authorized_ips
WHERE exchange_service = '{{ exchange_service }}' -- required
AND ip = '{{ ip }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;

INSERT examples​

Add an authorized IP. Allows an IP block to access the service over the selected protocols: HTTPS, IMAP, IMAPS, POP, POPS, SMTP and SMTPS. Returns the task.

INSERT INTO ovh.email_exchange.service_authorized_ips (
https,
imap,
imaps,
ip,
pop,
pops,
smtp,
smtps,
display_name,
exchange_service,
organization_name
)
SELECT
{{ https }},
{{ imap }},
{{ imaps }},
'{{ ip }}' /* required */,
{{ pop }},
{{ pops }},
{{ smtp }},
{{ smtps }},
'{{ display_name }}',
'{{ exchange_service }}',
'{{ organization_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

UPDATE examples​

Update an authorized IP. Updates the display name of the IP block and the accesses it is allowed: HTTPS, IMAP, IMAPS, POP, POPS, SMTP and SMTPS.

UPDATE ovh.email_exchange.service_authorized_ips
SET
https = {{ https }},
imap = {{ imap }},
imaps = {{ imaps }},
pop = {{ pop }},
pops = {{ pops }},
smtp = {{ smtp }},
smtps = {{ smtps }},
display_name = '{{ display_name }}'
WHERE
exchange_service = '{{ exchange_service }}' --required
AND ip = '{{ ip }}' --required
AND organization_name = '{{ organization_name }}' --required;

DELETE examples​

Delete an authorized IP. Removes the IP block from the IPs allowed to reach the service, and returns the task.

DELETE FROM ovh.email_exchange.service_authorized_ips
WHERE exchange_service = '{{ exchange_service }}' --required
AND ip = '{{ ip }}' --required
AND organization_name = '{{ organization_name }}' --required
;