email_contacts
Creates, updates, deletes, gets or lists an email_contacts resource.
Overview
| Name | email_contacts |
| Type | Resource |
| Id | aws.notificationscontacts.email_contacts |
Fields
The following fields are returned by SELECT queries:
- get_email_contact
- list_email_contacts
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the email contact. (pattern: <code>.[\w-.~]+.</code>) |
address | string | The email address this email contact points to. The activation email and any subscribed emails are sent here. (pattern: <code>(.+)@(.+)</code>) |
arn | string | The Amazon Resource Name (ARN) of the email contact. (pattern: <code>arn:aws:notifications-contacts::[0-9]{12}:emailcontact/[a-z0-9]{27}</code>) |
creation_time | string (date-time) | The creation time of the resource. |
status | string | The status of the email contact. Only activated email contacts receive emails. (inactive, active) |
update_time | string (date-time) | The time the resource was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the email contact. (pattern: <code>.[\w-.~]+.</code>) |
address | string | The email address this email contact points to. The activation email and any subscribed emails are sent here. (pattern: <code>(.+)@(.+)</code>) |
arn | string | The Amazon Resource Name (ARN) of the email contact. (pattern: <code>arn:aws:notifications-contacts::[0-9]{12}:emailcontact/[a-z0-9]{27}</code>) |
creation_time | string (date-time) | The creation time of the resource. |
status | string | The status of the email contact. Only activated email contacts receive emails. (inactive, active) |
update_time | string (date-time) | The time the resource was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_email_contact | select | arn, region | Returns an email contact. | |
list_email_contacts | select | region | maxResults, nextToken | Lists all email contacts created under the Account. |
create_email_contact | insert | region, name, emailAddress | Creates an email contact for the provided email address. | |
delete_email_contact | delete | arn, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the resource. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The 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. |
nextToken | string | An 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
- get_email_contact
- list_email_contacts
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
;
Lists all email contacts created under the Account.
SELECT
name,
address,
arn,
creation_time,
status,
update_time
FROM aws.notificationscontacts.email_contacts
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_email_contact
- Manifest
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
;
# Description fields are for documentation purposes
- name: email_contacts
props:
- name: region
value: "{{ region }}"
description: Required parameter for the email_contacts resource.
- name: name
value: "{{ name }}"
- name: emailAddress
value: "{{ emailAddress }}"
- name: tags
value: "{{ tags }}"
description: |
Map of tags assigned to a resource
DELETE examples
- delete_email_contact
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
;