Example usage for com.amazonaws.services.ec2.model DeleteSnapshotRequest setSnapshotId

List of usage examples for com.amazonaws.services.ec2.model DeleteSnapshotRequest setSnapshotId

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2.model DeleteSnapshotRequest setSnapshotId.

Prototype


public void setSnapshotId(String snapshotId) 

Source Link

Document

The ID of the EBS snapshot.

Usage

From source file:com.carrotgarden.maven.aws.ecc.CarrotElasticCompute.java

License:BSD License

/** unregister EBS snapshot; will fail if snapshot still in use */
public void snapshotDelete(final String snapshotId) throws Exception {

    final DeleteSnapshotRequest request = new DeleteSnapshotRequest();
    request.setSnapshotId(snapshotId);

    amazonClient.deleteSnapshot(request);

    logger.info("removed snapshotId = " + snapshotId);

}