Skip to main content

service_receive_connectors

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

Overview​

Nameservice_receive_connectors
TypeResource
Idovh.email_exchange.service_receive_connectors

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerId of this receive connector
namestringName of your receive connector, in 255 characters at most
defaultbooleanWhether this is the default receive connector owned by Exchange. Read-only: only its status can be changed, and it cannot be deleted
enabledbooleanWhether the receive connector is enabled
max_message_sizeintegerThe maximum message size to state, in megabytes. (wire: maxMessageSize)
remote_ip_rangesarrayList of remote IP entries, replacing the stored list as a whole. Each entry is a single IP address, a CIDR network, or an inclusive 'start-end' range, in IPv4 or IPv6, and cannot be already declared by another receive connector of the service. The entries are joined by commas in 255 characters at most (wire: remoteIpRanges)
require_tlsbooleanAll messages received through this connector must be transmitted using TLS (wire: requireTls)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, id, organization_nameReturns the name, status, remote IP ranges, maximum message size and TLS requirement of the receive connector, and whether it is the default one.
listselectexchange_service, organization_namex_pagination_modeReturns the IDs of the receive connectors of the service.
createinsertexchange_service, organization_name, name, remote_ip_ranges, require_tlsCreates a receive connector for the senders in remoteIpRanges and returns the task. A remote IP entry already declared by another receive connector of the service is refused. The connector is disabled unless enabled is true.
updateupdateexchange_service, id, organization_nameUpdates only the given properties and returns the task: the others keep their value, and an omitted enabled leaves the status unchanged. At least one property must be given. The default receive connector accepts enabled only.
deletedeleteexchange_service, id, organization_nameenable_default_receive_connectorDeletes the receive connector and returns the task. The default receive connector cannot be deleted. When the last non-default connector is deleted, the default one is enabled again unless enableDefaultReceiveConnector is false.
replaceexecexchangeService, id, organizationName, enabled, maxMessageSize, name, remoteIpRanges, requireTlsReplaces the whole configuration of the receive connector and returns the task. name, remoteIpRanges, requireTls and enabled are all required: use PATCH to change only some of them. The default receive connector accepts enabled only, so it always refuses a PUT.

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"}})
exchangeServicestringThe internal name of your exchange service
exchange_servicestringThe internal name of your exchange service (wire: exchangeService)
idintegerId
organizationNamestringThe internal name of your exchange organization
organization_namestringThe internal name of your exchange organization (wire: organizationName)
enable_default_receive_connectorbooleanWhen the deleted connector is the last non-default connector of the service, re-enable the default receive connector once it is removed. Defaults to true (wire: enableDefaultReceiveConnector)
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​

Returns the name, status, remote IP ranges, maximum message size and TLS requirement of the receive connector, and whether it is the default one.

SELECT
id,
name,
default,
enabled,
max_message_size,
remote_ip_ranges,
require_tls
FROM ovh.email_exchange.service_receive_connectors
WHERE exchange_service = '{{ exchange_service }}' -- required
AND id = '{{ id }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;

INSERT examples​

Creates a receive connector for the senders in remoteIpRanges and returns the task. A remote IP entry already declared by another receive connector of the service is refused. The connector is disabled unless enabled is true.

INSERT INTO ovh.email_exchange.service_receive_connectors (
enabled,
max_message_size,
name,
remote_ip_ranges,
require_tls,
exchange_service,
organization_name
)
SELECT
{{ enabled }},
{{ max_message_size }},
'{{ name }}' /* required */,
'{{ remote_ip_ranges }}' /* required */,
{{ require_tls }} /* required */,
'{{ exchange_service }}',
'{{ organization_name }}'
RETURNING
id,
completed_at,
created_at,
function,
status
;

UPDATE examples​

Updates only the given properties and returns the task: the others keep their value, and an omitted enabled leaves the status unchanged. At least one property must be given. The default receive connector accepts enabled only.

UPDATE ovh.email_exchange.service_receive_connectors
SET
enabled = {{ enabled }},
max_message_size = {{ max_message_size }},
name = '{{ name }}',
remote_ip_ranges = '{{ remote_ip_ranges }}',
require_tls = {{ require_tls }}
WHERE
exchange_service = '{{ exchange_service }}' --required
AND id = '{{ id }}' --required
AND organization_name = '{{ organization_name }}' --required
RETURNING
id,
completed_at,
created_at,
function,
status;

DELETE examples​

Deletes the receive connector and returns the task. The default receive connector cannot be deleted. When the last non-default connector is deleted, the default one is enabled again unless enableDefaultReceiveConnector is false.

DELETE FROM ovh.email_exchange.service_receive_connectors
WHERE exchange_service = '{{ exchange_service }}' --required
AND id = '{{ id }}' --required
AND organization_name = '{{ organization_name }}' --required
AND enable_default_receive_connector = '{{ enable_default_receive_connector }}'
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Replaces the whole configuration of the receive connector and returns the task. name, remoteIpRanges, requireTls and enabled are all required: use PATCH to change only some of them. The default receive connector accepts enabled only, so it always refuses a PUT.

EXEC ovh.email_exchange.service_receive_connectors.replace
@exchangeService='{{ exchangeService }}' --required,
@id='{{ id }}' --required,
@organizationName='{{ organizationName }}' --required
@@json=
'{
"enabled": {{ enabled }},
"maxMessageSize": {{ maxMessageSize }},
"name": "{{ name }}",
"remoteIpRanges": "{{ remoteIpRanges }}",
"requireTls": {{ requireTls }}
}'
;