AWS.NotificationsContacts reference
ActivateEmailContact
Section titled “ActivateEmailContact”Source:
src/AWS/NotificationsContacts/ActivateEmailContact.ts
Runtime binding for notifications-contacts:ActivateEmailContact.
Activate the bound email contact with the activation code the address
owner received (see SendActivationCode) — e.g. from a
confirmation form in your app. Provide the implementation with
Effect.provide(AWS.NotificationsContacts.ActivateEmailContactHttp).
ActivateEmailContact: Activating a Contact
Section titled “ActivateEmailContact: Activating a Contact”// init — bind the operation to the contactconst activate = yield* AWS.NotificationsContacts.ActivateEmailContact(contact);
// runtime — the user pasted the code from the activation emailyield* activate({ code: Redacted.make(userSuppliedCode) });EmailContact
Section titled “EmailContact”Source:
src/AWS/NotificationsContacts/EmailContact.ts
An AWS User Notifications Contacts email contact — an email address that can be attached to a notification configuration as a delivery channel.
Contacts are created in the unverified inactive state; activation is a
human email-confirmation loop (AWS emails the address a confirmation
link), so Alchemy provisions the contact and leaves activation to the
address owner. Contacts are immutable (no update API) — changing the
name or address replaces the contact; tags update in place.
EmailContact: Creating an Email Contact
Section titled “EmailContact: Creating an Email Contact”Basic email contact
import * as NotificationsContacts from "alchemy/AWS/NotificationsContacts";
const contact = yield* NotificationsContacts.EmailContact("OnCall", { emailAddress: "oncall@example.com",});// contact.status === "inactive" until the address owner confirmsNamed contact with tags
const contact = yield* NotificationsContacts.EmailContact("OnCall", { name: "platform-oncall", emailAddress: "oncall@example.com", tags: { team: "platform" },});GetEmailContact
Section titled “GetEmailContact”Source:
src/AWS/NotificationsContacts/GetEmailContact.ts
Runtime binding for notifications-contacts:GetEmailContact.
Read the bound email contact — most usefully its activation status,
which flips from inactive to active once the address owner confirms
the activation email. Provide the implementation with
Effect.provide(AWS.NotificationsContacts.GetEmailContactHttp).
GetEmailContact: Checking Activation Status
Section titled “GetEmailContact: Checking Activation Status”// init — bind the operation to the contactconst getContact = yield* AWS.NotificationsContacts.GetEmailContact(contact);
// runtimeconst result = yield* getContact();const isActive = result.emailContact.status === "active";SendActivationCode
Section titled “SendActivationCode”Source:
src/AWS/NotificationsContacts/SendActivationCode.ts
Runtime binding for notifications-contacts:SendActivationCode.
Send (or re-send) the activation email to the bound contact’s address.
The email contains the activation code the address owner uses to confirm
the contact (directly via the emailed link, or through your app via
ActivateEmailContact). Provide the implementation with
Effect.provide(AWS.NotificationsContacts.SendActivationCodeHttp).
SendActivationCode: Activating a Contact
Section titled “SendActivationCode: Activating a Contact”// init — bind the operation to the contactconst sendActivationCode = yield* AWS.NotificationsContacts.SendActivationCode(contact);
// runtime — e.g. behind a "resend confirmation email" buttonyield* sendActivationCode();