Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSouther committed Apr 4, 2024
1 parent 122105d commit 1df34b7
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 20 deletions.
45 changes: 35 additions & 10 deletions python/example_code/sesv2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,23 @@ python -m pip install -r requirements.txt

Code excerpts that show you how to call individual service functions.

- [Create a contact in a contact list](newsletter.py#L152) (`CreateContact`)
- [Create a contact list](newsletter.py#L102) (`CreateContactList`)
- [Create an email identity](newsletter.py#L89) (`CreateEmailIdentity`)
- [Create an email template](newsletter.py#L115) (`CreateEmailTemplate`)
- [Delete a contact list](newsletter.py#L255) (`DeleteContactList`)
- [Delete an email identity](newsletter.py#L283) (`DeleteEmailIdentity`)
- [Delete an email template](newsletter.py#L268) (`DeleteEmailTemplate`)
- [List the contacts in a contact list](newsletter.py#L195) (`ListContacts`)
- [Send a simple email](newsletter.py#L161) (`SendEmail`)
- [Send a templated email](newsletter.py#L214) (`SendEmail`)
- [Create a contact in a contact list](newsletter.py#L155) (`CreateContact`)
- [Create a contact list](newsletter.py#L105) (`CreateContactList`)
- [Create an email identity](newsletter.py#L92) (`CreateEmailIdentity`)
- [Create an email template](newsletter.py#L118) (`CreateEmailTemplate`)
- [Delete a contact list](newsletter.py#L258) (`DeleteContactList`)
- [Delete an email identity](newsletter.py#L286) (`DeleteEmailIdentity`)
- [Delete an email template](newsletter.py#L271) (`DeleteEmailTemplate`)
- [List the contacts in a contact list](newsletter.py#L198) (`ListContacts`)
- [Send a simple email](newsletter.py#L164) (`SendEmail`)
- [Send a templated email](newsletter.py#L217) (`SendEmail`)

### Scenarios

Code examples that show you how to accomplish a specific task by calling multiple
functions within the same service.

- [Newsletter workflow](newsletter.py)


<!--custom.examples.start-->
Expand All @@ -70,6 +77,24 @@ To run the Newsletter example, copy the files from workflows/sesv2_weekly_mailer



#### Newsletter workflow

This example shows you how to Amazon SES v2 API newsletter workflow.


<!--custom.scenario_prereqs.sesv2_NewsletterWorkflow.start-->
<!--custom.scenario_prereqs.sesv2_NewsletterWorkflow.end-->

Start the example by running the following at a command prompt:

```
python newsletter.py
```


<!--custom.scenarios.sesv2_NewsletterWorkflow.start-->
<!--custom.scenarios.sesv2_NewsletterWorkflow.end-->

### Tests

⚠ Running tests might result in charges to your AWS account.
Expand Down
31 changes: 25 additions & 6 deletions rustv1/examples/ses/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,23 @@ Code excerpts that show you how to call individual service functions.

- [Create a contact in a contact list](src/bin/create-contact.rs#L30) (`CreateContact`)
- [Create a contact list](src/bin/create-contact-list.rs#L26) (`CreateContactList`)
- [Create an email identity](src/newsletter.rs#L49) (`CreateEmailIdentity`)
- [Create an email template](src/newsletter.rs#L94) (`CreateEmailTemplate`)
- [Delete a contact list](src/newsletter.rs#L345) (`DeleteContactList`)
- [Delete an email identity](src/newsletter.rs#L383) (`DeleteEmailIdentity`)
- [Delete an email template](src/newsletter.rs#L358) (`DeleteEmailTemplate`)
- [Create an email identity](src/newsletter.rs#L58) (`CreateEmailIdentity`)
- [Create an email template](src/newsletter.rs#L101) (`CreateEmailTemplate`)
- [Delete a contact list](src/newsletter.rs#L348) (`DeleteContactList`)
- [Delete an email identity](src/newsletter.rs#L386) (`DeleteEmailIdentity`)
- [Delete an email template](src/newsletter.rs#L361) (`DeleteEmailTemplate`)
- [Get identity information](src/bin/is-email-verified.rs#L26) (`GetEmailIdentity`)
- [List the contact lists](src/bin/list-contact-lists.rs#L22) (`ListContactLists`)
- [List the contacts in a contact list](src/bin/list-contacts.rs#L26) (`ListContacts`)
- [Send a simple email](src/bin/send-email.rs#L39) (`SendEmail`)
- [Send a templated email](src/newsletter.rs#L261) (`SendEmail`)
- [Send a templated email](src/newsletter.rs#L264) (`SendEmail`)

### Scenarios

Code examples that show you how to accomplish a specific task by calling multiple
functions within the same service.

- [Newsletter workflow](src/newsletter.rs)


<!--custom.examples.start-->
Expand All @@ -67,6 +74,18 @@ To run the Newsletter example, copy the files from workflows/sesv2_weekly_mailer



#### Newsletter workflow

This example shows you how to Amazon SES v2 API newsletter workflow.


<!--custom.scenario_prereqs.sesv2_NewsletterWorkflow.start-->
<!--custom.scenario_prereqs.sesv2_NewsletterWorkflow.end-->


<!--custom.scenarios.sesv2_NewsletterWorkflow.start-->
<!--custom.scenarios.sesv2_NewsletterWorkflow.end-->

### Tests

⚠ Running tests might result in charges to your AWS account.
Expand Down
7 changes: 3 additions & 4 deletions rustv1/examples/ses/src/newsletter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
use anyhow::{anyhow, Result};
use aws_sdk_sesv2::{
operation::{
create_contact::CreateContactError,
create_contact_list::CreateContactListError,
create_email_identity::{CreateEmailIdentity, CreateEmailIdentityError},
create_email_template::{CreateEmailTemplate, CreateEmailTemplateError},
create_contact::CreateContactError, create_contact_list::CreateContactListError,
create_email_identity::CreateEmailIdentityError,
create_email_template::CreateEmailTemplateError,
},
types::{
Body, Contact, Content, Destination, EmailContent, EmailTemplateContent,
Expand Down

0 comments on commit 1df34b7

Please sign in to comment.