service_receive_connectors
Creates, updates, deletes, gets or lists a service_receive_connectors resource.
Overview​
| Name | service_receive_connectors |
| Type | Resource |
| Id | ovh.email_exchange.service_receive_connectors |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Id of this receive connector |
name | string | Name of your receive connector, in 255 characters at most |
default | boolean | Whether this is the default receive connector owned by Exchange. Read-only: only its status can be changed, and it cannot be deleted |
enabled | boolean | Whether the receive connector is enabled |
max_message_size | integer | The maximum message size to state, in megabytes. (wire: maxMessageSize) |
remote_ip_ranges | array | List 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_tls | boolean | All messages received through this connector must be transmitted using TLS (wire: requireTls) |
Exchange Receive Connector
| Name | Datatype | Description |
|---|---|---|
id | integer | Id of this receive connector |
name | string | Name of your receive connector, in 255 characters at most |
default | boolean | Whether this is the default receive connector owned by Exchange. Read-only: only its status can be changed, and it cannot be deleted |
enabled | boolean | Whether the receive connector is enabled |
max_message_size | integer | The maximum message size to state, in megabytes. (wire: maxMessageSize) |
remote_ip_ranges | array | List 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_tls | boolean | All messages received through this connector must be transmitted using TLS (wire: requireTls) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | exchange_service, id, organization_name | Returns the name, status, remote IP ranges, maximum message size and TLS requirement of the receive connector, and whether it is the default one. | |
list | select | exchange_service, organization_name | x_pagination_mode | Returns the IDs of the receive connectors of the service. |
create | insert | exchange_service, organization_name, name, remote_ip_ranges, require_tls | 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. | |
update | update | exchange_service, id, organization_name | 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. | |
delete | delete | exchange_service, id, organization_name | enable_default_receive_connector | 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. |
replace | exec | exchangeService, id, organizationName, enabled, maxMessageSize, name, remoteIpRanges, requireTls | 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. |
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"}}) |
exchangeService | string | The internal name of your exchange service |
exchange_service | string | The internal name of your exchange service (wire: exchangeService) |
id | integer | Id |
organizationName | string | The internal name of your exchange organization |
organization_name | string | The internal name of your exchange organization (wire: organizationName) |
enable_default_receive_connector | boolean | When 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_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
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
;
Returns the IDs of the receive connectors of the service.
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 organization_name = '{{ organization_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: service_receive_connectors
props:
- name: exchange_service
value: "{{ exchange_service }}"
description: Required parameter for the service_receive_connectors resource.
- name: organization_name
value: "{{ organization_name }}"
description: Required parameter for the service_receive_connectors resource.
- name: enabled
value: {{ enabled }}
description: |
Whether the receive connector must be enabled. Defaults to false
- name: max_message_size
value: {{ max_message_size }}
description: |
The maximum message size to state, in megabytes.
- name: name
value: "{{ name }}"
description: |
Name of your receive connector, in 255 characters at most
- name: remote_ip_ranges
value:
- "{{ remote_ip_ranges }}"
description: |
List of remote IP entries. 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
- name: require_tls
value: {{ require_tls }}
description: |
All messages received through this connector must be transmitted using TLS
UPDATE examples​
- update
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​
- delete
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.
- replace
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 }}
}'
;