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.
Namespace
GoogleCloudGoogle.Cloud.ComputeV1Assembly
Google.Cloud.Compute.V1.dll
Remarks
The Snapshots API.
Constructors
SnapshotsClientImpl(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 | |
---|---|
Name | Description |
grpcClient | SnapshotsSnapshotsClient The underlying gRPC client. |
settings | SnapshotsSettings The base SnapshotsSettings used within this client. |
logger | ILogger Optional ILogger to use within this client. |
Properties
DeleteOperationsClient
public override OperationsClient DeleteOperationsClient { get; }
The long-running operations client for Delete
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public override Snapshots.SnapshotsClient GrpcClient { get; }
The underlying gRPC Snapshots client
Property Value | |
---|---|
Type | Description |
SnapshotsSnapshotsClient |
InsertOperationsClient
public override OperationsClient InsertOperationsClient { get; }
The long-running operations client for Insert
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetLabelsOperationsClient
public override OperationsClient SetLabelsOperationsClient { get; }
The long-running operations client for SetLabels
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
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 | |
---|---|
Name | Description |
request | DeleteSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
DeleteAsync(DeleteSnapshotRequest, CallSettings)
public override 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 | |
---|---|
Name | Description |
request | DeleteSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | GetSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Snapshot | The RPC response. |
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 | |
---|---|
Name | Description |
request | GetSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskSnapshot | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | GetIamPolicySnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
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 | |
---|---|
Name | Description |
request | GetIamPolicySnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | InsertSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
InsertAsync(InsertSnapshotRequest, CallSettings)
public override 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 | |
---|---|
Name | Description |
request | InsertSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | ListSnapshotsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableSnapshotListSnapshot | A pageable sequence of Snapshot resources. |
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 | |
---|---|
Name | Description |
request | ListSnapshotsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableSnapshotListSnapshot | A pageable asynchronous sequence of Snapshot resources. |
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 | |
---|---|
Name | Description |
request | SetIamPolicySnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
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 | |
---|---|
Name | Description |
request | SetIamPolicySnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | SetLabelsSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation | The RPC response. |
SetLabelsAsync(SetLabelsSnapshotRequest, CallSettings)
public override 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 | |
---|---|
Name | Description |
request | SetLabelsSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation | A Task containing the RPC response. |
TestIamPermissions(TestIamPermissionsSnapshotRequest, CallSettings)
public override TestPermissionsResponse TestIamPermissions(TestIamPermissionsSnapshotRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestPermissionsResponse | The RPC response. |
TestIamPermissionsAsync(TestIamPermissionsSnapshotRequest, CallSettings)
public override Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsSnapshotRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsSnapshotRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestPermissionsResponse | A Task containing the RPC response. |