Class: Fog::Storage::Rackspace::Account

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/rackspace/models/storage/account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bytes_usedInteger (readonly)

Returns The total number of bytes used by the account.

Returns:

  • (Integer)

    The total number of bytes used by the account



20
# File 'lib/fog/rackspace/models/storage/account.rb', line 20

attribute :bytes_used, :aliases => 'X-Account-Bytes-Used', :type => :integer

#container_countInteger (readonly)

Returns The number of containers in account.

Returns:

  • (Integer)

    The number of containers in account



16
# File 'lib/fog/rackspace/models/storage/account.rb', line 16

attribute :container_count, :aliases => 'X-Account-Container-Count', :type => :integer

#meta_temp_url_keyString

Returns The temporary URL key used to generate temporary access to files.

Returns:

  • (String)

    The temporary URL key used to generate temporary access to files

See Also:



12
# File 'lib/fog/rackspace/models/storage/account.rb', line 12

attribute :meta_temp_url_key, :aliases => 'X-Account-Meta-Temp-Url-Key'

#object_countInteger (readonly)

Returns The total number of objects in the account.

Returns:

  • (Integer)

    The total number of objects in the account



24
# File 'lib/fog/rackspace/models/storage/account.rb', line 24

attribute :object_count, :aliases => 'X-Account-Object-Count', :type => :integer

Instance Method Details

#reloadFog::Storage::Rackspace::Account

Reload account with latest data from Cloud Files

Returns:

Raises:



43
44
45
46
# File 'lib/fog/rackspace/models/storage/account.rb', line 43

def reload
  response = service.head_containers
  merge_attributes response.headers
end

#saveBoolean

Saves account settings (meta_temp_url_key)

Returns:

  • (Boolean)

    returns true if successfully updated

Raises:



32
33
34
35
# File 'lib/fog/rackspace/models/storage/account.rb', line 32

def save
  service.post_set_meta_temp_url_key meta_temp_url_key
  true
end