Compute Engine v1 API - Class SnapshotsClientImpl (2.5.0)

public sealed class SnapshotsClientImpl : SnapshotsClient

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

Snapshots client wrapper implementation, for convenient use.

Inheritance

Object > SnapshotsClient > SnapshotsClientImpl

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Snapshots API.

Constructors

SnapshotsClientImpl(Snapshots.SnapshotsClient, SnapshotsSettings, ILogger)

public SnapshotsClientImpl(Snapshots.SnapshotsClient grpcClient, SnapshotsSettings settings, ILogger logger)

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

Parameters
NameDescription
grpcClientSnapshots.SnapshotsClient

The underlying gRPC client.

settingsSnapshotsSettings

The base SnapshotsSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

DeleteOperationsClient

public override OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override Snapshots.SnapshotsClient GrpcClient { get; }

The underlying gRPC Snapshots client

Property Value
TypeDescription
Snapshots.SnapshotsClient
Overrides

InsertOperationsClient

public override OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient
Overrides

SetLabelsOperationsClient

public override OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for SetLabels.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

Delete(DeleteSnapshotRequest, CallSettings)

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

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots.

Parameters
NameDescription
requestDeleteSnapshotRequest

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(DeleteSnapshotRequest, CallSettings)

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

Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots.

Parameters
NameDescription
requestDeleteSnapshotRequest

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(GetSnapshotRequest, CallSettings)

public override Snapshot Get(GetSnapshotRequest request, CallSettings callSettings = null)

Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.

Parameters
NameDescription
requestGetSnapshotRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Snapshot

The RPC response.

Overrides

GetAsync(GetSnapshotRequest, CallSettings)

public override Task<Snapshot> GetAsync(GetSnapshotRequest request, CallSettings callSettings = null)

Returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.

Parameters
NameDescription
requestGetSnapshotRequest

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<Snapshot>

A Task containing the RPC response.

Overrides

GetIamPolicy(GetIamPolicySnapshotRequest, CallSettings)

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

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

Parameters
NameDescription
requestGetIamPolicySnapshotRequest

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(GetIamPolicySnapshotRequest, CallSettings)

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

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

Parameters
NameDescription
requestGetIamPolicySnapshotRequest

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(InsertSnapshotRequest, CallSettings)

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

Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of disks.createSnapshot, as this method supports more features, such as creating snapshots in a project different from the source disk project.

Parameters
NameDescription
requestInsertSnapshotRequest

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(InsertSnapshotRequest, CallSettings)

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

Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of disks.createSnapshot, as this method supports more features, such as creating snapshots in a project different from the source disk project.

Parameters
NameDescription
requestInsertSnapshotRequest

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(ListSnapshotsRequest, CallSettings)

public override PagedEnumerable<SnapshotList, Snapshot> List(ListSnapshotsRequest request, CallSettings callSettings = null)

Retrieves the list of Snapshot resources contained within the specified project.

Parameters
NameDescription
requestListSnapshotsRequest

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<SnapshotList, Snapshot>

A pageable sequence of Snapshot resources.

Overrides

ListAsync(ListSnapshotsRequest, CallSettings)

public override PagedAsyncEnumerable<SnapshotList, Snapshot> ListAsync(ListSnapshotsRequest request, CallSettings callSettings = null)

Retrieves the list of Snapshot resources contained within the specified project.

Parameters
NameDescription
requestListSnapshotsRequest

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<SnapshotList, Snapshot>

A pageable asynchronous sequence of Snapshot resources.

Overrides

SetIamPolicy(SetIamPolicySnapshotRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetIamPolicySnapshotRequest

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(SetIamPolicySnapshotRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetIamPolicySnapshotRequest

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(SetLabelsSnapshotRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetLabelsSnapshotRequest

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(SetLabelsSnapshotRequest, CallSettings)

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

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

Parameters
NameDescription
requestSetLabelsSnapshotRequest

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(TestIamPermissionsSnapshotRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsSnapshotRequest

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(TestIamPermissionsSnapshotRequest, CallSettings)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsSnapshotRequest

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