public class BucketReplicationConfiguration
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
BucketReplicationConfiguration() |
Modifier and Type | Method and Description |
---|---|
BucketReplicationConfiguration |
addRule(java.lang.String id,
ReplicationRule rule)
Adds a new rule to the replication configuration associated with this
Amazon S3 bucket.
|
java.lang.String |
getRoleARN()
Returns the IAM role associated with this replication configuration.
|
ReplicationRule |
getRule(java.lang.String id)
Returns the replication rule for the given rule id.
|
java.util.Map<java.lang.String,ReplicationRule> |
getRules()
Returns the replication rules associated with this Amazon S3 bucket.
|
BucketReplicationConfiguration |
removeRule(java.lang.String id)
Removes the replication rule with the given id from the replication
configuration associated with Amazon S3 bucket.
|
void |
setRoleARN(java.lang.String roleARN)
Sets the IAM role that will be used by Amazon S3 while replication.
|
void |
setRules(java.util.Map<java.lang.String,ReplicationRule> rules)
Sets the replication rules for the Amazon S3 bucket.
|
BucketReplicationConfiguration |
withRoleARN(java.lang.String roleARN)
Sets the IAM role that will be used by Amazon S3 while replication.
|
BucketReplicationConfiguration |
withRules(java.util.Map<java.lang.String,ReplicationRule> rules)
Sets the replication rules for the Amazon S3 bucket.
|
public java.lang.String getRoleARN()
public void setRoleARN(java.lang.String roleARN)
role
- The IAM role for this configuration.public BucketReplicationConfiguration withRoleARN(java.lang.String roleARN)
roleARN
- The IAM role for this configuration.BucketReplicationConfiguration
object.public java.util.Map<java.lang.String,ReplicationRule> getRules()
public ReplicationRule getRule(java.lang.String id)
id
- the unique identifier representing a rule in the replication
configuration.public void setRules(java.util.Map<java.lang.String,ReplicationRule> rules)
rules
- the replication rules for the Amazon S3 bucket.java.lang.IllegalArgumentException
- if the rules are null.public BucketReplicationConfiguration withRules(java.util.Map<java.lang.String,ReplicationRule> rules)
rules
- the replication rules for the Amazon S3 bucket.BucketReplicationConfiguration
object.java.lang.IllegalArgumentException
- if the rules are null.public BucketReplicationConfiguration addRule(java.lang.String id, ReplicationRule rule)
id
- the id for the rule.rule
- the replication rule for the Amazon S3 bucket.BucketReplicationConfiguration
object.java.lang.IllegalArgumentException
- if the given id or rule is null.public BucketReplicationConfiguration removeRule(java.lang.String id)
id
- the id of the replication rule to be removed.BucketReplicationConfiguration
object.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.