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

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







Compute.Disks (Compute Engine API alpha-rev20200526-1.30.9)












com.google.api.services.compute

Class Compute.Disks

  • Enclosing class:
    Compute


    public class Compute.Disks
    extends Object
    The "disks" collection of methods.
    • Constructor Detail

      • Disks

        public Disks()
    • Method Detail

      • aggregatedList

        public Compute.Disks.AggregatedList aggregatedList(String project)
                                                    throws IOException
        Retrieves an aggregated list of persistent disks. Create a request for the method "disks.aggregatedList". 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
      • createSnapshot

        public Compute.Disks.CreateSnapshot createSnapshot(String project,
                                                           String zone,
                                                           String disk,
                                                           Snapshot content)
                                                    throws IOException
        Creates a snapshot of a specified persistent disk. Create a request for the method "disks.createSnapshot". 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.
        zone - The name of the zone for this request.
        disk - Name of the persistent disk to snapshot.
        content - the Snapshot
        Returns:
        the request
        Throws:
        IOException
      • delete

        public Compute.Disks.Delete delete(String project,
                                           String zone,
                                           String disk)
                                    throws IOException
        Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. Create a request for the method "disks.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.
        zone - The name of the zone for this request.
        disk - Name of the persistent disk to delete.
        Returns:
        the request
        Throws:
        IOException
      • get

        public Compute.Disks.Get get(String project,
                                     String zone,
                                     String disk)
                              throws IOException
        Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request. Create a request for the method "disks.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.
        zone - The name of the zone for this request.
        disk - Name of the persistent disk to return.
        Returns:
        the request
        Throws:
        IOException
      • getIamPolicy

        public Compute.Disks.GetIamPolicy getIamPolicy(String project,
                                                       String zone,
                                                       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 "disks.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.
        zone - The name of the zone for this request.
        resource - Name or id of the resource for this request.
        Returns:
        the request
        Throws:
        IOException
      • insert

        public Compute.Disks.Insert insert(String project,
                                           String zone,
                                           Disk content)
                                    throws IOException
        Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. Create a request for the method "disks.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.
        zone - The name of the zone for this request.
        content - the Disk
        Returns:
        the request
        Throws:
        IOException
      • list

        public Compute.Disks.List list(String project,
                                       String zone)
                                throws IOException
        Retrieves a list of persistent disks contained within the specified zone. Create a request for the method "disks.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.
        zone - The name of the zone for this request.
        Returns:
        the request
        Throws:
        IOException
      • resize

        public Compute.Disks.Resize resize(String project,
                                           String zone,
                                           String disk,
                                           DisksResizeRequest content)
                                    throws IOException
        Resizes the specified persistent disk. You can only increase the size of the disk. Create a request for the method "disks.resize". 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.
        zone - The name of the zone for this request.
        disk - The name of the persistent disk.
        content - the DisksResizeRequest
        Returns:
        the request
        Throws:
        IOException
      • setIamPolicy

        public Compute.Disks.SetIamPolicy setIamPolicy(String project,
                                                       String zone,
                                                       String resource,
                                                       ZoneSetPolicyRequest content)
                                                throws IOException
        Sets the access control policy on the specified resource. Replaces any existing policy. Create a request for the method "disks.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.
        zone - The name of the zone for this request.
        resource - Name or id of the resource for this request.
        content - the ZoneSetPolicyRequest
        Returns:
        the request
        Throws:
        IOException
      • setLabels

        public Compute.Disks.SetLabels setLabels(String project,
                                                 String zone,
                                                 String resource,
                                                 ZoneSetLabelsRequest content)
                                          throws IOException
        Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. Create a request for the method "disks.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.
        zone - The name of the zone for this request.
        resource - Name or id of the resource for this request.
        content - the ZoneSetLabelsRequest
        Returns:
        the request
        Throws:
        IOException

Copyright © 2011–2020 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy