Notify¶
Client¶
-
class
Notify.
Client
¶ A client object representing ‘Notify’ Service:
import almdrlib client = almdrlib.client('notify')
Available methods:
-
send_email
(**kwargs)¶ Sends an email to a specific user or email using a template
Request Syntax
response = client.send_email( account_id='string' attachments=[ { ': 'string', 'name': 'string', 'url': 'string' } ] from_email_address='string' subject='string' template_name='string' template_variables={} to_email_address='string' user_id='string' )
- Parameters
account_id (string) – The Account ID of the user_id. If present, it must match the one in the URL.
attachments (list) –
List of attachment objects
(dict) –
(string) –
name (string) –
url (string) –
from_email_address (string) – The email address to use in the from field of the email. This email must be verified with Amazon SES. If absent, the service default will be used.
subject (string) – The subject to use for the email. If absent, the default subject will be used.
template_name (string) –
[REQUIRED]
The name of the template to use to send the email.
template_variables (dict) –
[REQUIRED]
An object containing the required template (and optional, if desired) variables needed to render the template. These will vary depending on the selected template.
to_email_address (string) – The address to send the email to. Either user_id or to_email_address is required
user_id (string) – The ID of the user to send the email to. If specified, the email will be sent to the user’s email_address. Either user_id or to_email_address is required
- Return type
dict
- Returns
Response Syntax
{ 'account_id': 'string', 'attachments': [ {} ], 'body': { 'text': 'string' }, 'from_email_address': 'string', 'message_id': 'string', 'subject': 'string', 'template_name': 'string', 'template_variables': {}, 'to_email_address': 'string', 'user_id': 'string' }
Response Definitions
account_id (string) –
The Account ID
attachments (list) –
List of attachment objects
(dict) –
body (dict) – [REQUIRED]
text (string) –
Rendered template
from_email_address (string) –
The email address to use in the from field of the email. This email must be verified with Amazon SES.
message_id (string) –
Message ID of the SES email
subject (string) –
The subject to use for the email
template_name (string) –
The name of the template the email was send using which.
template_variables (dict) –
Template variables used to render the template
to_email_address (string) –
The address the email was sent to
user_id (string) –
The ID of the userthe email was sent to
-
send_emails
(**kwargs)¶ Send a message to a list of arbitrary email addresses
Request Syntax
response = client.send_emails( account_id='string' attachments=[ {} ] from_email_address='string' subject='string' template_name='string' template_variables={} to_email_addresses=[ 'None' ] )
- Parameters
account_id (string) –
[REQUIRED]
AIMS Account ID
attachments (list) –
List of attachment objects
(dict) –
from_email_address (string) – The email address to use in the from field of the email. This email must be verified with Amazon SES. If absent, the service default will be used.
subject (string) – The subject to use for the email. If absent, the default subject will be used.
template_name (string) –
[REQUIRED]
The name of the template to use to send the email.
template_variables (dict) –
[REQUIRED]
An object containing the required template (and optional, if desired) variables needed to render the template. These will vary depending on the selected template.
to_email_addresses (list) –
[REQUIRED]
The list of email addresses to which the message should be sent to.
- Return type
dict
- Returns
Response Syntax
{ 'account_id': 'string', 'attachments': [ {} ], 'from_email_address': 'string', 'message_ids': [ 'None' ], 'subject': 'string', 'template_name': 'string', 'template_variables': {}, 'to_email_addresses': [ 'None' ] }
Response Definitions
account_id (string) –
The Account ID
attachments (list) –
List of attachment objects
(dict) –
from_email_address (string) –
The email address to use in the from field of the email. This email must be verified with Amazon SES.
message_ids (list) –
Message IDs of the sent emails
subject (string) –
The subject to use for the email
template_name (string) –
The name of the template the email was send using which.
template_variables (dict) –
Template variables used to render the template
to_email_addresses (list) –
The addresses the email was sent to
-