Interface SnapshotApi


public interface SnapshotApi
Provides synchronous access to CloudStack Snapshot features.

  • Method Details

    • createSnapshot

      @Named("createSnapshot") @GET @Consumes("application/json") AsyncCreateResponse createSnapshot(@QueryParam("volumeid") String volumeId, CreateSnapshotOptions... options)
      Creates an instant snapshot of a volume.
      Parameters:
      volumeId - The ID of the disk volume
      options - optional arguments
      Returns:
      an asynchronous job structure
    • listSnapshots

      @Named("listSnapshots") @GET @Consumes("application/json") Set<Snapshot> listSnapshots(ListSnapshotsOptions... options)
      Lists all available snapshots for the account, matching the query described by the options.
      Parameters:
      options - optional arguments
      Returns:
      the snapshots matching the query
    • getSnapshot

      @Named("listSnapshots") @GET @Consumes("application/json") Snapshot getSnapshot(@QueryParam("id") String id)
      Gets a snapshot by its ID.
      Parameters:
      id - the snapshot ID
      Returns:
      the snapshot with the requested ID
    • deleteSnapshot

      @Named("deleteSnapshot") @GET @Consumes("application/json") void deleteSnapshot(@QueryParam("id") String id)
      Deletes a snapshot of a disk volume.
      Parameters:
      id - The ID of the snapshot
    • createSnapshotPolicy

      @Named("createSnapshotPolicy") @GET @Consumes("application/json") SnapshotPolicy createSnapshotPolicy(SnapshotPolicySchedule schedule, @QueryParam("maxsnaps") String numberToRetain, @QueryParam("timezone") String timezone, @QueryParam("volumeid") String volumeId)
      Creates a snapshot policy for the account.
      Parameters:
      schedule - how to schedule snapshots
      numberToRetain - maximum number of snapshots to retain
      timezone - Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format.
      volumeId - the ID of the disk volume
      Returns:
      the newly-created snapshot policy
    • deleteSnapshotPolicy

      @Named("deleteSnapshotPolicies") @GET @Consumes("application/json") void deleteSnapshotPolicy(@QueryParam("id") String id)
      Deletes a snapshot policy for the account.
      Parameters:
      id - The ID of the snapshot policy
    • deleteSnapshotPolicies

      @Named("deleteSnapshotPolicies") @GET @Consumes("application/json") void deleteSnapshotPolicies(Iterable<String> id)
      Deletes snapshot policies for the account.
      Parameters:
      id - IDs of snapshot policies
    • listSnapshotPolicies

      @Named("listSnapshotPolicies") @GET @Consumes("application/json") Set<SnapshotPolicy> listSnapshotPolicies(@QueryParam("volumeid") String volumeId, ListSnapshotPoliciesOptions... options)
      Lists snapshot policies.
      Parameters:
      volumeId - the ID of the disk volume
      options - optional arguments
      Returns:
      the snapshot policies matching the query