summaryrefslogtreecommitdiff
path: root/boto/s3
diff options
context:
space:
mode:
authorMark Hjelm <markhjelm@google.com>2017-09-12 12:47:36 -0700
committerMark Hjelm <markhjelm@google.com>2017-09-12 12:47:36 -0700
commit1e36397e3f3b15049ae83fd2f88acc94ef50fca5 (patch)
tree9d9f7f0e69d6c9274bb6b5383f0f6a6ba523ddc7 /boto/s3
parent6c5b98861d726fdd5e05702972b14692e73e84f4 (diff)
downloadboto-1e36397e3f3b15049ae83fd2f88acc94ef50fca5.tar.gz
Support Billing Configuration.
Pass headers everywhere appropriate. Recognize billing and userProject query parameters. Integration test for Billing Configuration.
Diffstat (limited to 'boto/s3')
-rw-r--r--boto/s3/bucket.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/boto/s3/bucket.py b/boto/s3/bucket.py
index 88fb29ff..1adae4b1 100644
--- a/boto/s3/bucket.py
+++ b/boto/s3/bucket.py
@@ -852,8 +852,8 @@ class Bucket(object):
src_bucket = self
else:
src_bucket = self.connection.get_bucket(
- src_bucket_name, validate=False)
- acl = src_bucket.get_xml_acl(src_key_name)
+ src_bucket_name, validate=False, headers=headers)
+ acl = src_bucket.get_xml_acl(src_key_name, headers=headers)
if encrypt_key:
headers[provider.server_side_encryption_header] = 'AES256'
src = '%s/%s' % (src_bucket_name, urllib.parse.quote(src_key_name))
@@ -1123,7 +1123,7 @@ class Bucket(object):
policy = self.get_acl(headers=headers)
return policy.acl.grants
- def get_location(self):
+ def get_location(self, headers=None):
"""
Returns the LocationConstraint for the bucket.
@@ -1132,6 +1132,7 @@ class Bucket(object):
string if no constraint was specified when bucket was created.
"""
response = self.connection.make_request('GET', self.name,
+ headers=headers,
query_args='location')
body = response.read()
if response.status == 200:
@@ -1824,8 +1825,8 @@ class Bucket(object):
def delete(self, headers=None):
return self.connection.delete_bucket(self.name, headers=headers)
- def get_tags(self):
- response = self.get_xml_tags()
+ def get_tags(self, headers=None):
+ response = self.get_xml_tags(headers)
tags = Tags()
h = handler.XmlHandler(tags, self)
if not isinstance(response, bytes):
@@ -1833,10 +1834,10 @@ class Bucket(object):
xml.sax.parseString(response, h)
return tags
- def get_xml_tags(self):
+ def get_xml_tags(self, headers=None):
response = self.connection.make_request('GET', self.name,
query_args='tagging',
- headers=None)
+ headers=headers)
body = response.read()
if response.status == 200:
return body