Skip to content

Commit

Permalink
Updated metadata from review
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSouther committed Apr 3, 2024
1 parent 103246f commit 1b04490
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 1 deletion.
81 changes: 81 additions & 0 deletions .doc_gen/metadata/sesv2_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ sesv2_CreateContactList:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.CreateContactList
services:
sesv2: {CreateContactList}
Expand Down Expand Up @@ -60,6 +61,7 @@ sesv2_CreateContact:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.CreateContact
services:
sesv2: {CreateContact}
Expand Down Expand Up @@ -124,6 +126,7 @@ sesv2_ListContacts:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.ListContacts
services:
sesv2: {ListContacts}
Expand Down Expand Up @@ -165,6 +168,7 @@ sesv2_SendEmail_Simple:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.SendEmail.simple
services:
sesv2: {SendEmail}
Expand Down Expand Up @@ -197,6 +201,7 @@ sesv2_SendEmail_Template:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.SendEmail.template
services:
sesv2: {SendEmail}
Expand All @@ -221,6 +226,7 @@ sesv2_CreateEmailIdentity:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.CreateEmailIdentity
Rust:
versions:
Expand Down Expand Up @@ -253,6 +259,7 @@ sesv2_CreateEmailTemplate:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.CreateEmailTemplate
Rust:
versions:
Expand Down Expand Up @@ -286,6 +293,7 @@ sesv2_DeleteContactList:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.DeleteContactList
Rust:
versions:
Expand Down Expand Up @@ -319,6 +327,7 @@ sesv2_DeleteEmailIdentity:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.DeleteEmailIdentity
Rust:
versions:
Expand Down Expand Up @@ -352,6 +361,7 @@ sesv2_DeleteEmailTemplate:
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.DeleteEmailTemplate
Rust:
versions:
Expand All @@ -363,3 +373,74 @@ sesv2_DeleteEmailTemplate:
- sesv2.rust.delete-email-template
services:
sesv2: {DeleteEmailTemplate}

sesv2_NewsletterWorkflow:
title: A complete &SESv2; Newsletter workflow using an &AWS; SDK
title_abbrev: Newsletter workflow
synopsis: "&SESv2; newsletter workflow."
category:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/ses
excerpts:
- description:
snippet_tags:
- sesv2.java2.newsletter.CreateContactList
- sesv2.java2.newsletter.CreateContact
- sesv2.java2.newsletter.ListContacts
- sesv2.java2.newsletter.SendEmail.template
- sesv2.java2.newsletter.CreateEmailIdentity
- sesv2.java2.newsletter.CreateEmailTemplate
- sesv2.java2.newsletter.DeleteContactList
- sesv2.java2.newsletter.DeleteEmailIdentity
- sesv2.java2.newsletter.DeleteEmailTemplate
Python:
versions:
- sdk_version: 3
github: python/example_code/sesv2
excerpts:
- description:
snippet_tags:
- python.example_code.sesv2.SESv2Workflow.decl
- python.example_code.sesv2.CreateContactList
- python.example_code.sesv2.CreateContact
- python.example_code.sesv2.ListContacts
- python.example_code.sesv2.SendEmail.simple
- python.example_code.sesv2.SendEmail.template
- python.example_code.sesv2.CreateEmailIdentity
- python.example_code.sesv2.CreateEmailTemplate
- python.example_code.sesv2.DeleteContactList
- python.example_code.sesv2.DeleteEmailIdentity
- python.example_code.sesv2.DeleteEmailTemplate
Rust:
versions:
- sdk_version: 1
github: rustv1/examples/ses
excerpts:
- description:
snippet_tags:
- sesv2.rust.create-contact-list
- sesv2.rust.create-contact
- sesv2.rust.list-contacts
- sesv2.rust.send-email.template
- sesv2.rust.create-email-identity
- sesv2.rust.create-email-template
- sesv2.rust.delete-contact-list
- sesv2.rust.delete-email-identity
- sesv2.rust.delete-email-template
services:
sesv2:
{
CreateContactList,
CreateContact,
ListContacts,
SendEmail.simple,
SendEmail.template,
CreateEmailIdentity,
CreateEmailTemplate,
DeleteContactList,
DeleteEmailIdentity,
DeleteEmailTemplate,
}
1 change: 1 addition & 0 deletions .doc_gen/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ allow_list:
- "respondToDevicePasswordVerifierChallenge"
- "role/AmazonBedrockExecutionRoleForAgents"
- "role/AmazonSageMakerGeospatialFullAccess"
- "rustv1/examples/ses/resources/newsletter"
- "s3/src/main/java/com/example/s3/ParseUri"
- "s3_client_side_encryption_sym_master_key"
- "serial/CORE_THING_NAME/write/dev/serial1"
Expand Down
8 changes: 7 additions & 1 deletion python/example_code/sesv2/newsletter.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def get_subaddress_variants(base_email, num_variants):
return variants


# snippet-start:[python.example_code.sesv2.SESv2Workflow.decl]
class SESv2Workflow:
"""
A class to manage the SES v2 Coupon Newsletter Workflow.
Expand All @@ -78,6 +79,8 @@ def __init__(self, ses_client, sleep=True):
self.ses_client = ses_client
self.sleep = sleep

# snippet-end:[python.example_code.sesv2.SESv2Workflow.decl]

def prepare_application(self):
"""
Prepares the application by creating an email identity and a contact list.
Expand Down Expand Up @@ -295,7 +298,7 @@ def clean_up(self):
print("Skipping email identity deletion.")


# Main function
# snippet-start:[python.example_code.sesv2.SESv2Workflow.main]
def main():
"""
The main function that orchestrates the execution of the workflow.
Expand All @@ -313,5 +316,8 @@ def main():
workflow.clean_up()


# snippet-end:[python.example_code.sesv2.SESv2Workflow.main]


if __name__ == "__main__":
main()
3 changes: 3 additions & 0 deletions rustv1/examples/ses/src/bin/newsletter.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

use anyhow::{anyhow, Result};
use aws_sdk_sesv2::Client;
use ses_code_examples::newsletter::SESWorkflow;
Expand Down
3 changes: 3 additions & 0 deletions rustv1/examples/ses/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

pub mod newsletter;
3 changes: 3 additions & 0 deletions rustv1/examples/ses/src/newsletter.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

use anyhow::{anyhow, Result};
use aws_sdk_sesv2::{
types::{
Expand Down
3 changes: 3 additions & 0 deletions rustv1/examples/ses/tests/test_newsletter.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

use std::io::Cursor;

use anyhow::Result;
Expand Down

0 comments on commit 1b04490

Please sign in to comment.