Compute Engine v1 API - Class DisksClientImpl (2.14.0)

public sealed class DisksClientImpl : DisksClient

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

Disks client wrapper implementation, for convenient use.

Inheritance

object > DisksClient > DisksClientImpl

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Disks API.

Constructors

DisksClientImpl(DisksClient, DisksSettings, ILogger)

public DisksClientImpl(Disks.DisksClient grpcClient, DisksSettings settings, ILogger logger)

Constructs a client wrapper for the Disks service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientDisksDisksClient

The underlying gRPC client.

settingsDisksSettings

The base DisksSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

AddResourcePoliciesOperationsClient

public override OperationsClient AddResourcePoliciesOperationsClient { get; }

The long-running operations client for AddResourcePolicies.

Property Value
TypeDescription
OperationsClient
Overrides

BulkInsertOperationsClient

public override OperationsClient BulkInsertOperationsClient { get; }

The long-running operations client for BulkInsert.

Property Value
TypeDescription
OperationsClient
Overrides

CreateSnapshotOperationsClient

public override OperationsClient CreateSnapshotOperationsClient { get; }

The long-running operations client for CreateSnapshot.

Property Value
TypeDescription
OperationsClient
Overrides

DeleteOperationsClient

public override OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override Disks.DisksClient GrpcClient { get; }

The underlying gRPC Disks client

Property Value
TypeDescription
DisksDisksClient
Overrides

InsertOperationsClient

public override OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient
Overrides

RemoveResourcePoliciesOperationsClient

public override OperationsClient RemoveResourcePoliciesOperationsClient { get; }

The long-running operations client for RemoveResourcePolicies.

Property Value
TypeDescription
OperationsClient
Overrides

ResizeOperationsClient

public override OperationsClient ResizeOperationsClient { get; }

The long-running operations client for Resize.

Property Value
TypeDescription
OperationsClient
Overrides

SetLabelsOperationsClient

public override OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
TypeDescription
OperationsClient
Overrides

StartAsyncReplicationOperationsClient

public override OperationsClient StartAsyncReplicationOperationsClient { get; }

The long-running operations client for StartAsyncReplication.

Property Value
TypeDescription
OperationsClient
Overrides

StopAsyncReplicationOperationsClient

public override OperationsClient StopAsyncReplicationOperationsClient { get; }

The long-running operations client for StopAsyncReplication.

Property Value
TypeDescription
OperationsClient
Overrides

StopGroupAsyncReplicationOperationsClient

public override OperationsClient StopGroupAsyncReplicationOperationsClient { get; }

The long-running operations client for StopGroupAsyncReplication.

Property Value
TypeDescription
OperationsClient
Overrides

UpdateOperationsClient

public override OperationsClient UpdateOperationsClient { get; }

The long-running operations client for Update.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

AddResourcePolicies(AddResourcePoliciesDiskRequest, CallSettings)

public override Operation<Operation, Operation> AddResourcePolicies(AddResourcePoliciesDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestAddResourcePoliciesDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

AddResourcePoliciesAsync(AddResourcePoliciesDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> AddResourcePoliciesAsync(AddResourcePoliciesDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestAddResourcePoliciesDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

AggregatedList(AggregatedListDisksRequest, CallSettings)

public override PagedEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> AggregatedList(AggregatedListDisksRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestAggregatedListDisksRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableDiskAggregatedListKeyValuePairstringDisksScopedList

A pageable sequence of KeyValuePair<TKey, TValue> resources.

Overrides

AggregatedListAsync(AggregatedListDisksRequest, CallSettings)

public override PagedAsyncEnumerable<DiskAggregatedList, KeyValuePair<string, DisksScopedList>> AggregatedListAsync(AggregatedListDisksRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestAggregatedListDisksRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableDiskAggregatedListKeyValuePairstringDisksScopedList

A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources.

Overrides

BulkInsert(BulkInsertDiskRequest, CallSettings)

public override Operation<Operation, Operation> BulkInsert(BulkInsertDiskRequest request, CallSettings callSettings = null)

Bulk create a set of disks.

Parameters
NameDescription
requestBulkInsertDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

BulkInsertAsync(BulkInsertDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> BulkInsertAsync(BulkInsertDiskRequest request, CallSettings callSettings = null)

Bulk create a set of disks.

Parameters
NameDescription
requestBulkInsertDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

CreateSnapshot(CreateSnapshotDiskRequest, CallSettings)

public override Operation<Operation, Operation> CreateSnapshot(CreateSnapshotDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestCreateSnapshotDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

CreateSnapshotAsync(CreateSnapshotDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> CreateSnapshotAsync(CreateSnapshotDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestCreateSnapshotDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

Delete(DeleteDiskRequest, CallSettings)

public override Operation<Operation, Operation> Delete(DeleteDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestDeleteDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

DeleteAsync(DeleteDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> DeleteAsync(DeleteDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestDeleteDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

Get(GetDiskRequest, CallSettings)

public override Disk Get(GetDiskRequest request, CallSettings callSettings = null)

Returns the specified persistent disk.

Parameters
NameDescription
requestGetDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Disk

The RPC response.

Overrides

GetAsync(GetDiskRequest, CallSettings)

public override Task<Disk> GetAsync(GetDiskRequest request, CallSettings callSettings = null)

Returns the specified persistent disk.

Parameters
NameDescription
requestGetDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDisk

A Task containing the RPC response.

Overrides

GetIamPolicy(GetIamPolicyDiskRequest, CallSettings)

public override Policy GetIamPolicy(GetIamPolicyDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetIamPolicyDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Overrides

GetIamPolicyAsync(GetIamPolicyDiskRequest, CallSettings)

public override Task<Policy> GetIamPolicyAsync(GetIamPolicyDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetIamPolicyDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Overrides

Insert(InsertDiskRequest, CallSettings)

public override Operation<Operation, Operation> Insert(InsertDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestInsertDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

InsertAsync(InsertDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> InsertAsync(InsertDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestInsertDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

List(ListDisksRequest, CallSettings)

public override PagedEnumerable<DiskList, Disk> List(ListDisksRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListDisksRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableDiskListDisk

A pageable sequence of Disk resources.

Overrides

ListAsync(ListDisksRequest, CallSettings)

public override PagedAsyncEnumerable<DiskList, Disk> ListAsync(ListDisksRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListDisksRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableDiskListDisk

A pageable asynchronous sequence of Disk resources.

Overrides

RemoveResourcePolicies(RemoveResourcePoliciesDiskRequest, CallSettings)

public override Operation<Operation, Operation> RemoveResourcePolicies(RemoveResourcePoliciesDiskRequest request, CallSettings callSettings = null)

Removes resource policies from a disk.

Parameters
NameDescription
requestRemoveResourcePoliciesDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

RemoveResourcePoliciesAsync(RemoveResourcePoliciesDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> RemoveResourcePoliciesAsync(RemoveResourcePoliciesDiskRequest request, CallSettings callSettings = null)

Removes resource policies from a disk.

Parameters
NameDescription
requestRemoveResourcePoliciesDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

Resize(ResizeDiskRequest, CallSettings)

public override Operation<Operation, Operation> Resize(ResizeDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestResizeDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

ResizeAsync(ResizeDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> ResizeAsync(ResizeDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestResizeDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

SetIamPolicy(SetIamPolicyDiskRequest, CallSettings)

public override Policy SetIamPolicy(SetIamPolicyDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestSetIamPolicyDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Overrides

SetIamPolicyAsync(SetIamPolicyDiskRequest, CallSettings)

public override Task<Policy> SetIamPolicyAsync(SetIamPolicyDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestSetIamPolicyDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Overrides

SetLabels(SetLabelsDiskRequest, CallSettings)

public override Operation<Operation, Operation> SetLabels(SetLabelsDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestSetLabelsDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

SetLabelsAsync(SetLabelsDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestSetLabelsDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

StartAsyncReplication(StartAsyncReplicationDiskRequest, CallSettings)

public override Operation<Operation, Operation> StartAsyncReplication(StartAsyncReplicationDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestStartAsyncReplicationDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

StartAsyncReplicationAsync(StartAsyncReplicationDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> StartAsyncReplicationAsync(StartAsyncReplicationDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestStartAsyncReplicationDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

StopAsyncReplication(StopAsyncReplicationDiskRequest, CallSettings)

public override Operation<Operation, Operation> StopAsyncReplication(StopAsyncReplicationDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestStopAsyncReplicationDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

StopAsyncReplicationAsync(StopAsyncReplicationDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> StopAsyncReplicationAsync(StopAsyncReplicationDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestStopAsyncReplicationDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

StopGroupAsyncReplication(StopGroupAsyncReplicationDiskRequest, CallSettings)

public override Operation<Operation, Operation> StopGroupAsyncReplication(StopGroupAsyncReplicationDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestStopGroupAsyncReplicationDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

StopGroupAsyncReplicationAsync(StopGroupAsyncReplicationDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> StopGroupAsyncReplicationAsync(StopGroupAsyncReplicationDiskRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestStopGroupAsyncReplicationDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides

TestIamPermissions(TestIamPermissionsDiskRequest, CallSettings)

public override TestPermissionsResponse TestIamPermissions(TestIamPermissionsDiskRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestPermissionsResponse

The RPC response.

Overrides

TestIamPermissionsAsync(TestIamPermissionsDiskRequest, CallSettings)

public override Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsDiskRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

Overrides

Update(UpdateDiskRequest, CallSettings)

public override Operation<Operation, Operation> Update(UpdateDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestUpdateDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Overrides

UpdateAsync(UpdateDiskRequest, CallSettings)

public override Task<Operation<Operation, Operation>> UpdateAsync(UpdateDiskRequest request, CallSettings callSettings = null)

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
NameDescription
requestUpdateDiskRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Overrides