Compute Engine v1 API - Class Reservations.ReservationsClient (3.0.0)

public class Reservations.ReservationsClient : ClientBase<Reservations.ReservationsClient>

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

Client for Reservations

Inheritance

object > ClientBase > ClientBaseReservationsReservationsClient > Reservations.ReservationsClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

ReservationsClient()

protected ReservationsClient()

Protected parameterless constructor to allow creation of test doubles.

ReservationsClient(CallInvoker)

public ReservationsClient(CallInvoker callInvoker)

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

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

ReservationsClient(ChannelBase)

public ReservationsClient(ChannelBase channel)

Creates a new client for Reservations

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

ReservationsClient(ClientBaseConfiguration)

protected ReservationsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

AggregatedList(AggregatedListReservationsRequest, CallOptions)

public virtual ReservationAggregatedList AggregatedList(AggregatedListReservationsRequest request, CallOptions options)

Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListReservationsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ReservationAggregatedList

The response received from the server.

AggregatedList(AggregatedListReservationsRequest, Metadata, DateTime?, CancellationToken)

public virtual ReservationAggregatedList AggregatedList(AggregatedListReservationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListReservationsRequest

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
ReservationAggregatedList

The response received from the server.

AggregatedListAsync(AggregatedListReservationsRequest, CallOptions)

public virtual AsyncUnaryCall<ReservationAggregatedList> AggregatedListAsync(AggregatedListReservationsRequest request, CallOptions options)

Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListReservationsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallReservationAggregatedList

The call object.

AggregatedListAsync(AggregatedListReservationsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ReservationAggregatedList> AggregatedListAsync(AggregatedListReservationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Parameters
Name Description
request AggregatedListReservationsRequest

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
AsyncUnaryCallReservationAggregatedList

The call object.

CreateOperationsClientForZoneOperations()

public virtual Operations.OperationsClient CreateOperationsClientForZoneOperations()

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

Returns
Type Description
OperationsOperationsClient

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

Delete(DeleteReservationRequest, CallOptions)

public virtual Operation Delete(DeleteReservationRequest request, CallOptions options)

Deletes the specified reservation.

Parameters
Name Description
request DeleteReservationRequest

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(DeleteReservationRequest, Metadata, DateTime?, CancellationToken)

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

Deletes the specified reservation.

Parameters
Name Description
request DeleteReservationRequest

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(DeleteReservationRequest, CallOptions)

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

Deletes the specified reservation.

Parameters
Name Description
request DeleteReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

DeleteAsync(DeleteReservationRequest, Metadata, DateTime?, CancellationToken)

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

Deletes the specified reservation.

Parameters
Name Description
request DeleteReservationRequest

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(GetReservationRequest, CallOptions)

public virtual Reservation Get(GetReservationRequest request, CallOptions options)

Retrieves information about the specified reservation.

Parameters
Name Description
request GetReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Reservation

The response received from the server.

Get(GetReservationRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves information about the specified reservation.

Parameters
Name Description
request GetReservationRequest

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
Reservation

The response received from the server.

GetAsync(GetReservationRequest, CallOptions)

public virtual AsyncUnaryCall<Reservation> GetAsync(GetReservationRequest request, CallOptions options)

Retrieves information about the specified reservation.

Parameters
Name Description
request GetReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallReservation

The call object.

GetAsync(GetReservationRequest, Metadata, DateTime?, CancellationToken)

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

Retrieves information about the specified reservation.

Parameters
Name Description
request GetReservationRequest

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
AsyncUnaryCallReservation

The call object.

GetIamPolicy(GetIamPolicyReservationRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyReservationRequest 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 GetIamPolicyReservationRequest

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(GetIamPolicyReservationRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetIamPolicy(GetIamPolicyReservationRequest 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 GetIamPolicyReservationRequest

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(GetIamPolicyReservationRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyReservationRequest 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 GetIamPolicyReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

GetIamPolicyAsync(GetIamPolicyReservationRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyReservationRequest 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 GetIamPolicyReservationRequest

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(InsertReservationRequest, CallOptions)

public virtual Operation Insert(InsertReservationRequest request, CallOptions options)

Creates a new reservation. For more information, read Reserving zonal resources.

Parameters
Name Description
request InsertReservationRequest

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(InsertReservationRequest, Metadata, DateTime?, CancellationToken)

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

Creates a new reservation. For more information, read Reserving zonal resources.

Parameters
Name Description
request InsertReservationRequest

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(InsertReservationRequest, CallOptions)

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

Creates a new reservation. For more information, read Reserving zonal resources.

Parameters
Name Description
request InsertReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

InsertAsync(InsertReservationRequest, Metadata, DateTime?, CancellationToken)

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

Creates a new reservation. For more information, read Reserving zonal resources.

Parameters
Name Description
request InsertReservationRequest

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(ListReservationsRequest, CallOptions)

public virtual ReservationList List(ListReservationsRequest request, CallOptions options)

A list of all the reservations that have been configured for the specified project in specified zone.

Parameters
Name Description
request ListReservationsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ReservationList

The response received from the server.

List(ListReservationsRequest, Metadata, DateTime?, CancellationToken)

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

A list of all the reservations that have been configured for the specified project in specified zone.

Parameters
Name Description
request ListReservationsRequest

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
ReservationList

The response received from the server.

ListAsync(ListReservationsRequest, CallOptions)

public virtual AsyncUnaryCall<ReservationList> ListAsync(ListReservationsRequest request, CallOptions options)

A list of all the reservations that have been configured for the specified project in specified zone.

Parameters
Name Description
request ListReservationsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallReservationList

The call object.

ListAsync(ListReservationsRequest, Metadata, DateTime?, CancellationToken)

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

A list of all the reservations that have been configured for the specified project in specified zone.

Parameters
Name Description
request ListReservationsRequest

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
AsyncUnaryCallReservationList

The call object.

NewInstance(ClientBaseConfiguration)

protected override Reservations.ReservationsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
ReservationsReservationsClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Compute.V1.Reservations.ReservationsClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

Resize(ResizeReservationRequest, CallOptions)

public virtual Operation Resize(ResizeReservationRequest request, CallOptions options)

Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.

Parameters
Name Description
request ResizeReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

Resize(ResizeReservationRequest, Metadata, DateTime?, CancellationToken)

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

Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.

Parameters
Name Description
request ResizeReservationRequest

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.

ResizeAsync(ResizeReservationRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> ResizeAsync(ResizeReservationRequest request, CallOptions options)

Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.

Parameters
Name Description
request ResizeReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

ResizeAsync(ResizeReservationRequest, Metadata, DateTime?, CancellationToken)

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

Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.

Parameters
Name Description
request ResizeReservationRequest

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.

SetIamPolicy(SetIamPolicyReservationRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyReservationRequest request, CallOptions options)

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

Parameters
Name Description
request SetIamPolicyReservationRequest

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(SetIamPolicyReservationRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy SetIamPolicy(SetIamPolicyReservationRequest 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 SetIamPolicyReservationRequest

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(SetIamPolicyReservationRequest, CallOptions)

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

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

Parameters
Name Description
request SetIamPolicyReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

SetIamPolicyAsync(SetIamPolicyReservationRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyReservationRequest 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 SetIamPolicyReservationRequest

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.

TestIamPermissions(TestIamPermissionsReservationRequest, CallOptions)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsReservationRequest request, CallOptions options)

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsReservationRequest

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(TestIamPermissionsReservationRequest, Metadata, DateTime?, CancellationToken)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsReservationRequest

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(TestIamPermissionsReservationRequest, CallOptions)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallTestPermissionsResponse

The call object.

TestIamPermissionsAsync(TestIamPermissionsReservationRequest, Metadata, DateTime?, CancellationToken)

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

Returns permissions that a caller has on the specified resource.

Parameters
Name Description
request TestIamPermissionsReservationRequest

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.

Update(UpdateReservationRequest, CallOptions)

public virtual Operation Update(UpdateReservationRequest request, CallOptions options)

Update share settings of the reservation.

Parameters
Name Description
request UpdateReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

Update(UpdateReservationRequest, Metadata, DateTime?, CancellationToken)

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

Update share settings of the reservation.

Parameters
Name Description
request UpdateReservationRequest

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.

UpdateAsync(UpdateReservationRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> UpdateAsync(UpdateReservationRequest request, CallOptions options)

Update share settings of the reservation.

Parameters
Name Description
request UpdateReservationRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

UpdateAsync(UpdateReservationRequest, Metadata, DateTime?, CancellationToken)

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

Update share settings of the reservation.

Parameters
Name Description
request UpdateReservationRequest

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.