Compute Engine v1 API - Class Disks.DisksBase (3.2.0)

[BindServiceMethod(typeof(Disks), "BindService")]
public abstract class Disks.DisksBase

Reference documentation and code samples for the Compute Engine v1 API class Disks.DisksBase.

Base class for server-side implementations of Disks

Inheritance

object > Disks.DisksBase

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Methods

AddResourcePolicies(AddResourcePoliciesDiskRequest, ServerCallContext)

public virtual Task<Operation> AddResourcePolicies(AddResourcePoliciesDiskRequest request, ServerCallContext context)

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Parameters
Name Description
request AddResourcePoliciesDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

AggregatedList(AggregatedListDisksRequest, ServerCallContext)

public virtual Task<DiskAggregatedList> AggregatedList(AggregatedListDisksRequest request, ServerCallContext context)

Retrieves an aggregated list of persistent disks. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListDisksRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskDiskAggregatedList

The response to send back to the client (wrapped by a task).

BulkInsert(BulkInsertDiskRequest, ServerCallContext)

public virtual Task<Operation> BulkInsert(BulkInsertDiskRequest request, ServerCallContext context)

Bulk create a set of disks.

Parameters
Name Description
request BulkInsertDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

CreateSnapshot(CreateSnapshotDiskRequest, ServerCallContext)

public virtual Task<Operation> CreateSnapshot(CreateSnapshotDiskRequest request, ServerCallContext context)

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.

Parameters
Name Description
request CreateSnapshotDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

Delete(DeleteDiskRequest, ServerCallContext)

public virtual Task<Operation> Delete(DeleteDiskRequest request, ServerCallContext context)

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.

Parameters
Name Description
request DeleteDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

Get(GetDiskRequest, ServerCallContext)

public virtual Task<Disk> Get(GetDiskRequest request, ServerCallContext context)

Returns the specified persistent disk.

Parameters
Name Description
request GetDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskDisk

The response to send back to the client (wrapped by a task).

GetIamPolicy(GetIamPolicyDiskRequest, ServerCallContext)

public virtual Task<Policy> GetIamPolicy(GetIamPolicyDiskRequest request, ServerCallContext context)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
Name Description
request GetIamPolicyDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskPolicy

The response to send back to the client (wrapped by a task).

Insert(InsertDiskRequest, ServerCallContext)

public virtual Task<Operation> Insert(InsertDiskRequest request, ServerCallContext context)

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.

Parameters
Name Description
request InsertDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

List(ListDisksRequest, ServerCallContext)

public virtual Task<DiskList> List(ListDisksRequest request, ServerCallContext context)

Retrieves a list of persistent disks contained within the specified zone.

Parameters
Name Description
request ListDisksRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskDiskList

The response to send back to the client (wrapped by a task).

RemoveResourcePolicies(RemoveResourcePoliciesDiskRequest, ServerCallContext)

public virtual Task<Operation> RemoveResourcePolicies(RemoveResourcePoliciesDiskRequest request, ServerCallContext context)

Removes resource policies from a disk.

Parameters
Name Description
request RemoveResourcePoliciesDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

Resize(ResizeDiskRequest, ServerCallContext)

public virtual Task<Operation> Resize(ResizeDiskRequest request, ServerCallContext context)

Resizes the specified persistent disk. You can only increase the size of the disk.

Parameters
Name Description
request ResizeDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

SetIamPolicy(SetIamPolicyDiskRequest, ServerCallContext)

public virtual Task<Policy> SetIamPolicy(SetIamPolicyDiskRequest request, ServerCallContext context)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
Name Description
request SetIamPolicyDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskPolicy

The response to send back to the client (wrapped by a task).

SetLabels(SetLabelsDiskRequest, ServerCallContext)

public virtual Task<Operation> SetLabels(SetLabelsDiskRequest request, ServerCallContext context)

Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.

Parameters
Name Description
request SetLabelsDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

StartAsyncReplication(StartAsyncReplicationDiskRequest, ServerCallContext)

public virtual Task<Operation> StartAsyncReplication(StartAsyncReplicationDiskRequest request, ServerCallContext context)

Starts asynchronous replication. Must be invoked on the primary disk.

Parameters
Name Description
request StartAsyncReplicationDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

StopAsyncReplication(StopAsyncReplicationDiskRequest, ServerCallContext)

public virtual Task<Operation> StopAsyncReplication(StopAsyncReplicationDiskRequest request, ServerCallContext context)

Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.

Parameters
Name Description
request StopAsyncReplicationDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

StopGroupAsyncReplication(StopGroupAsyncReplicationDiskRequest, ServerCallContext)

public virtual Task<Operation> StopGroupAsyncReplication(StopGroupAsyncReplicationDiskRequest request, ServerCallContext context)

Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.

Parameters
Name Description
request StopGroupAsyncReplicationDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

TestIamPermissions(TestIamPermissionsDiskRequest, ServerCallContext)

public virtual Task<TestPermissionsResponse> TestIamPermissions(TestIamPermissionsDiskRequest request, ServerCallContext context)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskTestPermissionsResponse

The response to send back to the client (wrapped by a task).

Update(UpdateDiskRequest, ServerCallContext)

public virtual Task<Operation> Update(UpdateDiskRequest request, ServerCallContext context)

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.

Parameters
Name Description
request UpdateDiskRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).