Class DisksClientImpl (1.2.0)

public sealed class DisksClientImpl : DisksClient

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(Disks.DisksClient, DisksSettings)

public DisksClientImpl(Disks.DisksClient grpcClient, DisksSettings settings)

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

Parameters
NameDescription
grpcClientDisks.DisksClient

The underlying gRPC client.

settingsDisksSettings

The base DisksSettings used within this client.

Properties

AddResourcePoliciesOperationsClient

public override OperationsClient AddResourcePoliciesOperationsClient { get; }

The long-running operations client for AddResourcePolicies.

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
Disks.DisksClient
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

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
Operation<Operation, Operation>

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
Task<Operation<Operation, Operation>>

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.

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
PagedEnumerable<DiskAggregatedList, KeyValuePair<String, DisksScopedList>>

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.

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
PagedAsyncEnumerable<DiskAggregatedList, KeyValuePair<String, DisksScopedList>>

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

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
Operation<Operation, Operation>

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
Task<Operation<Operation, Operation>>

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
Operation<Operation, Operation>

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
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Overrides

Get(GetDiskRequest, CallSettings)

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

Returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.

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 a specified persistent disk. Gets a list of available persistent disks by making a list() request.

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
Task<Disk>

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
Task<Policy>

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
Operation<Operation, Operation>

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
Task<Operation<Operation, Operation>>

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
PagedEnumerable<DiskList, Disk>

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
PagedAsyncEnumerable<DiskList, Disk>

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
Operation<Operation, Operation>

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
Task<Operation<Operation, Operation>>

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
Operation<Operation, Operation>

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
Task<Operation<Operation, Operation>>

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
Task<Policy>

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
Operation<Operation, Operation>

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
Task<Operation<Operation, Operation>>

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
Task<TestPermissionsResponse>

A Task containing the RPC response.

Overrides