Skip to main content

services

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

Overview​

Nameservices
TypeResource
Idovh.email_pro.services

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_pending_idintegerTask pending id (wire: taskPendingId)
display_namestringservice displayName (wire: displayName)
complexity_enabledbooleanenable policy for strong and secure passwords (wire: complexityEnabled)
domainstringDomain name of your service
hostnamestringHostname of your service
iamobjectIAM resource metadata
last_update_datestring (date-time)Update date (wire: lastUpdateDate)
lockout_durationintegernumber of minutes account will remain locked if it occurs (wire: lockoutDuration)
lockout_observation_windowintegernumber of minutes that must elapse after a failed logon to reset lockout trigger (wire: lockoutObservationWindow)
lockout_thresholdintegernumber of attempts before account to be locked (wire: lockoutThreshold)
max_password_ageintegermaximum number of days that account's password is valid before expiration (wire: maxPasswordAge)
max_receive_sizeintegerMaximum message size that You can receive in MB (wire: maxReceiveSize)
max_send_sizeintegerMaximum message size that You can send in MB (wire: maxSendSize)
min_password_ageintegerminimum number of days before able to change account's password (wire: minPasswordAge)
min_password_lengthintegerminimum number of characters password must contain (wire: minPasswordLength)
offerstringType of your offer (emailpro)
spam_and_virus_configurationobjectSpam and Antivirus configuration (wire: spamAndVirusConfiguration)
statestringState of your service (creating, deleting, inMaintenance, ok, reopening, suspended, suspending)
web_urlstringURL for web interface (wire: webUrl)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectserviceReturns the state, offer, hostname and web interface URL of the service, its message size limits, its password and lockout policy, and its spam and virus configuration. (Alpha version)
listselectiam_tags, x_pagination_modeReturns the names of the Email Pro services of the account. Filter them by IAM tags with iamTags. (Alpha version)
updateupdateserviceUpdate the Email Pro service. Updates the display name, message size limits, password and lockout policy, and spam and virus configuration of the service.
change_contactexecserviceChange service contacts. Starts a procedure to change the admin, tech or billing contact of the service.
update_flags_on_all_accountsexecserviceUpdate spam and virus flags. Applies the spam and virus configuration of the service (spamAndVirusConfiguration) to all its active email accounts.

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"}})
servicestringThe internal name of your pro organization
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
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​

Returns the state, offer, hostname and web interface URL of the service, its message size limits, its password and lockout policy, and its spam and virus configuration. (Alpha version)

SELECT
task_pending_id,
display_name,
complexity_enabled,
domain,
hostname,
iam,
last_update_date,
lockout_duration,
lockout_observation_window,
lockout_threshold,
max_password_age,
max_receive_size,
max_send_size,
min_password_age,
min_password_length,
offer,
spam_and_virus_configuration,
state,
web_url
FROM ovh.email_pro.services
WHERE service = '{{ service }}' -- required
;

UPDATE examples​

Update the Email Pro service. Updates the display name, message size limits, password and lockout policy, and spam and virus configuration of the service.

UPDATE ovh.email_pro.services
SET
complexity_enabled = {{ complexity_enabled }},
display_name = '{{ display_name }}',
lockout_duration = {{ lockout_duration }},
lockout_observation_window = {{ lockout_observation_window }},
lockout_threshold = {{ lockout_threshold }},
max_password_age = {{ max_password_age }},
max_receive_size = {{ max_receive_size }},
max_send_size = {{ max_send_size }},
min_password_age = {{ min_password_age }},
min_password_length = {{ min_password_length }},
spam_and_virus_configuration = '{{ spam_and_virus_configuration }}'
WHERE
service = '{{ service }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

EXEC ovh.email_pro.services.change_contact
@service='{{ service }}' --required
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;