Interface SnapshotApi


@Consumes("application/json") @Path("/snapshots") public interface SnapshotApi
Provides access to Volume Snapshots API.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String volumeId, CreateSnapshotOptions... options)
    Creates a new Snapshot.
    boolean
    delete(String snapshotId)
    Delete a Snapshot.
    get(String snapshotId)
    Return data about the given Snapshot.
    com.google.common.collect.FluentIterable<? extends Snapshot>
    Returns a summary list of Snapshots.
    com.google.common.collect.FluentIterable<? extends Snapshot>
    Returns a detailed list of Snapshots.
  • Method Details

    • list

      @Named("snapshot:list") @GET com.google.common.collect.FluentIterable<? extends Snapshot> list()
      Returns a summary list of Snapshots.
      Returns:
      The list of Snapshots
    • listInDetail

      @Named("snapshot:list") @GET @Path("/detail") com.google.common.collect.FluentIterable<? extends Snapshot> listInDetail()
      Returns a detailed list of Snapshots.
      Returns:
      The list of Snapshots
    • get

      @Named("snapshot:get") @GET @Path("/{id}") @Nullable Snapshot get(@PathParam("id") String snapshotId)
      Return data about the given Snapshot.
      Parameters:
      snapshotId - Id of the Snapshot
      Returns:
      Details of a specific Snapshot
    • create

      @Named("snapshot:create") @POST @Produces("application/json") Snapshot create(String volumeId, CreateSnapshotOptions... options)
      Creates a new Snapshot. The Volume status must be Available.
      Parameters:
      volumeId - The Volume Id from which to create the Snapshot
      options - See CreateSnapshotOptions
      Returns:
      The new Snapshot
    • delete

      @Named("snapshot:delete") @DELETE @Path("/{id}") boolean delete(@PathParam("id") String snapshotId)
      Delete a Snapshot.
      Parameters:
      snapshotId - Id of the Snapshot
      Returns:
      true if successful, false otherwise