Compute Engine v1 API - Class Snapshots.SnapshotsBase (2.6.0)

[BindServiceMethod(typeof(Snapshots), "BindService")]
public abstract class SnapshotsBase

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

Base class for server-side implementations of Snapshots

Inheritance

Object > Snapshots.SnapshotsBase

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Methods

Delete(DeleteSnapshotRequest, ServerCallContext)

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

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 received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<Operation>

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

Get(GetSnapshotRequest, ServerCallContext)

public virtual Task<Snapshot> Get(GetSnapshotRequest request, ServerCallContext context)

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

Parameters
NameDescription
requestGetSnapshotRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<Snapshot>

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

GetIamPolicy(GetIamPolicySnapshotRequest, ServerCallContext)

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

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

Parameters
NameDescription
requestGetIamPolicySnapshotRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<Policy>

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

Insert(InsertSnapshotRequest, ServerCallContext)

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

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 received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<Operation>

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

List(ListSnapshotsRequest, ServerCallContext)

public virtual Task<SnapshotList> List(ListSnapshotsRequest request, ServerCallContext context)

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

Parameters
NameDescription
requestListSnapshotsRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<SnapshotList>

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

SetIamPolicy(SetIamPolicySnapshotRequest, ServerCallContext)

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

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

Parameters
NameDescription
requestSetIamPolicySnapshotRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<Policy>

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

SetLabels(SetLabelsSnapshotRequest, ServerCallContext)

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

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

Parameters
NameDescription
requestSetLabelsSnapshotRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<Operation>

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

TestIamPermissions(TestIamPermissionsSnapshotRequest, ServerCallContext)

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

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsSnapshotRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
Task<TestPermissionsResponse>

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