openstack.object_store.v1.obj

openstack.object_store.v1.obj

The Object Class

The Object class inherits from Resource.

class openstack.object_store.v1.obj.Object(attrs=None, loaded=False)

Construct a Resource to interact with a service’s REST API.

The Resource class offers two class methods to construct resource objects, which are preferrable to entering through this initializer. See Resource.new() and Resource.existing().

Parameters:
  • attrs (dict) – The attributes to set when constructing this Resource.
  • loaded (bool) – True if this Resource exists on the server, False if it does not.
container = None

The unique name for the container.

name = None

The unique name for the object.

is_newest = None

If set to True, Object Storage queries all replicas to return the most recent one. If you omit this header, Object Storage responds faster after it finds one valid replica. Because setting this header to True is more expensive for the back end, use it only when it is absolutely needed. Type: bool

range = None

TODO(briancurtin) there’s a lot of content here…

if_match = None

See http://www.ietf.org/rfc/rfc2616.txt.

if_none_match = None

In combination with Expect: 100-Continue, specify an “If-None-Match: *” header to query whether the server already has a copy of the object before any data is sent.

if_modified_since = None

See http://www.ietf.org/rfc/rfc2616.txt.

if_unmodified_since = None

See http://www.ietf.org/rfc/rfc2616.txt.

signature = None

Used with temporary URLs to sign the request. For more information about temporary URLs, see OpenStack Object Storage API v1 Reference.

expires_at = None

Used with temporary URLs to specify the expiry time of the signature. For more information about temporary URLs, see OpenStack Object Storage API v1 Reference.

multipart_manifest = None

If you include the multipart-manifest=get query parameter and the object is a large object, the object contents are not returned. Instead, the manifest is returned in the X-Object-Manifest response header for dynamic large objects or in the response body for static large objects.

content_length = None

HEAD operations do not return content. However, in this operation the value in the Content-Length header is not the size of the response body. Instead it contains the size of the object, in bytes.

content_type = None

The MIME type of the object.

accept_ranges = None

The type of ranges that the object accepts.

etag = None

For objects smaller than 5 GB, this value is the MD5 checksum of the object content. The value is not quoted. For manifest objects, this value is the MD5 checksum of the concatenated string of MD5 checksums and ETags for each of the segments in the manifest, and not the MD5 checksum of the content that was downloaded. Also the value is enclosed in double-quote characters. You are strongly recommended to compute the MD5 checksum of the response body as it is received and compare this value with the one in the ETag header. If they differ, the content was corrupted, so retry the operation.

is_static_large_object = None

Set to True if this object is a static large object manifest object. Type: bool

content_encoding = None

If set, the value of the Content-Encoding metadata. If not set, this header is not returned by this operation.

content_disposition = None

If set, specifies the override behavior for the browser. For example, this header might specify that the browser use a download program to save this file rather than show the file, which is the default. If not set, this header is not returned by this operation.

delete_after = None

Specifies the number of seconds after which the object is removed. Internally, the Object Storage system stores this value in the X-Delete-At metadata item.

delete_at = None

If set, the time when the object will be deleted by the system in the format of a UNIX Epoch timestamp. If not set, this header is not returned by this operation.

object_manifest = None

If set, to this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects in the form container/prefix.

timestamp = None

The timestamp of the transaction.

last_modified_at = None

The date and time that the object was created or the last time that the metadata was changed.

transfer_encoding = None

Set to chunked to enable chunked transfer encoding. If used, do not set the Content-Length header to a non-zero value.

is_content_type_detected = None

If set to true, Object Storage guesses the content type based on the file extension and ignores the value sent in the Content-Type header, if present. Type: bool

copy_from = None

If set, this is the name of an object used to create the new object by copying the X-Copy-From object. The value is in form {container}/{object}. You must UTF-8-encode and then URL-encode the names of the container and object before you include them in the header. Using PUT with X-Copy-From has the same effect as using the COPY operation to copy an object.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.