| GitHub Repository | Product Reference |
Service Description: Service for managing Firewall Endpoints and Associations.
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
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
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
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
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
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
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 For gRPC and client library implementations, the resource name ispassed as the |
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 |
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 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.
Static Methods
create()
public static final FirewallActivationClient create()Constructs an instance of FirewallActivationClient with default settings.
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(FirewallActivationSettings settings)
public static final FirewallActivationClient create(FirewallActivationSettings settings)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.
| Parameter | |
|---|---|
| Name | Description |
settings |
FirewallActivationSettings |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(FirewallActivationStub stub)
public static final FirewallActivationClient create(FirewallActivationStub stub)Constructs an instance of FirewallActivationClient, using the given stub for making calls. This is for advanced usage - prefer using create(FirewallActivationSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
FirewallActivationStub |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient |
|
Constructors
FirewallActivationClient(FirewallActivationSettings settings)
protected FirewallActivationClient(FirewallActivationSettings settings)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.
| Parameter | |
|---|---|
| Name | Description |
settings |
FirewallActivationSettings |
FirewallActivationClient(FirewallActivationStub stub)
protected FirewallActivationClient(FirewallActivationStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
FirewallActivationStub |
Methods
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 |
|
close()
public final void close()createFirewallEndpointAssociationAsync(CreateFirewallEndpointAssociationRequest request)
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();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateFirewallEndpointAssociationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpointAssociation,OperationMetadata> |
|
createFirewallEndpointAssociationAsync(LocationName parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId)
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 | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. Value for parent. |
firewallEndpointAssociation |
FirewallEndpointAssociationRequired. The resource being created |
firewallEndpointAssociationId |
StringOptional. 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. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpointAssociation,OperationMetadata> |
|
createFirewallEndpointAssociationAsync(String parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId)
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 | |
|---|---|
| Name | Description |
parent |
StringRequired. Value for parent. |
firewallEndpointAssociation |
FirewallEndpointAssociationRequired. The resource being created |
firewallEndpointAssociationId |
StringOptional. 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. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpointAssociation,OperationMetadata> |
|
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateFirewallEndpointAssociationRequest,Operation> |
|
createFirewallEndpointAssociationOperationCallable()
public final OperationCallable<CreateFirewallEndpointAssociationRequest,FirewallEndpointAssociation,OperationMetadata> createFirewallEndpointAssociationOperationCallable()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();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateFirewallEndpointAssociationRequest,FirewallEndpointAssociation,OperationMetadata> |
|
createFirewallEndpointAsync(CreateFirewallEndpointRequest request)
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();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateFirewallEndpointRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpoint,OperationMetadata> |
|
createFirewallEndpointAsync(LocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId)
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 | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. Value for parent. |
firewallEndpoint |
FirewallEndpointRequired. The resource being created |
firewallEndpointId |
StringRequired. 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. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpoint,OperationMetadata> |
|
createFirewallEndpointAsync(OrganizationLocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId)
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 | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. Value for parent. |
firewallEndpoint |
FirewallEndpointRequired. The resource being created |
firewallEndpointId |
StringRequired. 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. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpoint,OperationMetadata> |
|
createFirewallEndpointAsync(String parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId)
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 | |
|---|---|
| Name | Description |
parent |
StringRequired. Value for parent. |
firewallEndpoint |
FirewallEndpointRequired. The resource being created |
firewallEndpointId |
StringRequired. 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. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpoint,OperationMetadata> |
|
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateFirewallEndpointRequest,Operation> |
|
createFirewallEndpointOperationCallable()
public final OperationCallable<CreateFirewallEndpointRequest,FirewallEndpoint,OperationMetadata> createFirewallEndpointOperationCallable()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();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateFirewallEndpointRequest,FirewallEndpoint,OperationMetadata> |
|
deleteFirewallEndpointAssociationAsync(DeleteFirewallEndpointAssociationRequest request)
public final OperationFuture<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();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteFirewallEndpointAssociationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteFirewallEndpointAssociationAsync(FirewallEndpointAssociationName name)
public final OperationFuture<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();
}
| Parameter | |
|---|---|
| Name | Description |
name |
FirewallEndpointAssociationNameRequired. Name of the resource |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteFirewallEndpointAssociationAsync(String name)
public final OperationFuture<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();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Name of the resource |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteFirewallEndpointAssociationRequest,Operation> |
|
deleteFirewallEndpointAssociationOperationCallable()
public final OperationCallable<DeleteFirewallEndpointAssociationRequest,Empty,OperationMetadata> deleteFirewallEndpointAssociationOperationCallable()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();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteFirewallEndpointAssociationRequest,Empty,OperationMetadata> |
|
deleteFirewallEndpointAsync(DeleteFirewallEndpointRequest request)
public final OperationFuture<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();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteFirewallEndpointRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteFirewallEndpointAsync(FirewallEndpointName name)
public final OperationFuture<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();
}
| Parameter | |
|---|---|
| Name | Description |
name |
FirewallEndpointNameRequired. Name of the resource |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteFirewallEndpointAsync(String name)
public final OperationFuture<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();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Name of the resource |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteFirewallEndpointRequest,Operation> |
|
deleteFirewallEndpointOperationCallable()
public final OperationCallable<DeleteFirewallEndpointRequest,Empty,OperationMetadata> deleteFirewallEndpointOperationCallable()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();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteFirewallEndpointRequest,Empty,OperationMetadata> |
|
getFirewallEndpoint(FirewallEndpointName name)
public final FirewallEndpoint getFirewallEndpoint(FirewallEndpointName name)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);
}
| Parameter | |
|---|---|
| Name | Description |
name |
FirewallEndpointNameRequired. Name of the resource |
| Returns | |
|---|---|
| Type | Description |
FirewallEndpoint |
|
getFirewallEndpoint(GetFirewallEndpointRequest request)
public final FirewallEndpoint getFirewallEndpoint(GetFirewallEndpointRequest request)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);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetFirewallEndpointRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FirewallEndpoint |
|
getFirewallEndpoint(String name)
public final FirewallEndpoint getFirewallEndpoint(String name)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);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Name of the resource |
| Returns | |
|---|---|
| Type | Description |
FirewallEndpoint |
|
getFirewallEndpointAssociation(FirewallEndpointAssociationName name)
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);
}
| Parameter | |
|---|---|
| Name | Description |
name |
FirewallEndpointAssociationNameRequired. Name of the resource |
| Returns | |
|---|---|
| Type | Description |
FirewallEndpointAssociation |
|
getFirewallEndpointAssociation(GetFirewallEndpointAssociationRequest request)
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);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetFirewallEndpointAssociationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FirewallEndpointAssociation |
|
getFirewallEndpointAssociation(String name)
public final FirewallEndpointAssociation getFirewallEndpointAssociation(String 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()) {
String name =
FirewallEndpointAssociationName.of(
"[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]")
.toString();
FirewallEndpointAssociation response =
firewallActivationClient.getFirewallEndpointAssociation(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Name of the resource |
| Returns | |
|---|---|
| Type | Description |
FirewallEndpointAssociation |
|
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetFirewallEndpointAssociationRequest,FirewallEndpointAssociation> |
|
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetFirewallEndpointRequest,FirewallEndpoint> |
|
getIamPolicy(GetIamPolicyRequest request)
public final Policy getIamPolicy(GetIamPolicyRequest request)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);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.GetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
getIamPolicyCallable()
public final UnaryCallable<GetIamPolicyRequest,Policy> 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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
|
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)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);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.GetLocationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.cloud.location.Location |
|
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> 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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
|
getOperationsClient()
public final OperationsClient getOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getSettings()
public final FirewallActivationSettings getSettings()| Returns | |
|---|---|
| Type | Description |
FirewallActivationSettings |
|
getStub()
public FirewallActivationStub getStub()| Returns | |
|---|---|
| Type | Description |
FirewallActivationStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listFirewallEndpointAssociations(ListFirewallEndpointAssociationsRequest request)
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);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListFirewallEndpointAssociationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse |
|
listFirewallEndpointAssociations(LocationName parent)
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);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. Parent value for ListAssociationsRequest |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse |
|
listFirewallEndpointAssociations(String parent)
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);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent value for ListAssociationsRequest |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse |
|
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;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFirewallEndpointAssociationsRequest,ListFirewallEndpointAssociationsResponse> |
|
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);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFirewallEndpointAssociationsRequest,ListFirewallEndpointAssociationsPagedResponse> |
|
listFirewallEndpoints(ListFirewallEndpointsRequest request)
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);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListFirewallEndpointsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient.ListFirewallEndpointsPagedResponse |
|
listFirewallEndpoints(LocationName parent)
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);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. Parent value for ListEndpointsRequest |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient.ListFirewallEndpointsPagedResponse |
|
listFirewallEndpoints(OrganizationLocationName parent)
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);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. Parent value for ListEndpointsRequest |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient.ListFirewallEndpointsPagedResponse |
|
listFirewallEndpoints(String parent)
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);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. Parent value for ListEndpointsRequest |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient.ListFirewallEndpointsPagedResponse |
|
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;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFirewallEndpointsRequest,ListFirewallEndpointsResponse> |
|
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);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListFirewallEndpointsRequest,ListFirewallEndpointsPagedResponse> |
|
listLocations(ListLocationsRequest request)
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 formatprojects/{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);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.ListLocationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
FirewallActivationClient.ListLocationsPagedResponse |
|
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> 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 formatprojects/{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;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
|
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 formatprojects/{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);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
|
setIamPolicy(SetIamPolicyRequest request)
public final Policy setIamPolicy(SetIamPolicyRequest request)Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
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);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.SetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
setIamPolicyCallable()
public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()testIamPermissions(TestIamPermissionsRequest request)
public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)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);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.TestIamPermissionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
|
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
|
updateFirewallEndpointAssociationAsync(FirewallEndpointAssociation firewallEndpointAssociation, FieldMask updateMask)
public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> updateFirewallEndpointAssociationAsync(FirewallEndpointAssociation firewallEndpointAssociation, 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 | |
|---|---|
| Name | Description |
firewallEndpointAssociation |
FirewallEndpointAssociationRequired. The resource being updated |
updateMask |
FieldMaskRequired. 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. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpointAssociation,OperationMetadata> |
|
updateFirewallEndpointAssociationAsync(UpdateFirewallEndpointAssociationRequest request)
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();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateFirewallEndpointAssociationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpointAssociation,OperationMetadata> |
|
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateFirewallEndpointAssociationRequest,Operation> |
|
updateFirewallEndpointAssociationOperationCallable()
public final OperationCallable<UpdateFirewallEndpointAssociationRequest,FirewallEndpointAssociation,OperationMetadata> updateFirewallEndpointAssociationOperationCallable()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();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateFirewallEndpointAssociationRequest,FirewallEndpointAssociation,OperationMetadata> |
|
updateFirewallEndpointAsync(FirewallEndpoint firewallEndpoint, FieldMask updateMask)
public final OperationFuture<FirewallEndpoint,OperationMetadata> updateFirewallEndpointAsync(FirewallEndpoint firewallEndpoint, 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 | |
|---|---|
| Name | Description |
firewallEndpoint |
FirewallEndpointRequired. The resource being updated |
updateMask |
FieldMaskRequired. 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. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpoint,OperationMetadata> |
|
updateFirewallEndpointAsync(UpdateFirewallEndpointRequest request)
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();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateFirewallEndpointRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<FirewallEndpoint,OperationMetadata> |
|
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();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateFirewallEndpointRequest,Operation> |
|
updateFirewallEndpointOperationCallable()
public final OperationCallable<UpdateFirewallEndpointRequest,FirewallEndpoint,OperationMetadata> updateFirewallEndpointOperationCallable()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();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateFirewallEndpointRequest,FirewallEndpoint,OperationMetadata> |
|