Search in sources :

Example 1 with CreateContainerRequest

use of com.amazonaws.services.mediastore.model.CreateContainerRequest in project aws-doc-sdk-examples by awsdocs.

the class CreateContainer method createContainer.

public static Container createContainer(String name) {
    final AWSMediaStore mediastore = AWSMediaStoreClientBuilder.defaultClient();
    final CreateContainerRequest request = new CreateContainerRequest().withContainerName(name.trim());
    try {
        final CreateContainerResult result = mediastore.createContainer(request);
        return result.getContainer();
    } catch (AWSMediaStoreException e) {
        System.err.println(e.getErrorMessage());
    }
    return null;
}
Also used : CreateContainerRequest(com.amazonaws.services.mediastore.model.CreateContainerRequest) AWSMediaStore(com.amazonaws.services.mediastore.AWSMediaStore) AWSMediaStoreException(com.amazonaws.services.mediastore.model.AWSMediaStoreException) CreateContainerResult(com.amazonaws.services.mediastore.model.CreateContainerResult)

Aggregations

AWSMediaStore (com.amazonaws.services.mediastore.AWSMediaStore)1 AWSMediaStoreException (com.amazonaws.services.mediastore.model.AWSMediaStoreException)1 CreateContainerRequest (com.amazonaws.services.mediastore.model.CreateContainerRequest)1 CreateContainerResult (com.amazonaws.services.mediastore.model.CreateContainerResult)1