Compute Engine v1 API - Class RegionSnapshots.RegionSnapshotsClient (3.27.0)

public class RegionSnapshots.RegionSnapshotsClient : ClientBase<RegionSnapshots.RegionSnapshotsClient>

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

Client for RegionSnapshots

Inheritance

object > ClientBase > ClientBaseRegionSnapshotsRegionSnapshotsClient > RegionSnapshots.RegionSnapshotsClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

RegionSnapshotsClient()

protected RegionSnapshotsClient()

Protected parameterless constructor to allow creation of test doubles.

RegionSnapshotsClient(CallInvoker)

public RegionSnapshotsClient(CallInvoker callInvoker)

Creates a new client for RegionSnapshots that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

RegionSnapshotsClient(ChannelBase)

public RegionSnapshotsClient(ChannelBase channel)

Creates a new client for RegionSnapshots

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

RegionSnapshotsClient(ClientBaseConfiguration)

protected RegionSnapshotsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateOperationsClientForRegionOperations()

public virtual Operations.OperationsClient CreateOperationsClientForRegionOperations()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client, delegating to RegionOperations.

Returns
Type Description
OperationsOperationsClient

A new Operations client for the same target as this client.

Delete(DeleteRegionSnapshotRequest, CallOptions)

public virtual Operation Delete(DeleteRegionSnapshotRequest request, CallOptions options)

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, seeDeleting snapshots.

Parameters
Name Description
request DeleteRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

Delete(DeleteRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation Delete(DeleteRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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, seeDeleting snapshots.

Parameters
Name Description
request DeleteRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

DeleteAsync(DeleteRegionSnapshotRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> DeleteAsync(DeleteRegionSnapshotRequest request, CallOptions options)

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, seeDeleting snapshots.

Parameters
Name Description
request DeleteRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

DeleteAsync(DeleteRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> DeleteAsync(DeleteRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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, seeDeleting snapshots.

Parameters
Name Description
request DeleteRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

Get(GetRegionSnapshotRequest, CallOptions)

public virtual Snapshot Get(GetRegionSnapshotRequest request, CallOptions options)

Returns the specified Snapshot resource.

Parameters
Name Description
request GetRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Snapshot

The response received from the server.

Get(GetRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual Snapshot Get(GetRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the specified Snapshot resource.

Parameters
Name Description
request GetRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Snapshot

The response received from the server.

GetAsync(GetRegionSnapshotRequest, CallOptions)

public virtual AsyncUnaryCall<Snapshot> GetAsync(GetRegionSnapshotRequest request, CallOptions options)

Returns the specified Snapshot resource.

Parameters
Name Description
request GetRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallSnapshot

The call object.

GetAsync(GetRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Snapshot> GetAsync(GetRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the specified Snapshot resource.

Parameters
Name Description
request GetRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallSnapshot

The call object.

GetIamPolicy(GetIamPolicyRegionSnapshotRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyRegionSnapshotRequest request, CallOptions options)

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

Parameters
Name Description
request GetIamPolicyRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Policy

The response received from the server.

GetIamPolicy(GetIamPolicyRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetIamPolicy(GetIamPolicyRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request GetIamPolicyRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Policy

The response received from the server.

GetIamPolicyAsync(GetIamPolicyRegionSnapshotRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRegionSnapshotRequest request, CallOptions options)

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

Parameters
Name Description
request GetIamPolicyRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

GetIamPolicyAsync(GetIamPolicyRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request GetIamPolicyRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

Insert(InsertRegionSnapshotRequest, CallOptions)

public virtual Operation Insert(InsertRegionSnapshotRequest request, CallOptions options)

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
request InsertRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

Insert(InsertRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation Insert(InsertRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
request InsertRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

InsertAsync(InsertRegionSnapshotRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> InsertAsync(InsertRegionSnapshotRequest request, CallOptions options)

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
request InsertRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

InsertAsync(InsertRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> InsertAsync(InsertRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a snapshot in the specified region using the data included in the request.

Parameters
Name Description
request InsertRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

List(ListRegionSnapshotsRequest, CallOptions)

public virtual SnapshotList List(ListRegionSnapshotsRequest request, CallOptions options)

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

Parameters
Name Description
request ListRegionSnapshotsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
SnapshotList

The response received from the server.

List(ListRegionSnapshotsRequest, Metadata, DateTime?, CancellationToken)

public virtual SnapshotList List(ListRegionSnapshotsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request ListRegionSnapshotsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
SnapshotList

The response received from the server.

ListAsync(ListRegionSnapshotsRequest, CallOptions)

public virtual AsyncUnaryCall<SnapshotList> ListAsync(ListRegionSnapshotsRequest request, CallOptions options)

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

Parameters
Name Description
request ListRegionSnapshotsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallSnapshotList

The call object.

ListAsync(ListRegionSnapshotsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SnapshotList> ListAsync(ListRegionSnapshotsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request ListRegionSnapshotsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallSnapshotList

The call object.

NewInstance(ClientBaseConfiguration)

protected override RegionSnapshots.RegionSnapshotsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
RegionSnapshotsRegionSnapshotsClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Compute.V1.RegionSnapshots.RegionSnapshotsClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

SetIamPolicy(SetIamPolicyRegionSnapshotRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyRegionSnapshotRequest request, CallOptions options)

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

Parameters
Name Description
request SetIamPolicyRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Policy

The response received from the server.

SetIamPolicy(SetIamPolicyRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy SetIamPolicy(SetIamPolicyRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SetIamPolicyRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Policy

The response received from the server.

SetIamPolicyAsync(SetIamPolicyRegionSnapshotRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRegionSnapshotRequest request, CallOptions options)

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

Parameters
Name Description
request SetIamPolicyRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

SetIamPolicyAsync(SetIamPolicyRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SetIamPolicyRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

SetLabels(SetLabelsRegionSnapshotRequest, CallOptions)

public virtual Operation SetLabels(SetLabelsRegionSnapshotRequest request, CallOptions options)

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

Parameters
Name Description
request SetLabelsRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

SetLabels(SetLabelsRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation SetLabels(SetLabelsRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SetLabelsRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

SetLabelsAsync(SetLabelsRegionSnapshotRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> SetLabelsAsync(SetLabelsRegionSnapshotRequest request, CallOptions options)

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

Parameters
Name Description
request SetLabelsRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

SetLabelsAsync(SetLabelsRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> SetLabelsAsync(SetLabelsRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request SetLabelsRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

TestIamPermissions(TestIamPermissionsRegionSnapshotRequest, CallOptions)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsRegionSnapshotRequest request, CallOptions options)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
TestPermissionsResponse

The response received from the server.

TestIamPermissions(TestIamPermissionsRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
TestPermissionsResponse

The response received from the server.

TestIamPermissionsAsync(TestIamPermissionsRegionSnapshotRequest, CallOptions)

public virtual AsyncUnaryCall<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRegionSnapshotRequest request, CallOptions options)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallTestPermissionsResponse

The call object.

TestIamPermissionsAsync(TestIamPermissionsRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallTestPermissionsResponse

The call object.

UpdateKmsKey(UpdateKmsKeyRegionSnapshotRequest, CallOptions)

public virtual Operation UpdateKmsKey(UpdateKmsKeyRegionSnapshotRequest request, CallOptions options)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
request UpdateKmsKeyRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

UpdateKmsKey(UpdateKmsKeyRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation UpdateKmsKey(UpdateKmsKeyRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
request UpdateKmsKeyRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

UpdateKmsKeyAsync(UpdateKmsKeyRegionSnapshotRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> UpdateKmsKeyAsync(UpdateKmsKeyRegionSnapshotRequest request, CallOptions options)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
request UpdateKmsKeyRegionSnapshotRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

UpdateKmsKeyAsync(UpdateKmsKeyRegionSnapshotRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> UpdateKmsKeyAsync(UpdateKmsKeyRegionSnapshotRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Rotates the customer-managed encryption key to the latest version for the specified snapshot.

Parameters
Name Description
request UpdateKmsKeyRegionSnapshotRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.