Skip to main content

account_exchanges

Creates, updates, deletes, gets or lists an account_exchanges resource.

Overview​

Nameaccount_exchanges
TypeResource
Idovh.ms_services.account_exchanges

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerAccount id
task_pending_idintegerPending task id for this account (wire: taskPendingId)
account_licensestringExchange account license (basic, enterprise, standard) (wire: accountLicense)
configuredbooleanIndicates if the account is configured
creation_datestring (date-time)Creation date (wire: creationDate)
current_usageintegerMailbox usage in KB (wire: currentUsage)
delete_at_expirationbooleanDelete mailbox at expiration date (wire: deleteAtExpiration)
delete_outlook_at_expirationbooleanDelete Outlook license at expiration date (wire: deleteOutlookAtExpiration)
exchange_guidstringProperty needed for mailbox manual configuration (GUID) (wire: exchangeGuid)
expiration_datestring (date-time)Expiration date (wire: expirationDate)
expiration_outlook_datestring (date-time)Expiration date of Outlook license (wire: expirationOutlookDate)
hidden_from_galbooleanVisibility in Global Address List (wire: hiddenFromGAL)
litigationbooleanLitigation hold feature enabled on this mailbox
litigation_periodintegerLitigation hold period in days (0 means unlimited). This setting covers all items in the mailbox. (wire: litigationPeriod)
mailing_filterarrayEnable or disable anti-virus and anti-spam (wire: mailingFilter)
number_of_aliasesintegerCount the number of related aliases attached to this account (wire: numberOfAliases)
outlook_licensebooleanOutlook licence attached (wire: outlookLicense)
owa_limitedbooleanOWA policy restriction is applied (wire: owaLimited)
primary_email_addressstringPrimary address of the mailbox (wire: primaryEmailAddress)
quotaintegerMaximum mailbox usage in GB (overall size)
renew_outlook_periodstringFrequency of Outlook license renewals (monthly, yearly) (wire: renewOutlookPeriod)
renew_periodstringFrequency of mailbox license renewals (monthly, yearly) (wire: renewPeriod)
spam_and_virus_configurationobjectSpam and Antivirus configuration (wire: spamAndVirusConfiguration)
spam_detectedbooleanSpam activity detected on this mailbox (wire: spamDetected)
spam_ticket_numberintegerTicket number of spam detection (wire: spamTicketNumber)
statestringMailbox state (creating, deleting, disabled, modifying, ok, reopening, suspended, suspending)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_name, user_principal_nameGet an account mailbox. Returns the Exchange mailbox of the Active Directory account: primary address, license, quota, usage, Outlook license, renewal and expiration settings, and spam and antivirus configuration.
updateupdateservice_name, user_principal_nameUpdate an account mailbox. Updates the license, quota, Outlook license, renewal and deletion at expiration settings, litigation hold, Global Address List visibility and spam and antivirus configuration of the mailbox.
configureexecserviceName, userPrincipalNameConfigure mailbox to be operational (Deprecated, will be removed)

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"}})
serviceNamestringThe internal name of your Active Directory organization
service_namestringThe internal name of your Active Directory organization (wire: serviceName)
userPrincipalNamestringUser Principal Name
user_principal_namestringUser Principal Name (wire: userPrincipalName)

SELECT examples​

Get an account mailbox. Returns the Exchange mailbox of the Active Directory account: primary address, license, quota, usage, Outlook license, renewal and expiration settings, and spam and antivirus configuration.

SELECT
id,
task_pending_id,
account_license,
configured,
creation_date,
current_usage,
delete_at_expiration,
delete_outlook_at_expiration,
exchange_guid,
expiration_date,
expiration_outlook_date,
hidden_from_gal,
litigation,
litigation_period,
mailing_filter,
number_of_aliases,
outlook_license,
owa_limited,
primary_email_address,
quota,
renew_outlook_period,
renew_period,
spam_and_virus_configuration,
spam_detected,
spam_ticket_number,
state
FROM ovh.ms_services.account_exchanges
WHERE service_name = '{{ service_name }}' -- required
AND user_principal_name = '{{ user_principal_name }}' -- required
;

UPDATE examples​

Update an account mailbox. Updates the license, quota, Outlook license, renewal and deletion at expiration settings, litigation hold, Global Address List visibility and spam and antivirus configuration of the mailbox.

UPDATE ovh.ms_services.account_exchanges
SET
account_license = '{{ account_license }}',
delete_at_expiration = {{ delete_at_expiration }},
delete_outlook_at_expiration = {{ delete_outlook_at_expiration }},
hidden_from_gal = {{ hidden_from_gal }},
litigation = {{ litigation }},
litigation_period = {{ litigation_period }},
mailing_filter = '{{ mailing_filter }}',
outlook_license = {{ outlook_license }},
quota = {{ quota }},
renew_outlook_period = '{{ renew_outlook_period }}',
renew_period = '{{ renew_period }}',
spam_and_virus_configuration = '{{ spam_and_virus_configuration }}'
WHERE
service_name = '{{ service_name }}' --required
AND user_principal_name = '{{ user_principal_name }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Configure mailbox to be operational (Deprecated, will be removed)

EXEC ovh.ms_services.account_exchanges.configure
@serviceName='{{ serviceName }}' --required,
@userPrincipalName='{{ userPrincipalName }}' --required
;