anchor.diff:                                     :sub-resource "lifecycle"
                                      :content-md5 md5
                                      :content content))))
  +
  +;;; Restoring from glacier
  +
  +(defun restore-request-document (days)
  +  (with-xml-output
  +    (with-element "RestoreRequest"
  +      (with-element "Days"
  +        (text (princ-to-string days))))))
  +
  +(defun restore-object (bucket key &key
  +                       days
  +                       ((:credentials *credentials*) *credentials*))
  +  (let* ((content (restore-request-document days))
  +         (md5 (vector-md5/b64 content)))
  +    (submit-request (make-instance 'request
  +                                   :content-md5 md5
  +                                   :sub-resource "restore"
  +                                   :bucket bucket
  +                                   :key key))))
  
positive.code:     :initarg :enabledp
      :accessor enabledp)
     (days
      :initarg :days
      :accessor days)))
  
  (defmethod print-object ((rule lifecycle-rule) stream)
    (print-unreadable-object (rule stream :type t)
      (format stream "~S expire prefix ~S in ~D day~:P (~:[disabled~;enabled~])"
              (id rule)
              (prefix rule)
              (days rule)
              (enabledp rule))))
  
  ;;; FIXME: The GFs for ENABLE and DISABLE should really be moved
  
negative.code:     (bindings-lifecycle-rules
       (xml-bind 'lifecycle-configuration (body response)))))
  
  (defun delete-bucket-lifecycle (bucket
                                  &key
                                  ((:credentials *credentials*) *credentials*))
    "Delete the lifecycle configuration of BUCKET."
    (submit-request (make-instance 'request
                                   :method :delete
                                   :bucket bucket
                                   :sub-resource "lifecycle")))
  
  (defun (setf bucket-lifecycle) (rules bucket
                                  &key
                                  ((:credentials *credentials*) *credentials*))
    "Set the lifecycle configuration of BUCKET to RULES. RULES is
  coerced to a list if needed. If RULES is NIL, the lifecycle
  configuration is deleted with DELETE-BUCKET-LIFECYCLE."
  