account_exchanges
Creates, updates, deletes, gets or lists an account_exchanges resource.
Overview​
| Name | account_exchanges |
| Type | Resource |
| Id | ovh.ms_services.account_exchanges |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Account id |
task_pending_id | integer | Pending task id for this account (wire: taskPendingId) |
account_license | string | Exchange account license (basic, enterprise, standard) (wire: accountLicense) |
configured | boolean | Indicates if the account is configured |
creation_date | string (date-time) | Creation date (wire: creationDate) |
current_usage | integer | Mailbox usage in KB (wire: currentUsage) |
delete_at_expiration | boolean | Delete mailbox at expiration date (wire: deleteAtExpiration) |
delete_outlook_at_expiration | boolean | Delete Outlook license at expiration date (wire: deleteOutlookAtExpiration) |
exchange_guid | string | Property needed for mailbox manual configuration (GUID) (wire: exchangeGuid) |
expiration_date | string (date-time) | Expiration date (wire: expirationDate) |
expiration_outlook_date | string (date-time) | Expiration date of Outlook license (wire: expirationOutlookDate) |
hidden_from_gal | boolean | Visibility in Global Address List (wire: hiddenFromGAL) |
litigation | boolean | Litigation hold feature enabled on this mailbox |
litigation_period | integer | Litigation hold period in days (0 means unlimited). This setting covers all items in the mailbox. (wire: litigationPeriod) |
mailing_filter | array | Enable or disable anti-virus and anti-spam (wire: mailingFilter) |
number_of_aliases | integer | Count the number of related aliases attached to this account (wire: numberOfAliases) |
outlook_license | boolean | Outlook licence attached (wire: outlookLicense) |
owa_limited | boolean | OWA policy restriction is applied (wire: owaLimited) |
primary_email_address | string | Primary address of the mailbox (wire: primaryEmailAddress) |
quota | integer | Maximum mailbox usage in GB (overall size) |
renew_outlook_period | string | Frequency of Outlook license renewals (monthly, yearly) (wire: renewOutlookPeriod) |
renew_period | string | Frequency of mailbox license renewals (monthly, yearly) (wire: renewPeriod) |
spam_and_virus_configuration | object | Spam and Antivirus configuration (wire: spamAndVirusConfiguration) |
spam_detected | boolean | Spam activity detected on this mailbox (wire: spamDetected) |
spam_ticket_number | integer | Ticket number of spam detection (wire: spamTicketNumber) |
state | string | Mailbox state (creating, deleting, disabled, modifying, ok, reopening, suspended, suspending) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name, user_principal_name | 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. | |
update | update | service_name, user_principal_name | 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. | |
configure | exec | serviceName, userPrincipalName | Configure 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.
| 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"}}) |
serviceName | string | The internal name of your Active Directory organization |
service_name | string | The internal name of your Active Directory organization (wire: serviceName) |
userPrincipalName | string | User Principal Name |
user_principal_name | string | User Principal Name (wire: userPrincipalName) |
SELECT examples​
- get
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
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
Configure mailbox to be operational (Deprecated, will be removed)
EXEC ovh.ms_services.account_exchanges.configure
@serviceName='{{ serviceName }}' --required,
@userPrincipalName='{{ userPrincipalName }}' --required
;