Class BounceAction

java.lang.Object
com.amazonaws.services.simpleemail.model.BounceAction
All Implemented Interfaces:
Serializable, Cloneable

public class BounceAction extends Object implements Serializable, Cloneable

When included in a receipt rule, this action rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).

For information about sending a bounce message in response to a received email, see the Amazon SES Developer Guide.

See Also:
  • Constructor Details

    • BounceAction

      public BounceAction()
  • Method Details

    • setTopicArn

      public void setTopicArn(String topicArn)

      The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

      Parameters:
      topicArn - The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.
    • getTopicArn

      public String getTopicArn()

      The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

      Returns:
      The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.
    • withTopicArn

      public BounceAction withTopicArn(String topicArn)

      The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.

      Parameters:
      topicArn - The Amazon Resource Name (ARN) of the Amazon SNS topic to notify when the bounce action is taken. An example of an Amazon SNS topic ARN is arn:aws:sns:us-west-2:123456789012:MyTopic. For more information about Amazon SNS topics, see the Amazon SNS Developer Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setSmtpReplyCode

      public void setSmtpReplyCode(String smtpReplyCode)

      The SMTP reply code, as defined by RFC 5321.

      Parameters:
      smtpReplyCode - The SMTP reply code, as defined by RFC 5321.
    • getSmtpReplyCode

      public String getSmtpReplyCode()

      The SMTP reply code, as defined by RFC 5321.

      Returns:
      The SMTP reply code, as defined by RFC 5321.
    • withSmtpReplyCode

      public BounceAction withSmtpReplyCode(String smtpReplyCode)

      The SMTP reply code, as defined by RFC 5321.

      Parameters:
      smtpReplyCode - The SMTP reply code, as defined by RFC 5321.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setStatusCode

      public void setStatusCode(String statusCode)

      The SMTP enhanced status code, as defined by RFC 3463.

      Parameters:
      statusCode - The SMTP enhanced status code, as defined by RFC 3463.
    • getStatusCode

      public String getStatusCode()

      The SMTP enhanced status code, as defined by RFC 3463.

      Returns:
      The SMTP enhanced status code, as defined by RFC 3463.
    • withStatusCode

      public BounceAction withStatusCode(String statusCode)

      The SMTP enhanced status code, as defined by RFC 3463.

      Parameters:
      statusCode - The SMTP enhanced status code, as defined by RFC 3463.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setMessage

      public void setMessage(String message)

      Human-readable text to include in the bounce message.

      Parameters:
      message - Human-readable text to include in the bounce message.
    • getMessage

      public String getMessage()

      Human-readable text to include in the bounce message.

      Returns:
      Human-readable text to include in the bounce message.
    • withMessage

      public BounceAction withMessage(String message)

      Human-readable text to include in the bounce message.

      Parameters:
      message - Human-readable text to include in the bounce message.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setSender

      public void setSender(String sender)

      The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.

      Parameters:
      sender - The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.
    • getSender

      public String getSender()

      The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.

      Returns:
      The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.
    • withSender

      public BounceAction withSender(String sender)

      The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.

      Parameters:
      sender - The email address of the sender of the bounced email. This is the address from which the bounce message will be sent.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public BounceAction clone()
      Overrides:
      clone in class Object