Class: Fog::AWS::S3::Bucket
- Defined in:
- lib/fog/aws/models/s3/bucket.rb
Instance Attribute Summary collapse
-
#creation_date ⇒ Object
Returns the value of attribute creation_date.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner ⇒ Object
Returns the value of attribute owner.
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(attributes = {}) ⇒ Bucket
constructor
A new instance of Bucket.
- #objects ⇒ Object
- #payer ⇒ Object
- #payer=(new_payer) ⇒ Object
- #save ⇒ Object
Methods inherited from Model
Constructor Details
#initialize(attributes = {}) ⇒ Bucket
Returns a new instance of Bucket.
12 13 14 15 16 17 18 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 12 def initialize(attributes = {}) remap_attributes(attributes, { 'CreationDate' => :creation_date, 'Name' => :name }) super end |
Instance Attribute Details
#creation_date ⇒ Object
Returns the value of attribute creation_date.
7 8 9 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 7 def creation_date @creation_date end |
#location ⇒ Object
Returns the value of attribute location.
7 8 9 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 7 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 7 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner.
7 8 9 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 7 def owner @owner end |
Instance Method Details
#delete ⇒ Object
20 21 22 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 20 def delete connection.delete_bucket(name) end |
#objects ⇒ Object
31 32 33 34 35 36 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 31 def objects Fog::AWS::S3::Objects.new( :bucket => self, :connection => connection ) end |
#payer ⇒ Object
38 39 40 41 42 43 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 38 def payer @payer ||= begin data = connection.get_request_payment(name) data.body['Payer'] end end |
#payer=(new_payer) ⇒ Object
45 46 47 48 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 45 def payer=(new_payer) connection.put_request_payment(name, new_payer) @payer = new_payer end |
#save ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/fog/aws/models/s3/bucket.rb', line 50 def save = {} if @location ['LocationConstraint'] = @location end connection.put_bucket(name, ) end |