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:
  • Constructor Details

    • BucketReplicationConfiguration

      public BucketReplicationConfiguration()
  • Method Details

    • 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

      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

      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.
    • toString

      public String toString()
      Overrides:
      toString in class Object