bucket_contents
Creates, updates, deletes, gets or lists a bucket_contents resource.
Overview
| Name | bucket_contents |
| Type | Resource |
| Id | linode.object_storage.bucket_contents |
Fields
The following fields are returned by SELECT queries:
- list
One page of the requested bucket's contents.
| Name | Datatype | Description |
|---|---|---|
name | string | The name of this object or prefix. (example: example) |
etag | string | An MD-5 hash of the object. null if this object represents a prefix. (example: 9f254c71e28e033bf9e0e5262e3e72ab) |
last_modified | string (date-time) | The date and time this object was last modified. null if this object represents a prefix. (example: 2019-01-01T01:23:45) |
owner | string | The owner of this object, as a UUID. null if this object represents a prefix. (example: bfc70ab2-e3d4-42a4-ad55-83921822270c) |
size | integer | The size of this object, in bytes. null if this object represents a prefix. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | regionId, bucket | marker, delimiter, prefix, page_size | Returns the contents of a bucket. The contents are paginated using a marker, that's the name of the last object on the previous page. Objects can also be filtered by prefix and delimiter. See Filtering and sorting for more information.> 📘 > > You can use an outside API, such as the Ceph Object Gateway S3 API for more options. OAuth scopes. <br /> object_storage:read_only<br /> Learn more... |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
bucket | string | The bucket name. (example: {{bucket}}) |
regionId | string | Identifies a region where this bucket lives. > 📘 > > You can use a clusterId in place of regionId in requests for buckets that you created using the legacy version of the API. Run List clusters to see each cluster id. |
delimiter | string | The delimiter for object names; if given, object names will be returned up to the first occurrence of this character. This is most commonly used with the / character to allow bucket transversal in a manner similar to a filesystem, however any delimiter may be used. Use in conjunction with prefix to see object names past the first occurrence of the delimiter. (example: {{delimiter}}) |
marker | string | The "marker" for this request, which can be used to paginate through large buckets. Its value should be the value of the next_marker property returned with the last page. Listing bucket contents does not support arbitrary page access. See the next_marker property in the responses section for more details. (example: {{marker}}) |
page_size | integer | The number of items to return per page. |
prefix | string | Filters objects returned to only those whose name start with the given prefix. Commonly used in conjunction with delimiter to allow transversal of bucket contents in a manner similar to a filesystem. (example: {{prefix}}) |
SELECT examples
- list
Returns the contents of a bucket. The contents are paginated using a marker, that's the name of the last object on the previous page. Objects can also be filtered by prefix and delimiter. See Filtering and sorting for more information.
> 📘
>
> You can use an outside API, such as the Ceph Object Gateway S3 API for more options. OAuth scopes.
<br /> object_storage:read_only<br />
Learn more...
SELECT
name,
etag,
last_modified,
owner,
size
FROM linode.object_storage.bucket_contents
WHERE regionId = '{{ regionId }}' -- required
AND bucket = '{{ bucket }}' -- required
AND marker = '{{ marker }}'
AND delimiter = '{{ delimiter }}'
AND prefix = '{{ prefix }}'
AND page_size = '{{ page_size }}'
;