public abstract 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 |
IReadOnlyList<String> |
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 |
Reservations.ReservationsClient |
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 |
Methods
AggregatedList(AggregatedListReservationsRequest, CallSettings)
public virtual PagedEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> AggregatedList(AggregatedListReservationsRequest request, CallSettings callSettings = null)
Retrieves an aggregated list of reservations.
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 |
PagedEnumerable<ReservationAggregatedList, KeyValuePair<String, ReservationsScopedList>> | A pageable sequence of KeyValuePair<TKey,TValue> resources. |
// Create client
ReservationsClient reservationsClient = ReservationsClient.Create();
// Initialize request argument(s)
AggregatedListReservationsRequest request = new AggregatedListReservationsRequest
{
OrderBy = "",
Project = "",
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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Retrieves an aggregated list of reservations.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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 |
PagedEnumerable<ReservationAggregatedList, KeyValuePair<String, ReservationsScopedList>> | 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.
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 |
PagedAsyncEnumerable<ReservationAggregatedList, KeyValuePair<String, ReservationsScopedList>> | 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 = "",
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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ReservationAggregatedList, KeyValuePair<string, ReservationsScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Retrieves an aggregated list of reservations.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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 |
PagedAsyncEnumerable<ReservationAggregatedList, KeyValuePair<String, ReservationsScopedList>> | 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(CancellationToken))
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 |
Task<ReservationsClient> | 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 |
Operation<Operation, Operation> | 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 |
Operation<Operation, Operation> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Reservation> | 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 |
Task<Reservation> | 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 |
Task<Reservation> | 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 |
Task<Reservation> | 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 |
Task<Policy> | 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 |
Task<Policy> | 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 |
Task<Policy> | 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 |
Task<Policy> | 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 |
Operation<Operation, Operation> | 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 |
Operation<Operation, Operation> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Operation<Operation, Operation>> | 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 |
PagedEnumerable<ReservationList, Reservation> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ReservationList, Reservation> List(string project, string zone, string pageToken = null, int? pageSize = default(int? ), 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 | Nullable<Int32> 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 |
PagedEnumerable<ReservationList, Reservation> | 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 |
PagedAsyncEnumerable<ReservationList, Reservation> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ReservationList, Reservation> ListAsync(string project, string zone, string pageToken = null, int? pageSize = default(int? ), 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 | Nullable<Int32> 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 |
PagedAsyncEnumerable<ReservationList, Reservation> | 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 |
Operation<Operation, Operation> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Operation<Operation, Operation> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Operation<Operation, Operation> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Operation<Operation, Operation> | 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 |
Operation<Operation, Operation> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Operation<Operation, Operation>> | 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 |
Task<Policy> | 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 |
Task<Policy> | 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 |
Task<Policy> | 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 |
Task<Policy> | 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 |
Task<TestPermissionsResponse> | 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 |
Task<TestPermissionsResponse> | 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 |
Task<TestPermissionsResponse> | 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 |
Task<TestPermissionsResponse> | 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);