use of com.amazonaws.services.mediastore.AWSMediaStore 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;
}
use of com.amazonaws.services.mediastore.AWSMediaStore 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;
}
use of com.amazonaws.services.mediastore.AWSMediaStore 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;
}
use of com.amazonaws.services.mediastore.AWSMediaStore in project aws-doc-sdk-examples by awsdocs.
the class ListContainers method main.
public static void main(String[] args) {
final AWSMediaStore mediastore = AWSMediaStoreClientBuilder.defaultClient();
final ListContainersResult result = mediastore.listContainers(new ListContainersRequest());
final List<Container> containers = result.getContainers();
System.out.println("Your AWS Elemental MediaStore containers are:");
for (Container b : containers) {
System.out.println("* " + b.getName());
}
}
Aggregations