public abstract class FirewallsClient
Reference documentation and code samples for the Compute Engine v1 API class FirewallsClient.
Firewalls client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Compute.V1Assembly
Google.Cloud.Compute.V1.dll
Remarks
The Firewalls API.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Firewalls 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 Firewalls scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default Firewalls scopes are:
DeleteOperationsClient
public virtual OperationsClient DeleteOperationsClient { get; }
The long-running operations client for Delete
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual Firewalls.FirewallsClient GrpcClient { get; }
The underlying gRPC Firewalls client
Property Value | |
---|---|
Type | Description |
Firewalls.FirewallsClient |
InsertOperationsClient
public virtual OperationsClient InsertOperationsClient { get; }
The long-running operations client for Insert
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
PatchOperationsClient
public virtual OperationsClient PatchOperationsClient { get; }
The long-running operations client for Patch
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateOperationsClient
public virtual OperationsClient UpdateOperationsClient { get; }
The long-running operations client for Update
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static FirewallsClient Create()
Synchronously creates a FirewallsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FirewallsClientBuilder.
Returns | |
---|---|
Type | Description |
FirewallsClient | The created FirewallsClient. |
CreateAsync(CancellationToken)
public static Task<FirewallsClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a FirewallsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FirewallsClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<FirewallsClient> | The task representing the created FirewallsClient. |
Delete(DeleteFirewallRequest, CallSettings)
public virtual Operation<Operation, Operation> Delete(DeleteFirewallRequest request, CallSettings callSettings = null)
Deletes the specified firewall.
Parameters | |
---|---|
Name | Description |
request | DeleteFirewallRequest 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
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
DeleteFirewallRequest request = new DeleteFirewallRequest
{
RequestId = "",
Project = "",
Firewall = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallsClient.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 = firewallsClient.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, CallSettings)
public virtual Operation<Operation, Operation> Delete(string project, string firewall, CallSettings callSettings = null)
Deletes the specified firewall.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The RPC response. |
// Create client
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
string project = "";
string firewall = "";
// Make the request
lro::Operation<Operation, Operation> response = firewallsClient.Delete(project, firewall);
// 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 = firewallsClient.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(DeleteFirewallRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteFirewallRequest request, CallSettings callSettings = null)
Deletes the specified firewall.
Parameters | |
---|---|
Name | Description |
request | DeleteFirewallRequest 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
DeleteFirewallRequest request = new DeleteFirewallRequest
{
RequestId = "",
Project = "",
Firewall = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.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 firewallsClient.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(DeleteFirewallRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteFirewallRequest request, CancellationToken cancellationToken)
Deletes the specified firewall.
Parameters | |
---|---|
Name | Description |
request | DeleteFirewallRequest 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
DeleteFirewallRequest request = new DeleteFirewallRequest
{
RequestId = "",
Project = "",
Firewall = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.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 firewallsClient.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, CallSettings)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string firewall, CallSettings callSettings = null)
Deletes the specified firewall.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string firewall = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.DeleteAsync(project, firewall);
// 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 firewallsClient.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, CancellationToken)
public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string firewall, CancellationToken cancellationToken)
Deletes the specified firewall.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string firewall = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.DeleteAsync(project, firewall);
// 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 firewallsClient.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(GetFirewallRequest, CallSettings)
public virtual Firewall Get(GetFirewallRequest request, CallSettings callSettings = null)
Returns the specified firewall.
Parameters | |
---|---|
Name | Description |
request | GetFirewallRequest 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 |
Firewall | The RPC response. |
// Create client
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
GetFirewallRequest request = new GetFirewallRequest
{
Project = "",
Firewall = "",
};
// Make the request
Firewall response = firewallsClient.Get(request);
Get(String, String, CallSettings)
public virtual Firewall Get(string project, string firewall, CallSettings callSettings = null)
Returns the specified firewall.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to return. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Firewall | The RPC response. |
// Create client
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
string project = "";
string firewall = "";
// Make the request
Firewall response = firewallsClient.Get(project, firewall);
GetAsync(GetFirewallRequest, CallSettings)
public virtual Task<Firewall> GetAsync(GetFirewallRequest request, CallSettings callSettings = null)
Returns the specified firewall.
Parameters | |
---|---|
Name | Description |
request | GetFirewallRequest 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<Firewall> | A Task containing the RPC response. |
// Create client
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
GetFirewallRequest request = new GetFirewallRequest
{
Project = "",
Firewall = "",
};
// Make the request
Firewall response = await firewallsClient.GetAsync(request);
GetAsync(GetFirewallRequest, CancellationToken)
public virtual Task<Firewall> GetAsync(GetFirewallRequest request, CancellationToken cancellationToken)
Returns the specified firewall.
Parameters | |
---|---|
Name | Description |
request | GetFirewallRequest 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<Firewall> | A Task containing the RPC response. |
// Create client
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
GetFirewallRequest request = new GetFirewallRequest
{
Project = "",
Firewall = "",
};
// Make the request
Firewall response = await firewallsClient.GetAsync(request);
GetAsync(String, String, CallSettings)
public virtual Task<Firewall> GetAsync(string project, string firewall, CallSettings callSettings = null)
Returns the specified firewall.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to return. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Firewall> | A Task containing the RPC response. |
// Create client
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string firewall = "";
// Make the request
Firewall response = await firewallsClient.GetAsync(project, firewall);
GetAsync(String, String, CancellationToken)
public virtual Task<Firewall> GetAsync(string project, string firewall, CancellationToken cancellationToken)
Returns the specified firewall.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to return. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Firewall> | A Task containing the RPC response. |
// Create client
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string firewall = "";
// Make the request
Firewall response = await firewallsClient.GetAsync(project, firewall);
Insert(InsertFirewallRequest, CallSettings)
public virtual Operation<Operation, Operation> Insert(InsertFirewallRequest request, CallSettings callSettings = null)
Creates a firewall rule in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request | InsertFirewallRequest 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
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
InsertFirewallRequest request = new InsertFirewallRequest
{
RequestId = "",
FirewallResource = new Firewall(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallsClient.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 = firewallsClient.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, Firewall, CallSettings)
public virtual Operation<Operation, Operation> Insert(string project, Firewall firewallResource, CallSettings callSettings = null)
Creates a firewall rule in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewallResource | Firewall 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
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
string project = "";
Firewall firewallResource = new Firewall();
// Make the request
lro::Operation<Operation, Operation> response = firewallsClient.Insert(project, firewallResource);
// 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 = firewallsClient.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(InsertFirewallRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertFirewallRequest request, CallSettings callSettings = null)
Creates a firewall rule in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request | InsertFirewallRequest 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
InsertFirewallRequest request = new InsertFirewallRequest
{
RequestId = "",
FirewallResource = new Firewall(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.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 firewallsClient.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(InsertFirewallRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertFirewallRequest request, CancellationToken cancellationToken)
Creates a firewall rule in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request | InsertFirewallRequest 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
InsertFirewallRequest request = new InsertFirewallRequest
{
RequestId = "",
FirewallResource = new Firewall(),
Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.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 firewallsClient.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, Firewall, CallSettings)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, Firewall firewallResource, CallSettings callSettings = null)
Creates a firewall rule in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewallResource | Firewall 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
Firewall firewallResource = new Firewall();
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.InsertAsync(project, firewallResource);
// 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 firewallsClient.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, Firewall, CancellationToken)
public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, Firewall firewallResource, CancellationToken cancellationToken)
Creates a firewall rule in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewallResource | Firewall 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
Firewall firewallResource = new Firewall();
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.InsertAsync(project, firewallResource);
// 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 firewallsClient.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(ListFirewallsRequest, CallSettings)
public virtual PagedEnumerable<FirewallList, Firewall> List(ListFirewallsRequest request, CallSettings callSettings = null)
Retrieves the list of firewall rules available to the specified project.
Parameters | |
---|---|
Name | Description |
request | ListFirewallsRequest 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<FirewallList, Firewall> | A pageable sequence of Firewall resources. |
// Create client
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
ListFirewallsRequest request = new ListFirewallsRequest
{
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<FirewallList, Firewall> response = firewallsClient.List(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Firewall 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 (FirewallList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Firewall 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<Firewall> 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 (Firewall 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<FirewallList, Firewall> List(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves the list of firewall rules available to the specified project.
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<FirewallList, Firewall> | A pageable sequence of Firewall resources. |
// Create client
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<FirewallList, Firewall> response = firewallsClient.List(project);
// Iterate over all response items, lazily performing RPCs as required
foreach (Firewall 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 (FirewallList page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Firewall 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<Firewall> 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 (Firewall 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(ListFirewallsRequest, CallSettings)
public virtual PagedAsyncEnumerable<FirewallList, Firewall> ListAsync(ListFirewallsRequest request, CallSettings callSettings = null)
Retrieves the list of firewall rules available to the specified project.
Parameters | |
---|---|
Name | Description |
request | ListFirewallsRequest 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<FirewallList, Firewall> | A pageable asynchronous sequence of Firewall resources. |
// Create client
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
ListFirewallsRequest request = new ListFirewallsRequest
{
OrderBy = "",
Project = "",
Filter = "",
ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<FirewallList, Firewall> response = firewallsClient.ListAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Firewall 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((FirewallList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Firewall 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<Firewall> 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 (Firewall 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<FirewallList, Firewall> ListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Retrieves the list of firewall rules available to the specified project.
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<FirewallList, Firewall> | A pageable asynchronous sequence of Firewall resources. |
// Create client
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<FirewallList, Firewall> response = firewallsClient.ListAsync(project);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Firewall 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((FirewallList page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Firewall 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<Firewall> 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 (Firewall 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;
Patch(PatchFirewallRequest, CallSettings)
public virtual Operation<Operation, Operation> Patch(PatchFirewallRequest request, CallSettings callSettings = null)
Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | PatchFirewallRequest 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
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
PatchFirewallRequest request = new PatchFirewallRequest
{
RequestId = "",
FirewallResource = new Firewall(),
Project = "",
Firewall = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallsClient.Patch(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 = firewallsClient.PollOncePatch(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;
}
Patch(String, String, Firewall, CallSettings)
public virtual Operation<Operation, Operation> Patch(string project, string firewall, Firewall firewallResource, CallSettings callSettings = null)
Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to patch. |
firewallResource | Firewall 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
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
string project = "";
string firewall = "";
Firewall firewallResource = new Firewall();
// Make the request
lro::Operation<Operation, Operation> response = firewallsClient.Patch(project, firewall, firewallResource);
// 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 = firewallsClient.PollOncePatch(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;
}
PatchAsync(PatchFirewallRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchFirewallRequest request, CallSettings callSettings = null)
Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | PatchFirewallRequest 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
PatchFirewallRequest request = new PatchFirewallRequest
{
RequestId = "",
FirewallResource = new Firewall(),
Project = "",
Firewall = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.PatchAsync(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 firewallsClient.PollOncePatchAsync(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;
}
PatchAsync(PatchFirewallRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchFirewallRequest request, CancellationToken cancellationToken)
Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
request | PatchFirewallRequest 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
PatchFirewallRequest request = new PatchFirewallRequest
{
RequestId = "",
FirewallResource = new Firewall(),
Project = "",
Firewall = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.PatchAsync(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 firewallsClient.PollOncePatchAsync(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;
}
PatchAsync(String, String, Firewall, CallSettings)
public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string firewall, Firewall firewallResource, CallSettings callSettings = null)
Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to patch. |
firewallResource | Firewall 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string firewall = "";
Firewall firewallResource = new Firewall();
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.PatchAsync(project, firewall, firewallResource);
// 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 firewallsClient.PollOncePatchAsync(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;
}
PatchAsync(String, String, Firewall, CancellationToken)
public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string firewall, Firewall firewallResource, CancellationToken cancellationToken)
Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to patch. |
firewallResource | Firewall 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string firewall = "";
Firewall firewallResource = new Firewall();
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.PatchAsync(project, firewall, firewallResource);
// 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 firewallsClient.PollOncePatchAsync(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;
}
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. |
PollOncePatch(String, CallSettings)
public virtual Operation<Operation, Operation> PollOncePatch(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Patch
.
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. |
PollOncePatchAsync(String, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOncePatchAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Patch
.
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. |
PollOnceUpdate(String, CallSettings)
public virtual Operation<Operation, Operation> PollOnceUpdate(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of Update
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<Operation, Operation> | The result of polling the operation. |
PollOnceUpdateAsync(String, CallSettings)
public virtual Task<Operation<Operation, Operation>> PollOnceUpdateAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of Update
.
Parameters | |
---|---|
Name | Description |
operationName | String The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Operation, Operation>> | A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
Update(UpdateFirewallRequest, CallSettings)
public virtual Operation<Operation, Operation> Update(UpdateFirewallRequest request, CallSettings callSettings = null)
Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Parameters | |
---|---|
Name | Description |
request | UpdateFirewallRequest 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
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
UpdateFirewallRequest request = new UpdateFirewallRequest
{
RequestId = "",
FirewallResource = new Firewall(),
Project = "",
Firewall = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallsClient.Update(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallsClient.PollOnceUpdate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
Update(String, String, Firewall, CallSettings)
public virtual Operation<Operation, Operation> Update(string project, string firewall, Firewall firewallResource, CallSettings callSettings = null)
Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to update. |
firewallResource | Firewall 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
FirewallsClient firewallsClient = FirewallsClient.Create();
// Initialize request argument(s)
string project = "";
string firewall = "";
Firewall firewallResource = new Firewall();
// Make the request
lro::Operation<Operation, Operation> response = firewallsClient.Update(project, firewall, firewallResource);
// 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 = firewallsClient.PollOnceUpdate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(UpdateFirewallRequest, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateFirewallRequest request, CallSettings callSettings = null)
Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Parameters | |
---|---|
Name | Description |
request | UpdateFirewallRequest 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
UpdateFirewallRequest request = new UpdateFirewallRequest
{
RequestId = "",
FirewallResource = new Firewall(),
Project = "",
Firewall = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.UpdateAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallsClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(UpdateFirewallRequest, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateFirewallRequest request, CancellationToken cancellationToken)
Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Parameters | |
---|---|
Name | Description |
request | UpdateFirewallRequest 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
UpdateFirewallRequest request = new UpdateFirewallRequest
{
RequestId = "",
FirewallResource = new Firewall(),
Project = "",
Firewall = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.UpdateAsync(request);
// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallsClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(String, String, Firewall, CallSettings)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string firewall, Firewall firewallResource, CallSettings callSettings = null)
Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to update. |
firewallResource | Firewall 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string firewall = "";
Firewall firewallResource = new Firewall();
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.UpdateAsync(project, firewall, firewallResource);
// 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 firewallsClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}
UpdateAsync(String, String, Firewall, CancellationToken)
public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string firewall, Firewall firewallResource, CancellationToken cancellationToken)
Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
firewall | String Name of the firewall rule to update. |
firewallResource | Firewall 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
FirewallsClient firewallsClient = await FirewallsClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string firewall = "";
Firewall firewallResource = new Firewall();
// Make the request
lro::Operation<Operation, Operation> response = await firewallsClient.UpdateAsync(project, firewall, firewallResource);
// 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 firewallsClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Operation retrievedResult = retrievedResponse.Result;
}