Interface ImageApi
-
@Consumes("application/json") public interface ImageApi
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ImageApi.ImagePages
static class
ImageApi.ImagePagesInProject
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Operation
create(ImageCreationOptions options)
Operation
createFromDisk(String image, String sourceDisk)
Creates an image resource in the specified project from the provided persistent disk.Operation
delete(String image)
Deletes an image by name and returns the operation in progress, or null if not found.Operation
deprecate(String image, DeprecateOptions deprecated)
Sets the deprecation status of an image.Image
get(String image)
Returns an image by name or null if not found.Image
get(URI selfLink)
Returns an image by self-link or null if not found.Iterator<ListPage<Image>>
list()
Iterator<ListPage<Image>>
list(ListOptions options)
Iterator<ListPage<Image>>
listInProject(String projectName)
Iterator<ListPage<Image>>
listInProject(String projectName, ListOptions options)
ListPage<Image>
listPage(String pageToken, ListOptions listOptions)
Retrieves the list of image resources available to the specified project.ListPage<Image>
listPageInProject(String projectName, String pageToken, ListOptions listOptions)
Retrieves the list of image resources available to the specified project.
-
-
-
Method Detail
-
get
@Named("Images:get") @GET @Nullable Image get(URI selfLink)
Returns an image by self-link or null if not found.
-
get
@Named("Images:get\u00a0") @GET @Path("/global/images/{image}") @Nullable Image get(@PathParam("image") String image)
Returns an image by name or null if not found.
-
delete
@Named("Images:delete") @DELETE @Path("/global/images/{image}") @Nullable Operation delete(@PathParam("image") String image)
Deletes an image by name and returns the operation in progress, or null if not found.
-
createFromDisk
@Named("Images:insert") @POST @Path("/global/images") @Produces("application/json") Operation createFromDisk(String image, String sourceDisk)
Creates an image resource in the specified project from the provided persistent disk.- Parameters:
image
- the name of the created imagesourceDisk
- fully qualified URL for the persistent disk to create the image from- Returns:
- an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
-
create
@Named("Images:insert") @POST @Path("/global/images") @Produces("application/json") Operation create(ImageCreationOptions options)
-
deprecate
@Named("Images:deprecate") @POST @Path("/global/images/{image}/deprecate") Operation deprecate(@PathParam("image") String image, DeprecateOptions deprecated)
Sets the deprecation status of an image. If no message body is given, clears the deprecation status instead.- Parameters:
image
- The Image resource to deprecate.deprecated
- the deprecation status to return- Returns:
- an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
-
listPage
@Named("Images:list") @GET @Path("/global/images") ListPage<Image> listPage(@Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions)
Retrieves the list of image resources available to the specified project. By default the list as a maximum size of 100, if no options are provided or ListOptions#getMaxResults() has not been set.- Parameters:
pageToken
- marks the beginning of the next list pagelistOptions
- listing options- Returns:
- a page of the list
-
list
@Named("Images:list") @GET @Path("/global/images") Iterator<ListPage<Image>> list()
- See Also:
listPage(String, ListOptions)
-
list
@Named("Images:list") @GET @Path("/global/images") Iterator<ListPage<Image>> list(ListOptions options)
- See Also:
listPage(String, ListOptions)
-
listPageInProject
@Named("Images:list") @GET @Path("/projects/{project}/global/images") ListPage<Image> listPageInProject(@PathParam("project") String projectName, @Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions)
Retrieves the list of image resources available to the specified project. By default the list as a maximum size of 100, if no options are provided or ListOptions#getMaxResults() has not been set.- Parameters:
pageToken
- marks the beginning of the next list pagelistOptions
- listing options- Returns:
- a page of the list
-
listInProject
@Named("Images:list") @GET @Path("/projects/{project}/global/images") Iterator<ListPage<Image>> listInProject(@PathParam("project") String projectName)
-
listInProject
@Named("Images:list") @GET @Path("/projects/{project}/global/images") Iterator<ListPage<Image>> listInProject(@PathParam("project") String projectName, ListOptions options)
-
-