Class RegionNetworkFirewallPoliciesClient (1.9.1)

public class RegionNetworkFirewallPoliciesClient implements BackgroundResource

Service Description: The RegionNetworkFirewallPolicies API.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   FirewallPolicy response =
       regionNetworkFirewallPoliciesClient.get(project, region, firewallPolicy);
 }
 

Note: close() needs to be called on the RegionNetworkFirewallPoliciesClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of RegionNetworkFirewallPoliciesSettings to create(). For example:

To customize credentials:


 RegionNetworkFirewallPoliciesSettings regionNetworkFirewallPoliciesSettings =
     RegionNetworkFirewallPoliciesSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create(regionNetworkFirewallPoliciesSettings);
 

To customize the endpoint:


 RegionNetworkFirewallPoliciesSettings regionNetworkFirewallPoliciesSettings =
     RegionNetworkFirewallPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build();
 RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create(regionNetworkFirewallPoliciesSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > RegionNetworkFirewallPoliciesClient

Implements

BackgroundResource

Static Methods

create()

public static final RegionNetworkFirewallPoliciesClient create()

Constructs an instance of RegionNetworkFirewallPoliciesClient with default settings.

Returns
TypeDescription
RegionNetworkFirewallPoliciesClient
Exceptions
TypeDescription
IOException

create(RegionNetworkFirewallPoliciesSettings settings)

public static final RegionNetworkFirewallPoliciesClient create(RegionNetworkFirewallPoliciesSettings settings)

Constructs an instance of RegionNetworkFirewallPoliciesClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsRegionNetworkFirewallPoliciesSettings
Returns
TypeDescription
RegionNetworkFirewallPoliciesClient
Exceptions
TypeDescription
IOException

create(RegionNetworkFirewallPoliciesStub stub)

public static final RegionNetworkFirewallPoliciesClient create(RegionNetworkFirewallPoliciesStub stub)

Constructs an instance of RegionNetworkFirewallPoliciesClient, using the given stub for making calls. This is for advanced usage - prefer using create(RegionNetworkFirewallPoliciesSettings).

Parameter
NameDescription
stubRegionNetworkFirewallPoliciesStub
Returns
TypeDescription
RegionNetworkFirewallPoliciesClient

Constructors

RegionNetworkFirewallPoliciesClient(RegionNetworkFirewallPoliciesSettings settings)

protected RegionNetworkFirewallPoliciesClient(RegionNetworkFirewallPoliciesSettings settings)

Constructs an instance of RegionNetworkFirewallPoliciesClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
NameDescription
settingsRegionNetworkFirewallPoliciesSettings

RegionNetworkFirewallPoliciesClient(RegionNetworkFirewallPoliciesStub stub)

protected RegionNetworkFirewallPoliciesClient(RegionNetworkFirewallPoliciesStub stub)
Parameter
NameDescription
stubRegionNetworkFirewallPoliciesStub

Methods

addAssociationAsync(AddAssociationRegionNetworkFirewallPolicyRequest request)

public final OperationFuture<Operation,Operation> addAssociationAsync(AddAssociationRegionNetworkFirewallPolicyRequest request)

Inserts an association for the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   AddAssociationRegionNetworkFirewallPolicyRequest request =
       AddAssociationRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReplaceExistingAssociation(true)
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionNetworkFirewallPoliciesClient.addAssociationAsync(request).get();
 }
 
Parameter
NameDescription
requestAddAssociationRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

addAssociationAsync(String project, String region, String firewallPolicy, FirewallPolicyAssociation firewallPolicyAssociationResource)

public final OperationFuture<Operation,Operation> addAssociationAsync(String project, String region, String firewallPolicy, FirewallPolicyAssociation firewallPolicyAssociationResource)

Inserts an association for the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   FirewallPolicyAssociation firewallPolicyAssociationResource =
       FirewallPolicyAssociation.newBuilder().build();
   Operation response =
       regionNetworkFirewallPoliciesClient
           .addAssociationAsync(
               project, region, firewallPolicy, firewallPolicyAssociationResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to update.

firewallPolicyAssociationResourceFirewallPolicyAssociation

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

addAssociationCallable()

public final UnaryCallable<AddAssociationRegionNetworkFirewallPolicyRequest,Operation> addAssociationCallable()

Inserts an association for the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   AddAssociationRegionNetworkFirewallPolicyRequest request =
       AddAssociationRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReplaceExistingAssociation(true)
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionNetworkFirewallPoliciesClient.addAssociationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<AddAssociationRegionNetworkFirewallPolicyRequest,Operation>

addAssociationOperationCallable()

public final OperationCallable<AddAssociationRegionNetworkFirewallPolicyRequest,Operation,Operation> addAssociationOperationCallable()

Inserts an association for the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   AddAssociationRegionNetworkFirewallPolicyRequest request =
       AddAssociationRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyAssociationResource(FirewallPolicyAssociation.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReplaceExistingAssociation(true)
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionNetworkFirewallPoliciesClient.addAssociationOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<AddAssociationRegionNetworkFirewallPolicyRequest,Operation,Operation>

addRuleAsync(AddRuleRegionNetworkFirewallPolicyRequest request)

public final OperationFuture<Operation,Operation> addRuleAsync(AddRuleRegionNetworkFirewallPolicyRequest request)

Inserts a rule into a network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   AddRuleRegionNetworkFirewallPolicyRequest request =
       AddRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build())
           .setMaxPriority(-207235553)
           .setMinPriority(267190513)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionNetworkFirewallPoliciesClient.addRuleAsync(request).get();
 }
 
Parameter
NameDescription
requestAddRuleRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

addRuleAsync(String project, String region, String firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource)

public final OperationFuture<Operation,Operation> addRuleAsync(String project, String region, String firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource)

Inserts a rule into a network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   FirewallPolicyRule firewallPolicyRuleResource = FirewallPolicyRule.newBuilder().build();
   Operation response =
       regionNetworkFirewallPoliciesClient
           .addRuleAsync(project, region, firewallPolicy, firewallPolicyRuleResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to update.

firewallPolicyRuleResourceFirewallPolicyRule

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

addRuleCallable()

public final UnaryCallable<AddRuleRegionNetworkFirewallPolicyRequest,Operation> addRuleCallable()

Inserts a rule into a network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   AddRuleRegionNetworkFirewallPolicyRequest request =
       AddRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build())
           .setMaxPriority(-207235553)
           .setMinPriority(267190513)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionNetworkFirewallPoliciesClient.addRuleCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<AddRuleRegionNetworkFirewallPolicyRequest,Operation>

addRuleOperationCallable()

public final OperationCallable<AddRuleRegionNetworkFirewallPolicyRequest,Operation,Operation> addRuleOperationCallable()

Inserts a rule into a network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   AddRuleRegionNetworkFirewallPolicyRequest request =
       AddRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build())
           .setMaxPriority(-207235553)
           .setMinPriority(267190513)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionNetworkFirewallPoliciesClient.addRuleOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<AddRuleRegionNetworkFirewallPolicyRequest,Operation,Operation>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

cloneRulesAsync(CloneRulesRegionNetworkFirewallPolicyRequest request)

public final OperationFuture<Operation,Operation> cloneRulesAsync(CloneRulesRegionNetworkFirewallPolicyRequest request)

Copies rules to the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   CloneRulesRegionNetworkFirewallPolicyRequest request =
       CloneRulesRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .setSourceFirewallPolicy("sourceFirewallPolicy-593774771")
           .build();
   Operation response = regionNetworkFirewallPoliciesClient.cloneRulesAsync(request).get();
 }
 
Parameter
NameDescription
requestCloneRulesRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

cloneRulesAsync(String project, String region, String firewallPolicy)

public final OperationFuture<Operation,Operation> cloneRulesAsync(String project, String region, String firewallPolicy)

Copies rules to the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   Operation response =
       regionNetworkFirewallPoliciesClient
           .cloneRulesAsync(project, region, firewallPolicy)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to update.

Returns
TypeDescription
OperationFuture<Operation,Operation>

cloneRulesCallable()

public final UnaryCallable<CloneRulesRegionNetworkFirewallPolicyRequest,Operation> cloneRulesCallable()

Copies rules to the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   CloneRulesRegionNetworkFirewallPolicyRequest request =
       CloneRulesRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .setSourceFirewallPolicy("sourceFirewallPolicy-593774771")
           .build();
   ApiFuture<Operation> future =
       regionNetworkFirewallPoliciesClient.cloneRulesCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CloneRulesRegionNetworkFirewallPolicyRequest,Operation>

cloneRulesOperationCallable()

public final OperationCallable<CloneRulesRegionNetworkFirewallPolicyRequest,Operation,Operation> cloneRulesOperationCallable()

Copies rules to the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   CloneRulesRegionNetworkFirewallPolicyRequest request =
       CloneRulesRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .setSourceFirewallPolicy("sourceFirewallPolicy-593774771")
           .build();
   OperationFuture<Operation, Operation> future =
       regionNetworkFirewallPoliciesClient.cloneRulesOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CloneRulesRegionNetworkFirewallPolicyRequest,Operation,Operation>

close()

public final void close()

deleteAsync(DeleteRegionNetworkFirewallPolicyRequest request)

public final OperationFuture<Operation,Operation> deleteAsync(DeleteRegionNetworkFirewallPolicyRequest request)

Deletes the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   DeleteRegionNetworkFirewallPolicyRequest request =
       DeleteRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionNetworkFirewallPoliciesClient.deleteAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteAsync(String project, String region, String firewallPolicy)

public final OperationFuture<Operation,Operation> deleteAsync(String project, String region, String firewallPolicy)

Deletes the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   Operation response =
       regionNetworkFirewallPoliciesClient.deleteAsync(project, region, firewallPolicy).get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to delete.

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteCallable()

public final UnaryCallable<DeleteRegionNetworkFirewallPolicyRequest,Operation> deleteCallable()

Deletes the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   DeleteRegionNetworkFirewallPolicyRequest request =
       DeleteRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionNetworkFirewallPoliciesClient.deleteCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteRegionNetworkFirewallPolicyRequest,Operation>

deleteOperationCallable()

public final OperationCallable<DeleteRegionNetworkFirewallPolicyRequest,Operation,Operation> deleteOperationCallable()

Deletes the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   DeleteRegionNetworkFirewallPolicyRequest request =
       DeleteRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionNetworkFirewallPoliciesClient.deleteOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteRegionNetworkFirewallPolicyRequest,Operation,Operation>

get(GetRegionNetworkFirewallPolicyRequest request)

public final FirewallPolicy get(GetRegionNetworkFirewallPolicyRequest request)

Returns the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetRegionNetworkFirewallPolicyRequest request =
       GetRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   FirewallPolicy response = regionNetworkFirewallPoliciesClient.get(request);
 }
 
Parameter
NameDescription
requestGetRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
FirewallPolicy

get(String project, String region, String firewallPolicy)

public final FirewallPolicy get(String project, String region, String firewallPolicy)

Returns the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   FirewallPolicy response =
       regionNetworkFirewallPoliciesClient.get(project, region, firewallPolicy);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to get.

Returns
TypeDescription
FirewallPolicy

getAssociation(GetAssociationRegionNetworkFirewallPolicyRequest request)

public final FirewallPolicyAssociation getAssociation(GetAssociationRegionNetworkFirewallPolicyRequest request)

Gets an association with the specified name.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetAssociationRegionNetworkFirewallPolicyRequest request =
       GetAssociationRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setName("name3373707")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   FirewallPolicyAssociation response =
       regionNetworkFirewallPoliciesClient.getAssociation(request);
 }
 
Parameter
NameDescription
requestGetAssociationRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
FirewallPolicyAssociation

getAssociation(String project, String region, String firewallPolicy)

public final FirewallPolicyAssociation getAssociation(String project, String region, String firewallPolicy)

Gets an association with the specified name.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   FirewallPolicyAssociation response =
       regionNetworkFirewallPoliciesClient.getAssociation(project, region, firewallPolicy);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to which the queried association belongs.

Returns
TypeDescription
FirewallPolicyAssociation

getAssociationCallable()

public final UnaryCallable<GetAssociationRegionNetworkFirewallPolicyRequest,FirewallPolicyAssociation> getAssociationCallable()

Gets an association with the specified name.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetAssociationRegionNetworkFirewallPolicyRequest request =
       GetAssociationRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setName("name3373707")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   ApiFuture<FirewallPolicyAssociation> future =
       regionNetworkFirewallPoliciesClient.getAssociationCallable().futureCall(request);
   // Do something.
   FirewallPolicyAssociation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetAssociationRegionNetworkFirewallPolicyRequest,FirewallPolicyAssociation>

getCallable()

public final UnaryCallable<GetRegionNetworkFirewallPolicyRequest,FirewallPolicy> getCallable()

Returns the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetRegionNetworkFirewallPolicyRequest request =
       GetRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   ApiFuture<FirewallPolicy> future =
       regionNetworkFirewallPoliciesClient.getCallable().futureCall(request);
   // Do something.
   FirewallPolicy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetRegionNetworkFirewallPolicyRequest,FirewallPolicy>

getEffectiveFirewalls(GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest request)

public final RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse getEffectiveFirewalls(GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest request)

Returns the effective firewalls on a given network.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest request =
       GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.newBuilder()
           .setNetwork("network1843485230")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse response =
       regionNetworkFirewallPoliciesClient.getEffectiveFirewalls(request);
 }
 
Parameter
NameDescription
requestGetEffectiveFirewallsRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse

getEffectiveFirewalls(String project, String region, String network)

public final RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse getEffectiveFirewalls(String project, String region, String network)

Returns the effective firewalls on a given network.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String network = "network1843485230";
   RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse response =
       regionNetworkFirewallPoliciesClient.getEffectiveFirewalls(project, region, network);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

networkString

Network reference

Returns
TypeDescription
RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse

getEffectiveFirewallsCallable()

public final UnaryCallable<GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest,RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse> getEffectiveFirewallsCallable()

Returns the effective firewalls on a given network.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest request =
       GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.newBuilder()
           .setNetwork("network1843485230")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   ApiFuture<RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse> future =
       regionNetworkFirewallPoliciesClient.getEffectiveFirewallsCallable().futureCall(request);
   // Do something.
   RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest,RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse>

getIamPolicy(GetIamPolicyRegionNetworkFirewallPolicyRequest request)

public final Policy getIamPolicy(GetIamPolicyRegionNetworkFirewallPolicyRequest request)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetIamPolicyRegionNetworkFirewallPolicyRequest request =
       GetIamPolicyRegionNetworkFirewallPolicyRequest.newBuilder()
           .setOptionsRequestedPolicyVersion(-574521795)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .build();
   Policy response = regionNetworkFirewallPoliciesClient.getIamPolicy(request);
 }
 
Parameter
NameDescription
requestGetIamPolicyRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
Policy

getIamPolicy(String project, String region, String resource)

public final Policy getIamPolicy(String project, String region, String resource)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String resource = "resource-341064690";
   Policy response = regionNetworkFirewallPoliciesClient.getIamPolicy(project, region, resource);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

Returns
TypeDescription
Policy

getIamPolicyCallable()

public final UnaryCallable<GetIamPolicyRegionNetworkFirewallPolicyRequest,Policy> getIamPolicyCallable()

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetIamPolicyRegionNetworkFirewallPolicyRequest request =
       GetIamPolicyRegionNetworkFirewallPolicyRequest.newBuilder()
           .setOptionsRequestedPolicyVersion(-574521795)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .build();
   ApiFuture<Policy> future =
       regionNetworkFirewallPoliciesClient.getIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetIamPolicyRegionNetworkFirewallPolicyRequest,Policy>

getRule(GetRuleRegionNetworkFirewallPolicyRequest request)

public final FirewallPolicyRule getRule(GetRuleRegionNetworkFirewallPolicyRequest request)

Gets a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetRuleRegionNetworkFirewallPolicyRequest request =
       GetRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setPriority(-1165461084)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   FirewallPolicyRule response = regionNetworkFirewallPoliciesClient.getRule(request);
 }
 
Parameter
NameDescription
requestGetRuleRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
FirewallPolicyRule

getRule(String project, String region, String firewallPolicy)

public final FirewallPolicyRule getRule(String project, String region, String firewallPolicy)

Gets a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   FirewallPolicyRule response =
       regionNetworkFirewallPoliciesClient.getRule(project, region, firewallPolicy);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to which the queried rule belongs.

Returns
TypeDescription
FirewallPolicyRule

getRuleCallable()

public final UnaryCallable<GetRuleRegionNetworkFirewallPolicyRequest,FirewallPolicyRule> getRuleCallable()

Gets a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   GetRuleRegionNetworkFirewallPolicyRequest request =
       GetRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setPriority(-1165461084)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   ApiFuture<FirewallPolicyRule> future =
       regionNetworkFirewallPoliciesClient.getRuleCallable().futureCall(request);
   // Do something.
   FirewallPolicyRule response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetRuleRegionNetworkFirewallPolicyRequest,FirewallPolicyRule>

getSettings()

public final RegionNetworkFirewallPoliciesSettings getSettings()
Returns
TypeDescription
RegionNetworkFirewallPoliciesSettings

getStub()

public RegionNetworkFirewallPoliciesStub getStub()
Returns
TypeDescription
RegionNetworkFirewallPoliciesStub

insertAsync(InsertRegionNetworkFirewallPolicyRequest request)

public final OperationFuture<Operation,Operation> insertAsync(InsertRegionNetworkFirewallPolicyRequest request)

Creates a new network firewall policy in the specified project and region.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   InsertRegionNetworkFirewallPolicyRequest request =
       InsertRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicyResource(FirewallPolicy.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionNetworkFirewallPoliciesClient.insertAsync(request).get();
 }
 
Parameter
NameDescription
requestInsertRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertAsync(String project, String region, FirewallPolicy firewallPolicyResource)

public final OperationFuture<Operation,Operation> insertAsync(String project, String region, FirewallPolicy firewallPolicyResource)

Creates a new network firewall policy in the specified project and region.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   FirewallPolicy firewallPolicyResource = FirewallPolicy.newBuilder().build();
   Operation response =
       regionNetworkFirewallPoliciesClient
           .insertAsync(project, region, firewallPolicyResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyResourceFirewallPolicy

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertCallable()

public final UnaryCallable<InsertRegionNetworkFirewallPolicyRequest,Operation> insertCallable()

Creates a new network firewall policy in the specified project and region.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   InsertRegionNetworkFirewallPolicyRequest request =
       InsertRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicyResource(FirewallPolicy.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionNetworkFirewallPoliciesClient.insertCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<InsertRegionNetworkFirewallPolicyRequest,Operation>

insertOperationCallable()

public final OperationCallable<InsertRegionNetworkFirewallPolicyRequest,Operation,Operation> insertOperationCallable()

Creates a new network firewall policy in the specified project and region.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   InsertRegionNetworkFirewallPolicyRequest request =
       InsertRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicyResource(FirewallPolicy.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionNetworkFirewallPoliciesClient.insertOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<InsertRegionNetworkFirewallPolicyRequest,Operation,Operation>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

list(ListRegionNetworkFirewallPoliciesRequest request)

public final RegionNetworkFirewallPoliciesClient.ListPagedResponse list(ListRegionNetworkFirewallPoliciesRequest request)

Lists all the network firewall policies that have been configured for the specified project in the given region.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   ListRegionNetworkFirewallPoliciesRequest request =
       ListRegionNetworkFirewallPoliciesRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   for (FirewallPolicy element :
       regionNetworkFirewallPoliciesClient.list(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListRegionNetworkFirewallPoliciesRequest

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

Returns
TypeDescription
RegionNetworkFirewallPoliciesClient.ListPagedResponse

list(String project, String region)

public final RegionNetworkFirewallPoliciesClient.ListPagedResponse list(String project, String region)

Lists all the network firewall policies that have been configured for the specified project in the given region.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   for (FirewallPolicy element :
       regionNetworkFirewallPoliciesClient.list(project, region).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

Returns
TypeDescription
RegionNetworkFirewallPoliciesClient.ListPagedResponse

listCallable()

public final UnaryCallable<ListRegionNetworkFirewallPoliciesRequest,FirewallPolicyList> listCallable()

Lists all the network firewall policies that have been configured for the specified project in the given region.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   ListRegionNetworkFirewallPoliciesRequest request =
       ListRegionNetworkFirewallPoliciesRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     FirewallPolicyList response =
         regionNetworkFirewallPoliciesClient.listCallable().call(request);
     for (FirewallPolicy element : response.getResponsesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRegionNetworkFirewallPoliciesRequest,FirewallPolicyList>

listPagedCallable()

public final UnaryCallable<ListRegionNetworkFirewallPoliciesRequest,RegionNetworkFirewallPoliciesClient.ListPagedResponse> listPagedCallable()

Lists all the network firewall policies that have been configured for the specified project in the given region.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   ListRegionNetworkFirewallPoliciesRequest request =
       ListRegionNetworkFirewallPoliciesRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<FirewallPolicy> future =
       regionNetworkFirewallPoliciesClient.listPagedCallable().futureCall(request);
   // Do something.
   for (FirewallPolicy element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRegionNetworkFirewallPoliciesRequest,ListPagedResponse>

patchAsync(PatchRegionNetworkFirewallPolicyRequest request)

public final OperationFuture<Operation,Operation> patchAsync(PatchRegionNetworkFirewallPolicyRequest request)

Patches the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   PatchRegionNetworkFirewallPolicyRequest request =
       PatchRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyResource(FirewallPolicy.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionNetworkFirewallPoliciesClient.patchAsync(request).get();
 }
 
Parameter
NameDescription
requestPatchRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchAsync(String project, String region, String firewallPolicy, FirewallPolicy firewallPolicyResource)

public final OperationFuture<Operation,Operation> patchAsync(String project, String region, String firewallPolicy, FirewallPolicy firewallPolicyResource)

Patches the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   FirewallPolicy firewallPolicyResource = FirewallPolicy.newBuilder().build();
   Operation response =
       regionNetworkFirewallPoliciesClient
           .patchAsync(project, region, firewallPolicy, firewallPolicyResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to update.

firewallPolicyResourceFirewallPolicy

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchCallable()

public final UnaryCallable<PatchRegionNetworkFirewallPolicyRequest,Operation> patchCallable()

Patches the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   PatchRegionNetworkFirewallPolicyRequest request =
       PatchRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyResource(FirewallPolicy.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionNetworkFirewallPoliciesClient.patchCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<PatchRegionNetworkFirewallPolicyRequest,Operation>

patchOperationCallable()

public final OperationCallable<PatchRegionNetworkFirewallPolicyRequest,Operation,Operation> patchOperationCallable()

Patches the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   PatchRegionNetworkFirewallPolicyRequest request =
       PatchRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyResource(FirewallPolicy.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionNetworkFirewallPoliciesClient.patchOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<PatchRegionNetworkFirewallPolicyRequest,Operation,Operation>

patchRuleAsync(PatchRuleRegionNetworkFirewallPolicyRequest request)

public final OperationFuture<Operation,Operation> patchRuleAsync(PatchRuleRegionNetworkFirewallPolicyRequest request)

Patches a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   PatchRuleRegionNetworkFirewallPolicyRequest request =
       PatchRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build())
           .setPriority(-1165461084)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionNetworkFirewallPoliciesClient.patchRuleAsync(request).get();
 }
 
Parameter
NameDescription
requestPatchRuleRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchRuleAsync(String project, String region, String firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource)

public final OperationFuture<Operation,Operation> patchRuleAsync(String project, String region, String firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource)

Patches a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   FirewallPolicyRule firewallPolicyRuleResource = FirewallPolicyRule.newBuilder().build();
   Operation response =
       regionNetworkFirewallPoliciesClient
           .patchRuleAsync(project, region, firewallPolicy, firewallPolicyRuleResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to update.

firewallPolicyRuleResourceFirewallPolicyRule

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchRuleCallable()

public final UnaryCallable<PatchRuleRegionNetworkFirewallPolicyRequest,Operation> patchRuleCallable()

Patches a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   PatchRuleRegionNetworkFirewallPolicyRequest request =
       PatchRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build())
           .setPriority(-1165461084)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionNetworkFirewallPoliciesClient.patchRuleCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<PatchRuleRegionNetworkFirewallPolicyRequest,Operation>

patchRuleOperationCallable()

public final OperationCallable<PatchRuleRegionNetworkFirewallPolicyRequest,Operation,Operation> patchRuleOperationCallable()

Patches a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   PatchRuleRegionNetworkFirewallPolicyRequest request =
       PatchRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setFirewallPolicyRuleResource(FirewallPolicyRule.newBuilder().build())
           .setPriority(-1165461084)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionNetworkFirewallPoliciesClient.patchRuleOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<PatchRuleRegionNetworkFirewallPolicyRequest,Operation,Operation>

removeAssociationAsync(RemoveAssociationRegionNetworkFirewallPolicyRequest request)

public final OperationFuture<Operation,Operation> removeAssociationAsync(RemoveAssociationRegionNetworkFirewallPolicyRequest request)

Removes an association for the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   RemoveAssociationRegionNetworkFirewallPolicyRequest request =
       RemoveAssociationRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setName("name3373707")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response =
       regionNetworkFirewallPoliciesClient.removeAssociationAsync(request).get();
 }
 
Parameter
NameDescription
requestRemoveAssociationRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

removeAssociationAsync(String project, String region, String firewallPolicy)

public final OperationFuture<Operation,Operation> removeAssociationAsync(String project, String region, String firewallPolicy)

Removes an association for the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   Operation response =
       regionNetworkFirewallPoliciesClient
           .removeAssociationAsync(project, region, firewallPolicy)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to update.

Returns
TypeDescription
OperationFuture<Operation,Operation>

removeAssociationCallable()

public final UnaryCallable<RemoveAssociationRegionNetworkFirewallPolicyRequest,Operation> removeAssociationCallable()

Removes an association for the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   RemoveAssociationRegionNetworkFirewallPolicyRequest request =
       RemoveAssociationRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setName("name3373707")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionNetworkFirewallPoliciesClient.removeAssociationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<RemoveAssociationRegionNetworkFirewallPolicyRequest,Operation>

removeAssociationOperationCallable()

public final OperationCallable<RemoveAssociationRegionNetworkFirewallPolicyRequest,Operation,Operation> removeAssociationOperationCallable()

Removes an association for the specified network firewall policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   RemoveAssociationRegionNetworkFirewallPolicyRequest request =
       RemoveAssociationRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setName("name3373707")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionNetworkFirewallPoliciesClient
           .removeAssociationOperationCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<RemoveAssociationRegionNetworkFirewallPolicyRequest,Operation,Operation>

removeRuleAsync(RemoveRuleRegionNetworkFirewallPolicyRequest request)

public final OperationFuture<Operation,Operation> removeRuleAsync(RemoveRuleRegionNetworkFirewallPolicyRequest request)

Deletes a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   RemoveRuleRegionNetworkFirewallPolicyRequest request =
       RemoveRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setPriority(-1165461084)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionNetworkFirewallPoliciesClient.removeRuleAsync(request).get();
 }
 
Parameter
NameDescription
requestRemoveRuleRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

removeRuleAsync(String project, String region, String firewallPolicy)

public final OperationFuture<Operation,Operation> removeRuleAsync(String project, String region, String firewallPolicy)

Deletes a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String firewallPolicy = "firewallPolicy1819692626";
   Operation response =
       regionNetworkFirewallPoliciesClient
           .removeRuleAsync(project, region, firewallPolicy)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

firewallPolicyString

Name of the firewall policy to update.

Returns
TypeDescription
OperationFuture<Operation,Operation>

removeRuleCallable()

public final UnaryCallable<RemoveRuleRegionNetworkFirewallPolicyRequest,Operation> removeRuleCallable()

Deletes a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   RemoveRuleRegionNetworkFirewallPolicyRequest request =
       RemoveRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setPriority(-1165461084)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionNetworkFirewallPoliciesClient.removeRuleCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<RemoveRuleRegionNetworkFirewallPolicyRequest,Operation>

removeRuleOperationCallable()

public final OperationCallable<RemoveRuleRegionNetworkFirewallPolicyRequest,Operation,Operation> removeRuleOperationCallable()

Deletes a rule of the specified priority.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   RemoveRuleRegionNetworkFirewallPolicyRequest request =
       RemoveRuleRegionNetworkFirewallPolicyRequest.newBuilder()
           .setFirewallPolicy("firewallPolicy1819692626")
           .setPriority(-1165461084)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionNetworkFirewallPoliciesClient.removeRuleOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<RemoveRuleRegionNetworkFirewallPolicyRequest,Operation,Operation>

setIamPolicy(SetIamPolicyRegionNetworkFirewallPolicyRequest request)

public final Policy setIamPolicy(SetIamPolicyRegionNetworkFirewallPolicyRequest request)

Sets the access control policy on the specified resource. Replaces any existing policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   SetIamPolicyRegionNetworkFirewallPolicyRequest request =
       SetIamPolicyRegionNetworkFirewallPolicyRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
           .setResource("resource-341064690")
           .build();
   Policy response = regionNetworkFirewallPoliciesClient.setIamPolicy(request);
 }
 
Parameter
NameDescription
requestSetIamPolicyRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
Policy

setIamPolicy(String project, String region, String resource, RegionSetPolicyRequest regionSetPolicyRequestResource)

public final Policy setIamPolicy(String project, String region, String resource, RegionSetPolicyRequest regionSetPolicyRequestResource)

Sets the access control policy on the specified resource. Replaces any existing policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String resource = "resource-341064690";
   RegionSetPolicyRequest regionSetPolicyRequestResource =
       RegionSetPolicyRequest.newBuilder().build();
   Policy response =
       regionNetworkFirewallPoliciesClient.setIamPolicy(
           project, region, resource, regionSetPolicyRequestResource);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

regionSetPolicyRequestResourceRegionSetPolicyRequest

The body resource for this request

Returns
TypeDescription
Policy

setIamPolicyCallable()

public final UnaryCallable<SetIamPolicyRegionNetworkFirewallPolicyRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified resource. Replaces any existing policy.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   SetIamPolicyRegionNetworkFirewallPolicyRequest request =
       SetIamPolicyRegionNetworkFirewallPolicyRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
           .setResource("resource-341064690")
           .build();
   ApiFuture<Policy> future =
       regionNetworkFirewallPoliciesClient.setIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<SetIamPolicyRegionNetworkFirewallPolicyRequest,Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRegionNetworkFirewallPolicyRequest request)

public final TestPermissionsResponse testIamPermissions(TestIamPermissionsRegionNetworkFirewallPolicyRequest request)

Returns permissions that a caller has on the specified resource.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   TestIamPermissionsRegionNetworkFirewallPolicyRequest request =
       TestIamPermissionsRegionNetworkFirewallPolicyRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
           .build();
   TestPermissionsResponse response =
       regionNetworkFirewallPoliciesClient.testIamPermissions(request);
 }
 
Parameter
NameDescription
requestTestIamPermissionsRegionNetworkFirewallPolicyRequest

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

Returns
TypeDescription
TestPermissionsResponse

testIamPermissions(String project, String region, String resource, TestPermissionsRequest testPermissionsRequestResource)

public final TestPermissionsResponse testIamPermissions(String project, String region, String resource, TestPermissionsRequest testPermissionsRequestResource)

Returns permissions that a caller has on the specified resource.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String resource = "resource-341064690";
   TestPermissionsRequest testPermissionsRequestResource =
       TestPermissionsRequest.newBuilder().build();
   TestPermissionsResponse response =
       regionNetworkFirewallPoliciesClient.testIamPermissions(
           project, region, resource, testPermissionsRequestResource);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region for this request.

resourceString

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

Returns
TypeDescription
TestPermissionsResponse

testIamPermissionsCallable()

public final UnaryCallable<TestIamPermissionsRegionNetworkFirewallPolicyRequest,TestPermissionsResponse> testIamPermissionsCallable()

Returns permissions that a caller has on the specified resource.

Sample code:


 try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
     RegionNetworkFirewallPoliciesClient.create()) {
   TestIamPermissionsRegionNetworkFirewallPolicyRequest request =
       TestIamPermissionsRegionNetworkFirewallPolicyRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
           .build();
   ApiFuture<TestPermissionsResponse> future =
       regionNetworkFirewallPoliciesClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestPermissionsResponse response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<TestIamPermissionsRegionNetworkFirewallPolicyRequest,TestPermissionsResponse>