Package com.amazonaws.services.s3.model
Class BucketReplicationConfiguration
- java.lang.Object
-
- com.amazonaws.services.s3.model.BucketReplicationConfiguration
-
- All Implemented Interfaces:
Serializable
public class BucketReplicationConfiguration extends Object implements Serializable
Replication configuration for an Amazon S3 bucket.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BucketReplicationConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BucketReplicationConfiguration
addRule(String id, ReplicationRule rule)
Adds a new rule to the replication configuration associated with this Amazon S3 bucket.String
getRoleARN()
Returns the IAM role associated with this replication configuration.ReplicationRule
getRule(String id)
Returns the replication rule for the given rule id.Map<String,ReplicationRule>
getRules()
Returns the replication rules associated with this Amazon S3 bucket.BucketReplicationConfiguration
removeRule(String id)
Removes the replication rule with the given id from the replication configuration associated with Amazon S3 bucket.void
setRoleARN(String roleARN)
Sets the IAM role that will be used by Amazon S3 while replication.void
setRules(Map<String,ReplicationRule> rules)
Sets the replication rules for the Amazon S3 bucket.String
toString()
BucketReplicationConfiguration
withRoleARN(String roleARN)
Sets the IAM role that will be used by Amazon S3 while replication.BucketReplicationConfiguration
withRules(Map<String,ReplicationRule> rules)
Sets the replication rules for the Amazon S3 bucket.
-
-
-
Method Detail
-
getRoleARN
public String getRoleARN()
Returns the IAM role associated with this replication configuration.
-
setRoleARN
public void setRoleARN(String roleARN)
Sets the IAM role that will be used by Amazon S3 while replication.- Parameters:
role
- The IAM role for this configuration.
-
withRoleARN
public BucketReplicationConfiguration withRoleARN(String roleARN)
Sets the IAM role that will be used by Amazon S3 while replication. Returns the updated object.- Parameters:
roleARN
- The IAM role for this configuration.- Returns:
- The updated
BucketReplicationConfiguration
object.
-
getRules
public Map<String,ReplicationRule> getRules()
Returns the replication rules associated with this Amazon S3 bucket.- Returns:
- the replication rules associated with this Amazon S3 bucket.
-
getRule
public ReplicationRule getRule(String id)
Returns the replication rule for the given rule id.- Parameters:
id
- the unique identifier representing a rule in the replication configuration.- Returns:
- the replication rule for the given rule id.
-
setRules
public void setRules(Map<String,ReplicationRule> rules)
Sets the replication rules for the Amazon S3 bucket.- Parameters:
rules
- the replication rules for the Amazon S3 bucket.- Throws:
IllegalArgumentException
- if the rules are null.
-
withRules
public BucketReplicationConfiguration withRules(Map<String,ReplicationRule> rules)
Sets the replication rules for the Amazon S3 bucket. Returns the updated object.- Parameters:
rules
- the replication rules for the Amazon S3 bucket.- Returns:
- the updated
BucketReplicationConfiguration
object. - Throws:
IllegalArgumentException
- if the rules are null.
-
addRule
public BucketReplicationConfiguration addRule(String id, ReplicationRule rule)
Adds a new rule to the replication configuration associated with this Amazon S3 bucket. Returns the updated object.- Parameters:
id
- the id for the rule.rule
- the replication rule for the Amazon S3 bucket.- Returns:
- the updated
BucketReplicationConfiguration
object. - Throws:
IllegalArgumentException
- if the given id or rule is null.
-
removeRule
public BucketReplicationConfiguration removeRule(String id)
Removes the replication rule with the given id from the replication configuration associated with Amazon S3 bucket. Returns the updated object.- Parameters:
id
- the id of the replication rule to be removed.- Returns:
- the updated
BucketReplicationConfiguration
object.
-
-