Skip to main content

email_contacts

Creates, updates, deletes, gets or lists an email_contacts resource.

Overview

Nameemail_contacts
TypeResource
Idaws.notificationscontacts.email_contacts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the email contact. (pattern: <code>.[\w-.~]+.</code>)
addressstringThe email address this email contact points to. The activation email and any subscribed emails are sent here. (pattern: <code>(.+)@(.+)</code>)
arnstringThe Amazon Resource Name (ARN) of the email contact. (pattern: <code>arn:aws:notifications-contacts::[0-9]{12}:emailcontact/[a-z0-9]{27}</code>)
creation_timestring (date-time)The creation time of the resource.
statusstringThe status of the email contact. Only activated email contacts receive emails. (inactive, active)
update_timestring (date-time)The time the resource was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_email_contactselectarn, regionReturns an email contact.
list_email_contactsselectregionmaxResults, nextTokenLists all email contacts created under the Account.
create_email_contactinsertregion, name, emailAddressCreates an email contact for the provided email address.
delete_email_contactdeletearn, regionDeletes an email contact. Deleting an email contact removes it from all associated notification configurations.

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
arnstringThe Amazon Resource Name (ARN) of the resource.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
nextTokenstringAn optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

SELECT examples

Returns an email contact.

SELECT
name,
address,
arn,
creation_time,
status,
update_time
FROM aws.notificationscontacts.email_contacts
WHERE arn = '{{ arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an email contact for the provided email address.

INSERT INTO aws.notificationscontacts.email_contacts (
name,
emailAddress,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ emailAddress }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
arn
;

DELETE examples

Deletes an email contact. Deleting an email contact removes it from all associated notification configurations.

DELETE FROM aws.notificationscontacts.email_contacts
WHERE arn = '{{ arn }}' --required
AND region = '{{ region }}' --required
;