Package com.amazonaws.services.s3.model
Class BucketReplicationConfiguration
java.lang.Object
com.amazonaws.services.s3.model.BucketReplicationConfiguration
- All Implemented Interfaces:
Serializable
Replication configuration for an Amazon S3 bucket.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRule
(String id, ReplicationRule rule) Adds a new rule to the replication configuration associated with this Amazon S3 bucket.Returns the IAM role associated with this replication configuration.Returns the replication rule for the given rule id.getRules()
Returns the replication rules associated with this Amazon S3 bucket.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.toString()
withRoleARN
(String roleARN) Sets the IAM role that will be used by Amazon S3 while replication.withRules
(Map<String, ReplicationRule> rules) Sets the replication rules for the Amazon S3 bucket.
-
Constructor Details
-
BucketReplicationConfiguration
public BucketReplicationConfiguration()
-
-
Method Details
-
getRoleARN
Returns the IAM role associated with this replication configuration. -
setRoleARN
Sets the IAM role that will be used by Amazon S3 while replication.- Parameters:
role
- The IAM role for this configuration.
-
withRoleARN
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
Returns the replication rules associated with this Amazon S3 bucket.- Returns:
- the replication rules associated with this Amazon S3 bucket.
-
getRule
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
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
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
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
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.
-
toString
-