Compute Engine v1 API - Class FirewallsClient (2.7.0)

public abstract class FirewallsClient

Reference documentation and code samples for the Compute Engine v1 API class FirewallsClient.

Firewalls client wrapper, for convenient use.

Inheritance

object > FirewallsClient

Derived Types

Namespace

GoogleCloudGoogle.Cloud.ComputeV1

Assembly

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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Firewalls scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Firewalls.FirewallsClient GrpcClient { get; }

The underlying gRPC Firewalls client

Property Value
TypeDescription
FirewallsFirewallsClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateOperationsClient

public virtual OperationsClient UpdateOperationsClient { get; }

The long-running operations client for Update.

Property Value
TypeDescription
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
TypeDescription
FirewallsClient

The created FirewallsClient.

CreateAsync(CancellationToken)

public static Task<FirewallsClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a FirewallsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FirewallsClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskFirewallsClient

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
NameDescription
requestDeleteFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// 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
NameDescription
requestDeleteFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteFirewallRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Firewall

The RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Firewall

The RPC response.

Example
// 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
NameDescription
requestGetFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewall

A Task containing the RPC response.

Example
// 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
NameDescription
requestGetFirewallRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewall

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewall

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to return.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewall

A Task containing the RPC response.

Example
// 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
NameDescription
requestInsertFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallResourceFirewall

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// 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
NameDescription
requestInsertFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
requestInsertFirewallRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallResourceFirewall

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallResourceFirewall

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
requestListFirewallsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableFirewallListFirewall

A pageable sequence of Firewall resources.

Example
// 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, int?, 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
NameDescription
projectstring

Project ID for this request.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableFirewallListFirewall

A pageable sequence of Firewall resources.

Example
// 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
NameDescription
requestListFirewallsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableFirewallListFirewall

A pageable asynchronous sequence of Firewall resources.

Example
// 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, int?, 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
NameDescription
projectstring

Project ID for this request.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableFirewallListFirewall

A pageable asynchronous sequence of Firewall resources.

Example
// 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
NameDescription
requestPatchFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to patch.

firewallResourceFirewall

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// 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
NameDescription
requestPatchFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
requestPatchFirewallRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to patch.

firewallResourceFirewall

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to patch.

firewallResourceFirewall

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceDeleteAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Delete .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceInsert(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceInsert(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Insert.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceInsertAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Insert .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceUpdate(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceUpdate(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Update.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceUpdateAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceUpdateAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Update .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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
NameDescription
requestUpdateFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to update.

firewallResourceFirewall

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// 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
NameDescription
requestUpdateFirewallRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
requestUpdateFirewallRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to update.

firewallResourceFirewall

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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
NameDescription
projectstring

Project ID for this request.

firewallstring

Name of the firewall rule to update.

firewallResourceFirewall

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// 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;
}