Skip to main content

contact_means

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

Overview​

Namecontact_means
TypeResource
Idovh.notification.contact_means

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the contact mean
created_atstring (date-time)Date at which the contact mean was created (wire: createdAt)
current_tasksarrayTask to do on this contact mean (wire: currentTasks)
defaultbooleanIs this the default contact mean
descriptionstringArbitrary description for this contact mean
emailstringWhen type is EMAIL, the email address this contact mean uses
errorstringWhen status is ERROR, details about the error
statusstringStatus of the contact mean (DISABLED, ERROR, TO_VALIDATE, VALID)
typestringType of the contact mean (EMAIL)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcontact_mean_idRetrieve information about a contact mean
listselectx_pagination_cursor, x_pagination_sizeRetrieve every contact mean
createinserttypeCreate a contact mean
updateupdatecontact_mean_idUpdate a contact mean
deletedeletecontact_mean_idDelete the contact mean
restart_validationexeccontactMeanIdRestart the validation process for this contact mean, if you did not receive the OTP
validateexeccontactMeanId, otpValidate this contact mean

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"}})
contactMeanIdstring (uuid)Contact mean ID
contact_mean_idstring (uuid)Contact mean ID (wire: contactMeanId)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Retrieve information about a contact mean

SELECT
id,
created_at,
current_tasks,
default,
description,
email,
error,
status,
type
FROM ovh.notification.contact_means
WHERE contact_mean_id = '{{ contact_mean_id }}' -- required
;

INSERT examples​

Create a contact mean

INSERT INTO ovh.notification.contact_means (
description,
email,
type
)
SELECT
'{{ description }}',
'{{ email }}',
'{{ type }}' /* required */
RETURNING
id,
created_at,
current_tasks,
default,
description,
email,
error,
status,
type
;

UPDATE examples​

Update a contact mean

UPDATE ovh.notification.contact_means
SET
description = '{{ description }}',
status = '{{ status }}'
WHERE
contact_mean_id = '{{ contact_mean_id }}' --required
RETURNING
id,
created_at,
current_tasks,
default,
description,
email,
error,
status,
type;

DELETE examples​

Delete the contact mean

DELETE FROM ovh.notification.contact_means
WHERE contact_mean_id = '{{ contact_mean_id }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Restart the validation process for this contact mean, if you did not receive the OTP

EXEC ovh.notification.contact_means.restart_validation
@contactMeanId='{{ contactMeanId }}' --required
;