Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ses): add constructs for email receiving #1971

Merged
merged 10 commits into from
Mar 16, 2019
Merged

feat(ses): add constructs for email receiving #1971

merged 10 commits into from
Mar 16, 2019

Conversation

jogold
Copy link
Contributor

@jogold jogold commented Mar 7, 2019

Add constructs for receipt rule set, receipt rule and receipt filter. Also add classes for rule actions.

A rule set with a first rule that drops spam/viruses can be easily created using the dropSpam prop of the ReceiptRuleSet construct.

IP white listing can be implemented using the WhiteListReceiptFilter.


Pull Request Checklist

  • Testing
    • Unit test added (prefer not to modify an existing test, otherwise, it's probably a breaking change)
    • CLI change?: coordinate update of integration tests with team
    • cdk-init template change?: coordinated update of integration tests with team
  • Docs
    • jsdocs: All public APIs documented
    • README: README and/or documentation topic updated
  • Title and Description
    • Change type: title prefixed with fix, feat will appear in changelog
    • Title: use lower-case and doesn't end with a period
    • Breaking?: last paragraph: "BREAKING CHANGE: <describe what changed + link for details>"
    • Issues: Indicate issues fixed via: "Fixes #xxx" or "Closes #xxx"
  • Sensitive Modules (requires 2 PR approvers)
    • IAM Policy Document (in @aws-cdk/aws-iam)
    • EC2 Security Groups and ACLs (in @aws-cdk/aws-ec2)
    • Grant APIs (only if not based on official documentation with a reference)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

@jogold jogold requested a review from a team as a code owner March 7, 2019 10:19
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks excellent!

I have some small requests about documentation (move the example, make sure all publicly visible types have a docstring describing the purpose of the type) but the rest looks great.

Will merge this once the docs have been updated.

### Email receiving
Create a receipt rule set with rules and actions:
```ts
const bucket = new s3.Bucket(this, 'Bucket');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move this into a file named:

test/example.receiving.lit.ts

And add the requirement imports and Stack declaration around it?

You can mark the piece of code that is relevant for the example with:

/// !show
...code goes here
/// !hide

And at this location in the README add:

[example of setting up a receive rule](test/example.receiving.lit.ts)

This will make sure that the example actually compiles, and if we make breaking API changes, the compiler failure will force us to update the example code.

@jogold
Copy link
Contributor Author

jogold commented Mar 15, 2019

Done. I thought XxxProps interfaces were not documented.

Shouldn't completed-docs be included? I see a lot of PR comments about JSDoc... (maybe with a minimal configuration, the code base is large)

@jogold
Copy link
Contributor Author

jogold commented Mar 15, 2019

Created #2026

@rix0rrr
Copy link
Contributor

rix0rrr commented Mar 16, 2019

I was thinking the same, we should have static checks on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants