public class BucketReplicationConfiguration extends Object implements Serializable
Constructor and Description |
---|
BucketReplicationConfiguration() |
Modifier and Type | Method and 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.
|
public String getRoleARN()
public void setRoleARN(String roleARN)
role
- The IAM role for this configuration.public BucketReplicationConfiguration withRoleARN(String roleARN)
roleARN
- The IAM role for this configuration.BucketReplicationConfiguration
object.public Map<String,ReplicationRule> getRules()
public ReplicationRule getRule(String id)
id
- the unique identifier representing a rule in the replication
configuration.public void setRules(Map<String,ReplicationRule> rules)
rules
- the replication rules for the Amazon S3 bucket.IllegalArgumentException
- if the rules are null.public BucketReplicationConfiguration withRules(Map<String,ReplicationRule> rules)
rules
- the replication rules for the Amazon S3 bucket.BucketReplicationConfiguration
object.IllegalArgumentException
- if the rules are null.public BucketReplicationConfiguration addRule(String id, ReplicationRule rule)
id
- the id for the rule.rule
- the replication rule for the Amazon S3 bucket.BucketReplicationConfiguration
object.IllegalArgumentException
- if the given id or rule is null.public BucketReplicationConfiguration removeRule(String id)
id
- the id of the replication rule to be removed.BucketReplicationConfiguration
object.Copyright © 2024. All rights reserved.