public BucketReplicationConfiguration addRule ( String id , ReplicationRule rule ) { if ( id == null || id . trim ( ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "Rule id cannot be null or empty." ) ; } if ( rule == null ) { throw new IllegalArgumentException ( "Replication rule cannot be null" ) ; } rules . put ( id , rule ) ; return this ; }
Adds a new rule to the replication configuration associated with this Amazon S3 bucket . Returns the updated object .