
target.apidocs.com.google.api.services.compute.Compute.Disks.html Maven / Gradle / Ivy
Compute.Disks (Compute Engine API beta-rev20220312-1.32.1)
com.google.api.services.compute
Class Compute.Disks
- java.lang.Object
-
- com.google.api.services.compute.Compute.Disks
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
Compute.Disks.AddResourcePolicies
class
Compute.Disks.AggregatedList
class
Compute.Disks.CreateSnapshot
class
Compute.Disks.Delete
class
Compute.Disks.Get
class
Compute.Disks.GetIamPolicy
class
Compute.Disks.Insert
class
Compute.Disks.List
class
Compute.Disks.RemoveResourcePolicies
class
Compute.Disks.Resize
class
Compute.Disks.SetIamPolicy
class
Compute.Disks.SetLabels
class
Compute.Disks.TestIamPermissions
class
Compute.Disks.Update
-
Constructor Summary
Constructors
Constructor and Description
Disks()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Compute.Disks.AddResourcePolicies
addResourcePolicies(String project,
String zone,
String disk,
DisksAddResourcePoliciesRequest content)
Adds existing resource policies to a disk.
Compute.Disks.AggregatedList
aggregatedList(String project)
Retrieves an aggregated list of persistent disks.
Compute.Disks.CreateSnapshot
createSnapshot(String project,
String zone,
String disk,
Snapshot content)
Creates a snapshot of a specified persistent disk.
Compute.Disks.Delete
delete(String project,
String zone,
String disk)
Deletes the specified persistent disk.
Compute.Disks.Get
get(String project,
String zone,
String disk)
Returns a specified persistent disk.
Compute.Disks.GetIamPolicy
getIamPolicy(String project,
String zone,
String resource)
Gets the access control policy for a resource.
Compute.Disks.Insert
insert(String project,
String zone,
Disk content)
Creates a persistent disk in the specified project using the data in the request.
Compute.Disks.List
list(String project,
String zone)
Retrieves a list of persistent disks contained within the specified zone.
Compute.Disks.RemoveResourcePolicies
removeResourcePolicies(String project,
String zone,
String disk,
DisksRemoveResourcePoliciesRequest content)
Removes resource policies from a disk.
Compute.Disks.Resize
resize(String project,
String zone,
String disk,
DisksResizeRequest content)
Resizes the specified persistent disk.
Compute.Disks.SetIamPolicy
setIamPolicy(String project,
String zone,
String resource,
ZoneSetPolicyRequest content)
Sets the access control policy on the specified resource.
Compute.Disks.SetLabels
setLabels(String project,
String zone,
String resource,
ZoneSetLabelsRequest content)
Sets the labels on a disk.
Compute.Disks.TestIamPermissions
testIamPermissions(String project,
String zone,
String resource,
TestPermissionsRequest content)
Returns permissions that a caller has on the specified resource.
Compute.Disks.Update
update(String project,
String zone,
String disk,
Disk content)
Updates the specified disk with the data included in the request.
-
-
Method Detail
-
addResourcePolicies
public Compute.Disks.AddResourcePolicies addResourcePolicies(String project,
String zone,
String disk,
DisksAddResourcePoliciesRequest content)
throws IOException
Adds existing resource policies to a disk. You can only add one policy which will be applied to
this disk for scheduling snapshot creation.
Create a request for the method "disks.addResourcePolicies".
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 disk name for this request.
content
- the DisksAddResourcePoliciesRequest
- Returns:
- the request
- Throws:
IOException
-
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. For regular snapshot creation, consider using
snapshots.insert instead, as that method supports more features, such as creating snapshots in a
project different from the source disk project.
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 from a source (sourceImage, sourceSnapshot, or sourceDisk) 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
-
removeResourcePolicies
public Compute.Disks.RemoveResourcePolicies removeResourcePolicies(String project,
String zone,
String disk,
DisksRemoveResourcePoliciesRequest content)
throws IOException
Removes resource policies from a disk.
Create a request for the method "disks.removeResourcePolicies".
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 disk name for this request.
content
- the DisksRemoveResourcePoliciesRequest
- 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
-
testIamPermissions
public Compute.Disks.TestIamPermissions testIamPermissions(String project,
String zone,
String resource,
TestPermissionsRequest content)
throws IOException
Returns permissions that a caller has on the specified resource.
Create a request for the method "disks.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.
zone
- The name of the zone for this request.
resource
- Name or id of the resource for this request.
content
- the TestPermissionsRequest
- Returns:
- the request
- Throws:
IOException
-
update
public Compute.Disks.Update update(String project,
String zone,
String disk,
Disk content)
throws IOException
Updates the specified disk with the data included in the request. The update is performed only on
selected fields included as part of update-mask. Only the following fields can be modified:
user_license.
Create a request for the method "disks.update".
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 disk name for this request.
content
- the Disk
- Returns:
- the request
- Throws:
IOException
Copyright © 2011–2022 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy