Class ReceiptRule
- java.lang.Object
-
- com.amazonaws.services.simpleemail.model.ReceiptRule
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class ReceiptRule extends Object implements Serializable, Cloneable
Receipt rules enable you to specify which actions Amazon SES should take when it receives mail on behalf of one or more email addresses or domains that you own.
Each receipt rule defines a set of email addresses or domains to which it applies. If the email addresses or domains match at least one recipient address of the message, Amazon SES executes all of the receipt rule's actions on the message.
For information about setting up receipt rules, see the Amazon SES Developer Guide.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReceiptRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReceiptRule
clone()
boolean
equals(Object obj)
List<ReceiptAction>
getActions()
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.Boolean
getEnabled()
Iftrue
, the receipt rule is active.String
getName()
The name of the receipt rule.List<String>
getRecipients()
The recipient domains and email addresses to which the receipt rule applies.Boolean
getScanEnabled()
Iftrue
, then messages to which this receipt rule applies are scanned for spam and viruses.String
getTlsPolicy()
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).int
hashCode()
Boolean
isEnabled()
Iftrue
, the receipt rule is active.Boolean
isScanEnabled()
Iftrue
, then messages to which this receipt rule applies are scanned for spam and viruses.void
setActions(Collection<ReceiptAction> actions)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.void
setEnabled(Boolean enabled)
Iftrue
, the receipt rule is active.void
setName(String name)
The name of the receipt rule.void
setRecipients(Collection<String> recipients)
The recipient domains and email addresses to which the receipt rule applies.void
setScanEnabled(Boolean scanEnabled)
Iftrue
, then messages to which this receipt rule applies are scanned for spam and viruses.void
setTlsPolicy(TlsPolicy tlsPolicy)
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).void
setTlsPolicy(String tlsPolicy)
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).String
toString()
Returns a string representation of this object; useful for testing and debugging.ReceiptRule
withActions(ReceiptAction... actions)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.ReceiptRule
withActions(Collection<ReceiptAction> actions)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.ReceiptRule
withEnabled(Boolean enabled)
Iftrue
, the receipt rule is active.ReceiptRule
withName(String name)
The name of the receipt rule.ReceiptRule
withRecipients(String... recipients)
The recipient domains and email addresses to which the receipt rule applies.ReceiptRule
withRecipients(Collection<String> recipients)
The recipient domains and email addresses to which the receipt rule applies.ReceiptRule
withScanEnabled(Boolean scanEnabled)
Iftrue
, then messages to which this receipt rule applies are scanned for spam and viruses.ReceiptRule
withTlsPolicy(TlsPolicy tlsPolicy)
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).ReceiptRule
withTlsPolicy(String tlsPolicy)
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS).
-
-
-
Method Detail
-
setName
public void setName(String name)
The name of the receipt rule. The name must:
- Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
- Start and end with a letter or number.
- Contain less than 64 characters.
- Parameters:
name
- The name of the receipt rule. The name must:- Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
- Start and end with a letter or number.
- Contain less than 64 characters.
-
getName
public String getName()
The name of the receipt rule. The name must:
- Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
- Start and end with a letter or number.
- Contain less than 64 characters.
- Returns:
- The name of the receipt rule. The name must:
- Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
- Start and end with a letter or number.
- Contain less than 64 characters.
-
withName
public ReceiptRule withName(String name)
The name of the receipt rule. The name must:
- Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
- Start and end with a letter or number.
- Contain less than 64 characters.
- Parameters:
name
- The name of the receipt rule. The name must:- Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-).
- Start and end with a letter or number.
- Contain less than 64 characters.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEnabled
public void setEnabled(Boolean enabled)
If
true
, the receipt rule is active. The default value isfalse
.- Parameters:
enabled
- Iftrue
, the receipt rule is active. The default value isfalse
.
-
getEnabled
public Boolean getEnabled()
If
true
, the receipt rule is active. The default value isfalse
.- Returns:
- If
true
, the receipt rule is active. The default value isfalse
.
-
withEnabled
public ReceiptRule withEnabled(Boolean enabled)
If
true
, the receipt rule is active. The default value isfalse
.- Parameters:
enabled
- Iftrue
, the receipt rule is active. The default value isfalse
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEnabled
public Boolean isEnabled()
If
true
, the receipt rule is active. The default value isfalse
.- Returns:
- If
true
, the receipt rule is active. The default value isfalse
.
-
setTlsPolicy
public void setTlsPolicy(String tlsPolicy)
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to
Require
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
.- Parameters:
tlsPolicy
- Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set toRequire
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
.- See Also:
TlsPolicy
-
getTlsPolicy
public String getTlsPolicy()
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to
Require
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
.- Returns:
- Specifies whether Amazon SES should require that incoming email
is delivered over a connection encrypted with Transport Layer
Security (TLS). If this parameter is set to
Require
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
. - See Also:
TlsPolicy
-
withTlsPolicy
public ReceiptRule withTlsPolicy(String tlsPolicy)
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to
Require
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
.- Parameters:
tlsPolicy
- Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set toRequire
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TlsPolicy
-
setTlsPolicy
public void setTlsPolicy(TlsPolicy tlsPolicy)
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to
Require
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
.- Parameters:
tlsPolicy
- Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set toRequire
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
.- See Also:
TlsPolicy
-
withTlsPolicy
public ReceiptRule withTlsPolicy(TlsPolicy tlsPolicy)
Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set to
Require
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
.- Parameters:
tlsPolicy
- Specifies whether Amazon SES should require that incoming email is delivered over a connection encrypted with Transport Layer Security (TLS). If this parameter is set toRequire
, Amazon SES will bounce emails that are not received over TLS. The default isOptional
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TlsPolicy
-
getRecipients
public List<String> getRecipients()
The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
- Returns:
- The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
-
setRecipients
public void setRecipients(Collection<String> recipients)
The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
- Parameters:
recipients
- The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
-
withRecipients
public ReceiptRule withRecipients(String... recipients)
The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
NOTE: This method appends the values to the existing list (if any). Use
setRecipients(java.util.Collection)
orwithRecipients(java.util.Collection)
if you want to override the existing values.- Parameters:
recipients
- The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withRecipients
public ReceiptRule withRecipients(Collection<String> recipients)
The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.
- Parameters:
recipients
- The recipient domains and email addresses to which the receipt rule applies. If this field is not specified, this rule will match all recipients under all verified domains.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getActions
public List<ReceiptAction> getActions()
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
- Returns:
- An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
-
setActions
public void setActions(Collection<ReceiptAction> actions)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
- Parameters:
actions
- An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
-
withActions
public ReceiptRule withActions(ReceiptAction... actions)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
NOTE: This method appends the values to the existing list (if any). Use
setActions(java.util.Collection)
orwithActions(java.util.Collection)
if you want to override the existing values.- Parameters:
actions
- An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withActions
public ReceiptRule withActions(Collection<ReceiptAction> actions)
An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.
- Parameters:
actions
- An ordered list of actions to perform on messages that match at least one of the recipient email addresses or domains specified in the receipt rule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setScanEnabled
public void setScanEnabled(Boolean scanEnabled)
If
true
, then messages to which this receipt rule applies are scanned for spam and viruses. The default value isfalse
.- Parameters:
scanEnabled
- Iftrue
, then messages to which this receipt rule applies are scanned for spam and viruses. The default value isfalse
.
-
getScanEnabled
public Boolean getScanEnabled()
If
true
, then messages to which this receipt rule applies are scanned for spam and viruses. The default value isfalse
.- Returns:
- If
true
, then messages to which this receipt rule applies are scanned for spam and viruses. The default value isfalse
.
-
withScanEnabled
public ReceiptRule withScanEnabled(Boolean scanEnabled)
If
true
, then messages to which this receipt rule applies are scanned for spam and viruses. The default value isfalse
.- Parameters:
scanEnabled
- Iftrue
, then messages to which this receipt rule applies are scanned for spam and viruses. The default value isfalse
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isScanEnabled
public Boolean isScanEnabled()
If
true
, then messages to which this receipt rule applies are scanned for spam and viruses. The default value isfalse
.- Returns:
- If
true
, then messages to which this receipt rule applies are scanned for spam and viruses. The default value isfalse
.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public ReceiptRule clone()
-
-