Search in sources :

Example 1 with DeleteObjectRequest

use of software.amazon.awssdk.services.mediastoredata.model.DeleteObjectRequest in project aws-doc-sdk-examples by awsdocs.

the class DeleteObject method deleteMediaObject.

// snippet-start:[mediastore.java2.delete_object.main]
public static void deleteMediaObject(MediaStoreDataClient mediaStoreData, String completePath) {
    try {
        DeleteObjectRequest deleteObjectRequest = DeleteObjectRequest.builder().path(completePath).build();
        mediaStoreData.deleteObject(deleteObjectRequest);
    } catch (MediaStoreDataException e) {
        System.err.println(e.awsErrorDetails().errorMessage());
        System.exit(1);
    }
}
Also used : DeleteObjectRequest(software.amazon.awssdk.services.mediastoredata.model.DeleteObjectRequest) MediaStoreDataException(software.amazon.awssdk.services.mediastoredata.model.MediaStoreDataException)

Aggregations

DeleteObjectRequest (software.amazon.awssdk.services.mediastoredata.model.DeleteObjectRequest)1 MediaStoreDataException (software.amazon.awssdk.services.mediastoredata.model.MediaStoreDataException)1