public class BucketReplicationConfiguration extends Object implements Serializable
构造器和说明 |
---|
BucketReplicationConfiguration() |
限定符和类型 | 方法和说明 |
---|---|
BucketReplicationConfiguration |
addRule(String id,
ReplicationRule rule)
Adds a new rule to the replication configuration associated with this QCloud bucket.
|
String |
getRoleName()
Returns the role name 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 QCloud bucket.
|
BucketReplicationConfiguration |
removeRule(String id)
Removes the replication rule with the given id from the replication configuration associated
with QCloud bucket.
|
void |
setRoleName(String roleName)
Sets the role name that will be used by QCloud while replication.
|
void |
setRules(Map<String,ReplicationRule> rules)
Sets the replication rules for the QCloud bucket.
|
String |
toString() |
BucketReplicationConfiguration |
withRoleName(String roleName)
Sets the role name that will be used by QCloud while replication.
|
BucketReplicationConfiguration |
withRules(Map<String,ReplicationRule> rules)
Sets the replication rules for the QCloud bucket.
|
public String getRoleName()
public void setRoleName(String roleName)
role
- The role name for this configuration.public BucketReplicationConfiguration withRoleName(String roleName)
roleName
- The 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 QCloud bucket.IllegalArgumentException
- if the rules are null.public BucketReplicationConfiguration withRules(Map<String,ReplicationRule> rules)
rules
- the replication rules for the QCloud 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 QCloud 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 © 2020. All rights reserved.