Interface VolumeApi


  • @Consumes("application/json")
    @Path("/volumes")
    public interface VolumeApi
    Provides access to the Volume API. This API strictly handles creating and managing Volumes. To attach a Volume to a Server you need to use the
    See Also:
    VolumeAttachmentApi
    • Method Detail

      • list

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

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

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

        @Named("volume:create")
        @POST
        @Produces("application/json")
        Volume create​(int sizeGB,
                      CreateVolumeOptions... options)
        Creates a new Volume
        Parameters:
        volumeId - Id of the Volume
        options - See CreateVolumeOptions
        Returns:
        The new Volume
      • delete

        @Named("volume:delete")
        @DELETE
        @Path("/{id}")
        boolean delete​(@PathParam("id")
                       String volumeId)
        Delete a Volume. The Volume status must be Available or Error.
        Parameters:
        volumeId - Id of the Volume
        Returns:
        true if successful, false otherwise