(self, uri)
| 896 | return response |
| 897 | |
| 898 | def object_restore(self, uri): |
| 899 | if uri.type != "s3": |
| 900 | raise ValueError("Expected URI type 's3', got '%s'" % uri.type) |
| 901 | if self.config.restore_days < 1: |
| 902 | raise ParameterError("You must restore a file for 1 or more days") |
| 903 | if self.config.restore_priority not in ['Standard', 'Expedited', 'Bulk']: |
| 904 | raise ParameterError("Valid restoration priorities: bulk, standard, expedited") |
| 905 | body = '<RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-03-01/">' |
| 906 | body += (' <Days>%s</Days>' % self.config.restore_days) |
| 907 | body += ' <GlacierJobParameters>' |
| 908 | body += (' <Tier>%s</Tier>' % self.config.restore_priority) |
| 909 | body += ' </GlacierJobParameters>' |
| 910 | body += '</RestoreRequest>' |
| 911 | request = self.create_request("OBJECT_POST", uri = uri, body = body, |
| 912 | uri_params = {'restore': None}) |
| 913 | response = self.send_request(request) |
| 914 | debug("Received response '%s'" % (response)) |
| 915 | return response |
| 916 | |
| 917 | def _sanitize_headers(self, headers): |
| 918 | to_remove = [ |
nothing calls this directly
no test coverage detected