openstack.object_store.v1.obj¶
The Object Class¶
The Object
class inherits from Resource
.
-
class
openstack.object_store.v1.obj.
Object
(data=None, **attrs)¶ The base resource
- Parameters
_synchronized (bool) – This is not intended to be used directly. See
new()
andexisting()
.connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of
self._connection
in Resource code should protect itself with a check for None.
-
container
¶ The unique name for the container.
-
name
¶ The unique name for the object.
-
is_newest
¶ 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
¶ TODO(briancurtin) there’s a lot of content here…
-
if_match
¶
-
if_none_match
¶ 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
¶
-
if_unmodified_since
¶
-
signature
¶ Used with temporary URLs to sign the request. For more information about temporary URLs, see OpenStack Object Storage API v1 Reference.
-
expires_at
¶ 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
¶ 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
¶ 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
¶ The MIME type of the object.
-
accept_ranges
¶ The type of ranges that the object accepts.
-
etag
¶ 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
¶ Set to True if this object is a static large object manifest object. Type: bool
-
content_encoding
¶ If set, the value of the Content-Encoding metadata. If not set, this header is not returned by this operation.
-
content_disposition
¶ 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
¶ 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
¶ 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
¶ 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
¶ The timestamp of the transaction.
-
last_modified_at
¶ The date and time that the object was created or the last time that the metadata was changed.
-
transfer_encoding
¶ 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
¶ 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
¶ 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.
-
create
(session, base_path=None)¶ Create a remote resource based on this instance.
- Parameters
session (
Adapter
) – The session to use for making this request.prepend_key – A boolean indicating whether the resource_key should be prepended in a resource creation request. Default to True.
base_path (str) – Base part of the URI for creating resources, if different from
base_path
.params (dict) – Additional params to pass.
- Returns
This
Resource
instance.- Raises
MethodNotSupported
ifResource.allow_create
is not set toTrue
.