- 1.63.0 (latest)
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
GitHub Repository | Product Reference |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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().
Method | Description | Method Variants |
---|---|---|
AddAssociation |
Inserts an association for the specified network firewall policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AddRule |
Inserts a rule into a network firewall policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CloneRules |
Copies rules to the specified network firewall policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Delete |
Deletes the specified network firewall policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Get |
Returns the specified network firewall policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAssociation |
Gets an association with the specified name. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetEffectiveFirewalls |
Returns the effective firewalls on a given network. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. May be empty if no such policy or resource exists. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRule |
Gets a rule of the specified priority. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Insert |
Creates a new network firewall policy in the specified project and region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
List |
Lists all the network firewall policies that have been configured for the specified project in the given region. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Patch |
Patches the specified network firewall policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
PatchRule |
Patches a rule of the specified priority. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RemoveAssociation |
Removes an association for the specified network firewall policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RemoveRule |
Deletes a rule of the specified priority. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replaces any existing policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return 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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
RegionNetworkFirewallPoliciesSettings regionNetworkFirewallPoliciesSettings =
RegionNetworkFirewallPoliciesSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
RegionNetworkFirewallPoliciesClient.create(regionNetworkFirewallPoliciesSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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.
Static Methods
create()
public static final RegionNetworkFirewallPoliciesClient create()
Constructs an instance of RegionNetworkFirewallPoliciesClient with default settings.
Returns | |
---|---|
Type | Description |
RegionNetworkFirewallPoliciesClient |
Exceptions | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
settings |
RegionNetworkFirewallPoliciesSettings |
Returns | |
---|---|
Type | Description |
RegionNetworkFirewallPoliciesClient |
Exceptions | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
stub |
RegionNetworkFirewallPoliciesStub |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
settings |
RegionNetworkFirewallPoliciesSettings |
RegionNetworkFirewallPoliciesClient(RegionNetworkFirewallPoliciesStub stub)
protected RegionNetworkFirewallPoliciesClient(RegionNetworkFirewallPoliciesStub stub)
Parameter | |
---|---|
Name | Description |
stub |
RegionNetworkFirewallPoliciesStub |
Methods
addAssociationAsync(AddAssociationRegionNetworkFirewallPolicyRequest request)
public final OperationFuture<Operation,Operation> addAssociationAsync(AddAssociationRegionNetworkFirewallPolicyRequest request)
Inserts an association for the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
AddAssociationRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to update. |
firewallPolicyAssociationResource |
FirewallPolicyAssociation The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
addAssociationCallable()
public final UnaryCallable<AddAssociationRegionNetworkFirewallPolicyRequest,Operation> addAssociationCallable()
Inserts an association for the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<AddAssociationRegionNetworkFirewallPolicyRequest,Operation> |
addAssociationOperationCallable()
public final OperationCallable<AddAssociationRegionNetworkFirewallPolicyRequest,Operation,Operation> addAssociationOperationCallable()
Inserts an association for the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
AddRuleRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to update. |
firewallPolicyRuleResource |
FirewallPolicyRule The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
addRuleCallable()
public final UnaryCallable<AddRuleRegionNetworkFirewallPolicyRequest,Operation> addRuleCallable()
Inserts a rule into a network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<AddRuleRegionNetworkFirewallPolicyRequest,Operation> |
addRuleOperationCallable()
public final OperationCallable<AddRuleRegionNetworkFirewallPolicyRequest,Operation,Operation> addRuleOperationCallable()
Inserts a rule into a network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
OperationCallable<AddRuleRegionNetworkFirewallPolicyRequest,Operation,Operation> |
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration |
long |
unit |
TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
cloneRulesAsync(CloneRulesRegionNetworkFirewallPolicyRequest request)
public final OperationFuture<Operation,Operation> cloneRulesAsync(CloneRulesRegionNetworkFirewallPolicyRequest request)
Copies rules to the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
CloneRulesRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to update. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
cloneRulesCallable()
public final UnaryCallable<CloneRulesRegionNetworkFirewallPolicyRequest,Operation> cloneRulesCallable()
Copies rules to the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<CloneRulesRegionNetworkFirewallPolicyRequest,Operation> |
cloneRulesOperationCallable()
public final OperationCallable<CloneRulesRegionNetworkFirewallPolicyRequest,Operation,Operation> cloneRulesOperationCallable()
Copies rules to the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
DeleteRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
deleteCallable()
public final UnaryCallable<DeleteRegionNetworkFirewallPolicyRequest,Operation> deleteCallable()
Deletes the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<DeleteRegionNetworkFirewallPolicyRequest,Operation> |
deleteOperationCallable()
public final OperationCallable<DeleteRegionNetworkFirewallPolicyRequest,Operation,Operation> deleteOperationCallable()
Deletes the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
OperationCallable<DeleteRegionNetworkFirewallPolicyRequest,Operation,Operation> |
get(GetRegionNetworkFirewallPolicyRequest request)
public final FirewallPolicy get(GetRegionNetworkFirewallPolicyRequest request)
Returns the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
RegionNetworkFirewallPoliciesClient.create()) {
GetRegionNetworkFirewallPolicyRequest request =
GetRegionNetworkFirewallPolicyRequest.newBuilder()
.setFirewallPolicy("firewallPolicy1819692626")
.setProject("project-309310695")
.setRegion("region-934795532")
.build();
FirewallPolicy response = regionNetworkFirewallPoliciesClient.get(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
RegionNetworkFirewallPoliciesClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String firewallPolicy = "firewallPolicy1819692626";
FirewallPolicy response =
regionNetworkFirewallPoliciesClient.get(project, region, firewallPolicy);
}
Parameters | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to get. |
Returns | |
---|---|
Type | Description |
FirewallPolicy |
getAssociation(GetAssociationRegionNetworkFirewallPolicyRequest request)
public final FirewallPolicyAssociation getAssociation(GetAssociationRegionNetworkFirewallPolicyRequest request)
Gets an association with the specified name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
GetAssociationRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
RegionNetworkFirewallPoliciesClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String firewallPolicy = "firewallPolicy1819692626";
FirewallPolicyAssociation response =
regionNetworkFirewallPoliciesClient.getAssociation(project, region, firewallPolicy);
}
Parameters | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to which the queried association belongs. |
Returns | |
---|---|
Type | Description |
FirewallPolicyAssociation |
getAssociationCallable()
public final UnaryCallable<GetAssociationRegionNetworkFirewallPolicyRequest,FirewallPolicyAssociation> getAssociationCallable()
Gets an association with the specified name.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<GetAssociationRegionNetworkFirewallPolicyRequest,FirewallPolicyAssociation> |
getCallable()
public final UnaryCallable<GetRegionNetworkFirewallPolicyRequest,FirewallPolicy> getCallable()
Returns the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<GetRegionNetworkFirewallPolicyRequest,FirewallPolicy> |
getEffectiveFirewalls(GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest request)
public final RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse getEffectiveFirewalls(GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest request)
Returns the effective firewalls on a given network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
RegionNetworkFirewallPoliciesClient.create()) {
GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest request =
GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.newBuilder()
.setNetwork("network1843485230")
.setProject("project-309310695")
.setRegion("region-934795532")
.build();
RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse response =
regionNetworkFirewallPoliciesClient.getEffectiveFirewalls(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
RegionNetworkFirewallPoliciesClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String network = "network1843485230";
RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse response =
regionNetworkFirewallPoliciesClient.getEffectiveFirewalls(project, region, network);
}
Parameters | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
network |
String Network reference |
Returns | |
---|---|
Type | Description |
RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse |
getEffectiveFirewallsCallable()
public final UnaryCallable<GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest,RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse> getEffectiveFirewallsCallable()
Returns the effective firewalls on a given network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
GetIamPolicyRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String The name of the region for this request. |
resource |
String Name or id of the resource for this request. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<GetIamPolicyRegionNetworkFirewallPolicyRequest,Policy> |
getRule(GetRuleRegionNetworkFirewallPolicyRequest request)
public final FirewallPolicyRule getRule(GetRuleRegionNetworkFirewallPolicyRequest request)
Gets a rule of the specified priority.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
GetRuleRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
RegionNetworkFirewallPoliciesClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String firewallPolicy = "firewallPolicy1819692626";
FirewallPolicyRule response =
regionNetworkFirewallPoliciesClient.getRule(project, region, firewallPolicy);
}
Parameters | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to which the queried rule belongs. |
Returns | |
---|---|
Type | Description |
FirewallPolicyRule |
getRuleCallable()
public final UnaryCallable<GetRuleRegionNetworkFirewallPolicyRequest,FirewallPolicyRule> getRuleCallable()
Gets a rule of the specified priority.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<GetRuleRegionNetworkFirewallPolicyRequest,FirewallPolicyRule> |
getSettings()
public final RegionNetworkFirewallPoliciesSettings getSettings()
Returns | |
---|---|
Type | Description |
RegionNetworkFirewallPoliciesSettings |
getStub()
public RegionNetworkFirewallPoliciesStub getStub()
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
InsertRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicyResource |
FirewallPolicy The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
insertCallable()
public final UnaryCallable<InsertRegionNetworkFirewallPolicyRequest,Operation> insertCallable()
Creates a new network firewall policy in the specified project and region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
OperationCallable<InsertRegionNetworkFirewallPolicyRequest,Operation,Operation> |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
ListRegionNetworkFirewallPoliciesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RegionNetworkFirewallPoliciesClient regionNetworkFirewallPoliciesClient =
RegionNetworkFirewallPoliciesClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
for (FirewallPolicy element :
regionNetworkFirewallPoliciesClient.list(project, region).iterateAll()) {
// doThingsWith(element);
}
}
Parameters | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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.getItemsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<ListRegionNetworkFirewallPoliciesRequest,ListPagedResponse> |
patchAsync(PatchRegionNetworkFirewallPolicyRequest request)
public final OperationFuture<Operation,Operation> patchAsync(PatchRegionNetworkFirewallPolicyRequest request)
Patches the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
PatchRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to update. |
firewallPolicyResource |
FirewallPolicy The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
patchCallable()
public final UnaryCallable<PatchRegionNetworkFirewallPolicyRequest,Operation> patchCallable()
Patches the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<PatchRegionNetworkFirewallPolicyRequest,Operation> |
patchOperationCallable()
public final OperationCallable<PatchRegionNetworkFirewallPolicyRequest,Operation,Operation> patchOperationCallable()
Patches the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
OperationCallable<PatchRegionNetworkFirewallPolicyRequest,Operation,Operation> |
patchRuleAsync(PatchRuleRegionNetworkFirewallPolicyRequest request)
public final OperationFuture<Operation,Operation> patchRuleAsync(PatchRuleRegionNetworkFirewallPolicyRequest request)
Patches a rule of the specified priority.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
PatchRuleRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to update. |
firewallPolicyRuleResource |
FirewallPolicyRule The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
patchRuleCallable()
public final UnaryCallable<PatchRuleRegionNetworkFirewallPolicyRequest,Operation> patchRuleCallable()
Patches a rule of the specified priority.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<PatchRuleRegionNetworkFirewallPolicyRequest,Operation> |
patchRuleOperationCallable()
public final OperationCallable<PatchRuleRegionNetworkFirewallPolicyRequest,Operation,Operation> patchRuleOperationCallable()
Patches a rule of the specified priority.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
RemoveAssociationRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to update. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
removeAssociationCallable()
public final UnaryCallable<RemoveAssociationRegionNetworkFirewallPolicyRequest,Operation> removeAssociationCallable()
Removes an association for the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<RemoveAssociationRegionNetworkFirewallPolicyRequest,Operation> |
removeAssociationOperationCallable()
public final OperationCallable<RemoveAssociationRegionNetworkFirewallPolicyRequest,Operation,Operation> removeAssociationOperationCallable()
Removes an association for the specified network firewall policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
OperationCallable<RemoveAssociationRegionNetworkFirewallPolicyRequest,Operation,Operation> |
removeRuleAsync(RemoveRuleRegionNetworkFirewallPolicyRequest request)
public final OperationFuture<Operation,Operation> removeRuleAsync(RemoveRuleRegionNetworkFirewallPolicyRequest request)
Deletes a rule of the specified priority.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
RemoveRuleRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String Name of the region scoping this request. |
firewallPolicy |
String Name of the firewall policy to update. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
removeRuleCallable()
public final UnaryCallable<RemoveRuleRegionNetworkFirewallPolicyRequest,Operation> removeRuleCallable()
Deletes a rule of the specified priority.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<RemoveRuleRegionNetworkFirewallPolicyRequest,Operation> |
removeRuleOperationCallable()
public final OperationCallable<RemoveRuleRegionNetworkFirewallPolicyRequest,Operation,Operation> removeRuleOperationCallable()
Deletes a rule of the specified priority.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
SetIamPolicyRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String The name of the region for this request. |
resource |
String Name or id of the resource for this request. |
regionSetPolicyRequestResource |
RegionSetPolicyRequest The body resource for this request |
Returns | |
---|---|
Type | Description |
Policy |
setIamPolicyCallable()
public final UnaryCallable<SetIamPolicyRegionNetworkFirewallPolicyRequest,Policy> setIamPolicyCallable()
Sets the access control policy on the specified resource. Replaces any existing policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
request |
TestIamPermissionsRegionNetworkFirewallPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Name | Description |
project |
String Project ID for this request. |
region |
String The name of the region for this request. |
resource |
String Name or id of the resource for this request. |
testPermissionsRequestResource |
TestPermissionsRequest The body resource for this request |
Returns | |
---|---|
Type | Description |
TestPermissionsResponse |
testIamPermissionsCallable()
public final UnaryCallable<TestIamPermissionsRegionNetworkFirewallPolicyRequest,TestPermissionsResponse> testIamPermissionsCallable()
Returns permissions that a caller has on the specified resource.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
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 | |
---|---|
Type | Description |
UnaryCallable<TestIamPermissionsRegionNetworkFirewallPolicyRequest,TestPermissionsResponse> |