All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.compute.Compute.Snapshots.html Maven / Gradle / Ivy

The newest version!






Compute.Snapshots (Compute Engine API v1-rev20250320-2.0.0)












com.google.api.services.compute

Class Compute.Snapshots

  • Enclosing class:
    Compute


    public class Compute.Snapshots
    extends Object
    The "snapshots" collection of methods.
    • Constructor Detail

      • Snapshots

        public Snapshots()
    • Method Detail

      • delete

        public Compute.Snapshots.Delete delete(String project,
                                               String snapshot)
                                        throws IOException
        Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots. Create a request for the method "snapshots.delete". This request holds the parameters needed by the compute server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID for this request.
        snapshot - Name of the Snapshot resource to delete.
        Returns:
        the request
        Throws:
        IOException
      • get

        public Compute.Snapshots.Get get(String project,
                                         String snapshot)
                                  throws IOException
        Returns the specified Snapshot resource. Create a request for the method "snapshots.get". This request holds the parameters needed by the compute server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID for this request.
        snapshot - Name of the Snapshot resource to return.
        Returns:
        the request
        Throws:
        IOException
      • getIamPolicy

        public Compute.Snapshots.GetIamPolicy getIamPolicy(String project,
                                                           String resource)
                                                    throws IOException
        Gets the access control policy for a resource. May be empty if no such policy or resource exists. Create a request for the method "snapshots.getIamPolicy". This request holds the parameters needed by the compute server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID for this request.
        resource - Name or id of the resource for this request.
        Returns:
        the request
        Throws:
        IOException
      • insert

        public Compute.Snapshots.Insert insert(String project,
                                               Snapshot content)
                                        throws IOException
        Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of disks.createSnapshot, as this method supports more features, such as creating snapshots in a project different from the source disk project. Create a request for the method "snapshots.insert". This request holds the parameters needed by the compute server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID for this request.
        content - the Snapshot
        Returns:
        the request
        Throws:
        IOException
      • list

        public Compute.Snapshots.List list(String project)
                                    throws IOException
        Retrieves the list of Snapshot resources contained within the specified project. Create a request for the method "snapshots.list". This request holds the parameters needed by the compute server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID for this request.
        Returns:
        the request
        Throws:
        IOException
      • setIamPolicy

        public Compute.Snapshots.SetIamPolicy setIamPolicy(String project,
                                                           String resource,
                                                           GlobalSetPolicyRequest content)
                                                    throws IOException
        Sets the access control policy on the specified resource. Replaces any existing policy. Create a request for the method "snapshots.setIamPolicy". This request holds the parameters needed by the compute server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID for this request.
        resource - Name or id of the resource for this request.
        content - the GlobalSetPolicyRequest
        Returns:
        the request
        Throws:
        IOException
      • setLabels

        public Compute.Snapshots.SetLabels setLabels(String project,
                                                     String resource,
                                                     GlobalSetLabelsRequest content)
                                              throws IOException
        Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. Create a request for the method "snapshots.setLabels". This request holds the parameters needed by the compute server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID for this request.
        resource - Name or id of the resource for this request.
        content - the GlobalSetLabelsRequest
        Returns:
        the request
        Throws:
        IOException
      • testIamPermissions

        public Compute.Snapshots.TestIamPermissions testIamPermissions(String project,
                                                                       String resource,
                                                                       TestPermissionsRequest content)
                                                                throws IOException
        Returns permissions that a caller has on the specified resource. Create a request for the method "snapshots.testIamPermissions". This request holds the parameters needed by the compute server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        project - Project ID for this request.
        resource - Name or id of the resource for this request.
        content - the TestPermissionsRequest
        Returns:
        the request
        Throws:
        IOException

Copyright © 2011–2025 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy