services
Creates, updates, deletes, gets or lists a services resource.
Overview​
| Name | services |
| Type | Resource |
| Id | ovh.email_pro.services |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Task pending id (wire: taskPendingId) |
display_name | string | service displayName (wire: displayName) |
complexity_enabled | boolean | enable policy for strong and secure passwords (wire: complexityEnabled) |
domain | string | Domain name of your service |
hostname | string | Hostname of your service |
iam | object | IAM resource metadata |
last_update_date | string (date-time) | Update date (wire: lastUpdateDate) |
lockout_duration | integer | number of minutes account will remain locked if it occurs (wire: lockoutDuration) |
lockout_observation_window | integer | number of minutes that must elapse after a failed logon to reset lockout trigger (wire: lockoutObservationWindow) |
lockout_threshold | integer | number of attempts before account to be locked (wire: lockoutThreshold) |
max_password_age | integer | maximum number of days that account's password is valid before expiration (wire: maxPasswordAge) |
max_receive_size | integer | Maximum message size that You can receive in MB (wire: maxReceiveSize) |
max_send_size | integer | Maximum message size that You can send in MB (wire: maxSendSize) |
min_password_age | integer | minimum number of days before able to change account's password (wire: minPasswordAge) |
min_password_length | integer | minimum number of characters password must contain (wire: minPasswordLength) |
offer | string | Type of your offer (emailpro) |
spam_and_virus_configuration | object | Spam and Antivirus configuration (wire: spamAndVirusConfiguration) |
state | string | State of your service (creating, deleting, inMaintenance, ok, reopening, suspended, suspending) |
web_url | string | URL for web interface (wire: webUrl) |
Email pro service
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Task pending id (wire: taskPendingId) |
display_name | string | service displayName (wire: displayName) |
complexity_enabled | boolean | enable policy for strong and secure passwords (wire: complexityEnabled) |
domain | string | Domain name of your service |
hostname | string | Hostname of your service |
iam | object | IAM resource metadata |
last_update_date | string (date-time) | Update date (wire: lastUpdateDate) |
lockout_duration | integer | number of minutes account will remain locked if it occurs (wire: lockoutDuration) |
lockout_observation_window | integer | number of minutes that must elapse after a failed logon to reset lockout trigger (wire: lockoutObservationWindow) |
lockout_threshold | integer | number of attempts before account to be locked (wire: lockoutThreshold) |
max_password_age | integer | maximum number of days that account's password is valid before expiration (wire: maxPasswordAge) |
max_receive_size | integer | Maximum message size that You can receive in MB (wire: maxReceiveSize) |
max_send_size | integer | Maximum message size that You can send in MB (wire: maxSendSize) |
min_password_age | integer | minimum number of days before able to change account's password (wire: minPasswordAge) |
min_password_length | integer | minimum number of characters password must contain (wire: minPasswordLength) |
offer | string | Type of your offer (emailpro) |
spam_and_virus_configuration | object | Spam and Antivirus configuration (wire: spamAndVirusConfiguration) |
state | string | State of your service (creating, deleting, inMaintenance, ok, reopening, suspended, suspending) |
web_url | string | URL for web interface (wire: webUrl) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service | 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) | |
list | select | iam_tags, x_pagination_mode | Returns the names of the Email Pro services of the account. Filter them by IAM tags with iamTags. (Alpha version) | |
update | update | service | Update the Email Pro service. Updates the display name, message size limits, password and lockout policy, and spam and virus configuration of the service. | |
change_contact | exec | service | Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service. | |
update_flags_on_all_accounts | exec | service | Update 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.
| 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"}}) |
service | string | The internal name of your pro organization |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
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
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
;
Returns the names of the Email Pro services of the account. Filter them by IAM tags with iamTags. (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 iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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_contact
- update_flags_on_all_accounts
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 }}"
}'
;
Update spam and virus flags. Applies the spam and virus configuration of the service (spamAndVirusConfiguration) to all its active email accounts.
EXEC ovh.email_pro.services.update_flags_on_all_accounts
@service='{{ service }}' --required
;