Skip to main content

hosted_email_services

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

Overview​

Namehosted_email_services
TypeResource
Idovh.pack_xdsl.hosted_email_services

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
domainstring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain, pack_nameGet a hosted email service of an xDSL pack. Returns the domain of a hosted email service activated with the pack.
listselectpack_namex_pagination_modeList the hosted email services of an xDSL pack. Returns the domains of the hosted email services activated with the pack.
createinsertpack_name, email, passwordCreate a hosted email service in an xDSL pack. Activates a hosted email account from an email address and a password. Returns the task that performs it.
deletedeletedomain, pack_nameDelete a hosted email service of an xDSL pack. Deletes the hosted email account and its mailbox from the pack.
change_passwordexecdomain, packName, passwordChange the password of a hosted email service. Sets a new password for the hosted email account of the xDSL pack.

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"}})
domainstring
packNamestringThe internal name of your pack
pack_namestringThe internal name of your pack (wire: packName)
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 hosted email service of an xDSL pack. Returns the domain of a hosted email service activated with the pack.

SELECT
domain
FROM ovh.pack_xdsl.hosted_email_services
WHERE domain = '{{ domain }}' -- required
AND pack_name = '{{ pack_name }}' -- required
;

INSERT examples​

Create a hosted email service in an xDSL pack. Activates a hosted email account from an email address and a password. Returns the task that performs it.

INSERT INTO ovh.pack_xdsl.hosted_email_services (
email,
password,
pack_name
)
SELECT
'{{ email }}' /* required */,
'{{ password }}' /* required */,
'{{ pack_name }}'
RETURNING
id,
function,
status,
update_date
;

DELETE examples​

Delete a hosted email service of an xDSL pack. Deletes the hosted email account and its mailbox from the pack.

DELETE FROM ovh.pack_xdsl.hosted_email_services
WHERE domain = '{{ domain }}' --required
AND pack_name = '{{ pack_name }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change the password of a hosted email service. Sets a new password for the hosted email account of the xDSL pack.

EXEC ovh.pack_xdsl.hosted_email_services.change_password
@domain='{{ domain }}' --required,
@packName='{{ packName }}' --required
@@json=
'{
"password": "{{ password }}"
}'
;