For details on how to use this API, see Using OpenStack Object Store
The Object Store high-level interface is exposed as the object_store
object on Connection objects.
openstack.object_store.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)get_account_metadata()Get metadata for this account.
| Return type: | Account |
|---|
set_account_metadata(**metadata)Set metadata for this account.
| Parameters: | metadata (kwargs) – Key/value pairs to be set as metadata on the container. Custom metadata can be set. Custom metadata are keys and values defined by the user. |
|---|
delete_account_metadata(keys)Delete metadata for this account.
| Parameters: | keys – The keys of metadata to be deleted. |
|---|
openstack.object_store.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)containers(**query)Obtain Container objects for this account.
| Parameters: | query (kwargs) – Optional query parameters to be sent to limit the resources being returned. |
|---|---|
| Return type: | A generator of
Container objects. |
create_container(name, **attrs)Create a new container from attributes
| Parameters: |
|
|---|---|
| Returns: | The results of container creation |
| Return type: |
delete_container(container, ignore_missing=True)Delete a container
| Parameters: |
|
|---|---|
| Returns: |
|
get_container_metadata(container)Get metadata for a container
| Parameters: | container – The value can be the name of a container or a
Container
instance. |
|---|---|
| Returns: | One Container |
| Raises: | ResourceNotFound
when no resource can be found. |
set_container_metadata(container, refresh=True, **metadata)Set metadata for a container.
| Parameters: |
|
|---|
delete_container_metadata(container, keys)Delete metadata for a container.
| Parameters: |
|
|---|
openstack.object_store.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)objects(container, **query)Return a generator that yields the Container’s objects.
| Parameters: |
|
|---|---|
| Return type: | A generator of
|
get_object(obj, container=None)Get the data associated with an object
| Parameters: | |
|---|---|
| Returns: | The contents of the object. Use the
|
| Raises: |
|
download_object(obj, container=None, **attrs)Download the data contained inside an object.
| Parameters: | |
|---|---|
| Raises: |
|
upload_object(container, name, filename=None, md5=None, sha256=None, segment_size=None, use_slo=True, metadata=None, generate_checksums=None, data=None, **headers)Create a file object.
Automatically uses large-object segments if needed.
| Parameters: |
|
|---|---|
| Raises: |
|
copy_object()Copy an object.
delete_object(obj, ignore_missing=True, container=None)Delete an object
| Parameters: |
|
|---|---|
| Returns: |
|
get_object_metadata(obj, container=None)Get metadata for an object.
| Parameters: | |
|---|---|
| Returns: | One |
| Raises: |
|
set_object_metadata(obj, container=None, **metadata)Set metadata for an object.
Note: This method will do an extra HEAD call.
| Parameters: |
|
|---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.