public abstract class ReservationsClient
Reference documentation and code samples for the Compute Engine v1 API class ReservationsClient.
Reservations client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Compute.V1Assembly
Google.Cloud.Compute.V1.dll
Remarks
The Reservations API.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Reservations service, which is a host of "compute.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Reservations scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default Reservations scopes are:
DeleteOperationsClient
public virtual OperationsClient DeleteOperationsClient { get; }
The long-running operations client for Delete
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual Reservations.ReservationsClient GrpcClient { get; }
The underlying gRPC Reservations client
Property Value | |
---|---|
Type | Description |
ReservationsReservationsClient |
InsertOperationsClient
public virtual OperationsClient InsertOperationsClient { get; }
The long-running operations client for Insert
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ResizeOperationsClient
public virtual OperationsClient ResizeOperationsClient { get; }
The long-running operations client for Resize
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateOperationsClient
public virtual OperationsClient UpdateOperationsClient { get; }
The long-running operations client for Update
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
AggregatedList(AggregatedListReservationsRequest, CallSettings)
public virtual PagedEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> AggregatedList(AggregatedListReservationsRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableReservationAggregatedListKeyValuePairstringReservationsScopedList |
A pageable sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
AggregatedListReservationsRequest request = new AggregatedListReservationsRequest
{
OrderBy = "",
Project = "",
ServiceProjectNumber = 0L,
Filter = "",
IncludeAllScopes = false,
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> response = reservationsClient.AggregatedList(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (KeyValuePair<string, ReservationsScopedList> item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ReservationAggregatedList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, ReservationsScopedList> item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, ReservationsScopedList>> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, ReservationsScopedList> item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
AggregatedList(string, string, int?, CallSettings)
public virtual PagedEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you set the returnPartialSuccess
parameter to true
.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableReservationAggregatedListKeyValuePairstringReservationsScopedList |
A pageable sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> response = reservationsClient.AggregatedList(project);
// Iterate over all response items, lazily performing RPCs as required
foreach (KeyValuePair<string, ReservationsScopedList> item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ReservationAggregatedList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, ReservationsScopedList> item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, ReservationsScopedList>> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, ReservationsScopedList> item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
AggregatedListAsync(AggregatedListReservationsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> AggregatedListAsync(AggregatedListReservationsRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableReservationAggregatedListKeyValuePairstringReservationsScopedList |
A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
AggregatedListReservationsRequest request = new AggregatedListReservationsRequest
{
OrderBy = "",
Project = "",
ServiceProjectNumber = 0L,
Filter = "",
IncludeAllScopes = false,
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> response = reservationsClient.AggregatedListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, ReservationsScopedList> item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ReservationAggregatedList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, ReservationsScopedList> item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, ReservationsScopedList>> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, ReservationsScopedList> item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
AggregatedListAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves an aggregated list of reservations. To prevent failure, Google recommends that you set the returnPartialSuccess
parameter to true
.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableReservationAggregatedListKeyValuePairstringReservationsScopedList |
A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> response = reservationsClient.AggregatedListAsync(project);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, ReservationsScopedList> item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ReservationAggregatedList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, ReservationsScopedList> item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<KeyValuePair<string, ReservationsScopedList>> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (KeyValuePair<string, ReservationsScopedList> item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
Create()
public static ReservationsClient Create()
Synchronously creates a ReservationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ReservationsClientBuilder.
Returns | |
---|---|
Type | Description |
ReservationsClient |
The created ReservationsClient. |
CreateAsync(CancellationToken)
public static Task<ReservationsClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a ReservationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ReservationsClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskReservationsClient |
The task representing the created ReservationsClient. |
Delete(DeleteReservationRequest, CallSettings)
public virtual Operation<Operation, Operation> Delete(DeleteReservationRequest request, CallSettings callSettings = null)
Deletes the specified reservation.
Parameters | |
---|---|
Name | Description |
request |
DeleteReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
DeleteReservationRequest request = new DeleteReservationRequest
{
Zone = "",
RequestId = "",
Reservation = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = reservationsClient.Delete(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = reservationsClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Delete(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> Delete(string project, string zone, string reservation, CallSettings callSettings = null)
Deletes the specified reservation.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to delete. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
// Make the request
lro::Operation<Operation, Operation> response = reservationsClient.Delete(project, zone, reservation);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = reservationsClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(DeleteReservationRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteReservationRequest request, CallSettings callSettings = null)
Deletes the specified reservation.
Parameters | |
---|---|
Name | Description |
request |
DeleteReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
DeleteReservationRequest request = new DeleteReservationRequest
{
Zone = "",
RequestId = "",
Reservation = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.DeleteAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(DeleteReservationRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteReservationRequest request, CancellationToken cancellationToken)
Deletes the specified reservation.
Parameters | |
---|---|
Name | Description |
request |
DeleteReservationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
DeleteReservationRequest request = new DeleteReservationRequest
{
Zone = "",
RequestId = "",
Reservation = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.DeleteAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string zone, string reservation, CallSettings callSettings = null)
Deletes the specified reservation.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to delete. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.DeleteAsync(project, zone, reservation);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
DeleteAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string zone, string reservation, CancellationToken cancellationToken)
Deletes the specified reservation.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to delete. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.DeleteAsync(project, zone, reservation);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Get(GetReservationRequest, CallSettings)
public virtual Reservation Get(GetReservationRequest request, CallSettings callSettings = null)
Retrieves information about the specified reservation.
Parameters | |
---|---|
Name | Description |
request |
GetReservationRequest 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 |
Reservation |
The RPC response. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
GetReservationRequest request = new GetReservationRequest
{
Zone = "",
Reservation = "",
Project = "",
};
// Make the request
Reservation response = reservationsClient.Get(request);
Get(string, string, string, CallSettings)
public virtual Reservation Get(string project, string zone, string reservation, CallSettings callSettings = null)
Retrieves information about the specified reservation.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to retrieve. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Reservation |
The RPC response. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
// Make the request
Reservation response = reservationsClient.Get(project, zone, reservation);
GetAsync(GetReservationRequest, CallSettings)
public virtual Task<Reservation> GetAsync(GetReservationRequest request, CallSettings callSettings = null)
Retrieves information about the specified reservation.
Parameters | |
---|---|
Name | Description |
request |
GetReservationRequest 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 |
TaskReservation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
GetReservationRequest request = new GetReservationRequest
{
Zone = "",
Reservation = "",
Project = "",
};
// Make the request
Reservation response = await reservationsClient.GetAsync(request);
GetAsync(GetReservationRequest, CancellationToken)
public virtual Task<Reservation> GetAsync(GetReservationRequest request, CancellationToken cancellationToken)
Retrieves information about the specified reservation.
Parameters | |
---|---|
Name | Description |
request |
GetReservationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskReservation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
GetReservationRequest request = new GetReservationRequest
{
Zone = "",
Reservation = "",
Project = "",
};
// Make the request
Reservation response = await reservationsClient.GetAsync(request);
GetAsync(string, string, string, CallSettings)
public virtual Task<Reservation> GetAsync(string project, string zone, string reservation, CallSettings callSettings = null)
Retrieves information about the specified reservation.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to retrieve. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskReservation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
// Make the request
Reservation response = await reservationsClient.GetAsync(project, zone, reservation);
GetAsync(string, string, string, CancellationToken)
public virtual Task<Reservation> GetAsync(string project, string zone, string reservation, CancellationToken cancellationToken)
Retrieves information about the specified reservation.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to retrieve. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskReservation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
// Make the request
Reservation response = await reservationsClient.GetAsync(project, zone, reservation);
GetIamPolicy(GetIamPolicyReservationRequest, CallSettings)
public virtual Policy GetIamPolicy(GetIamPolicyReservationRequest 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 |
GetIamPolicyReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
GetIamPolicyReservationRequest request = new GetIamPolicyReservationRequest
{
Zone = "",
Resource = "",
Project = "",
OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = reservationsClient.GetIamPolicy(request);
GetIamPolicy(string, string, string, CallSettings)
public virtual Policy GetIamPolicy(string project, string zone, string resource, CallSettings callSettings = null)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string The name of the zone for this request. |
resource |
string Name or id of the resource for this request. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy |
The RPC response. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
Policy response = reservationsClient.GetIamPolicy(project, zone, resource);
GetIamPolicyAsync(GetIamPolicyReservationRequest, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyReservationRequest 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 |
GetIamPolicyReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyReservationRequest request = new GetIamPolicyReservationRequest
{
Zone = "",
Resource = "",
Project = "",
OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await reservationsClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(GetIamPolicyReservationRequest, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyReservationRequest request, CancellationToken cancellationToken)
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 object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyReservationRequest request = new GetIamPolicyReservationRequest
{
Zone = "",
Resource = "",
Project = "",
OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await reservationsClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(string, string, string, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(string project, string zone, string resource, CallSettings callSettings = null)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string The name of the zone for this request. |
resource |
string Name or id of the resource for this request. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
Policy response = await reservationsClient.GetIamPolicyAsync(project, zone, resource);
GetIamPolicyAsync(string, string, string, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(string project, string zone, string resource, CancellationToken cancellationToken)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string The name of the zone for this request. |
resource |
string Name or id of the resource for this request. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
// Make the request
Policy response = await reservationsClient.GetIamPolicyAsync(project, zone, resource);
Insert(InsertReservationRequest, CallSettings)
public virtual Operation<Operation, Operation> Insert(InsertReservationRequest request, CallSettings callSettings = null)
Creates a new reservation. For more information, read Reserving zonal resources.
Parameters | |
---|---|
Name | Description |
request |
InsertReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
InsertReservationRequest request = new InsertReservationRequest
{
Zone = "",
RequestId = "",
Project = "",
ReservationResource = new Reservation(),
};
// Make the request
lro::Operation<Operation, Operation> response = reservationsClient.Insert(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = reservationsClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Insert(string, string, Reservation, CallSettings)
public virtual Operation<Operation, Operation> Insert(string project, string zone, Reservation reservationResource, CallSettings callSettings = null)
Creates a new reservation. For more information, read Reserving zonal resources.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservationResource |
Reservation The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
Reservation reservationResource = new Reservation();
// Make the request
lro::Operation<Operation, Operation> response = reservationsClient.Insert(project, zone, reservationResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = reservationsClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
InsertAsync(InsertReservationRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertReservationRequest request, CallSettings callSettings = null)
Creates a new reservation. For more information, read Reserving zonal resources.
Parameters | |
---|---|
Name | Description |
request |
InsertReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
InsertReservationRequest request = new InsertReservationRequest
{
Zone = "",
RequestId = "",
Project = "",
ReservationResource = new Reservation(),
};
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.InsertAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
InsertAsync(InsertReservationRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertReservationRequest request, CancellationToken cancellationToken)
Creates a new reservation. For more information, read Reserving zonal resources.
Parameters | |
---|---|
Name | Description |
request |
InsertReservationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
InsertReservationRequest request = new InsertReservationRequest
{
Zone = "",
RequestId = "",
Project = "",
ReservationResource = new Reservation(),
};
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.InsertAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
InsertAsync(string, string, Reservation, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string zone, Reservation reservationResource, CallSettings callSettings = null)
Creates a new reservation. For more information, read Reserving zonal resources.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservationResource |
Reservation The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
Reservation reservationResource = new Reservation();
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.InsertAsync(project, zone, reservationResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
InsertAsync(string, string, Reservation, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string zone, Reservation reservationResource, CancellationToken cancellationToken)
Creates a new reservation. For more information, read Reserving zonal resources.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservationResource |
Reservation The body resource for this request |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
Reservation reservationResource = new Reservation();
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.InsertAsync(project, zone, reservationResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
List(ListReservationsRequest, CallSettings)
public virtual PagedEnumerable<ReservationList, Reservation> List(ListReservationsRequest request, CallSettings callSettings = null)
A list of all the reservations that have been configured for the specified project in specified zone.
Parameters | |
---|---|
Name | Description |
request |
ListReservationsRequest 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 |
PagedEnumerableReservationListReservation |
A pageable sequence of Reservation resources. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
ListReservationsRequest request = new ListReservationsRequest
{
Zone = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<ReservationList, Reservation> response = reservationsClient.List(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Reservation item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ReservationList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Reservation item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Reservation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Reservation item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
List(string, string, string, int?, CallSettings)
public virtual PagedEnumerable<ReservationList, Reservation> List(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
A list of all the reservations that have been configured for the specified project in specified zone.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableReservationListReservation |
A pageable sequence of Reservation resources. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedEnumerable<ReservationList, Reservation> response = reservationsClient.List(project, zone);
// Iterate over all response items, lazily performing RPCs as required
foreach (Reservation item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ReservationList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Reservation item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Reservation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Reservation item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAsync(ListReservationsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ReservationList, Reservation> ListAsync(ListReservationsRequest request, CallSettings callSettings = null)
A list of all the reservations that have been configured for the specified project in specified zone.
Parameters | |
---|---|
Name | Description |
request |
ListReservationsRequest 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 |
PagedAsyncEnumerableReservationListReservation |
A pageable asynchronous sequence of Reservation resources. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
ListReservationsRequest request = new ListReservationsRequest
{
Zone = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<ReservationList, Reservation> response = reservationsClient.ListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Reservation item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ReservationList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Reservation item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Reservation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Reservation item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAsync(string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ReservationList, Reservation> ListAsync(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
A list of all the reservations that have been configured for the specified project in specified zone.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableReservationListReservation |
A pageable asynchronous sequence of Reservation resources. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedAsyncEnumerable<ReservationList, Reservation> response = reservationsClient.ListAsync(project, zone);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Reservation item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ReservationList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Reservation item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Reservation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Reservation item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
PollOnceDelete(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Delete
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation |
The result of polling the operation. |
PollOnceDeleteAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Delete
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A task representing the result of polling the operation. |
PollOnceInsert(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceInsert(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Insert
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation |
The result of polling the operation. |
PollOnceInsertAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Insert
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A task representing the result of polling the operation. |
PollOnceResize(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceResize(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Resize
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation |
The result of polling the operation. |
PollOnceResizeAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceResizeAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Resize
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A task representing the result of polling the operation. |
PollOnceUpdate(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceUpdate(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Update
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation |
The result of polling the operation. |
PollOnceUpdateAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceUpdateAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Update
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A task representing the result of polling the operation. |
Resize(ResizeReservationRequest, CallSettings)
public virtual Operation<Operation, Operation> Resize(ResizeReservationRequest request, CallSettings callSettings = null)
Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
Parameters | |
---|---|
Name | Description |
request |
ResizeReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
ResizeReservationRequest request = new ResizeReservationRequest
{
Zone = "",
RequestId = "",
Reservation = "",
Project = "",
ReservationsResizeRequestResource = new ReservationsResizeRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = reservationsClient.Resize(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = reservationsClient.PollOnceResize(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Resize(string, string, string, ReservationsResizeRequest, CallSettings)
public virtual Operation<Operation, Operation> Resize(string project, string zone, string reservation, ReservationsResizeRequest reservationsResizeRequestResource, CallSettings callSettings = null)
Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to update. |
reservationsResizeRequestResource |
ReservationsResizeRequest The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
ReservationsResizeRequest reservationsResizeRequestResource = new ReservationsResizeRequest();
// Make the request
lro::Operation<Operation, Operation> response = reservationsClient.Resize(project, zone, reservation, reservationsResizeRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = reservationsClient.PollOnceResize(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResizeAsync(ResizeReservationRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> ResizeAsync(ResizeReservationRequest request, CallSettings callSettings = null)
Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
Parameters | |
---|---|
Name | Description |
request |
ResizeReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
ResizeReservationRequest request = new ResizeReservationRequest
{
Zone = "",
RequestId = "",
Reservation = "",
Project = "",
ReservationsResizeRequestResource = new ReservationsResizeRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.ResizeAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceResizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResizeAsync(ResizeReservationRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> ResizeAsync(ResizeReservationRequest request, CancellationToken cancellationToken)
Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
Parameters | |
---|---|
Name | Description |
request |
ResizeReservationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
ResizeReservationRequest request = new ResizeReservationRequest
{
Zone = "",
RequestId = "",
Reservation = "",
Project = "",
ReservationsResizeRequestResource = new ReservationsResizeRequest(),
};
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.ResizeAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceResizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResizeAsync(string, string, string, ReservationsResizeRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> ResizeAsync(string project, string zone, string reservation, ReservationsResizeRequest reservationsResizeRequestResource, CallSettings callSettings = null)
Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to update. |
reservationsResizeRequestResource |
ReservationsResizeRequest The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
ReservationsResizeRequest reservationsResizeRequestResource = new ReservationsResizeRequest();
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.ResizeAsync(project, zone, reservation, reservationsResizeRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceResizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
ResizeAsync(string, string, string, ReservationsResizeRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> ResizeAsync(string project, string zone, string reservation, ReservationsResizeRequest reservationsResizeRequestResource, CancellationToken cancellationToken)
Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to update. |
reservationsResizeRequestResource |
ReservationsResizeRequest The body resource for this request |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
ReservationsResizeRequest reservationsResizeRequestResource = new ReservationsResizeRequest();
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.ResizeAsync(project, zone, reservation, reservationsResizeRequestResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceResizeAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
SetIamPolicy(SetIamPolicyReservationRequest, CallSettings)
public virtual Policy SetIamPolicy(SetIamPolicyReservationRequest request, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
request |
SetIamPolicyReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
SetIamPolicyReservationRequest request = new SetIamPolicyReservationRequest
{
Zone = "",
Resource = "",
Project = "",
ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = reservationsClient.SetIamPolicy(request);
SetIamPolicy(string, string, string, ZoneSetPolicyRequest, CallSettings)
public virtual Policy SetIamPolicy(string project, string zone, string resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string The name of the zone for this request. |
resource |
string Name or id of the resource for this request. |
zoneSetPolicyRequestResource |
ZoneSetPolicyRequest The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy |
The RPC response. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = reservationsClient.SetIamPolicy(project, zone, resource, zoneSetPolicyRequestResource);
SetIamPolicyAsync(SetIamPolicyReservationRequest, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyReservationRequest request, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
request |
SetIamPolicyReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyReservationRequest request = new SetIamPolicyReservationRequest
{
Zone = "",
Resource = "",
Project = "",
ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = await reservationsClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(SetIamPolicyReservationRequest, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyReservationRequest request, CancellationToken cancellationToken)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
request |
SetIamPolicyReservationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyReservationRequest request = new SetIamPolicyReservationRequest
{
Zone = "",
Resource = "",
Project = "",
ZoneSetPolicyRequestResource = new ZoneSetPolicyRequest(),
};
// Make the request
Policy response = await reservationsClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(string, string, string, ZoneSetPolicyRequest, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(string project, string zone, string resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource, CallSettings callSettings = null)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string The name of the zone for this request. |
resource |
string Name or id of the resource for this request. |
zoneSetPolicyRequestResource |
ZoneSetPolicyRequest The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = await reservationsClient.SetIamPolicyAsync(project, zone, resource, zoneSetPolicyRequestResource);
SetIamPolicyAsync(string, string, string, ZoneSetPolicyRequest, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(string project, string zone, string resource, ZoneSetPolicyRequest zoneSetPolicyRequestResource, CancellationToken cancellationToken)
Sets the access control policy on the specified resource. Replaces any existing policy.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string The name of the zone for this request. |
resource |
string Name or id of the resource for this request. |
zoneSetPolicyRequestResource |
ZoneSetPolicyRequest The body resource for this request |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
ZoneSetPolicyRequest zoneSetPolicyRequestResource = new ZoneSetPolicyRequest();
// Make the request
Policy response = await reservationsClient.SetIamPolicyAsync(project, zone, resource, zoneSetPolicyRequestResource);
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
TestIamPermissions(TestIamPermissionsReservationRequest, CallSettings)
public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsReservationRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
request |
TestIamPermissionsReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
TestIamPermissionsReservationRequest request = new TestIamPermissionsReservationRequest
{
Zone = "",
Resource = "",
Project = "",
TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = reservationsClient.TestIamPermissions(request);
TestIamPermissions(string, string, string, TestPermissionsRequest, CallSettings)
public virtual TestPermissionsResponse TestIamPermissions(string project, string zone, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string The name of the zone for this request. |
resource |
string Name or id of the resource for this request. |
testPermissionsRequestResource |
TestPermissionsRequest The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestPermissionsResponse |
The RPC response. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = reservationsClient.TestIamPermissions(project, zone, resource, testPermissionsRequestResource);
TestIamPermissionsAsync(TestIamPermissionsReservationRequest, CallSettings)
public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsReservationRequest request, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
request |
TestIamPermissionsReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsReservationRequest request = new TestIamPermissionsReservationRequest
{
Zone = "",
Resource = "",
Project = "",
TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await reservationsClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(TestIamPermissionsReservationRequest, CancellationToken)
public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsReservationRequest request, CancellationToken cancellationToken)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
request |
TestIamPermissionsReservationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestPermissionsResponse |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsReservationRequest request = new TestIamPermissionsReservationRequest
{
Zone = "",
Resource = "",
Project = "",
TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await reservationsClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CallSettings)
public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string zone, string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string The name of the zone for this request. |
resource |
string Name or id of the resource for this request. |
testPermissionsRequestResource |
TestPermissionsRequest The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTestPermissionsResponse |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await reservationsClient.TestIamPermissionsAsync(project, zone, resource, testPermissionsRequestResource);
TestIamPermissionsAsync(string, string, string, TestPermissionsRequest, CancellationToken)
public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string project, string zone, string resource, TestPermissionsRequest testPermissionsRequestResource, CancellationToken cancellationToken)
Returns permissions that a caller has on the specified resource.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string The name of the zone for this request. |
resource |
string Name or id of the resource for this request. |
testPermissionsRequestResource |
TestPermissionsRequest The body resource for this request |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTestPermissionsResponse |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await reservationsClient.TestIamPermissionsAsync(project, zone, resource, testPermissionsRequestResource);
Update(UpdateReservationRequest, CallSettings)
public virtual Operation<Operation, Operation> Update(UpdateReservationRequest request, CallSettings callSettings = null)
Update share settings of the reservation.
Parameters | |
---|---|
Name | Description |
request |
UpdateReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
UpdateReservationRequest request = new UpdateReservationRequest
{
Zone = "",
RequestId = "",
Reservation = "",
Paths = "",
Project = "",
ReservationResource = new Reservation(),
UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = reservationsClient.Update(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = reservationsClient.PollOnceUpdate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Update(string, string, string, Reservation, CallSettings)
public virtual Operation<Operation, Operation> Update(string project, string zone, string reservation, Reservation reservationResource, CallSettings callSettings = null)
Update share settings of the reservation.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to update. |
reservationResource |
Reservation The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
Reservation reservationResource = new Reservation();
// Make the request
lro::Operation<Operation, Operation> response = reservationsClient.Update(project, zone, reservation, reservationResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = reservationsClient.PollOnceUpdate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(UpdateReservationRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateReservationRequest request, CallSettings callSettings = null)
Update share settings of the reservation.
Parameters | |
---|---|
Name | Description |
request |
UpdateReservationRequest 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. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
UpdateReservationRequest request = new UpdateReservationRequest
{
Zone = "",
RequestId = "",
Reservation = "",
Paths = "",
Project = "",
ReservationResource = new Reservation(),
UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.UpdateAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(UpdateReservationRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateReservationRequest request, CancellationToken cancellationToken)
Update share settings of the reservation.
Parameters | |
---|---|
Name | Description |
request |
UpdateReservationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
UpdateReservationRequest request = new UpdateReservationRequest
{
Zone = "",
RequestId = "",
Reservation = "",
Paths = "",
Project = "",
ReservationResource = new Reservation(),
UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.UpdateAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(string, string, string, Reservation, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string reservation, Reservation reservationResource, CallSettings callSettings = null)
Update share settings of the reservation.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to update. |
reservationResource |
Reservation The body resource for this request |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
Reservation reservationResource = new Reservation();
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.UpdateAsync(project, zone, reservation, reservationResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(string, string, string, Reservation, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string reservation, Reservation reservationResource, CancellationToken cancellationToken)
Update share settings of the reservation.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
reservation |
string Name of the reservation to update. |
reservationResource |
Reservation The body resource for this request |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
ReservationsClient reservationsClient = await ReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string reservation = "";
Reservation reservationResource = new Reservation();
// Make the request
lro::Operation<Operation, Operation> response = await reservationsClient.UpdateAsync(project, zone, reservation, reservationResource);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await reservationsClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}