Search in sources :

Example 1 with DescribeContainerResult

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

the class PutObject method getContainerEndpoint.

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

Example 2 with DescribeContainerResult

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

the class ListItems method getContainerEndpoint.

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

Aggregations

AWSMediaStore (com.amazonaws.services.mediastore.AWSMediaStore)2 AWSMediaStoreException (com.amazonaws.services.mediastore.model.AWSMediaStoreException)2 DescribeContainerRequest (com.amazonaws.services.mediastore.model.DescribeContainerRequest)2 DescribeContainerResult (com.amazonaws.services.mediastore.model.DescribeContainerResult)2