Class | Fog::Storage::Rackspace::Real

In:

lib/fog/rackspace/storage.rb
lib/fog/rackspace/requests/storage/get_containers.rb
lib/fog/rackspace/requests/storage/get_container.rb
lib/fog/rackspace/requests/storage/head_containers.rb
lib/fog/rackspace/requests/storage/post_set_meta_temp_url_key.rb
lib/fog/rackspace/requests/storage/delete_container.rb
lib/fog/rackspace/requests/storage/get_object.rb
lib/fog/rackspace/requests/storage/put_object_manifest.rb
lib/fog/rackspace/requests/storage/put_container.rb
lib/fog/rackspace/requests/storage/copy_object.rb
lib/fog/rackspace/requests/storage/head_object.rb
lib/fog/rackspace/requests/storage/get_object_https_url.rb
lib/fog/rackspace/requests/storage/head_container.rb
lib/fog/rackspace/requests/storage/put_object.rb
lib/fog/rackspace/requests/storage/delete_object.rb

Parent: | Object

### Methods

copy_object delete_container delete_object get_container get_containers get_object get_object_https_url head_container head_containers head_object new post_set_meta_temp_url_key put_container put_object put_object_manifest reload request

### Included Modules

Utils

### Attributes

rackspace_cdn_ssl | [R] |

### Public Class methods

new(options={})

### Public Instance methods

copy_object(source_container_name, source_object_name, target_container_name, target_object_name, options={})

Copy object

#### Parameters

- source_container_name<~String> - Name of source bucket
- source_object_name<~String> - Name of source object
- target_container_name<~String> - Name of bucket to create copy in
- target_object_name<~String> - Name for new copy of object
- options<~Hash> - Additional headers

delete_container(name)

Delete an existing container

#### Parameters

- name<~String> - Name of container to delete

delete_object(container, object)

Delete an existing object

#### Parameters

- container<~String> - Name of container to delete
- object<~String> - Name of object to delete

get_container(container, options = {})

Get details for container and total bytes stored

#### Parameters

- container<~String> - Name of container to retrieve info for
- options<~String>:
  - ‘limit’<~String> - Maximum number of objects to return
  - ‘marker’<~String> - Only return objects whose name is greater than marker
  - ‘prefix’<~String> - Limits results to those starting with prefix
  - ‘path’<~String> - Return objects nested in the pseudo path

#### Returns

- response<~Excon::Response>:
  - headers<~Hash>:
    - ‘X-Account-Container-Count’<~String> - Count of containers
    - ‘X-Account-Bytes-Used’<~String> - Bytes used
  - body<~Array>:
    - ‘bytes’<~Integer> - Number of bytes used by container
    - ‘count’<~Integer> - Number of items in container
    - ‘name’<~String> - Name of container
    - item<~Hash>:
      - ‘bytes’<~String> - Size of object
      - ‘content_type’<~String> Content-Type of object
      - ‘hash’<~String> - Hash of object (etag?)
      - ‘last_modified’<~String> - Last modified timestamp
      - ‘name’<~String> - Name of object

get_containers(options = {})

List existing storage containers

#### Parameters

- options<~Hash>:
  - ‘limit’<~Integer> - Upper limit to number of results returned
  - ‘marker’<~String> - Only return objects with name greater than this value

#### Returns

- response<~Excon::Response>:
  - body<~Array>:
    - container<~Hash>:
      - ‘bytes’<~Integer>: - Number of bytes used by container
      - ‘count’<~Integer>: - Number of items in container
      - ‘name’<~String>: - Name of container

get_object(container, object, &block)

Get details for object

#### Parameters

- container<~String> - Name of container to look in
- object<~String> - Name of object to look for

get_object_https_url(container, object, expires, options = {})

Get an expiring object https url from Cloud Files

#### Parameters

- container<~String> - Name of container containing object
- object<~String> - Name of object to get expiring url for
- expires<~Time> - An expiry time for this url

#### Returns

- response<~Excon::Response>:
  - body<~String> - url for object

#### See Also

docs.rackspace.com/files/api/v1/cf-devguide/content/Create_TempURL-d1a444.html

head_container(container)

List number of objects and total bytes stored

#### Parameters

- container<~String> - Name of container to retrieve info for

#### Returns

- response<~Excon::Response>:
  - headers<~Hash>:
    - ‘X-Container-Object-Count’<~String> - Count of containers
    - ‘X-Container-Bytes-Used’<~String> - Bytes used

head_containers()

List number of containers and total bytes stored

#### Returns

- response<~Excon::Response>:
  - headers<~Hash>:
    - ‘X-Account-Container-Count’<~String> - Count of containers
    - ‘X-Account-Bytes-Used’<~String> - Bytes used

head_object(container, object)

Get headers for object

#### Parameters

- container<~String> - Name of container to look in
- object<~String> - Name of object to look for

post_set_meta_temp_url_key(key)

Set the account wide Temp URL Key. This is a secret key that‘s used to generate signed expiring URLs.

Once the key has been set with this request you should create new Storage objects with the :rackspace_temp_url_key option then use the get_object_https_url method to generate expiring URLs.

*** CAUTION *** changing this secret key will invalidate any expiring URLS generated with old keys.

#### Parameters

- key<~String> - The new Temp URL Key

#### Returns

- response<~Excon::Response>

#### See Also

docs.rackspace.com/files/api/v1/cf-devguide/content/Set_Account_Metadata-d1a4460.html

put_container(name)

Create a new container

#### Parameters

- name<~String> - Name for container, should be < 256 bytes and must not contain ’/’

put_object(container, object, data, options = {})

Create a new object

#### Parameters

- container<~String> - Name for container, should be < 256 bytes and must not contain ’/’
- object<~String> - Name for object
- data<~String|File> - data to upload
- options<~Hash> - config headers for object. Defaults to {}.

put_object_manifest(container, object)

Create a new object

#### Parameters

- container<~String> - Name for container, should be < 256 bytes and must not contain ’/’
- object<~String> - Name for object

reload()
request(params, parse_json = true, &block)

[Validate]