Disks class final
The Disks API.
- Implementers
Constructors
- Disks({required Client client, Uri? endPoint, String? gcclVersion})
-
Creates a
Disksusingclientfor transport. - Disks.fromApiKey([String? apiKey])
-
Creates a
Disksthat does authentication through an API key.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addResourcePolicies(
AddResourcePoliciesDiskRequest request) → Future< Operation> - Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
-
aggregatedList(
AggregatedListDisksRequest request) → Future< DiskAggregatedList> - Retrieves an aggregated list of persistent disks.
-
bulkInsert(
BulkInsertDiskRequest request) → Future< Operation> - Bulk create a set of disks.
-
bulkSetLabels(
BulkSetLabelsDiskRequest request) → Future< Operation> - Sets the labels on many disks at once. To learn more about labels, read theLabeling Resources documentation.
-
close(
) → void - Closes the client and cleans up any resources associated with it.
-
createSnapshot(
CreateSnapshotDiskRequest request) → Future< Operation> - 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.
-
delete(
DeleteDiskRequest request) → Future< Operation> - 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 separatelydelete snapshots.
-
get(
GetDiskRequest request) → Future< Disk> - Returns the specified persistent disk.
-
getIamPolicy(
GetIamPolicyDiskRequest request) → Future< Policy> - Gets the access control policy for a resource. May be empty if no such policy or resource exists.
-
insert(
InsertDiskRequest request) → Future< Operation> - Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, orsourceDisk) 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.
-
list(
ListDisksRequest request) → Future< DiskList> - Retrieves a list of persistent disks contained within the specified zone.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeResourcePolicies(
RemoveResourcePoliciesDiskRequest request) → Future< Operation> - Removes resource policies from a disk.
-
resize(
ResizeDiskRequest request) → Future< Operation> - Resizes the specified persistent disk. You can only increase the size of the disk.
-
setIamPolicy(
SetIamPolicyDiskRequest request) → Future< Policy> - Sets the access control policy on the specified resource. Replaces any existing policy.
-
setLabels(
SetLabelsDiskRequest request) → Future< Operation> - Sets the labels on a disk. To learn more about labels, read theLabeling Resources documentation.
-
startAsyncReplication(
StartAsyncReplicationDiskRequest request) → Future< Operation> - Starts asynchronous replication. Must be invoked on the primary disk.
-
stopAsyncReplication(
StopAsyncReplicationDiskRequest request) → Future< Operation> - Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.
-
stopGroupAsyncReplication(
StopGroupAsyncReplicationDiskRequest request) → Future< Operation> - Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.
-
testIamPermissions(
TestIamPermissionsDiskRequest request) → Future< TestPermissionsResponse> - Returns permissions that a caller has on the specified resource.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
UpdateDiskRequest request) → Future< Operation> - 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.
-
updateKmsKey(
UpdateKmsKeyDiskRequest request) → Future< Operation> - Rotates the customer-managed encryption key to the latest version for the specified persistent disk.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited