Class EmailMapping.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • targetEmails

        @Stability(Stable)
        public EmailMapping.Builder targetEmails​(List<String> targetEmails)
        Parameters:
        targetEmails - A list of target email addresses that should receive the forwarded emails for the given email addresses matched by either `receiveEmail` or `receivePrefix`. This parameter is required. Make sure that you only specify email addresses that are verified by SES. Otherwise SES won't send them out.

        Example: ['foobar@gmail.com', 'foo+bar@gmail.com', 'whatever@example.org']

        Returns:
        this
      • receiveEmail

        @Stability(Stable)
        public EmailMapping.Builder receiveEmail​(String receiveEmail)
        Parameters:
        receiveEmail - You can define a string that is matching an email address, e.g. `hello@example.org`. If this property is defined, the receivePrefix will be ignored. You must define either this property or receivePrefix, otherwise no emails will be forwarded.
        Returns:
        this
      • receivePrefix

        @Stability(Stable)
        public EmailMapping.Builder receivePrefix​(String receivePrefix)
        Parameters:
        receivePrefix - A short way to match a specific email addresses by only providing a prefix, e.g. `hello`. The prefix will be combined with the given domain name from EmailForwardingRuleProps. If an email was sent to this specific email address, all emails matching this receiver will be forwarded to all email addresses defined in `targetEmails`. If receiveEmail property is defined as well, then receiveEmail is preferred. Hence, only define one of them.
        Returns:
        this
      • build

        @Stability(Stable)
        public EmailMapping build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<EmailMapping>
        Returns:
        a new instance of EmailMapping
        Throws:
        NullPointerException - if any required attribute was not provided