Skip to main content

objects

Creates, updates, deletes, gets or lists an objects resource.

Overview

Nameobjects
TypeResource
Idaws.mediastore_data.objects

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
cache_controlstringAn optional CacheControl header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP at https:​//www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9. Headers with a custom user-defined value are also accepted.
content_lengthinteger (int64)The length of the object in bytes.
content_typestringThe content type of the object. (pattern: <code>^[\w-/.+]{1,255}$</code>)
e_tagstringThe ETag that represents a unique instance of the object. (pattern: <code>[0-9A-Fa-f]+</code>)
last_modifiedstring (date-time)The date and time that the object was last modified.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_objectselectpath, regionGets the headers for an object at the specified path.
put_objectreplacepath, regionContent-Type, Cache-Control, x-amz-storage-class, x-amz-upload-availabilityUploads an object to the specified path. Object sizes are limited to 25 MB for standard upload availability and 10 MB for streaming upload availability.
delete_objectdeletepath, regionDeletes an object at the specified path.
get_objectexecpath, regionRangeDownloads the object at the specified path. If the object’s upload availability is set to streaming, AWS Elemental MediaStore downloads the object even if it’s still uploading the object.

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.

NameDatatypeDescription
pathstringThe path (including the file name) where the object is stored in the container. Format: <folder name>/<folder name>/<file name> For example, to upload the file mlaw.avi to the folder path premium\canada in the container movies, enter the path premium/canada/mlaw.avi. Do not include the container name in this path. If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existing premium/usa subfolder. If you specify premium/canada, the service creates a canada subfolder in the premium folder. You then have two subfolders, usa and canada, in the premium folder. There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore. For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.
regionstringAWS region (default: us-east-1)
Cache-ControlstringAn optional CacheControl header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP at https:​//www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9. Headers with a custom user-defined value are also accepted.
Content-TypestringThe content type of the object.
RangestringThe range bytes of an object to retrieve. For more information about the Range header, see http:​//www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. AWS Elemental MediaStore ignores this header for partially uploaded objects that have streaming upload availability.
x-amz-storage-classstringIndicates the storage class of a Put request. Defaults to high-performance temporal storage class, and objects are persisted into durable storage shortly after being received.
x-amz-upload-availabilitystringIndicates the availability of an object while it is still uploading. If the value is set to streaming, the object is available for downloading after some initial buffering but before the object is uploaded completely. If the value is set to standard, the object is available for downloading only when it is uploaded completely. The default value for this header is standard. To use this header, you must also set the HTTP Transfer-Encoding header to chunked.

SELECT examples

Gets the headers for an object at the specified path.

SELECT
cache_control,
content_length,
content_type,
e_tag,
last_modified
FROM aws.mediastore_data.objects
WHERE path = '{{ path }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Uploads an object to the specified path. Object sizes are limited to 25 MB for standard upload availability and 10 MB for streaming upload availability.

REPLACE aws.mediastore_data.objects
SET
Body = '{{ Body }}'
WHERE
path = '{{ path }}' --required
AND region = '{{ region }}' --required
AND `Content-Type` = '{{ Content-Type}}'
AND `Cache-Control` = '{{ Cache-Control}}'
AND `x-amz-storage-class` = '{{ x-amz-storage-class}}'
AND `x-amz-upload-availability` = '{{ x-amz-upload-availability}}'
RETURNING
content_sha256,
e_tag,
storage_class;

DELETE examples

Deletes an object at the specified path.

DELETE FROM aws.mediastore_data.objects
WHERE path = '{{ path }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Downloads the object at the specified path. If the object’s upload availability is set to streaming, AWS Elemental MediaStore downloads the object even if it’s still uploading the object.

EXEC aws.mediastore_data.objects.get_object
@path='{{ path }}' --required,
@region='{{ region }}' --required,
@Range='{{ Range }}'
;