# File lib/aws/s3/bucket_lifecycle_configuration.rb, line 160 def add_rule prefix, expiration_time = nil, options = {} if Hash === expiration_time options = expiration_time else options[:expiration_time] = expiration_time end id = options[:id] || SecureRandom.uuid opts = { :status => options[:disabled] == true ? 'Disabled' : 'Enabled', :expiration_time => options[:expiration_time], :glacier_transition_time => options[:glacier_transition_time] } rule = Rule.new(self, id, prefix, opts) self.rules << rule rule end