Example usage for com.amazonaws.services.ec2 AmazonEC2 deleteSnapshot

List of usage examples for com.amazonaws.services.ec2 AmazonEC2 deleteSnapshot

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2 AmazonEC2 deleteSnapshot.

Prototype

DeleteSnapshotResult deleteSnapshot(DeleteSnapshotRequest deleteSnapshotRequest);

Source Link

Document

Deletes the specified snapshot.

Usage

From source file:com.netflix.simianarmy.client.aws.AWSClient.java

License:Apache License

/** {@inheritDoc} */
@Override/*from   www  .j a v  a2s. c  om*/
public void deleteSnapshot(String snapshotId) {
    Validate.notEmpty(snapshotId);
    LOGGER.info(String.format("Deleting snapshot %s in region %s.", snapshotId, region));
    AmazonEC2 ec2Client = ec2Client();
    DeleteSnapshotRequest request = new DeleteSnapshotRequest().withSnapshotId(snapshotId);
    ec2Client.deleteSnapshot(request);
}