Skip to main content

service_remote_mailboxes

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

Overview​

Nameservice_remote_mailboxes
TypeResource
Idovh.email_exchange.service_remote_mailboxes

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerRemote mailbox id
task_pending_idintegerPending task for this remote mailbox (wire: taskPendingId)
display_namestringRemote mailbox display name (wire: displayName)
first_namestringRemote mailbox first name (wire: firstName)
last_namestringRemote mailbox last name (wire: lastName)
sam_account_namestringSAM account name (wire: SAMAccountName)
citystringcity
companystringCompany name
country_codestringCountry 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_datestring (date-time)Creation date (wire: creationDate)
descriptionstringDescription
domainstringRemote mailbox domain
exchange_guidstringexchangeGuid for manual configuration (wire: exchangeGuid)
faxstring (phone-number)Fax number
guidstringGUID for user in active directory
hidden_from_galbooleanHide remote mailbox in Global Address List (wire: hiddenFromGAL)
initialstringRemote mailbox initials
job_departmentstringJob Department (wire: jobDepartment)
job_titlestringJob title (wire: jobTitle)
loginstringRemote mailbox login
mobilestring (phone-number)Mobile phone
number_of_aliasesintegerCount the number of related aliases attached to this account (wire: numberOfAliases)
officestringJob office
phonestring (phone-number)Phone number
postal_codestringPostal code (wire: postalCode)
primary_email_addressstringDefault email for this mailbox (wire: primaryEmailAddress)
regionstringregion
remote_routing_addressstringEmail address of associated mailbox (wire: remoteRoutingAddress)
spam_and_virus_configurationobjectSpam and Antivirus configuration (wire: spamAndVirusConfiguration)
statestringRemote mailbox state (creating, deleting, internalMigration, ok, reopening, suspended, suspending)
street_addressstringStreet address (wire: streetAddress)
typestringType of mailbox (equipment, regular, room)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, organization_name, primary_email_addressGet a remote mailbox. Returns the login, names, type, remote routing address, state, spam settings and contact details of the remote mailbox.
listselectexchange_service, organization_nameid, primary_email_address, x_pagination_modeList remote mailboxes. Returns the primary email addresses of the remote mailboxes. Filter them by primaryEmailAddress or id.
createinsertexchange_service, organization_name, domain, exchange_guid, login, password, remote_routing_address, typeCreate 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.
updateupdateexchange_service, organization_name, primary_email_addressUpdate a remote mailbox. Updates the names, display name, spam settings, Global Address List visibility and contact details of the remote mailbox.
deletedeleteexchange_service, organization_name, primary_email_addressDelete a remote mailbox. Removes the remote mailbox from the Exchange service and returns the task. Its aliases are removed with it.
change_passwordexecexchangeService, organizationName, primaryEmailAddressChange 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.

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)
organizationNamestringThe internal name of your exchange organization
organization_namestringThe internal name of your exchange organization (wire: organizationName)
primaryEmailAddressstringDefault email for this mailbox
primary_email_addressstringDefault email for this mailbox (wire: primaryEmailAddress)
idintegerFilter the value of id property (like)
primary_email_addressstringFilter the value of primaryEmailAddress property (like) (wire: primaryEmailAddress)
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 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
;

INSERT examples​

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
;

UPDATE examples​

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 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 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 }}"
}'
;