Interface ImageApi


  • @Consumes("application/json")
    public interface ImageApi
    • 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 image
        sourceDisk - 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.
      • 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 page
        listOptions - listing options
        Returns:
        a page of the list
      • 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 page
        listOptions - listing options
        Returns:
        a page of the list