service_remote_mailboxes
Creates, updates, deletes, gets or lists a service_remote_mailboxes resource.
Overview​
| Name | service_remote_mailboxes |
| Type | Resource |
| Id | ovh.email_exchange.service_remote_mailboxes |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Remote mailbox id |
task_pending_id | integer | Pending task for this remote mailbox (wire: taskPendingId) |
display_name | string | Remote mailbox display name (wire: displayName) |
first_name | string | Remote mailbox first name (wire: firstName) |
last_name | string | Remote mailbox last name (wire: lastName) |
sam_account_name | string | SAM account name (wire: SAMAccountName) |
city | string | city |
company | string | Company name |
country_code | string | Country code (AC, AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DG, DJ, DK, DM, DO, DZ, EA, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HN, HR, HT, HU, IC, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TA, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW) (wire: countryCode) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
description | string | Description |
domain | string | Remote mailbox domain |
exchange_guid | string | exchangeGuid for manual configuration (wire: exchangeGuid) |
fax | string (phone-number) | Fax number |
guid | string | GUID for user in active directory |
hidden_from_gal | boolean | Hide remote mailbox in Global Address List (wire: hiddenFromGAL) |
initial | string | Remote mailbox initials |
job_department | string | Job Department (wire: jobDepartment) |
job_title | string | Job title (wire: jobTitle) |
login | string | Remote mailbox login |
mobile | string (phone-number) | Mobile phone |
number_of_aliases | integer | Count the number of related aliases attached to this account (wire: numberOfAliases) |
office | string | Job office |
phone | string (phone-number) | Phone number |
postal_code | string | Postal code (wire: postalCode) |
primary_email_address | string | Default email for this mailbox (wire: primaryEmailAddress) |
region | string | region |
remote_routing_address | string | Email address of associated mailbox (wire: remoteRoutingAddress) |
spam_and_virus_configuration | object | Spam and Antivirus configuration (wire: spamAndVirusConfiguration) |
state | string | Remote mailbox state (creating, deleting, internalMigration, ok, reopening, suspended, suspending) |
street_address | string | Street address (wire: streetAddress) |
type | string | Type of mailbox (equipment, regular, room) |
Exchange remote mailbox
| Name | Datatype | Description |
|---|---|---|
id | integer | Remote mailbox id |
task_pending_id | integer | Pending task for this remote mailbox (wire: taskPendingId) |
display_name | string | Remote mailbox display name (wire: displayName) |
first_name | string | Remote mailbox first name (wire: firstName) |
last_name | string | Remote mailbox last name (wire: lastName) |
sam_account_name | string | SAM account name (wire: SAMAccountName) |
city | string | city |
company | string | Company name |
country_code | string | Country code (AC, AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DG, DJ, DK, DM, DO, DZ, EA, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HN, HR, HT, HU, IC, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TA, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW) (wire: countryCode) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
description | string | Description |
domain | string | Remote mailbox domain |
exchange_guid | string | exchangeGuid for manual configuration (wire: exchangeGuid) |
fax | string (phone-number) | Fax number |
guid | string | GUID for user in active directory |
hidden_from_gal | boolean | Hide remote mailbox in Global Address List (wire: hiddenFromGAL) |
initial | string | Remote mailbox initials |
job_department | string | Job Department (wire: jobDepartment) |
job_title | string | Job title (wire: jobTitle) |
login | string | Remote mailbox login |
mobile | string (phone-number) | Mobile phone |
number_of_aliases | integer | Count the number of related aliases attached to this account (wire: numberOfAliases) |
office | string | Job office |
phone | string (phone-number) | Phone number |
postal_code | string | Postal code (wire: postalCode) |
primary_email_address | string | Default email for this mailbox (wire: primaryEmailAddress) |
region | string | region |
remote_routing_address | string | Email address of associated mailbox (wire: remoteRoutingAddress) |
spam_and_virus_configuration | object | Spam and Antivirus configuration (wire: spamAndVirusConfiguration) |
state | string | Remote mailbox state (creating, deleting, internalMigration, ok, reopening, suspended, suspending) |
street_address | string | Street address (wire: streetAddress) |
type | string | Type of mailbox (equipment, regular, room) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | exchange_service, organization_name, primary_email_address | Get a remote mailbox. Returns the login, names, type, remote routing address, state, spam settings and contact details of the remote mailbox. | |
list | select | exchange_service, organization_name | id, primary_email_address, x_pagination_mode | List remote mailboxes. Returns the primary email addresses of the remote mailboxes. Filter them by primaryEmailAddress or id. |
create | insert | exchange_service, organization_name, domain, exchange_guid, login, password, remote_routing_address, type | Create a remote mailbox. Creates a regular, room or equipment remote mailbox from a login, a domain, a password, an exchangeGuid and the remoteRoutingAddress of the associated mailbox, and returns the task. | |
update | update | exchange_service, organization_name, primary_email_address | Update a remote mailbox. Updates the names, display name, spam settings, Global Address List visibility and contact details of the remote mailbox. | |
delete | delete | exchange_service, organization_name, primary_email_address | Delete a remote mailbox. Removes the remote mailbox from the Exchange service and returns the task. Its aliases are removed with it. | |
change_password | exec | exchangeService, organizationName, primaryEmailAddress | Change a remote mailbox password. Changes the password and returns the task. Set forcePasswordChangeAtNextLogon to make the user change it at the next logon. |
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) |
organizationName | string | The internal name of your exchange organization |
organization_name | string | The internal name of your exchange organization (wire: organizationName) |
primaryEmailAddress | string | Default email for this mailbox |
primary_email_address | string | Default email for this mailbox (wire: primaryEmailAddress) |
id | integer | Filter the value of id property (like) |
primary_email_address | string | Filter the value of primaryEmailAddress property (like) (wire: primaryEmailAddress) |
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 a remote mailbox. Returns the login, names, type, remote routing address, state, spam settings and contact details of the remote mailbox.
SELECT
id,
task_pending_id,
display_name,
first_name,
last_name,
sam_account_name,
city,
company,
country_code,
creation_date,
description,
domain,
exchange_guid,
fax,
guid,
hidden_from_gal,
initial,
job_department,
job_title,
login,
mobile,
number_of_aliases,
office,
phone,
postal_code,
primary_email_address,
region,
remote_routing_address,
spam_and_virus_configuration,
state,
street_address,
type
FROM ovh.email_exchange.service_remote_mailboxes
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND primary_email_address = '{{ primary_email_address }}' -- required
;
List remote mailboxes. Returns the primary email addresses of the remote mailboxes. Filter them by primaryEmailAddress or id.
SELECT
id,
task_pending_id,
display_name,
first_name,
last_name,
sam_account_name,
city,
company,
country_code,
creation_date,
description,
domain,
exchange_guid,
fax,
guid,
hidden_from_gal,
initial,
job_department,
job_title,
login,
mobile,
number_of_aliases,
office,
phone,
postal_code,
primary_email_address,
region,
remote_routing_address,
spam_and_virus_configuration,
state,
street_address,
type
FROM ovh.email_exchange.service_remote_mailboxes
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND id = '{{ id }}'
AND primary_email_address = '{{ primary_email_address }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a remote mailbox. Creates a regular, room or equipment remote mailbox from a login, a domain, a password, an exchangeGuid and the remoteRoutingAddress of the associated mailbox, and returns the task.
INSERT INTO ovh.email_exchange.service_remote_mailboxes (
city,
company,
country_code,
description,
display_name,
domain,
exchange_guid,
fax,
first_name,
hidden_from_gal,
initials,
job_department,
job_title,
last_name,
login,
mobile,
office,
password,
phone,
postal_code,
region,
remote_routing_address,
spam_and_virus_configuration,
street_address,
type,
exchange_service,
organization_name
)
SELECT
'{{ city }}',
'{{ company }}',
'{{ country_code }}',
'{{ description }}',
'{{ display_name }}',
'{{ domain }}' /* required */,
'{{ exchange_guid }}' /* required */,
'{{ fax }}',
'{{ first_name }}',
{{ hidden_from_gal }},
'{{ initials }}',
'{{ job_department }}',
'{{ job_title }}',
'{{ last_name }}',
'{{ login }}' /* required */,
'{{ mobile }}',
'{{ office }}',
'{{ password }}' /* required */,
'{{ phone }}',
'{{ postal_code }}',
'{{ region }}',
'{{ remote_routing_address }}' /* required */,
'{{ spam_and_virus_configuration }}',
'{{ street_address }}',
'{{ type }}' /* required */,
'{{ exchange_service }}',
'{{ organization_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: service_remote_mailboxes
props:
- name: exchange_service
value: "{{ exchange_service }}"
description: Required parameter for the service_remote_mailboxes resource.
- name: organization_name
value: "{{ organization_name }}"
description: Required parameter for the service_remote_mailboxes resource.
- name: city
value: "{{ city }}"
description: |
City
- name: company
value: "{{ company }}"
description: |
Company name
- name: country_code
value: "{{ country_code }}"
description: |
Country code
valid_values: ['AC', 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DG', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EA', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HN', 'HR', 'HT', 'HU', 'IC', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TA', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'XK', 'YE', 'YT', 'ZA', 'ZM', 'ZW']
- name: description
value: "{{ description }}"
description: |
Description
- name: display_name
value: "{{ display_name }}"
description: |
Display name
- name: domain
value: "{{ domain }}"
description: |
Email domain
- name: exchange_guid
value: "{{ exchange_guid }}"
description: |
Remote exchangeGuid
- name: fax
value: "{{ fax }}"
description: |
Fax number
- name: first_name
value: "{{ first_name }}"
description: |
First name
- name: hidden_from_gal
value: {{ hidden_from_gal }}
description: |
Hide the remote mailbox in Global Address List
- name: initials
value: "{{ initials }}"
description: |
Initials
- name: job_department
value: "{{ job_department }}"
description: |
Job department
- name: job_title
value: "{{ job_title }}"
description: |
Job title
- name: last_name
value: "{{ last_name }}"
description: |
Last name
- name: login
value: "{{ login }}"
description: |
Login
- name: mobile
value: "{{ mobile }}"
description: |
Mobile phone number
- name: office
value: "{{ office }}"
description: |
Office
- name: password
value: "{{ password }}"
description: |
Password
- name: phone
value: "{{ phone }}"
description: |
Phone Number
- name: postal_code
value: "{{ postal_code }}"
description: |
Postal code
- name: region
value: "{{ region }}"
description: |
Region
- name: remote_routing_address
value: "{{ remote_routing_address }}"
description: |
Address of associated mailbox
- name: spam_and_virus_configuration
description: |
Antispam and Antivirus configuration
value:
checkDKIM: {{ checkDKIM }}
checkSPF: {{ checkSPF }}
deleteSpam: {{ deleteSpam }}
deleteVirus: {{ deleteVirus }}
putInJunk: {{ putInJunk }}
tagSpam: {{ tagSpam }}
tagVirus: {{ tagVirus }}
- name: street_address
value: "{{ street_address }}"
description: |
Street address
- name: type
value: "{{ type }}"
description: |
Type of mailbox
valid_values: ['equipment', 'regular', 'room']
UPDATE examples​
- update
Update a remote mailbox. Updates the names, display name, spam settings, Global Address List visibility and contact details of the remote mailbox.
UPDATE ovh.email_exchange.service_remote_mailboxes
SET
city = '{{ city }}',
company = '{{ company }}',
country_code = '{{ country_code }}',
description = '{{ description }}',
display_name = '{{ display_name }}',
domain = '{{ domain }}',
fax = '{{ fax }}',
first_name = '{{ first_name }}',
hidden_from_gal = {{ hidden_from_gal }},
initial = '{{ initial }}',
job_department = '{{ job_department }}',
job_title = '{{ job_title }}',
last_name = '{{ last_name }}',
login = '{{ login }}',
mobile = '{{ mobile }}',
office = '{{ office }}',
phone = '{{ phone }}',
postal_code = '{{ postal_code }}',
region = '{{ region }}',
spam_and_virus_configuration = '{{ spam_and_virus_configuration }}',
street_address = '{{ street_address }}'
WHERE
exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND primary_email_address = '{{ primary_email_address }}' --required;
DELETE examples​
- delete
Delete a remote mailbox. Removes the remote mailbox from the Exchange service and returns the task. Its aliases are removed with it.
DELETE FROM ovh.email_exchange.service_remote_mailboxes
WHERE exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND primary_email_address = '{{ primary_email_address }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_password
Change a remote mailbox password. Changes the password and returns the task. Set forcePasswordChangeAtNextLogon to make the user change it at the next logon.
EXEC ovh.email_exchange.service_remote_mailboxes.change_password
@exchangeService='{{ exchangeService }}' --required,
@organizationName='{{ organizationName }}' --required,
@primaryEmailAddress='{{ primaryEmailAddress }}' --required
@@json=
'{
"forcePasswordChangeAtNextLogon": {{ forcePasswordChangeAtNextLogon }},
"password": "{{ password }}"
}'
;