@Path(value="/disks")
@Consumes(value="application/json")
public interface DiskApi
Modifier and Type | Interface and Description |
---|---|
static class |
DiskApi.DiskPages |
Modifier and Type | Method and Description |
---|---|
Operation |
create(String diskName,
DiskCreationOptions options)
Creates a persistent disk resource, in the specified project, specifying the size of the disk and other options.
|
Operation |
create(String diskName,
String sourceImage,
DiskCreationOptions options)
Creates a persistent disk resource, in the specified project, specifying the size of the disk and other options.
|
Operation |
createSnapshot(String diskName,
String snapshotName)
Create a snapshot of a given disk in a zone.
|
Operation |
createSnapshot(String diskName,
String snapshotName,
String description) |
Operation |
delete(String disk)
Deletes a persistent disk by name and returns the operation in progress, or null if not found.
|
Disk |
get(String disk)
Returns a persistent disk by name or null if not found.
|
Iterator<ListPage<Disk>> |
list() |
Iterator<ListPage<Disk>> |
list(ListOptions options) |
ListPage<Disk> |
listPage(String pageToken,
ListOptions listOptions)
Retrieves the list of persistent disk resources available to the specified project.
|
@Named(value="Disks:get") @GET @Path(value="/{disk}") @Nullable Disk get(@PathParam(value="disk") String disk)
@Named(value="Disks:insert") @POST @Produces(value="application/json") Operation create(String diskName, DiskCreationOptions options)
diskName
- the name of disk.sizeGb
- the size of the diskoptions
- the options of the disk to create.@Named(value="Disks:insert") @POST @Produces(value="application/json") Operation create(String diskName, @QueryParam(value="sourceImage") String sourceImage, DiskCreationOptions options)
diskName
- the name of disk.sourceImage
- Fully-qualified URL of the source image to apply to the disk.options
- the options of the disk to create.@Named(value="Disks:delete") @DELETE @Path(value="/{disk}") @Nullable Operation delete(@PathParam(value="disk") String disk)
@Named(value="Disks:createSnapshot") @POST @Path(value="/{disk}/createSnapshot") Operation createSnapshot(@PathParam(value="disk") String diskName, String snapshotName)
diskName
- the name of the disk.snapshotName
- the name for the snapshot to be created.@Named(value="Disks:createSnapshot") @POST @Path(value="/{disk}/createSnapshot") Operation createSnapshot(@PathParam(value="disk") String diskName, String snapshotName, String description)
createSnapshot(String, String)
@Named(value="Disks:list") @GET ListPage<Disk> listPage(@Nullable@QueryParam(value="pageToken") String pageToken, ListOptions listOptions)
pageToken
- marks the beginning of the next list pagelistOptions
- listing options@Named(value="Disks:list") @GET Iterator<ListPage<Disk>> list()
listPage(String, ListOptions)
@Named(value="Disks:list") @GET Iterator<ListPage<Disk>> list(ListOptions options)
listPage(String, ListOptions)
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.