- 3.22.0 (latest)
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
public abstract class FutureReservationsClientReference documentation and code samples for the Compute Engine v1 API class FutureReservationsClient.
FutureReservations client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Compute.V1Assembly
Google.Cloud.Compute.V1.dll
Remarks
The FutureReservations API.
Properties
CancelOperationsClient
public virtual OperationsClient CancelOperationsClient { get; }The long-running operations client for Cancel.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the FutureReservations 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 FutureReservations scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default FutureReservations scopes are:
DeleteOperationsClient
public virtual OperationsClient DeleteOperationsClient { get; }The long-running operations client for Delete.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public virtual FutureReservations.FutureReservationsClient GrpcClient { get; }The underlying gRPC FutureReservations client
| Property Value | |
|---|---|
| Type | Description |
FutureReservationsFutureReservationsClient |
|
InsertOperationsClient
public virtual OperationsClient InsertOperationsClient { get; }The long-running operations client for Insert.
| 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(AggregatedListFutureReservationsRequest, CallSettings)
public virtual PagedEnumerable<FutureReservationsAggregatedListResponse, KeyValuePair<string, FutureReservationsScopedList>> AggregatedList(AggregatedListFutureReservationsRequest request, CallSettings callSettings = null)Retrieves an aggregated list of future reservations.
To prevent failure, it is recommended that you set the
returnPartialSuccess parameter to true.
| Parameters | |
|---|---|
| Name | Description |
request |
AggregatedListFutureReservationsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableFutureReservationsAggregatedListResponseKeyValuePairstringFutureReservationsScopedList |
A pageable sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
AggregatedListFutureReservationsRequest request = new AggregatedListFutureReservationsRequest
{
OrderBy = "",
Project = "",
ServiceProjectNumber = 0L,
Filter = "",
IncludeAllScopes = false,
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<FutureReservationsAggregatedListResponse, KeyValuePair<string, FutureReservationsScopedList>> response = futureReservationsClient.AggregatedList(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (KeyValuePair<string, FutureReservationsScopedList> 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 (FutureReservationsAggregatedListResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, FutureReservationsScopedList> 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, FutureReservationsScopedList>> 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, FutureReservationsScopedList> 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<FutureReservationsAggregatedListResponse, KeyValuePair<string, FutureReservationsScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Retrieves an aggregated list of future reservations.
To prevent failure, it is recommended that you set the
returnPartialSuccess parameter to true.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableFutureReservationsAggregatedListResponseKeyValuePairstringFutureReservationsScopedList |
A pageable sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<FutureReservationsAggregatedListResponse, KeyValuePair<string, FutureReservationsScopedList>> response = futureReservationsClient.AggregatedList(project);
// Iterate over all response items, lazily performing RPCs as required
foreach (KeyValuePair<string, FutureReservationsScopedList> 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 (FutureReservationsAggregatedListResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, FutureReservationsScopedList> 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, FutureReservationsScopedList>> 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, FutureReservationsScopedList> 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(AggregatedListFutureReservationsRequest, CallSettings)
public virtual PagedAsyncEnumerable<FutureReservationsAggregatedListResponse, KeyValuePair<string, FutureReservationsScopedList>> AggregatedListAsync(AggregatedListFutureReservationsRequest request, CallSettings callSettings = null)Retrieves an aggregated list of future reservations.
To prevent failure, it is recommended that you set the
returnPartialSuccess parameter to true.
| Parameters | |
|---|---|
| Name | Description |
request |
AggregatedListFutureReservationsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableFutureReservationsAggregatedListResponseKeyValuePairstringFutureReservationsScopedList |
A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
AggregatedListFutureReservationsRequest request = new AggregatedListFutureReservationsRequest
{
OrderBy = "",
Project = "",
ServiceProjectNumber = 0L,
Filter = "",
IncludeAllScopes = false,
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<FutureReservationsAggregatedListResponse, KeyValuePair<string, FutureReservationsScopedList>> response = futureReservationsClient.AggregatedListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, FutureReservationsScopedList> 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((FutureReservationsAggregatedListResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, FutureReservationsScopedList> 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, FutureReservationsScopedList>> 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, FutureReservationsScopedList> 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<FutureReservationsAggregatedListResponse, KeyValuePair<string, FutureReservationsScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Retrieves an aggregated list of future reservations.
To prevent failure, it is recommended that you set the
returnPartialSuccess parameter to true.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableFutureReservationsAggregatedListResponseKeyValuePairstringFutureReservationsScopedList |
A pageable asynchronous sequence of KeyValuePair<TKey, TValue> resources. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<FutureReservationsAggregatedListResponse, KeyValuePair<string, FutureReservationsScopedList>> response = futureReservationsClient.AggregatedListAsync(project);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((KeyValuePair<string, FutureReservationsScopedList> 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((FutureReservationsAggregatedListResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (KeyValuePair<string, FutureReservationsScopedList> 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, FutureReservationsScopedList>> 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, FutureReservationsScopedList> 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;
Cancel(CancelFutureReservationRequest, CallSettings)
public virtual Operation<Operation, Operation> Cancel(CancelFutureReservationRequest request, CallSettings callSettings = null)Cancel the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
CancelFutureReservationRequest request = new CancelFutureReservationRequest
{
Zone = "",
RequestId = "",
FutureReservation = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = futureReservationsClient.Cancel(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 = futureReservationsClient.PollOnceCancel(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;
}
Cancel(string, string, string, CallSettings)
public virtual Operation<Operation, Operation> Cancel(string project, string zone, string futureReservation, CallSettings callSettings = null)Cancel the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the future reservation to retrieve. Name should conform to RFC1035. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
// Make the request
lro::Operation<Operation, Operation> response = futureReservationsClient.Cancel(project, zone, futureReservation);
// 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 = futureReservationsClient.PollOnceCancel(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;
}
CancelAsync(CancelFutureReservationRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> CancelAsync(CancelFutureReservationRequest request, CallSettings callSettings = null)Cancel the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
CancelFutureReservationRequest request = new CancelFutureReservationRequest
{
Zone = "",
RequestId = "",
FutureReservation = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.CancelAsync(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 futureReservationsClient.PollOnceCancelAsync(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;
}
CancelAsync(CancelFutureReservationRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> CancelAsync(CancelFutureReservationRequest request, CancellationToken cancellationToken)Cancel the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelFutureReservationRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
CancelFutureReservationRequest request = new CancelFutureReservationRequest
{
Zone = "",
RequestId = "",
FutureReservation = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.CancelAsync(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 futureReservationsClient.PollOnceCancelAsync(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;
}
CancelAsync(string, string, string, CallSettings)
public virtual Task<Operation<Operation, Operation>> CancelAsync(string project, string zone, string futureReservation, CallSettings callSettings = null)Cancel the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the future reservation to retrieve. Name should conform to RFC1035. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.CancelAsync(project, zone, futureReservation);
// 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 futureReservationsClient.PollOnceCancelAsync(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;
}
CancelAsync(string, string, string, CancellationToken)
public virtual Task<Operation<Operation, Operation>> CancelAsync(string project, string zone, string futureReservation, CancellationToken cancellationToken)Cancel the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the future reservation to retrieve. Name should conform to RFC1035. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.CancelAsync(project, zone, futureReservation);
// 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 futureReservationsClient.PollOnceCancelAsync(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;
}
Create()
public static FutureReservationsClient Create()Synchronously creates a FutureReservationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FutureReservationsClientBuilder .
| Returns | |
|---|---|
| Type | Description |
FutureReservationsClient |
The created FutureReservationsClient. |
CreateAsync(CancellationToken)
public static Task<FutureReservationsClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a FutureReservationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FutureReservationsClientBuilder .
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskFutureReservationsClient |
The task representing the created FutureReservationsClient. |
Delete(DeleteFutureReservationRequest, CallSettings)
public virtual Operation<Operation, Operation> Delete(DeleteFutureReservationRequest request, CallSettings callSettings = null)Deletes the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
DeleteFutureReservationRequest request = new DeleteFutureReservationRequest
{
Zone = "",
RequestId = "",
FutureReservation = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = futureReservationsClient.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 = futureReservationsClient.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 futureReservation, CallSettings callSettings = null)Deletes the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the future reservation to retrieve. Name should conform to RFC1035. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
// Make the request
lro::Operation<Operation, Operation> response = futureReservationsClient.Delete(project, zone, futureReservation);
// 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 = futureReservationsClient.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(DeleteFutureReservationRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteFutureReservationRequest request, CallSettings callSettings = null)Deletes the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
DeleteFutureReservationRequest request = new DeleteFutureReservationRequest
{
Zone = "",
RequestId = "",
FutureReservation = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.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 futureReservationsClient.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(DeleteFutureReservationRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteFutureReservationRequest request, CancellationToken cancellationToken)Deletes the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteFutureReservationRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
DeleteFutureReservationRequest request = new DeleteFutureReservationRequest
{
Zone = "",
RequestId = "",
FutureReservation = "",
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.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 futureReservationsClient.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 futureReservation, CallSettings callSettings = null)Deletes the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the future reservation to retrieve. Name should conform to RFC1035. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.DeleteAsync(project, zone, futureReservation);
// 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 futureReservationsClient.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 futureReservation, CancellationToken cancellationToken)Deletes the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the future reservation to retrieve. Name should conform to RFC1035. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.DeleteAsync(project, zone, futureReservation);
// 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 futureReservationsClient.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(GetFutureReservationRequest, CallSettings)
public virtual FutureReservation Get(GetFutureReservationRequest request, CallSettings callSettings = null)Retrieves information about the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
GetFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
FutureReservation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
GetFutureReservationRequest request = new GetFutureReservationRequest
{
Zone = "",
FutureReservation = "",
Project = "",
};
// Make the request
FutureReservation response = futureReservationsClient.Get(request);
Get(string, string, string, CallSettings)
public virtual FutureReservation Get(string project, string zone, string futureReservation, CallSettings callSettings = null)Retrieves information about the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the future reservation to retrieve. Name should conform to RFC1035. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
FutureReservation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
// Make the request
FutureReservation response = futureReservationsClient.Get(project, zone, futureReservation);
GetAsync(GetFutureReservationRequest, CallSettings)
public virtual Task<FutureReservation> GetAsync(GetFutureReservationRequest request, CallSettings callSettings = null)Retrieves information about the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
GetFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskFutureReservation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
GetFutureReservationRequest request = new GetFutureReservationRequest
{
Zone = "",
FutureReservation = "",
Project = "",
};
// Make the request
FutureReservation response = await futureReservationsClient.GetAsync(request);
GetAsync(GetFutureReservationRequest, CancellationToken)
public virtual Task<FutureReservation> GetAsync(GetFutureReservationRequest request, CancellationToken cancellationToken)Retrieves information about the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
GetFutureReservationRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskFutureReservation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
GetFutureReservationRequest request = new GetFutureReservationRequest
{
Zone = "",
FutureReservation = "",
Project = "",
};
// Make the request
FutureReservation response = await futureReservationsClient.GetAsync(request);
GetAsync(string, string, string, CallSettings)
public virtual Task<FutureReservation> GetAsync(string project, string zone, string futureReservation, CallSettings callSettings = null)Retrieves information about the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the future reservation to retrieve. Name should conform to RFC1035. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskFutureReservation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
// Make the request
FutureReservation response = await futureReservationsClient.GetAsync(project, zone, futureReservation);
GetAsync(string, string, string, CancellationToken)
public virtual Task<FutureReservation> GetAsync(string project, string zone, string futureReservation, CancellationToken cancellationToken)Retrieves information about the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the future reservation to retrieve. Name should conform to RFC1035. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskFutureReservation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
// Make the request
FutureReservation response = await futureReservationsClient.GetAsync(project, zone, futureReservation);
Insert(InsertFutureReservationRequest, CallSettings)
public virtual Operation<Operation, Operation> Insert(InsertFutureReservationRequest request, CallSettings callSettings = null)Creates a new Future Reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
InsertFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
InsertFutureReservationRequest request = new InsertFutureReservationRequest
{
Zone = "",
RequestId = "",
Project = "",
FutureReservationResource = new FutureReservation(),
};
// Make the request
lro::Operation<Operation, Operation> response = futureReservationsClient.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 = futureReservationsClient.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, FutureReservation, CallSettings)
public virtual Operation<Operation, Operation> Insert(string project, string zone, FutureReservation futureReservationResource, CallSettings callSettings = null)Creates a new Future Reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservationResource |
FutureReservationThe body resource for this request |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
FutureReservation futureReservationResource = new FutureReservation();
// Make the request
lro::Operation<Operation, Operation> response = futureReservationsClient.Insert(project, zone, futureReservationResource);
// 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 = futureReservationsClient.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(InsertFutureReservationRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertFutureReservationRequest request, CallSettings callSettings = null)Creates a new Future Reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
InsertFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
InsertFutureReservationRequest request = new InsertFutureReservationRequest
{
Zone = "",
RequestId = "",
Project = "",
FutureReservationResource = new FutureReservation(),
};
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.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 futureReservationsClient.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(InsertFutureReservationRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertFutureReservationRequest request, CancellationToken cancellationToken)Creates a new Future Reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
InsertFutureReservationRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
InsertFutureReservationRequest request = new InsertFutureReservationRequest
{
Zone = "",
RequestId = "",
Project = "",
FutureReservationResource = new FutureReservation(),
};
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.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 futureReservationsClient.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, FutureReservation, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string zone, FutureReservation futureReservationResource, CallSettings callSettings = null)Creates a new Future Reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservationResource |
FutureReservationThe body resource for this request |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
FutureReservation futureReservationResource = new FutureReservation();
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.InsertAsync(project, zone, futureReservationResource);
// 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 futureReservationsClient.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, FutureReservation, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string zone, FutureReservation futureReservationResource, CancellationToken cancellationToken)Creates a new Future Reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservationResource |
FutureReservationThe body resource for this request |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
FutureReservation futureReservationResource = new FutureReservation();
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.InsertAsync(project, zone, futureReservationResource);
// 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 futureReservationsClient.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(ListFutureReservationsRequest, CallSettings)
public virtual PagedEnumerable<FutureReservationsListResponse, FutureReservation> List(ListFutureReservationsRequest request, CallSettings callSettings = null)A list of all the future reservations that have been configured for the specified project in specified zone.
| Parameters | |
|---|---|
| Name | Description |
request |
ListFutureReservationsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableFutureReservationsListResponseFutureReservation |
A pageable sequence of FutureReservation resources. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
ListFutureReservationsRequest request = new ListFutureReservationsRequest
{
Zone = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<FutureReservationsListResponse, FutureReservation> response = futureReservationsClient.List(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (FutureReservation 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 (FutureReservationsListResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FutureReservation 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<FutureReservation> 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 (FutureReservation 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<FutureReservationsListResponse, FutureReservation> List(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)A list of all the future reservations that have been configured for the specified project in specified zone.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableFutureReservationsListResponseFutureReservation |
A pageable sequence of FutureReservation resources. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedEnumerable<FutureReservationsListResponse, FutureReservation> response = futureReservationsClient.List(project, zone);
// Iterate over all response items, lazily performing RPCs as required
foreach (FutureReservation 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 (FutureReservationsListResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FutureReservation 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<FutureReservation> 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 (FutureReservation 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(ListFutureReservationsRequest, CallSettings)
public virtual PagedAsyncEnumerable<FutureReservationsListResponse, FutureReservation> ListAsync(ListFutureReservationsRequest request, CallSettings callSettings = null)A list of all the future reservations that have been configured for the specified project in specified zone.
| Parameters | |
|---|---|
| Name | Description |
request |
ListFutureReservationsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableFutureReservationsListResponseFutureReservation |
A pageable asynchronous sequence of FutureReservation resources. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
ListFutureReservationsRequest request = new ListFutureReservationsRequest
{
Zone = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<FutureReservationsListResponse, FutureReservation> response = futureReservationsClient.ListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((FutureReservation 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((FutureReservationsListResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FutureReservation 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<FutureReservation> 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 (FutureReservation 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<FutureReservationsListResponse, FutureReservation> ListAsync(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)A list of all the future reservations that have been configured for the specified project in specified zone.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableFutureReservationsListResponseFutureReservation |
A pageable asynchronous sequence of FutureReservation resources. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedAsyncEnumerable<FutureReservationsListResponse, FutureReservation> response = futureReservationsClient.ListAsync(project, zone);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((FutureReservation 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((FutureReservationsListResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FutureReservation 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<FutureReservation> 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 (FutureReservation 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;
PollOnceCancel(string, CallSettings)
public virtual Operation<Operation, Operation> PollOnceCancel(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of Cancel.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationOperationOperation |
The result of polling the operation. |
PollOnceCancelAsync(string, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceCancelAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of Cancel
.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A task representing the result of polling the operation. |
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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A task representing the result of polling the operation. |
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.
Update(UpdateFutureReservationRequest, CallSettings)
public virtual Operation<Operation, Operation> Update(UpdateFutureReservationRequest request, CallSettings callSettings = null)Updates the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
UpdateFutureReservationRequest request = new UpdateFutureReservationRequest
{
Zone = "",
RequestId = "",
FutureReservation = "",
Project = "",
FutureReservationResource = new FutureReservation(),
UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = futureReservationsClient.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 = futureReservationsClient.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, FutureReservation, CallSettings)
public virtual Operation<Operation, Operation> Update(string project, string zone, string futureReservation, FutureReservation futureReservationResource, CallSettings callSettings = null)Updates the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the reservation to update. Name should conform to RFC1035. |
futureReservationResource |
FutureReservationThe body resource for this request |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationOperationOperation |
The RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = FutureReservationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
FutureReservation futureReservationResource = new FutureReservation();
// Make the request
lro::Operation<Operation, Operation> response = futureReservationsClient.Update(project, zone, futureReservation, futureReservationResource);
// 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 = futureReservationsClient.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(UpdateFutureReservationRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateFutureReservationRequest request, CallSettings callSettings = null)Updates the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateFutureReservationRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
UpdateFutureReservationRequest request = new UpdateFutureReservationRequest
{
Zone = "",
RequestId = "",
FutureReservation = "",
Project = "",
FutureReservationResource = new FutureReservation(),
UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.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 futureReservationsClient.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(UpdateFutureReservationRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateFutureReservationRequest request, CancellationToken cancellationToken)Updates the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateFutureReservationRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
UpdateFutureReservationRequest request = new UpdateFutureReservationRequest
{
Zone = "",
RequestId = "",
FutureReservation = "",
Project = "",
FutureReservationResource = new FutureReservation(),
UpdateMask = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.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 futureReservationsClient.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, FutureReservation, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string futureReservation, FutureReservation futureReservationResource, CallSettings callSettings = null)Updates the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the reservation to update. Name should conform to RFC1035. |
futureReservationResource |
FutureReservationThe body resource for this request |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
FutureReservation futureReservationResource = new FutureReservation();
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.UpdateAsync(project, zone, futureReservation, futureReservationResource);
// 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 futureReservationsClient.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, FutureReservation, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string zone, string futureReservation, FutureReservation futureReservationResource, CancellationToken cancellationToken)Updates the specified future reservation.
| Parameters | |
|---|---|
| Name | Description |
project |
stringProject ID for this request. |
zone |
stringName of the zone for this request. Name should conform to RFC1035. |
futureReservation |
stringName of the reservation to update. Name should conform to RFC1035. |
futureReservationResource |
FutureReservationThe body resource for this request |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationOperationOperation |
A Task containing the RPC response. |
// Create client
FutureReservationsClient futureReservationsClient = await FutureReservationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string futureReservation = "";
FutureReservation futureReservationResource = new FutureReservation();
// Make the request
lro::Operation<Operation, Operation> response = await futureReservationsClient.UpdateAsync(project, zone, futureReservation, futureReservationResource);
// 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 futureReservationsClient.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;
}