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);
}
}
Aggregations