contact_means
Creates, updates, deletes, gets or lists a contact_means resource.
Overview​
| Name | contact_means |
| Type | Resource |
| Id | ovh.notification.contact_means |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the contact mean |
created_at | string (date-time) | Date at which the contact mean was created (wire: createdAt) |
current_tasks | array | Task to do on this contact mean (wire: currentTasks) |
default | boolean | Is this the default contact mean |
description | string | Arbitrary description for this contact mean |
email | string | When type is EMAIL, the email address this contact mean uses |
error | string | When status is ERROR, details about the error |
status | string | Status of the contact mean (DISABLED, ERROR, TO_VALIDATE, VALID) |
type | string | Type of the contact mean (EMAIL) |
A contact mean
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the contact mean |
created_at | string (date-time) | Date at which the contact mean was created (wire: createdAt) |
current_tasks | array | Task to do on this contact mean (wire: currentTasks) |
default | boolean | Is this the default contact mean |
description | string | Arbitrary description for this contact mean |
email | string | When type is EMAIL, the email address this contact mean uses |
error | string | When status is ERROR, details about the error |
status | string | Status of the contact mean (DISABLED, ERROR, TO_VALIDATE, VALID) |
type | string | Type of the contact mean (EMAIL) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | contact_mean_id | Retrieve information about a contact mean | |
list | select | x_pagination_cursor, x_pagination_size | Retrieve every contact mean | |
create | insert | type | Create a contact mean | |
update | update | contact_mean_id | Update a contact mean | |
delete | delete | contact_mean_id | Delete the contact mean | |
restart_validation | exec | contactMeanId | Restart the validation process for this contact mean, if you did not receive the OTP | |
validate | exec | contactMeanId, otp | Validate 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.
| 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"}}) |
contactMeanId | string (uuid) | Contact mean ID |
contact_mean_id | string (uuid) | Contact mean ID (wire: contactMeanId) |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
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
;
Retrieve every contact mean
SELECT
id,
created_at,
current_tasks,
default,
description,
email,
error,
status,
type
FROM ovh.notification.contact_means
WHERE x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: contact_means
props:
- name: description
value: "{{ description }}"
description: |
Arbitrary description for this contact mean
- name: email
value: "{{ email }}"
description: |
When type is EMAIL, the email address that will be used
- name: type
value: "{{ type }}"
description: |
Type of the contact mean to create
valid_values: ['EMAIL']
UPDATE examples​
- update
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
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_validation
- validate
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
;
Validate this contact mean
EXEC ovh.notification.contact_means.validate
@contactMeanId='{{ contactMeanId }}' --required
@@json=
'{
"otp": "{{ otp }}"
}'
;