SDK for PHP 3.x

Client: Aws\MediaStoreData\MediaStoreDataClient
Service ID: mediastore-data
Version: 2017-09-01

This page describes the parameters and results for the operations of the AWS Elemental MediaStore Data Plane (2017-09-01), and shows how to use the Aws\MediaStoreData\MediaStoreDataClient object to call the described operations. This documentation is specific to the 2017-09-01 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

DeleteObject ( array $params = [] )
Deletes an object at the specified path.
DescribeObject ( array $params = [] )
Gets the headers for an object at the specified path.
GetObject ( array $params = [] )
Downloads the object at the specified path.
ListItems ( array $params = [] )
Provides a list of metadata entries about folders and objects in the specified folder.
PutObject ( array $params = [] )
Uploads an object to the specified path.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListItems

Operations

DeleteObject

$result = $client->deleteObject([/* ... */]);
$promise = $client->deleteObjectAsync([/* ... */]);

Deletes an object at the specified path.

Parameter Syntax

$result = $client->deleteObject([
    'Path' => '<string>', // REQUIRED
]);

Parameter Details

Members
Path
Required: Yes
Type: string

The path (including the file name) where the object is stored in the container. Format: <folder name>/<folder name>/<file name>

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ContainerNotFoundException:

The specified container was not found for the specified account.

ObjectNotFoundException:

Could not perform an operation on an object that does not exist.

InternalServerError:

The service is temporarily unavailable.

DescribeObject

$result = $client->describeObject([/* ... */]);
$promise = $client->describeObjectAsync([/* ... */]);

Gets the headers for an object at the specified path.

Parameter Syntax

$result = $client->describeObject([
    'Path' => '<string>', // REQUIRED
]);

Parameter Details

Members
Path
Required: Yes
Type: string

The path (including the file name) where the object is stored in the container. Format: <folder name>/<folder name>/<file name>

Result Syntax

[
    'CacheControl' => '<string>',
    'ContentLength' => <integer>,
    'ContentType' => '<string>',
    'ETag' => '<string>',
    'LastModified' => <DateTime>,
]

Result Details

Members
CacheControl
Type: string

An 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.

ContentLength
Type: long (int|float)

The length of the object in bytes.

ContentType
Type: string

The content type of the object.

ETag
Type: string

The ETag that represents a unique instance of the object.

LastModified
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the object was last modified.

Errors

ContainerNotFoundException:

The specified container was not found for the specified account.

ObjectNotFoundException:

Could not perform an operation on an object that does not exist.

InternalServerError:

The service is temporarily unavailable.

GetObject

$result = $client->getObject([/* ... */]);
$promise = $client->getObjectAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getObject([
    'Path' => '<string>', // REQUIRED
    'Range' => '<string>',
]);

Parameter Details

Members
Path
Required: Yes
Type: string

The 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.

Range
Type: string

The 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.

Result Syntax

[
    'Body' => <string || resource || Psr\Http\Message\StreamInterface>,
    'CacheControl' => '<string>',
    'ContentLength' => <integer>,
    'ContentRange' => '<string>',
    'ContentType' => '<string>',
    'ETag' => '<string>',
    'LastModified' => <DateTime>,
    'StatusCode' => <integer>,
]

Result Details

Members
Body
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The bytes of the object.

CacheControl
Type: string

An optional CacheControl header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

Headers with a custom user-defined value are also accepted.

ContentLength
Type: long (int|float)

The length of the object in bytes.

ContentRange
Type: string

The range of bytes to retrieve.

ContentType
Type: string

The content type of the object.

ETag
Type: string

The ETag that represents a unique instance of the object.

LastModified
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the object was last modified.

StatusCode
Required: Yes
Type: int

The HTML status code of the request. Status codes ranging from 200 to 299 indicate success. All other status codes indicate the type of error that occurred.

Errors

ContainerNotFoundException:

The specified container was not found for the specified account.

ObjectNotFoundException:

Could not perform an operation on an object that does not exist.

RequestedRangeNotSatisfiableException:

The requested content range is not valid.

InternalServerError:

The service is temporarily unavailable.

ListItems

$result = $client->listItems([/* ... */]);
$promise = $client->listItemsAsync([/* ... */]);

Provides a list of metadata entries about folders and objects in the specified folder.

Parameter Syntax

$result = $client->listItems([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'Path' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of results to return per API request. For example, you submit a ListItems request with MaxResults set at 500. Although 2,000 items match your request, the service returns no more than the first 500 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value.

If MaxResults is not included in the request, the service defaults to pagination with a maximum of 1,000 results per page.

NextToken
Type: string

The token that identifies which batch of results that you want to see. For example, you submit a ListItems request with MaxResults set at 500. The service returns the first batch of results (up to 500) and a NextToken value. To see the next batch of results, you can submit the ListItems request a second time and specify the NextToken value.

Tokens expire after 15 minutes.

Path
Type: string

The path in the container from which to retrieve items. Format: <folder name>/<folder name>/<file name>

Result Syntax

[
    'Items' => [
        [
            'ContentLength' => <integer>,
            'ContentType' => '<string>',
            'ETag' => '<string>',
            'LastModified' => <DateTime>,
            'Name' => '<string>',
            'Type' => 'OBJECT|FOLDER',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
Items
Type: Array of Item structures

The metadata entries for the folders and objects at the requested path.

NextToken
Type: string

The token that can be used in a request to view the next set of results. For example, you submit a ListItems request that matches 2,000 items with MaxResults set at 500. The service returns the first batch of results (up to 500) and a NextToken value that can be used to fetch the next batch of results.

Errors

ContainerNotFoundException:

The specified container was not found for the specified account.

InternalServerError:

The service is temporarily unavailable.

PutObject

$result = $client->putObject([/* ... */]);
$promise = $client->putObjectAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->putObject([
    'Body' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
    'CacheControl' => '<string>',
    'ContentType' => '<string>',
    'Path' => '<string>', // REQUIRED
    'StorageClass' => 'TEMPORAL',
    'UploadAvailability' => 'STANDARD|STREAMING',
]);

Parameter Details

Members
Body
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The bytes to be stored.

CacheControl
Type: string

An 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.

ContentType
Type: string

The content type of the object.

Path
Required: Yes
Type: string

The 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.

StorageClass
Type: string

Indicates 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.

UploadAvailability
Type: string

Indicates 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.

Result Syntax

[
    'ContentSHA256' => '<string>',
    'ETag' => '<string>',
    'StorageClass' => 'TEMPORAL',
]

Result Details

Members
ContentSHA256
Type: string

The SHA256 digest of the object that is persisted.

ETag
Type: string

Unique identifier of the object in the container.

StorageClass
Type: string

The storage class where the object was persisted. The class should be “Temporal”.

Errors

ContainerNotFoundException:

The specified container was not found for the specified account.

InternalServerError:

The service is temporarily unavailable.

Shapes

ContainerNotFoundException

Description

The specified container was not found for the specified account.

Members
Message
Type: string

InternalServerError

Description

The service is temporarily unavailable.

Members
Message
Type: string

Item

Description

A metadata entry for a folder or object.

Members
ContentLength
Type: long (int|float)

The length of the item in bytes.

ContentType
Type: string

The content type of the item.

ETag
Type: string

The ETag that represents a unique instance of the item.

LastModified
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the item was last modified.

Name
Type: string

The name of the item.

Type
Type: string

The item type (folder or object).

ObjectNotFoundException

Description

Could not perform an operation on an object that does not exist.

Members
Message
Type: string

RequestedRangeNotSatisfiableException

Description

The requested content range is not valid.

Members
Message
Type: string