Compute Engine v1 API - Class Reservations.ReservationsClient (2.12.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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ReservationsClient(ChannelBase)

public ReservationsClient(ChannelBase channel)

Creates a new client for Reservations

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ReservationsClient(ClientBaseConfiguration)

protected ReservationsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

AggregatedList(AggregatedListReservationsRequest, CallOptions)

public virtual ReservationAggregatedList AggregatedList(AggregatedListReservationsRequest request, CallOptions options)

Retrieves an aggregated list of reservations.

Parameters
NameDescription
requestAggregatedListReservationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestAggregatedListReservationsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestAggregatedListReservationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestAggregatedListReservationsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
TypeDescription
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
NameDescription
requestDeleteReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestDeleteReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

DeleteAsync(DeleteReservationRequest, CallOptions)

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

Deletes the specified reservation.

Parameters
NameDescription
requestDeleteReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestDeleteReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

Get(GetReservationRequest, CallOptions)

public virtual Reservation Get(GetReservationRequest request, CallOptions options)

Retrieves information about the specified reservation.

Parameters
NameDescription
requestGetReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestInsertReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestInsertReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestInsertReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestInsertReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestListReservationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListReservationsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestListReservationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListReservationsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallReservationList

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
ReservationsReservationsClient
Overrides

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
NameDescription
requestResizeReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestResizeReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestResizeReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestResizeReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallTestPermissionsResponse

The call object.

Update(UpdateReservationRequest, CallOptions)

public virtual Operation Update(UpdateReservationRequest request, CallOptions options)

Update share settings of the reservation.

Parameters
NameDescription
requestUpdateReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestUpdateReservationRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateReservationRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.