Class FirewallActivationClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
FirewallEndpointName name =
FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
"[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]");
FirewallEndpoint response = firewallActivationClient.getFirewallEndpoint(name);
}
Note: close() needs to be called on the FirewallActivationClient 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 |
|---|---|---|
ListFirewallEndpoints |
Lists FirewallEndpoints in a given organization and location. |
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.
|
GetFirewallEndpoint |
Gets details of a single org Endpoint. |
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.
|
CreateFirewallEndpoint |
Creates a new FirewallEndpoint in a given organization and location. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteFirewallEndpoint |
Deletes a single org Endpoint. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateFirewallEndpoint |
Update a single org Endpoint. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListFirewallEndpointAssociations |
Lists Associations in a given project and location. |
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.
|
GetFirewallEndpointAssociation |
Gets details of a single FirewallEndpointAssociation. |
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.
|
CreateFirewallEndpointAssociation |
Creates a new FirewallEndpointAssociation in a given project and location. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteFirewallEndpointAssociation |
Deletes a single FirewallEndpointAssociation. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateFirewallEndpointAssociation |
Update a single FirewallEndpointAssociation. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field: * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
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. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
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. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
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. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
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 FirewallActivationSettings 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
FirewallActivationSettings firewallActivationSettings =
FirewallActivationSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
FirewallActivationClient firewallActivationClient =
FirewallActivationClient.create(firewallActivationSettings);
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
FirewallActivationSettings firewallActivationSettings =
FirewallActivationSettings.newBuilder().setEndpoint(myEndpoint).build();
FirewallActivationClient firewallActivationClient =
FirewallActivationClient.create(firewallActivationSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of FirewallActivationClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final FirewallActivationClientcreate()Constructs an instance of FirewallActivationClient with default settings.static final FirewallActivationClientcreate(FirewallActivationSettings settings) Constructs an instance of FirewallActivationClient, using the given settings.static final FirewallActivationClientcreate(FirewallActivationStub stub) Constructs an instance of FirewallActivationClient, using the given stub for making calls.Creates a new FirewallEndpointAssociation in a given project and location.createFirewallEndpointAssociationAsync(LocationName parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId) Creates a new FirewallEndpointAssociation in a given project and location.createFirewallEndpointAssociationAsync(String parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId) Creates a new FirewallEndpointAssociation in a given project and location.Creates a new FirewallEndpointAssociation in a given project and location.final OperationCallable<CreateFirewallEndpointAssociationRequest,FirewallEndpointAssociation, OperationMetadata> Creates a new FirewallEndpointAssociation in a given project and location.Creates a new FirewallEndpoint in a given organization and location.createFirewallEndpointAsync(LocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId) Creates a new FirewallEndpoint in a given organization and location.createFirewallEndpointAsync(OrganizationLocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId) Creates a new FirewallEndpoint in a given organization and location.createFirewallEndpointAsync(String parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId) Creates a new FirewallEndpoint in a given organization and location.Creates a new FirewallEndpoint in a given organization and location.Creates a new FirewallEndpoint in a given organization and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single FirewallEndpointAssociation.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single FirewallEndpointAssociation.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single FirewallEndpointAssociation.Deletes a single FirewallEndpointAssociation.final OperationCallable<DeleteFirewallEndpointAssociationRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single FirewallEndpointAssociation.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single org Endpoint.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single org Endpoint.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single org Endpoint.Deletes a single org Endpoint.final OperationCallable<DeleteFirewallEndpointRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single org Endpoint.final FirewallEndpointGets details of a single org Endpoint.final FirewallEndpointGets details of a single org Endpoint.final FirewallEndpointgetFirewallEndpoint(String name) Gets details of a single org Endpoint.Gets details of a single FirewallEndpointAssociation.Gets details of a single FirewallEndpointAssociation.Gets details of a single FirewallEndpointAssociation.Gets details of a single FirewallEndpointAssociation.Gets details of a single org Endpoint.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.getStub()booleanbooleanLists Associations in a given project and location.Lists Associations in a given project and location.Lists Associations in a given project and location.final UnaryCallable<ListFirewallEndpointAssociationsRequest,ListFirewallEndpointAssociationsResponse> Lists Associations in a given project and location.final UnaryCallable<ListFirewallEndpointAssociationsRequest,FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse> Lists Associations in a given project and location.Lists FirewallEndpoints in a given organization and location.listFirewallEndpoints(LocationName parent) Lists FirewallEndpoints in a given organization and location.Lists FirewallEndpoints in a given organization and location.listFirewallEndpoints(String parent) Lists FirewallEndpoints in a given organization and location.Lists FirewallEndpoints in a given organization and location.final UnaryCallable<ListFirewallEndpointsRequest,FirewallActivationClient.ListFirewallEndpointsPagedResponse> Lists FirewallEndpoints in a given organization and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.updateFirewallEndpointAssociationAsync(FirewallEndpointAssociation firewallEndpointAssociation, com.google.protobuf.FieldMask updateMask) Update a single FirewallEndpointAssociation.Update a single FirewallEndpointAssociation.Update a single FirewallEndpointAssociation.final OperationCallable<UpdateFirewallEndpointAssociationRequest,FirewallEndpointAssociation, OperationMetadata> Update a single FirewallEndpointAssociation.updateFirewallEndpointAsync(FirewallEndpoint firewallEndpoint, com.google.protobuf.FieldMask updateMask) Update a single org Endpoint.Update a single org Endpoint.Update a single org Endpoint.Update a single org Endpoint.
-
Constructor Details
-
FirewallActivationClient
Constructs an instance of FirewallActivationClient, 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.- Throws:
IOException
-
FirewallActivationClient
-
-
Method Details
-
create
Constructs an instance of FirewallActivationClient with default settings.- Throws:
IOException
-
create
public static final FirewallActivationClient create(FirewallActivationSettings settings) throws IOException Constructs an instance of FirewallActivationClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of FirewallActivationClient, using the given stub for making calls. This is for advanced usage - prefer using create(FirewallActivationSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listFirewallEndpoints
public final FirewallActivationClient.ListFirewallEndpointsPagedResponse listFirewallEndpoints(LocationName parent) Lists FirewallEndpoints in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (FirewallEndpoint element : firewallActivationClient.listFirewallEndpoints(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListEndpointsRequest- Throws:
ApiException- if the remote call fails
-
listFirewallEndpoints
public final FirewallActivationClient.ListFirewallEndpointsPagedResponse listFirewallEndpoints(OrganizationLocationName parent) Lists FirewallEndpoints in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); for (FirewallEndpoint element : firewallActivationClient.listFirewallEndpoints(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListEndpointsRequest- Throws:
ApiException- if the remote call fails
-
listFirewallEndpoints
public final FirewallActivationClient.ListFirewallEndpointsPagedResponse listFirewallEndpoints(String parent) Lists FirewallEndpoints in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); for (FirewallEndpoint element : firewallActivationClient.listFirewallEndpoints(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListEndpointsRequest- Throws:
ApiException- if the remote call fails
-
listFirewallEndpoints
public final FirewallActivationClient.ListFirewallEndpointsPagedResponse listFirewallEndpoints(ListFirewallEndpointsRequest request) Lists FirewallEndpoints in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { ListFirewallEndpointsRequest request = ListFirewallEndpointsRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (FirewallEndpoint element : firewallActivationClient.listFirewallEndpoints(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listFirewallEndpointsPagedCallable
public final UnaryCallable<ListFirewallEndpointsRequest,FirewallActivationClient.ListFirewallEndpointsPagedResponse> listFirewallEndpointsPagedCallable()Lists FirewallEndpoints in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { ListFirewallEndpointsRequest request = ListFirewallEndpointsRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<FirewallEndpoint> future = firewallActivationClient.listFirewallEndpointsPagedCallable().futureCall(request); // Do something. for (FirewallEndpoint element : future.get().iterateAll()) { // doThingsWith(element); } } -
listFirewallEndpointsCallable
public final UnaryCallable<ListFirewallEndpointsRequest,ListFirewallEndpointsResponse> listFirewallEndpointsCallable()Lists FirewallEndpoints in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { ListFirewallEndpointsRequest request = ListFirewallEndpointsRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListFirewallEndpointsResponse response = firewallActivationClient.listFirewallEndpointsCallable().call(request); for (FirewallEndpoint element : response.getFirewallEndpointsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getFirewallEndpoint
Gets details of a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { FirewallEndpointName name = FirewallEndpointName.ofOrganizationLocationFirewallEndpointName( "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]"); FirewallEndpoint response = firewallActivationClient.getFirewallEndpoint(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getFirewallEndpoint
Gets details of a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { String name = FirewallEndpointName.ofOrganizationLocationFirewallEndpointName( "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]") .toString(); FirewallEndpoint response = firewallActivationClient.getFirewallEndpoint(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getFirewallEndpoint
Gets details of a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { GetFirewallEndpointRequest request = GetFirewallEndpointRequest.newBuilder() .setName( FirewallEndpointName.ofOrganizationLocationFirewallEndpointName( "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]") .toString()) .build(); FirewallEndpoint response = firewallActivationClient.getFirewallEndpoint(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getFirewallEndpointCallable
public final UnaryCallable<GetFirewallEndpointRequest,FirewallEndpoint> getFirewallEndpointCallable()Gets details of a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { GetFirewallEndpointRequest request = GetFirewallEndpointRequest.newBuilder() .setName( FirewallEndpointName.ofOrganizationLocationFirewallEndpointName( "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]") .toString()) .build(); ApiFuture<FirewallEndpoint> future = firewallActivationClient.getFirewallEndpointCallable().futureCall(request); // Do something. FirewallEndpoint response = future.get(); } -
createFirewallEndpointAsync
public final OperationFuture<FirewallEndpoint,OperationMetadata> createFirewallEndpointAsync(LocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId) Creates a new FirewallEndpoint in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); FirewallEndpoint firewallEndpoint = FirewallEndpoint.newBuilder().build(); String firewallEndpointId = "firewallEndpointId-993710416"; FirewallEndpoint response = firewallActivationClient .createFirewallEndpointAsync(parent, firewallEndpoint, firewallEndpointId) .get(); }- Parameters:
parent- Required. Value for parent.firewallEndpoint- Required. The resource being createdfirewallEndpointId- Required. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_id from the method_signature of Create RPC.- Throws:
ApiException- if the remote call fails
-
createFirewallEndpointAsync
public final OperationFuture<FirewallEndpoint,OperationMetadata> createFirewallEndpointAsync(OrganizationLocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId) Creates a new FirewallEndpoint in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); FirewallEndpoint firewallEndpoint = FirewallEndpoint.newBuilder().build(); String firewallEndpointId = "firewallEndpointId-993710416"; FirewallEndpoint response = firewallActivationClient .createFirewallEndpointAsync(parent, firewallEndpoint, firewallEndpointId) .get(); }- Parameters:
parent- Required. Value for parent.firewallEndpoint- Required. The resource being createdfirewallEndpointId- Required. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_id from the method_signature of Create RPC.- Throws:
ApiException- if the remote call fails
-
createFirewallEndpointAsync
public final OperationFuture<FirewallEndpoint,OperationMetadata> createFirewallEndpointAsync(String parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId) Creates a new FirewallEndpoint in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); FirewallEndpoint firewallEndpoint = FirewallEndpoint.newBuilder().build(); String firewallEndpointId = "firewallEndpointId-993710416"; FirewallEndpoint response = firewallActivationClient .createFirewallEndpointAsync(parent, firewallEndpoint, firewallEndpointId) .get(); }- Parameters:
parent- Required. Value for parent.firewallEndpoint- Required. The resource being createdfirewallEndpointId- Required. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_id from the method_signature of Create RPC.- Throws:
ApiException- if the remote call fails
-
createFirewallEndpointAsync
public final OperationFuture<FirewallEndpoint,OperationMetadata> createFirewallEndpointAsync(CreateFirewallEndpointRequest request) Creates a new FirewallEndpoint in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { CreateFirewallEndpointRequest request = CreateFirewallEndpointRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setFirewallEndpointId("firewallEndpointId-993710416") .setFirewallEndpoint(FirewallEndpoint.newBuilder().build()) .setRequestId("requestId693933066") .build(); FirewallEndpoint response = firewallActivationClient.createFirewallEndpointAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createFirewallEndpointOperationCallable
public final OperationCallable<CreateFirewallEndpointRequest,FirewallEndpoint, createFirewallEndpointOperationCallable()OperationMetadata> Creates a new FirewallEndpoint in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { CreateFirewallEndpointRequest request = CreateFirewallEndpointRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setFirewallEndpointId("firewallEndpointId-993710416") .setFirewallEndpoint(FirewallEndpoint.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<FirewallEndpoint, OperationMetadata> future = firewallActivationClient.createFirewallEndpointOperationCallable().futureCall(request); // Do something. FirewallEndpoint response = future.get(); } -
createFirewallEndpointCallable
public final UnaryCallable<CreateFirewallEndpointRequest,Operation> createFirewallEndpointCallable()Creates a new FirewallEndpoint in a given organization and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { CreateFirewallEndpointRequest request = CreateFirewallEndpointRequest.newBuilder() .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) .setFirewallEndpointId("firewallEndpointId-993710416") .setFirewallEndpoint(FirewallEndpoint.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = firewallActivationClient.createFirewallEndpointCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteFirewallEndpointAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAsync(FirewallEndpointName name) Deletes a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { FirewallEndpointName name = FirewallEndpointName.ofOrganizationLocationFirewallEndpointName( "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]"); firewallActivationClient.deleteFirewallEndpointAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteFirewallEndpointAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAsync(String name) Deletes a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { String name = FirewallEndpointName.ofOrganizationLocationFirewallEndpointName( "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]") .toString(); firewallActivationClient.deleteFirewallEndpointAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteFirewallEndpointAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAsync(DeleteFirewallEndpointRequest request) Deletes a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { DeleteFirewallEndpointRequest request = DeleteFirewallEndpointRequest.newBuilder() .setName( FirewallEndpointName.ofOrganizationLocationFirewallEndpointName( "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]") .toString()) .setRequestId("requestId693933066") .build(); firewallActivationClient.deleteFirewallEndpointAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteFirewallEndpointOperationCallable
public final OperationCallable<DeleteFirewallEndpointRequest,com.google.protobuf.Empty, deleteFirewallEndpointOperationCallable()OperationMetadata> Deletes a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { DeleteFirewallEndpointRequest request = DeleteFirewallEndpointRequest.newBuilder() .setName( FirewallEndpointName.ofOrganizationLocationFirewallEndpointName( "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = firewallActivationClient.deleteFirewallEndpointOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteFirewallEndpointCallable
public final UnaryCallable<DeleteFirewallEndpointRequest,Operation> deleteFirewallEndpointCallable()Deletes a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { DeleteFirewallEndpointRequest request = DeleteFirewallEndpointRequest.newBuilder() .setName( FirewallEndpointName.ofOrganizationLocationFirewallEndpointName( "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = firewallActivationClient.deleteFirewallEndpointCallable().futureCall(request); // Do something. future.get(); } -
updateFirewallEndpointAsync
public final OperationFuture<FirewallEndpoint,OperationMetadata> updateFirewallEndpointAsync(FirewallEndpoint firewallEndpoint, com.google.protobuf.FieldMask updateMask) Update a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { FirewallEndpoint firewallEndpoint = FirewallEndpoint.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); FirewallEndpoint response = firewallActivationClient.updateFirewallEndpointAsync(firewallEndpoint, updateMask).get(); }- Parameters:
firewallEndpoint- Required. The resource being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the Endpoint resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateFirewallEndpointAsync
public final OperationFuture<FirewallEndpoint,OperationMetadata> updateFirewallEndpointAsync(UpdateFirewallEndpointRequest request) Update a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { UpdateFirewallEndpointRequest request = UpdateFirewallEndpointRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setFirewallEndpoint(FirewallEndpoint.newBuilder().build()) .setRequestId("requestId693933066") .build(); FirewallEndpoint response = firewallActivationClient.updateFirewallEndpointAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateFirewallEndpointOperationCallable
public final OperationCallable<UpdateFirewallEndpointRequest,FirewallEndpoint, updateFirewallEndpointOperationCallable()OperationMetadata> Update a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { UpdateFirewallEndpointRequest request = UpdateFirewallEndpointRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setFirewallEndpoint(FirewallEndpoint.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<FirewallEndpoint, OperationMetadata> future = firewallActivationClient.updateFirewallEndpointOperationCallable().futureCall(request); // Do something. FirewallEndpoint response = future.get(); } -
updateFirewallEndpointCallable
public final UnaryCallable<UpdateFirewallEndpointRequest,Operation> updateFirewallEndpointCallable()Update a single org Endpoint.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { UpdateFirewallEndpointRequest request = UpdateFirewallEndpointRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setFirewallEndpoint(FirewallEndpoint.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = firewallActivationClient.updateFirewallEndpointCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listFirewallEndpointAssociations
public final FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse listFirewallEndpointAssociations(LocationName parent) Lists Associations in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (FirewallEndpointAssociation element : firewallActivationClient.listFirewallEndpointAssociations(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListAssociationsRequest- Throws:
ApiException- if the remote call fails
-
listFirewallEndpointAssociations
public final FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse listFirewallEndpointAssociations(String parent) Lists Associations in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (FirewallEndpointAssociation element : firewallActivationClient.listFirewallEndpointAssociations(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListAssociationsRequest- Throws:
ApiException- if the remote call fails
-
listFirewallEndpointAssociations
public final FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse listFirewallEndpointAssociations(ListFirewallEndpointAssociationsRequest request) Lists Associations in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { ListFirewallEndpointAssociationsRequest request = ListFirewallEndpointAssociationsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (FirewallEndpointAssociation element : firewallActivationClient.listFirewallEndpointAssociations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listFirewallEndpointAssociationsPagedCallable
public final UnaryCallable<ListFirewallEndpointAssociationsRequest,FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse> listFirewallEndpointAssociationsPagedCallable()Lists Associations in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { ListFirewallEndpointAssociationsRequest request = ListFirewallEndpointAssociationsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<FirewallEndpointAssociation> future = firewallActivationClient .listFirewallEndpointAssociationsPagedCallable() .futureCall(request); // Do something. for (FirewallEndpointAssociation element : future.get().iterateAll()) { // doThingsWith(element); } } -
listFirewallEndpointAssociationsCallable
public final UnaryCallable<ListFirewallEndpointAssociationsRequest,ListFirewallEndpointAssociationsResponse> listFirewallEndpointAssociationsCallable()Lists Associations in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { ListFirewallEndpointAssociationsRequest request = ListFirewallEndpointAssociationsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListFirewallEndpointAssociationsResponse response = firewallActivationClient.listFirewallEndpointAssociationsCallable().call(request); for (FirewallEndpointAssociation element : response.getFirewallEndpointAssociationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getFirewallEndpointAssociation
public final FirewallEndpointAssociation getFirewallEndpointAssociation(FirewallEndpointAssociationName name) Gets details of a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { FirewallEndpointAssociationName name = FirewallEndpointAssociationName.of( "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]"); FirewallEndpointAssociation response = firewallActivationClient.getFirewallEndpointAssociation(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getFirewallEndpointAssociation
Gets details of a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { String name = FirewallEndpointAssociationName.of( "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]") .toString(); FirewallEndpointAssociation response = firewallActivationClient.getFirewallEndpointAssociation(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getFirewallEndpointAssociation
public final FirewallEndpointAssociation getFirewallEndpointAssociation(GetFirewallEndpointAssociationRequest request) Gets details of a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { GetFirewallEndpointAssociationRequest request = GetFirewallEndpointAssociationRequest.newBuilder() .setName( FirewallEndpointAssociationName.of( "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]") .toString()) .build(); FirewallEndpointAssociation response = firewallActivationClient.getFirewallEndpointAssociation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getFirewallEndpointAssociationCallable
public final UnaryCallable<GetFirewallEndpointAssociationRequest,FirewallEndpointAssociation> getFirewallEndpointAssociationCallable()Gets details of a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { GetFirewallEndpointAssociationRequest request = GetFirewallEndpointAssociationRequest.newBuilder() .setName( FirewallEndpointAssociationName.of( "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]") .toString()) .build(); ApiFuture<FirewallEndpointAssociation> future = firewallActivationClient.getFirewallEndpointAssociationCallable().futureCall(request); // Do something. FirewallEndpointAssociation response = future.get(); } -
createFirewallEndpointAssociationAsync
public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> createFirewallEndpointAssociationAsync(LocationName parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId) Creates a new FirewallEndpointAssociation in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); FirewallEndpointAssociation firewallEndpointAssociation = FirewallEndpointAssociation.newBuilder().build(); String firewallEndpointAssociationId = "firewallEndpointAssociationId-891991865"; FirewallEndpointAssociation response = firewallActivationClient .createFirewallEndpointAssociationAsync( parent, firewallEndpointAssociation, firewallEndpointAssociationId) .get(); }- Parameters:
parent- Required. Value for parent.firewallEndpointAssociation- Required. The resource being createdfirewallEndpointAssociationId- Optional. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_association_id from the method_signature of Create RPC.- Throws:
ApiException- if the remote call fails
-
createFirewallEndpointAssociationAsync
public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> createFirewallEndpointAssociationAsync(String parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId) Creates a new FirewallEndpointAssociation in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); FirewallEndpointAssociation firewallEndpointAssociation = FirewallEndpointAssociation.newBuilder().build(); String firewallEndpointAssociationId = "firewallEndpointAssociationId-891991865"; FirewallEndpointAssociation response = firewallActivationClient .createFirewallEndpointAssociationAsync( parent, firewallEndpointAssociation, firewallEndpointAssociationId) .get(); }- Parameters:
parent- Required. Value for parent.firewallEndpointAssociation- Required. The resource being createdfirewallEndpointAssociationId- Optional. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_association_id from the method_signature of Create RPC.- Throws:
ApiException- if the remote call fails
-
createFirewallEndpointAssociationAsync
public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> createFirewallEndpointAssociationAsync(CreateFirewallEndpointAssociationRequest request) Creates a new FirewallEndpointAssociation in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { CreateFirewallEndpointAssociationRequest request = CreateFirewallEndpointAssociationRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFirewallEndpointAssociationId("firewallEndpointAssociationId-891991865") .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); FirewallEndpointAssociation response = firewallActivationClient.createFirewallEndpointAssociationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createFirewallEndpointAssociationOperationCallable
public final OperationCallable<CreateFirewallEndpointAssociationRequest,FirewallEndpointAssociation, createFirewallEndpointAssociationOperationCallable()OperationMetadata> Creates a new FirewallEndpointAssociation in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { CreateFirewallEndpointAssociationRequest request = CreateFirewallEndpointAssociationRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFirewallEndpointAssociationId("firewallEndpointAssociationId-891991865") .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<FirewallEndpointAssociation, OperationMetadata> future = firewallActivationClient .createFirewallEndpointAssociationOperationCallable() .futureCall(request); // Do something. FirewallEndpointAssociation response = future.get(); } -
createFirewallEndpointAssociationCallable
public final UnaryCallable<CreateFirewallEndpointAssociationRequest,Operation> createFirewallEndpointAssociationCallable()Creates a new FirewallEndpointAssociation in a given project and location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { CreateFirewallEndpointAssociationRequest request = CreateFirewallEndpointAssociationRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFirewallEndpointAssociationId("firewallEndpointAssociationId-891991865") .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = firewallActivationClient.createFirewallEndpointAssociationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteFirewallEndpointAssociationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAssociationAsync(FirewallEndpointAssociationName name) Deletes a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { FirewallEndpointAssociationName name = FirewallEndpointAssociationName.of( "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]"); firewallActivationClient.deleteFirewallEndpointAssociationAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteFirewallEndpointAssociationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAssociationAsync(String name) Deletes a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { String name = FirewallEndpointAssociationName.of( "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]") .toString(); firewallActivationClient.deleteFirewallEndpointAssociationAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteFirewallEndpointAssociationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAssociationAsync(DeleteFirewallEndpointAssociationRequest request) Deletes a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { DeleteFirewallEndpointAssociationRequest request = DeleteFirewallEndpointAssociationRequest.newBuilder() .setName( FirewallEndpointAssociationName.of( "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]") .toString()) .setRequestId("requestId693933066") .build(); firewallActivationClient.deleteFirewallEndpointAssociationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteFirewallEndpointAssociationOperationCallable
public final OperationCallable<DeleteFirewallEndpointAssociationRequest,com.google.protobuf.Empty, deleteFirewallEndpointAssociationOperationCallable()OperationMetadata> Deletes a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { DeleteFirewallEndpointAssociationRequest request = DeleteFirewallEndpointAssociationRequest.newBuilder() .setName( FirewallEndpointAssociationName.of( "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = firewallActivationClient .deleteFirewallEndpointAssociationOperationCallable() .futureCall(request); // Do something. future.get(); } -
deleteFirewallEndpointAssociationCallable
public final UnaryCallable<DeleteFirewallEndpointAssociationRequest,Operation> deleteFirewallEndpointAssociationCallable()Deletes a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { DeleteFirewallEndpointAssociationRequest request = DeleteFirewallEndpointAssociationRequest.newBuilder() .setName( FirewallEndpointAssociationName.of( "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = firewallActivationClient.deleteFirewallEndpointAssociationCallable().futureCall(request); // Do something. future.get(); } -
updateFirewallEndpointAssociationAsync
public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> updateFirewallEndpointAssociationAsync(FirewallEndpointAssociation firewallEndpointAssociation, com.google.protobuf.FieldMask updateMask) Update a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { FirewallEndpointAssociation firewallEndpointAssociation = FirewallEndpointAssociation.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); FirewallEndpointAssociation response = firewallActivationClient .updateFirewallEndpointAssociationAsync(firewallEndpointAssociation, updateMask) .get(); }- Parameters:
firewallEndpointAssociation- Required. The resource being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the Association resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateFirewallEndpointAssociationAsync
public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> updateFirewallEndpointAssociationAsync(UpdateFirewallEndpointAssociationRequest request) Update a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { UpdateFirewallEndpointAssociationRequest request = UpdateFirewallEndpointAssociationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); FirewallEndpointAssociation response = firewallActivationClient.updateFirewallEndpointAssociationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateFirewallEndpointAssociationOperationCallable
public final OperationCallable<UpdateFirewallEndpointAssociationRequest,FirewallEndpointAssociation, updateFirewallEndpointAssociationOperationCallable()OperationMetadata> Update a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { UpdateFirewallEndpointAssociationRequest request = UpdateFirewallEndpointAssociationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<FirewallEndpointAssociation, OperationMetadata> future = firewallActivationClient .updateFirewallEndpointAssociationOperationCallable() .futureCall(request); // Do something. FirewallEndpointAssociation response = future.get(); } -
updateFirewallEndpointAssociationCallable
public final UnaryCallable<UpdateFirewallEndpointAssociationRequest,Operation> updateFirewallEndpointAssociationCallable()Update a single FirewallEndpointAssociation.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { UpdateFirewallEndpointAssociationRequest request = UpdateFirewallEndpointAssociationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = firewallActivationClient.updateFirewallEndpointAssociationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listLocations
public final FirewallActivationClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:
* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : firewallActivationClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,FirewallActivationClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:
* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = firewallActivationClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:
* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = firewallActivationClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = firewallActivationClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = firewallActivationClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = firewallActivationClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = firewallActivationClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getIamPolicy
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = firewallActivationClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = firewallActivationClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = firewallActivationClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( AddressGroupName.ofProjectLocationAddressGroupName( "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]") .toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = firewallActivationClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-