public abstract class ZoneOperationsClient
Reference documentation and code samples for the Compute Engine v1 API class ZoneOperationsClient.
ZoneOperations client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Compute.V1Assembly
Google.Cloud.Compute.V1.dll
Remarks
The ZoneOperations API.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the ZoneOperations 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 ZoneOperations scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default ZoneOperations scopes are:
GrpcClient
public virtual ZoneOperations.ZoneOperationsClient GrpcClient { get; }
The underlying gRPC ZoneOperations client
Property Value | |
---|---|
Type | Description |
ZoneOperationsZoneOperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static ZoneOperationsClient Create()
Synchronously creates a ZoneOperationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ZoneOperationsClientBuilder.
Returns | |
---|---|
Type | Description |
ZoneOperationsClient |
The created ZoneOperationsClient. |
CreateAsync(CancellationToken)
public static Task<ZoneOperationsClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a ZoneOperationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ZoneOperationsClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskZoneOperationsClient |
The task representing the created ZoneOperationsClient. |
Delete(DeleteZoneOperationRequest, CallSettings)
public virtual DeleteZoneOperationResponse Delete(DeleteZoneOperationRequest request, CallSettings callSettings = null)
Deletes the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
request |
DeleteZoneOperationRequest 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 |
DeleteZoneOperationResponse |
The RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.Create();
// Initialize request argument(s)
DeleteZoneOperationRequest request = new DeleteZoneOperationRequest
{
Zone = "",
Operation = "",
Project = "",
};
// Make the request
DeleteZoneOperationResponse response = zoneOperationsClient.Delete(request);
Delete(string, string, string, CallSettings)
public virtual DeleteZoneOperationResponse Delete(string project, string zone, string operation, CallSettings callSettings = null)
Deletes the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
operation |
string Name of the Operations resource to delete, or its unique numeric identifier. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DeleteZoneOperationResponse |
The RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string operation = "";
// Make the request
DeleteZoneOperationResponse response = zoneOperationsClient.Delete(project, zone, operation);
DeleteAsync(DeleteZoneOperationRequest, CallSettings)
public virtual Task<DeleteZoneOperationResponse> DeleteAsync(DeleteZoneOperationRequest request, CallSettings callSettings = null)
Deletes the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
request |
DeleteZoneOperationRequest 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 |
TaskDeleteZoneOperationResponse |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
DeleteZoneOperationRequest request = new DeleteZoneOperationRequest
{
Zone = "",
Operation = "",
Project = "",
};
// Make the request
DeleteZoneOperationResponse response = await zoneOperationsClient.DeleteAsync(request);
DeleteAsync(DeleteZoneOperationRequest, CancellationToken)
public virtual Task<DeleteZoneOperationResponse> DeleteAsync(DeleteZoneOperationRequest request, CancellationToken cancellationToken)
Deletes the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
request |
DeleteZoneOperationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeleteZoneOperationResponse |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
DeleteZoneOperationRequest request = new DeleteZoneOperationRequest
{
Zone = "",
Operation = "",
Project = "",
};
// Make the request
DeleteZoneOperationResponse response = await zoneOperationsClient.DeleteAsync(request);
DeleteAsync(string, string, string, CallSettings)
public virtual Task<DeleteZoneOperationResponse> DeleteAsync(string project, string zone, string operation, CallSettings callSettings = null)
Deletes the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
operation |
string Name of the Operations resource to delete, or its unique numeric identifier. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDeleteZoneOperationResponse |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string operation = "";
// Make the request
DeleteZoneOperationResponse response = await zoneOperationsClient.DeleteAsync(project, zone, operation);
DeleteAsync(string, string, string, CancellationToken)
public virtual Task<DeleteZoneOperationResponse> DeleteAsync(string project, string zone, string operation, CancellationToken cancellationToken)
Deletes the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
operation |
string Name of the Operations resource to delete, or its unique numeric identifier. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDeleteZoneOperationResponse |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string operation = "";
// Make the request
DeleteZoneOperationResponse response = await zoneOperationsClient.DeleteAsync(project, zone, operation);
Get(GetZoneOperationRequest, CallSettings)
public virtual Operation Get(GetZoneOperationRequest request, CallSettings callSettings = null)
Retrieves the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
request |
GetZoneOperationRequest 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 |
The RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.Create();
// Initialize request argument(s)
GetZoneOperationRequest request = new GetZoneOperationRequest
{
Zone = "",
Operation = "",
Project = "",
};
// Make the request
Operation response = zoneOperationsClient.Get(request);
Get(string, string, string, CallSettings)
public virtual Operation Get(string project, string zone, string operation, CallSettings callSettings = null)
Retrieves the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
operation |
string Name of the Operations resource to return, or its unique numeric identifier. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation |
The RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string operation = "";
// Make the request
Operation response = zoneOperationsClient.Get(project, zone, operation);
GetAsync(GetZoneOperationRequest, CallSettings)
public virtual Task<Operation> GetAsync(GetZoneOperationRequest request, CallSettings callSettings = null)
Retrieves the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
request |
GetZoneOperationRequest 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 |
TaskOperation |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
GetZoneOperationRequest request = new GetZoneOperationRequest
{
Zone = "",
Operation = "",
Project = "",
};
// Make the request
Operation response = await zoneOperationsClient.GetAsync(request);
GetAsync(GetZoneOperationRequest, CancellationToken)
public virtual Task<Operation> GetAsync(GetZoneOperationRequest request, CancellationToken cancellationToken)
Retrieves the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
request |
GetZoneOperationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperation |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
GetZoneOperationRequest request = new GetZoneOperationRequest
{
Zone = "",
Operation = "",
Project = "",
};
// Make the request
Operation response = await zoneOperationsClient.GetAsync(request);
GetAsync(string, string, string, CallSettings)
public virtual Task<Operation> GetAsync(string project, string zone, string operation, CallSettings callSettings = null)
Retrieves the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
operation |
string Name of the Operations resource to return, or its unique numeric identifier. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperation |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string operation = "";
// Make the request
Operation response = await zoneOperationsClient.GetAsync(project, zone, operation);
GetAsync(string, string, string, CancellationToken)
public virtual Task<Operation> GetAsync(string project, string zone, string operation, CancellationToken cancellationToken)
Retrieves the specified zone-specific Operations resource.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
operation |
string Name of the Operations resource to return, or its unique numeric identifier. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperation |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string operation = "";
// Make the request
Operation response = await zoneOperationsClient.GetAsync(project, zone, operation);
List(ListZoneOperationsRequest, CallSettings)
public virtual PagedEnumerable<OperationList, Operation> List(ListZoneOperationsRequest request, CallSettings callSettings = null)
Retrieves a list of Operation resources contained within the specified zone.
Parameters | |
---|---|
Name | Description |
request |
ListZoneOperationsRequest 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 |
PagedEnumerableOperationListOperation |
A pageable sequence of Operation resources. |
// Create client
ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.Create();
// Initialize request argument(s)
ListZoneOperationsRequest request = new ListZoneOperationsRequest
{
Zone = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<OperationList, Operation> response = zoneOperationsClient.List(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Operation 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 (OperationList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Operation 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<Operation> 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 (Operation 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<OperationList, Operation> List(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves a list of Operation resources contained within the specified zone.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for request. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableOperationListOperation |
A pageable sequence of Operation resources. |
// Create client
ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedEnumerable<OperationList, Operation> response = zoneOperationsClient.List(project, zone);
// Iterate over all response items, lazily performing RPCs as required
foreach (Operation 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 (OperationList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Operation 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<Operation> 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 (Operation 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(ListZoneOperationsRequest, CallSettings)
public virtual PagedAsyncEnumerable<OperationList, Operation> ListAsync(ListZoneOperationsRequest request, CallSettings callSettings = null)
Retrieves a list of Operation resources contained within the specified zone.
Parameters | |
---|---|
Name | Description |
request |
ListZoneOperationsRequest 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 |
PagedAsyncEnumerableOperationListOperation |
A pageable asynchronous sequence of Operation resources. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
ListZoneOperationsRequest request = new ListZoneOperationsRequest
{
Zone = "",
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<OperationList, Operation> response = zoneOperationsClient.ListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Operation 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((OperationList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Operation 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<Operation> 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 (Operation 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<OperationList, Operation> ListAsync(string project, string zone, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves a list of Operation resources contained within the specified zone.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for request. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableOperationListOperation |
A pageable asynchronous sequence of Operation resources. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
// Make the request
PagedAsyncEnumerable<OperationList, Operation> response = zoneOperationsClient.ListAsync(project, zone);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Operation 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((OperationList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Operation 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<Operation> 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 (Operation 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;
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.
Wait(WaitZoneOperationRequest, CallSettings)
public virtual Operation Wait(WaitZoneOperationRequest request, CallSettings callSettings = null)
Waits for the specified Operation resource to return as DONE
or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be DONE
or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE
.
Parameters | |
---|---|
Name | Description |
request |
WaitZoneOperationRequest 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 |
The RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.Create();
// Initialize request argument(s)
WaitZoneOperationRequest request = new WaitZoneOperationRequest
{
Zone = "",
Operation = "",
Project = "",
};
// Make the request
Operation response = zoneOperationsClient.Wait(request);
Wait(string, string, string, CallSettings)
public virtual Operation Wait(string project, string zone, string operation, CallSettings callSettings = null)
Waits for the specified Operation resource to return as DONE
or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be DONE
or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE
.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
operation |
string Name of the Operations resource to return, or its unique numeric identifier. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation |
The RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = ZoneOperationsClient.Create();
// Initialize request argument(s)
string project = "";
string zone = "";
string operation = "";
// Make the request
Operation response = zoneOperationsClient.Wait(project, zone, operation);
WaitAsync(WaitZoneOperationRequest, CallSettings)
public virtual Task<Operation> WaitAsync(WaitZoneOperationRequest request, CallSettings callSettings = null)
Waits for the specified Operation resource to return as DONE
or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be DONE
or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE
.
Parameters | |
---|---|
Name | Description |
request |
WaitZoneOperationRequest 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 |
TaskOperation |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
WaitZoneOperationRequest request = new WaitZoneOperationRequest
{
Zone = "",
Operation = "",
Project = "",
};
// Make the request
Operation response = await zoneOperationsClient.WaitAsync(request);
WaitAsync(WaitZoneOperationRequest, CancellationToken)
public virtual Task<Operation> WaitAsync(WaitZoneOperationRequest request, CancellationToken cancellationToken)
Waits for the specified Operation resource to return as DONE
or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be DONE
or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE
.
Parameters | |
---|---|
Name | Description |
request |
WaitZoneOperationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperation |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
WaitZoneOperationRequest request = new WaitZoneOperationRequest
{
Zone = "",
Operation = "",
Project = "",
};
// Make the request
Operation response = await zoneOperationsClient.WaitAsync(request);
WaitAsync(string, string, string, CallSettings)
public virtual Task<Operation> WaitAsync(string project, string zone, string operation, CallSettings callSettings = null)
Waits for the specified Operation resource to return as DONE
or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be DONE
or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE
.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
operation |
string Name of the Operations resource to return, or its unique numeric identifier. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperation |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string operation = "";
// Make the request
Operation response = await zoneOperationsClient.WaitAsync(project, zone, operation);
WaitAsync(string, string, string, CancellationToken)
public virtual Task<Operation> WaitAsync(string project, string zone, string operation, CancellationToken cancellationToken)
Waits for the specified Operation resource to return as DONE
or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be DONE
or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE
.
Parameters | |
---|---|
Name | Description |
project |
string Project ID for this request. |
zone |
string Name of the zone for this request. |
operation |
string Name of the Operations resource to return, or its unique numeric identifier. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperation |
A Task containing the RPC response. |
// Create client
ZoneOperationsClient zoneOperationsClient = await ZoneOperationsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string zone = "";
string operation = "";
// Make the request
Operation response = await zoneOperationsClient.WaitAsync(project, zone, operation);