| GitHub Repository | Product Reference |
Service Description: Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
AuthorizationPolicyName name =
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(name);
}
Note: close() needs to be called on the NetworkSecurityClient 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 |
|---|---|---|
ListAuthorizationPolicies |
Lists AuthorizationPolicies 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.
|
GetAuthorizationPolicy |
Gets details of a single AuthorizationPolicy. |
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.
|
CreateAuthorizationPolicy |
Creates a new AuthorizationPolicy 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.
|
UpdateAuthorizationPolicy |
Updates the parameters of a single AuthorizationPolicy. |
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.
|
DeleteAuthorizationPolicy |
Deletes a single AuthorizationPolicy. |
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.
|
ListBackendAuthenticationConfigs |
Lists BackendAuthenticationConfigs 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.
|
GetBackendAuthenticationConfig |
Gets details of a single BackendAuthenticationConfig to BackendAuthenticationConfig. |
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.
|
CreateBackendAuthenticationConfig |
Creates a new BackendAuthenticationConfig 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.
|
UpdateBackendAuthenticationConfig |
Updates the parameters of a single BackendAuthenticationConfig to BackendAuthenticationConfig. |
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.
|
DeleteBackendAuthenticationConfig |
Deletes a single BackendAuthenticationConfig to BackendAuthenticationConfig. |
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.
|
ListServerTlsPolicies |
Lists ServerTlsPolicies 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.
|
GetServerTlsPolicy |
Gets details of a single ServerTlsPolicy. |
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.
|
CreateServerTlsPolicy |
Creates a new ServerTlsPolicy 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.
|
UpdateServerTlsPolicy |
Updates the parameters of a single ServerTlsPolicy. |
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.
|
DeleteServerTlsPolicy |
Deletes a single ServerTlsPolicy. |
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.
|
ListClientTlsPolicies |
Lists ClientTlsPolicies 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.
|
GetClientTlsPolicy |
Gets details of a single ClientTlsPolicy. |
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.
|
CreateClientTlsPolicy |
Creates a new ClientTlsPolicy 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.
|
UpdateClientTlsPolicy |
Updates the parameters of a single ClientTlsPolicy. |
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.
|
DeleteClientTlsPolicy |
Deletes a single ClientTlsPolicy. |
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.
|
ListGatewaySecurityPolicies |
Lists GatewaySecurityPolicies 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.
|
GetGatewaySecurityPolicy |
Gets details of a single GatewaySecurityPolicy. |
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.
|
CreateGatewaySecurityPolicy |
Creates a new GatewaySecurityPolicy 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.
|
UpdateGatewaySecurityPolicy |
Updates the parameters of a single GatewaySecurityPolicy. |
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.
|
DeleteGatewaySecurityPolicy |
Deletes a single GatewaySecurityPolicy. |
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.
|
ListGatewaySecurityPolicyRules |
Lists GatewaySecurityPolicyRules 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.
|
GetGatewaySecurityPolicyRule |
Gets details of a single GatewaySecurityPolicyRule. |
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.
|
CreateGatewaySecurityPolicyRule |
Creates a new GatewaySecurityPolicy 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.
|
UpdateGatewaySecurityPolicyRule |
Updates the parameters of a single GatewaySecurityPolicyRule. |
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.
|
DeleteGatewaySecurityPolicyRule |
Deletes a single GatewaySecurityPolicyRule. |
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.
|
ListUrlLists |
Lists UrlLists 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.
|
GetUrlList |
Gets details of a single UrlList. |
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.
|
CreateUrlList |
Creates a new UrlList 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.
|
UpdateUrlList |
Updates the parameters of a single UrlList. |
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.
|
DeleteUrlList |
Deletes a single UrlList. |
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.
|
ListTlsInspectionPolicies |
Lists TlsInspectionPolicies 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.
|
GetTlsInspectionPolicy |
Gets details of a single TlsInspectionPolicy. |
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.
|
CreateTlsInspectionPolicy |
Creates a new TlsInspectionPolicy 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.
|
UpdateTlsInspectionPolicy |
Updates the parameters of a single TlsInspectionPolicy. |
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.
|
DeleteTlsInspectionPolicy |
Deletes a single TlsInspectionPolicy. |
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.
|
ListAuthzPolicies |
Lists AuthzPolicies 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.
|
GetAuthzPolicy |
Gets details of a single AuthzPolicy. |
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.
|
CreateAuthzPolicy |
Creates a new AuthzPolicy 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.
|
UpdateAuthzPolicy |
Updates the parameters of a single AuthzPolicy. |
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.
|
DeleteAuthzPolicy |
Deletes a single AuthzPolicy. |
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 NetworkSecuritySettings 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
NetworkSecuritySettings networkSecuritySettings =
NetworkSecuritySettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
NetworkSecurityClient networkSecurityClient =
NetworkSecurityClient.create(networkSecuritySettings);
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
NetworkSecuritySettings networkSecuritySettings =
NetworkSecuritySettings.newBuilder().setEndpoint(myEndpoint).build();
NetworkSecurityClient networkSecurityClient =
NetworkSecurityClient.create(networkSecuritySettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final NetworkSecurityClient create()Constructs an instance of NetworkSecurityClient with default settings.
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(NetworkSecuritySettings settings)
public static final NetworkSecurityClient create(NetworkSecuritySettings settings)Constructs an instance of NetworkSecurityClient, 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 |
NetworkSecuritySettings |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(NetworkSecurityStub stub)
public static final NetworkSecurityClient create(NetworkSecurityStub stub)Constructs an instance of NetworkSecurityClient, using the given stub for making calls. This is for advanced usage - prefer using create(NetworkSecuritySettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
NetworkSecurityStub |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient |
|
Constructors
NetworkSecurityClient(NetworkSecuritySettings settings)
protected NetworkSecurityClient(NetworkSecuritySettings settings)Constructs an instance of NetworkSecurityClient, 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 |
NetworkSecuritySettings |
NetworkSecurityClient(NetworkSecurityStub stub)
protected NetworkSecurityClient(NetworkSecurityStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
NetworkSecurityStub |
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()createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest request)
public final OperationFuture<AuthorizationPolicy,OperationMetadata> createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest request)Creates a new AuthorizationPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateAuthorizationPolicyRequest request =
CreateAuthorizationPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAuthorizationPolicyId("authorizationPolicyId1314252166")
.setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
.build();
AuthorizationPolicy response =
networkSecurityClient.createAuthorizationPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateAuthorizationPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<AuthorizationPolicy,OperationMetadata> |
|
createAuthorizationPolicyAsync(LocationName parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId)
public final OperationFuture<AuthorizationPolicy,OperationMetadata> createAuthorizationPolicyAsync(LocationName parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId)Creates a new AuthorizationPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
AuthorizationPolicy authorizationPolicy = AuthorizationPolicy.newBuilder().build();
String authorizationPolicyId = "authorizationPolicyId1314252166";
AuthorizationPolicy response =
networkSecurityClient
.createAuthorizationPolicyAsync(parent, authorizationPolicy, authorizationPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the AuthorizationPolicy. Must be in the format
|
authorizationPolicy |
AuthorizationPolicyRequired. AuthorizationPolicy resource to be created. |
authorizationPolicyId |
StringRequired. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<AuthorizationPolicy,OperationMetadata> |
|
createAuthorizationPolicyAsync(String parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId)
public final OperationFuture<AuthorizationPolicy,OperationMetadata> createAuthorizationPolicyAsync(String parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId)Creates a new AuthorizationPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
AuthorizationPolicy authorizationPolicy = AuthorizationPolicy.newBuilder().build();
String authorizationPolicyId = "authorizationPolicyId1314252166";
AuthorizationPolicy response =
networkSecurityClient
.createAuthorizationPolicyAsync(parent, authorizationPolicy, authorizationPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the AuthorizationPolicy. Must be in the format
|
authorizationPolicy |
AuthorizationPolicyRequired. AuthorizationPolicy resource to be created. |
authorizationPolicyId |
StringRequired. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "authz_policy". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<AuthorizationPolicy,OperationMetadata> |
|
createAuthorizationPolicyCallable()
public final UnaryCallable<CreateAuthorizationPolicyRequest,Operation> createAuthorizationPolicyCallable()Creates a new AuthorizationPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateAuthorizationPolicyRequest request =
CreateAuthorizationPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAuthorizationPolicyId("authorizationPolicyId1314252166")
.setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.createAuthorizationPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateAuthorizationPolicyRequest,Operation> |
|
createAuthorizationPolicyOperationCallable()
public final OperationCallable<CreateAuthorizationPolicyRequest,AuthorizationPolicy,OperationMetadata> createAuthorizationPolicyOperationCallable()Creates a new AuthorizationPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateAuthorizationPolicyRequest request =
CreateAuthorizationPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAuthorizationPolicyId("authorizationPolicyId1314252166")
.setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
.build();
OperationFuture<AuthorizationPolicy, OperationMetadata> future =
networkSecurityClient.createAuthorizationPolicyOperationCallable().futureCall(request);
// Do something.
AuthorizationPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateAuthorizationPolicyRequest,AuthorizationPolicy,OperationMetadata> |
|
createAuthzPolicyAsync(CreateAuthzPolicyRequest request)
public final OperationFuture<AuthzPolicy,OperationMetadata> createAuthzPolicyAsync(CreateAuthzPolicyRequest request)Creates a new AuthzPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateAuthzPolicyRequest request =
CreateAuthzPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAuthzPolicyId("authzPolicyId1717400543")
.setAuthzPolicy(AuthzPolicy.newBuilder().build())
.setRequestId("requestId693933066")
.build();
AuthzPolicy response = networkSecurityClient.createAuthzPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateAuthzPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<AuthzPolicy,OperationMetadata> |
|
createAuthzPolicyAsync(LocationName parent, AuthzPolicy authzPolicy, String authzPolicyId)
public final OperationFuture<AuthzPolicy,OperationMetadata> createAuthzPolicyAsync(LocationName parent, AuthzPolicy authzPolicy, String authzPolicyId)Creates a new AuthzPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
AuthzPolicy authzPolicy = AuthzPolicy.newBuilder().build();
String authzPolicyId = "authzPolicyId1717400543";
AuthzPolicy response =
networkSecurityClient.createAuthzPolicyAsync(parent, authzPolicy, authzPolicyId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the |
authzPolicy |
AuthzPolicyRequired. |
authzPolicyId |
StringRequired. User-provided ID of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<AuthzPolicy,OperationMetadata> |
|
createAuthzPolicyAsync(String parent, AuthzPolicy authzPolicy, String authzPolicyId)
public final OperationFuture<AuthzPolicy,OperationMetadata> createAuthzPolicyAsync(String parent, AuthzPolicy authzPolicy, String authzPolicyId)Creates a new AuthzPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
AuthzPolicy authzPolicy = AuthzPolicy.newBuilder().build();
String authzPolicyId = "authzPolicyId1717400543";
AuthzPolicy response =
networkSecurityClient.createAuthzPolicyAsync(parent, authzPolicy, authzPolicyId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the |
authzPolicy |
AuthzPolicyRequired. |
authzPolicyId |
StringRequired. User-provided ID of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<AuthzPolicy,OperationMetadata> |
|
createAuthzPolicyCallable()
public final UnaryCallable<CreateAuthzPolicyRequest,Operation> createAuthzPolicyCallable()Creates a new AuthzPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateAuthzPolicyRequest request =
CreateAuthzPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAuthzPolicyId("authzPolicyId1717400543")
.setAuthzPolicy(AuthzPolicy.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
networkSecurityClient.createAuthzPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateAuthzPolicyRequest,Operation> |
|
createAuthzPolicyOperationCallable()
public final OperationCallable<CreateAuthzPolicyRequest,AuthzPolicy,OperationMetadata> createAuthzPolicyOperationCallable()Creates a new AuthzPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateAuthzPolicyRequest request =
CreateAuthzPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAuthzPolicyId("authzPolicyId1717400543")
.setAuthzPolicy(AuthzPolicy.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<AuthzPolicy, OperationMetadata> future =
networkSecurityClient.createAuthzPolicyOperationCallable().futureCall(request);
// Do something.
AuthzPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateAuthzPolicyRequest,AuthzPolicy,OperationMetadata> |
|
createBackendAuthenticationConfigAsync(CreateBackendAuthenticationConfigRequest request)
public final OperationFuture<BackendAuthenticationConfig,OperationMetadata> createBackendAuthenticationConfigAsync(CreateBackendAuthenticationConfigRequest request)Creates a new BackendAuthenticationConfig 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateBackendAuthenticationConfigRequest request =
CreateBackendAuthenticationConfigRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setBackendAuthenticationConfigId("backendAuthenticationConfigId-396698039")
.setBackendAuthenticationConfig(BackendAuthenticationConfig.newBuilder().build())
.build();
BackendAuthenticationConfig response =
networkSecurityClient.createBackendAuthenticationConfigAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateBackendAuthenticationConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BackendAuthenticationConfig,OperationMetadata> |
|
createBackendAuthenticationConfigAsync(LocationName parent, BackendAuthenticationConfig backendAuthenticationConfig, String backendAuthenticationConfigId)
public final OperationFuture<BackendAuthenticationConfig,OperationMetadata> createBackendAuthenticationConfigAsync(LocationName parent, BackendAuthenticationConfig backendAuthenticationConfig, String backendAuthenticationConfigId)Creates a new BackendAuthenticationConfig 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
BackendAuthenticationConfig backendAuthenticationConfig =
BackendAuthenticationConfig.newBuilder().build();
String backendAuthenticationConfigId = "backendAuthenticationConfigId-396698039";
BackendAuthenticationConfig response =
networkSecurityClient
.createBackendAuthenticationConfigAsync(
parent, backendAuthenticationConfig, backendAuthenticationConfigId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the BackendAuthenticationConfig. Must be in the
format |
backendAuthenticationConfig |
BackendAuthenticationConfigRequired. BackendAuthenticationConfig resource to be created. |
backendAuthenticationConfigId |
StringRequired. Short name of the BackendAuthenticationConfig resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "backend-auth-config". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BackendAuthenticationConfig,OperationMetadata> |
|
createBackendAuthenticationConfigAsync(String parent, BackendAuthenticationConfig backendAuthenticationConfig, String backendAuthenticationConfigId)
public final OperationFuture<BackendAuthenticationConfig,OperationMetadata> createBackendAuthenticationConfigAsync(String parent, BackendAuthenticationConfig backendAuthenticationConfig, String backendAuthenticationConfigId)Creates a new BackendAuthenticationConfig 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
BackendAuthenticationConfig backendAuthenticationConfig =
BackendAuthenticationConfig.newBuilder().build();
String backendAuthenticationConfigId = "backendAuthenticationConfigId-396698039";
BackendAuthenticationConfig response =
networkSecurityClient
.createBackendAuthenticationConfigAsync(
parent, backendAuthenticationConfig, backendAuthenticationConfigId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the BackendAuthenticationConfig. Must be in the
format |
backendAuthenticationConfig |
BackendAuthenticationConfigRequired. BackendAuthenticationConfig resource to be created. |
backendAuthenticationConfigId |
StringRequired. Short name of the BackendAuthenticationConfig resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "backend-auth-config". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BackendAuthenticationConfig,OperationMetadata> |
|
createBackendAuthenticationConfigCallable()
public final UnaryCallable<CreateBackendAuthenticationConfigRequest,Operation> createBackendAuthenticationConfigCallable()Creates a new BackendAuthenticationConfig 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateBackendAuthenticationConfigRequest request =
CreateBackendAuthenticationConfigRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setBackendAuthenticationConfigId("backendAuthenticationConfigId-396698039")
.setBackendAuthenticationConfig(BackendAuthenticationConfig.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.createBackendAuthenticationConfigCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateBackendAuthenticationConfigRequest,Operation> |
|
createBackendAuthenticationConfigOperationCallable()
public final OperationCallable<CreateBackendAuthenticationConfigRequest,BackendAuthenticationConfig,OperationMetadata> createBackendAuthenticationConfigOperationCallable()Creates a new BackendAuthenticationConfig 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateBackendAuthenticationConfigRequest request =
CreateBackendAuthenticationConfigRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setBackendAuthenticationConfigId("backendAuthenticationConfigId-396698039")
.setBackendAuthenticationConfig(BackendAuthenticationConfig.newBuilder().build())
.build();
OperationFuture<BackendAuthenticationConfig, OperationMetadata> future =
networkSecurityClient
.createBackendAuthenticationConfigOperationCallable()
.futureCall(request);
// Do something.
BackendAuthenticationConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateBackendAuthenticationConfigRequest,BackendAuthenticationConfig,OperationMetadata> |
|
createClientTlsPolicyAsync(CreateClientTlsPolicyRequest request)
public final OperationFuture<ClientTlsPolicy,OperationMetadata> createClientTlsPolicyAsync(CreateClientTlsPolicyRequest request)Creates a new ClientTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateClientTlsPolicyRequest request =
CreateClientTlsPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setClientTlsPolicyId("clientTlsPolicyId-188933315")
.setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
.build();
ClientTlsPolicy response = networkSecurityClient.createClientTlsPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateClientTlsPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ClientTlsPolicy,OperationMetadata> |
|
createClientTlsPolicyAsync(LocationName parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId)
public final OperationFuture<ClientTlsPolicy,OperationMetadata> createClientTlsPolicyAsync(LocationName parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId)Creates a new ClientTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ClientTlsPolicy clientTlsPolicy = ClientTlsPolicy.newBuilder().build();
String clientTlsPolicyId = "clientTlsPolicyId-188933315";
ClientTlsPolicy response =
networkSecurityClient
.createClientTlsPolicyAsync(parent, clientTlsPolicy, clientTlsPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the ClientTlsPolicy. Must be in the format
|
clientTlsPolicy |
ClientTlsPolicyRequired. ClientTlsPolicy resource to be created. |
clientTlsPolicyId |
StringRequired. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "client_mtls_policy". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ClientTlsPolicy,OperationMetadata> |
|
createClientTlsPolicyAsync(String parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId)
public final OperationFuture<ClientTlsPolicy,OperationMetadata> createClientTlsPolicyAsync(String parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId)Creates a new ClientTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ClientTlsPolicy clientTlsPolicy = ClientTlsPolicy.newBuilder().build();
String clientTlsPolicyId = "clientTlsPolicyId-188933315";
ClientTlsPolicy response =
networkSecurityClient
.createClientTlsPolicyAsync(parent, clientTlsPolicy, clientTlsPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the ClientTlsPolicy. Must be in the format
|
clientTlsPolicy |
ClientTlsPolicyRequired. ClientTlsPolicy resource to be created. |
clientTlsPolicyId |
StringRequired. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "client_mtls_policy". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ClientTlsPolicy,OperationMetadata> |
|
createClientTlsPolicyCallable()
public final UnaryCallable<CreateClientTlsPolicyRequest,Operation> createClientTlsPolicyCallable()Creates a new ClientTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateClientTlsPolicyRequest request =
CreateClientTlsPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setClientTlsPolicyId("clientTlsPolicyId-188933315")
.setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.createClientTlsPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateClientTlsPolicyRequest,Operation> |
|
createClientTlsPolicyOperationCallable()
public final OperationCallable<CreateClientTlsPolicyRequest,ClientTlsPolicy,OperationMetadata> createClientTlsPolicyOperationCallable()Creates a new ClientTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateClientTlsPolicyRequest request =
CreateClientTlsPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setClientTlsPolicyId("clientTlsPolicyId-188933315")
.setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
.build();
OperationFuture<ClientTlsPolicy, OperationMetadata> future =
networkSecurityClient.createClientTlsPolicyOperationCallable().futureCall(request);
// Do something.
ClientTlsPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateClientTlsPolicyRequest,ClientTlsPolicy,OperationMetadata> |
|
createGatewaySecurityPolicyAsync(CreateGatewaySecurityPolicyRequest request)
public final OperationFuture<GatewaySecurityPolicy,OperationMetadata> createGatewaySecurityPolicyAsync(CreateGatewaySecurityPolicyRequest request)Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateGatewaySecurityPolicyRequest request =
CreateGatewaySecurityPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setGatewaySecurityPolicyId("gatewaySecurityPolicyId2047625137")
.setGatewaySecurityPolicy(GatewaySecurityPolicy.newBuilder().build())
.build();
GatewaySecurityPolicy response =
networkSecurityClient.createGatewaySecurityPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateGatewaySecurityPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<GatewaySecurityPolicy,OperationMetadata> |
|
createGatewaySecurityPolicyAsync(LocationName parent, GatewaySecurityPolicy gatewaySecurityPolicy, String gatewaySecurityPolicyId)
public final OperationFuture<GatewaySecurityPolicy,OperationMetadata> createGatewaySecurityPolicyAsync(LocationName parent, GatewaySecurityPolicy gatewaySecurityPolicy, String gatewaySecurityPolicyId)Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
GatewaySecurityPolicy gatewaySecurityPolicy = GatewaySecurityPolicy.newBuilder().build();
String gatewaySecurityPolicyId = "gatewaySecurityPolicyId2047625137";
GatewaySecurityPolicy response =
networkSecurityClient
.createGatewaySecurityPolicyAsync(
parent, gatewaySecurityPolicy, gatewaySecurityPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the GatewaySecurityPolicy. Must be in the format
|
gatewaySecurityPolicy |
GatewaySecurityPolicyRequired. GatewaySecurityPolicy resource to be created. |
gatewaySecurityPolicyId |
StringRequired. Short name of the GatewaySecurityPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "gateway_security_policy1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<GatewaySecurityPolicy,OperationMetadata> |
|
createGatewaySecurityPolicyAsync(String parent, GatewaySecurityPolicy gatewaySecurityPolicy, String gatewaySecurityPolicyId)
public final OperationFuture<GatewaySecurityPolicy,OperationMetadata> createGatewaySecurityPolicyAsync(String parent, GatewaySecurityPolicy gatewaySecurityPolicy, String gatewaySecurityPolicyId)Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
GatewaySecurityPolicy gatewaySecurityPolicy = GatewaySecurityPolicy.newBuilder().build();
String gatewaySecurityPolicyId = "gatewaySecurityPolicyId2047625137";
GatewaySecurityPolicy response =
networkSecurityClient
.createGatewaySecurityPolicyAsync(
parent, gatewaySecurityPolicy, gatewaySecurityPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the GatewaySecurityPolicy. Must be in the format
|
gatewaySecurityPolicy |
GatewaySecurityPolicyRequired. GatewaySecurityPolicy resource to be created. |
gatewaySecurityPolicyId |
StringRequired. Short name of the GatewaySecurityPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "gateway_security_policy1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<GatewaySecurityPolicy,OperationMetadata> |
|
createGatewaySecurityPolicyCallable()
public final UnaryCallable<CreateGatewaySecurityPolicyRequest,Operation> createGatewaySecurityPolicyCallable()Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateGatewaySecurityPolicyRequest request =
CreateGatewaySecurityPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setGatewaySecurityPolicyId("gatewaySecurityPolicyId2047625137")
.setGatewaySecurityPolicy(GatewaySecurityPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.createGatewaySecurityPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateGatewaySecurityPolicyRequest,Operation> |
|
createGatewaySecurityPolicyOperationCallable()
public final OperationCallable<CreateGatewaySecurityPolicyRequest,GatewaySecurityPolicy,OperationMetadata> createGatewaySecurityPolicyOperationCallable()Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateGatewaySecurityPolicyRequest request =
CreateGatewaySecurityPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setGatewaySecurityPolicyId("gatewaySecurityPolicyId2047625137")
.setGatewaySecurityPolicy(GatewaySecurityPolicy.newBuilder().build())
.build();
OperationFuture<GatewaySecurityPolicy, OperationMetadata> future =
networkSecurityClient.createGatewaySecurityPolicyOperationCallable().futureCall(request);
// Do something.
GatewaySecurityPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateGatewaySecurityPolicyRequest,GatewaySecurityPolicy,OperationMetadata> |
|
createGatewaySecurityPolicyRuleAsync(CreateGatewaySecurityPolicyRuleRequest request)
public final OperationFuture<GatewaySecurityPolicyRule,OperationMetadata> createGatewaySecurityPolicyRuleAsync(CreateGatewaySecurityPolicyRuleRequest request)Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateGatewaySecurityPolicyRuleRequest request =
CreateGatewaySecurityPolicyRuleRequest.newBuilder()
.setParent(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.setGatewaySecurityPolicyRule(GatewaySecurityPolicyRule.newBuilder().build())
.setGatewaySecurityPolicyRuleId("gatewaySecurityPolicyRuleId-1764962099")
.build();
GatewaySecurityPolicyRule response =
networkSecurityClient.createGatewaySecurityPolicyRuleAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateGatewaySecurityPolicyRuleRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<GatewaySecurityPolicyRule,OperationMetadata> |
|
createGatewaySecurityPolicyRuleAsync(GatewaySecurityPolicyName parent, GatewaySecurityPolicyRule gatewaySecurityPolicyRule, String gatewaySecurityPolicyRuleId)
public final OperationFuture<GatewaySecurityPolicyRule,OperationMetadata> createGatewaySecurityPolicyRuleAsync(GatewaySecurityPolicyName parent, GatewaySecurityPolicyRule gatewaySecurityPolicyRule, String gatewaySecurityPolicyRuleId)Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GatewaySecurityPolicyName parent =
GatewaySecurityPolicyName.of("[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]");
GatewaySecurityPolicyRule gatewaySecurityPolicyRule =
GatewaySecurityPolicyRule.newBuilder().build();
String gatewaySecurityPolicyRuleId = "gatewaySecurityPolicyRuleId-1764962099";
GatewaySecurityPolicyRule response =
networkSecurityClient
.createGatewaySecurityPolicyRuleAsync(
parent, gatewaySecurityPolicyRule, gatewaySecurityPolicyRuleId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
GatewaySecurityPolicyNameRequired. The parent where this rule will be created. Format : projects/{project}/location/{location}/gatewaySecurityPolicies/* |
gatewaySecurityPolicyRule |
GatewaySecurityPolicyRuleRequired. The rule to be created. |
gatewaySecurityPolicyRuleId |
StringThe ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<GatewaySecurityPolicyRule,OperationMetadata> |
|
createGatewaySecurityPolicyRuleAsync(String parent, GatewaySecurityPolicyRule gatewaySecurityPolicyRule, String gatewaySecurityPolicyRuleId)
public final OperationFuture<GatewaySecurityPolicyRule,OperationMetadata> createGatewaySecurityPolicyRuleAsync(String parent, GatewaySecurityPolicyRule gatewaySecurityPolicyRule, String gatewaySecurityPolicyRuleId)Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent =
GatewaySecurityPolicyName.of("[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString();
GatewaySecurityPolicyRule gatewaySecurityPolicyRule =
GatewaySecurityPolicyRule.newBuilder().build();
String gatewaySecurityPolicyRuleId = "gatewaySecurityPolicyRuleId-1764962099";
GatewaySecurityPolicyRule response =
networkSecurityClient
.createGatewaySecurityPolicyRuleAsync(
parent, gatewaySecurityPolicyRule, gatewaySecurityPolicyRuleId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent where this rule will be created. Format : projects/{project}/location/{location}/gatewaySecurityPolicies/* |
gatewaySecurityPolicyRule |
GatewaySecurityPolicyRuleRequired. The rule to be created. |
gatewaySecurityPolicyRuleId |
StringThe ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<GatewaySecurityPolicyRule,OperationMetadata> |
|
createGatewaySecurityPolicyRuleCallable()
public final UnaryCallable<CreateGatewaySecurityPolicyRuleRequest,Operation> createGatewaySecurityPolicyRuleCallable()Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateGatewaySecurityPolicyRuleRequest request =
CreateGatewaySecurityPolicyRuleRequest.newBuilder()
.setParent(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.setGatewaySecurityPolicyRule(GatewaySecurityPolicyRule.newBuilder().build())
.setGatewaySecurityPolicyRuleId("gatewaySecurityPolicyRuleId-1764962099")
.build();
ApiFuture<Operation> future =
networkSecurityClient.createGatewaySecurityPolicyRuleCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateGatewaySecurityPolicyRuleRequest,Operation> |
|
createGatewaySecurityPolicyRuleOperationCallable()
public final OperationCallable<CreateGatewaySecurityPolicyRuleRequest,GatewaySecurityPolicyRule,OperationMetadata> createGatewaySecurityPolicyRuleOperationCallable()Creates a new GatewaySecurityPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateGatewaySecurityPolicyRuleRequest request =
CreateGatewaySecurityPolicyRuleRequest.newBuilder()
.setParent(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.setGatewaySecurityPolicyRule(GatewaySecurityPolicyRule.newBuilder().build())
.setGatewaySecurityPolicyRuleId("gatewaySecurityPolicyRuleId-1764962099")
.build();
OperationFuture<GatewaySecurityPolicyRule, OperationMetadata> future =
networkSecurityClient
.createGatewaySecurityPolicyRuleOperationCallable()
.futureCall(request);
// Do something.
GatewaySecurityPolicyRule response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateGatewaySecurityPolicyRuleRequest,GatewaySecurityPolicyRule,OperationMetadata> |
|
createServerTlsPolicyAsync(CreateServerTlsPolicyRequest request)
public final OperationFuture<ServerTlsPolicy,OperationMetadata> createServerTlsPolicyAsync(CreateServerTlsPolicyRequest request)Creates a new ServerTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateServerTlsPolicyRequest request =
CreateServerTlsPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setServerTlsPolicyId("serverTlsPolicyId-1966046011")
.setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
.build();
ServerTlsPolicy response = networkSecurityClient.createServerTlsPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateServerTlsPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ServerTlsPolicy,OperationMetadata> |
|
createServerTlsPolicyAsync(LocationName parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId)
public final OperationFuture<ServerTlsPolicy,OperationMetadata> createServerTlsPolicyAsync(LocationName parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId)Creates a new ServerTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ServerTlsPolicy serverTlsPolicy = ServerTlsPolicy.newBuilder().build();
String serverTlsPolicyId = "serverTlsPolicyId-1966046011";
ServerTlsPolicy response =
networkSecurityClient
.createServerTlsPolicyAsync(parent, serverTlsPolicy, serverTlsPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the ServerTlsPolicy. Must be in the format
|
serverTlsPolicy |
ServerTlsPolicyRequired. ServerTlsPolicy resource to be created. |
serverTlsPolicyId |
StringRequired. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "server_mtls_policy". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ServerTlsPolicy,OperationMetadata> |
|
createServerTlsPolicyAsync(String parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId)
public final OperationFuture<ServerTlsPolicy,OperationMetadata> createServerTlsPolicyAsync(String parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId)Creates a new ServerTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ServerTlsPolicy serverTlsPolicy = ServerTlsPolicy.newBuilder().build();
String serverTlsPolicyId = "serverTlsPolicyId-1966046011";
ServerTlsPolicy response =
networkSecurityClient
.createServerTlsPolicyAsync(parent, serverTlsPolicy, serverTlsPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the ServerTlsPolicy. Must be in the format
|
serverTlsPolicy |
ServerTlsPolicyRequired. ServerTlsPolicy resource to be created. |
serverTlsPolicyId |
StringRequired. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "server_mtls_policy". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ServerTlsPolicy,OperationMetadata> |
|
createServerTlsPolicyCallable()
public final UnaryCallable<CreateServerTlsPolicyRequest,Operation> createServerTlsPolicyCallable()Creates a new ServerTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateServerTlsPolicyRequest request =
CreateServerTlsPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setServerTlsPolicyId("serverTlsPolicyId-1966046011")
.setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.createServerTlsPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateServerTlsPolicyRequest,Operation> |
|
createServerTlsPolicyOperationCallable()
public final OperationCallable<CreateServerTlsPolicyRequest,ServerTlsPolicy,OperationMetadata> createServerTlsPolicyOperationCallable()Creates a new ServerTlsPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateServerTlsPolicyRequest request =
CreateServerTlsPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setServerTlsPolicyId("serverTlsPolicyId-1966046011")
.setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
.build();
OperationFuture<ServerTlsPolicy, OperationMetadata> future =
networkSecurityClient.createServerTlsPolicyOperationCallable().futureCall(request);
// Do something.
ServerTlsPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateServerTlsPolicyRequest,ServerTlsPolicy,OperationMetadata> |
|
createTlsInspectionPolicyAsync(CreateTlsInspectionPolicyRequest request)
public final OperationFuture<TlsInspectionPolicy,OperationMetadata> createTlsInspectionPolicyAsync(CreateTlsInspectionPolicyRequest request)Creates a new TlsInspectionPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateTlsInspectionPolicyRequest request =
CreateTlsInspectionPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTlsInspectionPolicyId("tlsInspectionPolicyId-647545892")
.setTlsInspectionPolicy(TlsInspectionPolicy.newBuilder().build())
.build();
TlsInspectionPolicy response =
networkSecurityClient.createTlsInspectionPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateTlsInspectionPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<TlsInspectionPolicy,OperationMetadata> |
|
createTlsInspectionPolicyAsync(LocationName parent, TlsInspectionPolicy tlsInspectionPolicy, String tlsInspectionPolicyId)
public final OperationFuture<TlsInspectionPolicy,OperationMetadata> createTlsInspectionPolicyAsync(LocationName parent, TlsInspectionPolicy tlsInspectionPolicy, String tlsInspectionPolicyId)Creates a new TlsInspectionPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
TlsInspectionPolicy tlsInspectionPolicy = TlsInspectionPolicy.newBuilder().build();
String tlsInspectionPolicyId = "tlsInspectionPolicyId-647545892";
TlsInspectionPolicy response =
networkSecurityClient
.createTlsInspectionPolicyAsync(parent, tlsInspectionPolicy, tlsInspectionPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the TlsInspectionPolicy. Must be in the format
|
tlsInspectionPolicy |
TlsInspectionPolicyRequired. TlsInspectionPolicy resource to be created. |
tlsInspectionPolicyId |
StringRequired. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "tls_inspection_policy1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<TlsInspectionPolicy,OperationMetadata> |
|
createTlsInspectionPolicyAsync(String parent, TlsInspectionPolicy tlsInspectionPolicy, String tlsInspectionPolicyId)
public final OperationFuture<TlsInspectionPolicy,OperationMetadata> createTlsInspectionPolicyAsync(String parent, TlsInspectionPolicy tlsInspectionPolicy, String tlsInspectionPolicyId)Creates a new TlsInspectionPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
TlsInspectionPolicy tlsInspectionPolicy = TlsInspectionPolicy.newBuilder().build();
String tlsInspectionPolicyId = "tlsInspectionPolicyId-647545892";
TlsInspectionPolicy response =
networkSecurityClient
.createTlsInspectionPolicyAsync(parent, tlsInspectionPolicy, tlsInspectionPolicyId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the TlsInspectionPolicy. Must be in the format
|
tlsInspectionPolicy |
TlsInspectionPolicyRequired. TlsInspectionPolicy resource to be created. |
tlsInspectionPolicyId |
StringRequired. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "tls_inspection_policy1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<TlsInspectionPolicy,OperationMetadata> |
|
createTlsInspectionPolicyCallable()
public final UnaryCallable<CreateTlsInspectionPolicyRequest,Operation> createTlsInspectionPolicyCallable()Creates a new TlsInspectionPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateTlsInspectionPolicyRequest request =
CreateTlsInspectionPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTlsInspectionPolicyId("tlsInspectionPolicyId-647545892")
.setTlsInspectionPolicy(TlsInspectionPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.createTlsInspectionPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateTlsInspectionPolicyRequest,Operation> |
|
createTlsInspectionPolicyOperationCallable()
public final OperationCallable<CreateTlsInspectionPolicyRequest,TlsInspectionPolicy,OperationMetadata> createTlsInspectionPolicyOperationCallable()Creates a new TlsInspectionPolicy 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateTlsInspectionPolicyRequest request =
CreateTlsInspectionPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTlsInspectionPolicyId("tlsInspectionPolicyId-647545892")
.setTlsInspectionPolicy(TlsInspectionPolicy.newBuilder().build())
.build();
OperationFuture<TlsInspectionPolicy, OperationMetadata> future =
networkSecurityClient.createTlsInspectionPolicyOperationCallable().futureCall(request);
// Do something.
TlsInspectionPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateTlsInspectionPolicyRequest,TlsInspectionPolicy,OperationMetadata> |
|
createUrlListAsync(CreateUrlListRequest request)
public final OperationFuture<UrlList,OperationMetadata> createUrlListAsync(CreateUrlListRequest request)Creates a new UrlList 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateUrlListRequest request =
CreateUrlListRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setUrlListId("urlListId-564417368")
.setUrlList(UrlList.newBuilder().build())
.build();
UrlList response = networkSecurityClient.createUrlListAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateUrlListRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<UrlList,OperationMetadata> |
|
createUrlListAsync(LocationName parent, UrlList urlList, String urlListId)
public final OperationFuture<UrlList,OperationMetadata> createUrlListAsync(LocationName parent, UrlList urlList, String urlListId)Creates a new UrlList 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
UrlList urlList = UrlList.newBuilder().build();
String urlListId = "urlListId-564417368";
UrlList response = networkSecurityClient.createUrlListAsync(parent, urlList, urlListId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the UrlList. Must be in the format
|
urlList |
UrlListRequired. UrlList resource to be created. |
urlListId |
StringRequired. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "url_list". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<UrlList,OperationMetadata> |
|
createUrlListAsync(String parent, UrlList urlList, String urlListId)
public final OperationFuture<UrlList,OperationMetadata> createUrlListAsync(String parent, UrlList urlList, String urlListId)Creates a new UrlList 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
UrlList urlList = UrlList.newBuilder().build();
String urlListId = "urlListId-564417368";
UrlList response = networkSecurityClient.createUrlListAsync(parent, urlList, urlListId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the UrlList. Must be in the format
|
urlList |
UrlListRequired. UrlList resource to be created. |
urlListId |
StringRequired. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "url_list". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<UrlList,OperationMetadata> |
|
createUrlListCallable()
public final UnaryCallable<CreateUrlListRequest,Operation> createUrlListCallable()Creates a new UrlList 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateUrlListRequest request =
CreateUrlListRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setUrlListId("urlListId-564417368")
.setUrlList(UrlList.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.createUrlListCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateUrlListRequest,Operation> |
|
createUrlListOperationCallable()
public final OperationCallable<CreateUrlListRequest,UrlList,OperationMetadata> createUrlListOperationCallable()Creates a new UrlList 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
CreateUrlListRequest request =
CreateUrlListRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setUrlListId("urlListId-564417368")
.setUrlList(UrlList.newBuilder().build())
.build();
OperationFuture<UrlList, OperationMetadata> future =
networkSecurityClient.createUrlListOperationCallable().futureCall(request);
// Do something.
UrlList response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateUrlListRequest,UrlList,OperationMetadata> |
|
deleteAuthorizationPolicyAsync(AuthorizationPolicyName name)
public final OperationFuture<Empty,OperationMetadata> deleteAuthorizationPolicyAsync(AuthorizationPolicyName name)Deletes a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
AuthorizationPolicyName name =
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
networkSecurityClient.deleteAuthorizationPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
AuthorizationPolicyNameRequired. A name of the AuthorizationPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest request)Deletes a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteAuthorizationPolicyRequest request =
DeleteAuthorizationPolicyRequest.newBuilder()
.setName(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.build();
networkSecurityClient.deleteAuthorizationPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteAuthorizationPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteAuthorizationPolicyAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteAuthorizationPolicyAsync(String name)Deletes a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString();
networkSecurityClient.deleteAuthorizationPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the AuthorizationPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteAuthorizationPolicyCallable()
public final UnaryCallable<DeleteAuthorizationPolicyRequest,Operation> deleteAuthorizationPolicyCallable()Deletes a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteAuthorizationPolicyRequest request =
DeleteAuthorizationPolicyRequest.newBuilder()
.setName(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.build();
ApiFuture<Operation> future =
networkSecurityClient.deleteAuthorizationPolicyCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteAuthorizationPolicyRequest,Operation> |
|
deleteAuthorizationPolicyOperationCallable()
public final OperationCallable<DeleteAuthorizationPolicyRequest,Empty,OperationMetadata> deleteAuthorizationPolicyOperationCallable()Deletes a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteAuthorizationPolicyRequest request =
DeleteAuthorizationPolicyRequest.newBuilder()
.setName(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
networkSecurityClient.deleteAuthorizationPolicyOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteAuthorizationPolicyRequest,Empty,OperationMetadata> |
|
deleteAuthzPolicyAsync(AuthzPolicyName name)
public final OperationFuture<Empty,OperationMetadata> deleteAuthzPolicyAsync(AuthzPolicyName name)Deletes a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
AuthzPolicyName name = AuthzPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_POLICY]");
networkSecurityClient.deleteAuthzPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
AuthzPolicyNameRequired. The name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteAuthzPolicyAsync(DeleteAuthzPolicyRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteAuthzPolicyAsync(DeleteAuthzPolicyRequest request)Deletes a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteAuthzPolicyRequest request =
DeleteAuthzPolicyRequest.newBuilder()
.setName(AuthzPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_POLICY]").toString())
.setRequestId("requestId693933066")
.build();
networkSecurityClient.deleteAuthzPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteAuthzPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteAuthzPolicyAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteAuthzPolicyAsync(String name)Deletes a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name = AuthzPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_POLICY]").toString();
networkSecurityClient.deleteAuthzPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteAuthzPolicyCallable()
public final UnaryCallable<DeleteAuthzPolicyRequest,Operation> deleteAuthzPolicyCallable()Deletes a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteAuthzPolicyRequest request =
DeleteAuthzPolicyRequest.newBuilder()
.setName(AuthzPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_POLICY]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
networkSecurityClient.deleteAuthzPolicyCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteAuthzPolicyRequest,Operation> |
|
deleteAuthzPolicyOperationCallable()
public final OperationCallable<DeleteAuthzPolicyRequest,Empty,OperationMetadata> deleteAuthzPolicyOperationCallable()Deletes a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteAuthzPolicyRequest request =
DeleteAuthzPolicyRequest.newBuilder()
.setName(AuthzPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_POLICY]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
networkSecurityClient.deleteAuthzPolicyOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteAuthzPolicyRequest,Empty,OperationMetadata> |
|
deleteBackendAuthenticationConfigAsync(BackendAuthenticationConfigName name)
public final OperationFuture<Empty,OperationMetadata> deleteBackendAuthenticationConfigAsync(BackendAuthenticationConfigName name)Deletes a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
BackendAuthenticationConfigName name =
BackendAuthenticationConfigName.of(
"[PROJECT]", "[LOCATION]", "[BACKEND_AUTHENTICATION_CONFIG]");
networkSecurityClient.deleteBackendAuthenticationConfigAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
BackendAuthenticationConfigNameRequired. A name of the BackendAuthenticationConfig to delete. Must be in the
format |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteBackendAuthenticationConfigAsync(DeleteBackendAuthenticationConfigRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteBackendAuthenticationConfigAsync(DeleteBackendAuthenticationConfigRequest request)Deletes a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteBackendAuthenticationConfigRequest request =
DeleteBackendAuthenticationConfigRequest.newBuilder()
.setName(
BackendAuthenticationConfigName.of(
"[PROJECT]", "[LOCATION]", "[BACKEND_AUTHENTICATION_CONFIG]")
.toString())
.setEtag("etag3123477")
.build();
networkSecurityClient.deleteBackendAuthenticationConfigAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteBackendAuthenticationConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteBackendAuthenticationConfigAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteBackendAuthenticationConfigAsync(String name)Deletes a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
BackendAuthenticationConfigName.of(
"[PROJECT]", "[LOCATION]", "[BACKEND_AUTHENTICATION_CONFIG]")
.toString();
networkSecurityClient.deleteBackendAuthenticationConfigAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the BackendAuthenticationConfig to delete. Must be in the
format |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteBackendAuthenticationConfigCallable()
public final UnaryCallable<DeleteBackendAuthenticationConfigRequest,Operation> deleteBackendAuthenticationConfigCallable()Deletes a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteBackendAuthenticationConfigRequest request =
DeleteBackendAuthenticationConfigRequest.newBuilder()
.setName(
BackendAuthenticationConfigName.of(
"[PROJECT]", "[LOCATION]", "[BACKEND_AUTHENTICATION_CONFIG]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
networkSecurityClient.deleteBackendAuthenticationConfigCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteBackendAuthenticationConfigRequest,Operation> |
|
deleteBackendAuthenticationConfigOperationCallable()
public final OperationCallable<DeleteBackendAuthenticationConfigRequest,Empty,OperationMetadata> deleteBackendAuthenticationConfigOperationCallable()Deletes a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteBackendAuthenticationConfigRequest request =
DeleteBackendAuthenticationConfigRequest.newBuilder()
.setName(
BackendAuthenticationConfigName.of(
"[PROJECT]", "[LOCATION]", "[BACKEND_AUTHENTICATION_CONFIG]")
.toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
networkSecurityClient
.deleteBackendAuthenticationConfigOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteBackendAuthenticationConfigRequest,Empty,OperationMetadata> |
|
deleteClientTlsPolicyAsync(ClientTlsPolicyName name)
public final OperationFuture<Empty,OperationMetadata> deleteClientTlsPolicyAsync(ClientTlsPolicyName name)Deletes a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ClientTlsPolicyName name =
ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
networkSecurityClient.deleteClientTlsPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
ClientTlsPolicyNameRequired. A name of the ClientTlsPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest request)Deletes a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteClientTlsPolicyRequest request =
DeleteClientTlsPolicyRequest.newBuilder()
.setName(
ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
.toString())
.build();
networkSecurityClient.deleteClientTlsPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteClientTlsPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteClientTlsPolicyAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteClientTlsPolicyAsync(String name)Deletes a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]").toString();
networkSecurityClient.deleteClientTlsPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the ClientTlsPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteClientTlsPolicyCallable()
public final UnaryCallable<DeleteClientTlsPolicyRequest,Operation> deleteClientTlsPolicyCallable()Deletes a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteClientTlsPolicyRequest request =
DeleteClientTlsPolicyRequest.newBuilder()
.setName(
ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
.toString())
.build();
ApiFuture<Operation> future =
networkSecurityClient.deleteClientTlsPolicyCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteClientTlsPolicyRequest,Operation> |
|
deleteClientTlsPolicyOperationCallable()
public final OperationCallable<DeleteClientTlsPolicyRequest,Empty,OperationMetadata> deleteClientTlsPolicyOperationCallable()Deletes a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteClientTlsPolicyRequest request =
DeleteClientTlsPolicyRequest.newBuilder()
.setName(
ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
.toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
networkSecurityClient.deleteClientTlsPolicyOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteClientTlsPolicyRequest,Empty,OperationMetadata> |
|
deleteGatewaySecurityPolicyAsync(DeleteGatewaySecurityPolicyRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteGatewaySecurityPolicyAsync(DeleteGatewaySecurityPolicyRequest request)Deletes a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteGatewaySecurityPolicyRequest request =
DeleteGatewaySecurityPolicyRequest.newBuilder()
.setName(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.build();
networkSecurityClient.deleteGatewaySecurityPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteGatewaySecurityPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteGatewaySecurityPolicyAsync(GatewaySecurityPolicyName name)
public final OperationFuture<Empty,OperationMetadata> deleteGatewaySecurityPolicyAsync(GatewaySecurityPolicyName name)Deletes a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GatewaySecurityPolicyName name =
GatewaySecurityPolicyName.of("[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]");
networkSecurityClient.deleteGatewaySecurityPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
GatewaySecurityPolicyNameRequired. A name of the GatewaySecurityPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteGatewaySecurityPolicyAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteGatewaySecurityPolicyAsync(String name)Deletes a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
GatewaySecurityPolicyName.of("[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString();
networkSecurityClient.deleteGatewaySecurityPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the GatewaySecurityPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteGatewaySecurityPolicyCallable()
public final UnaryCallable<DeleteGatewaySecurityPolicyRequest,Operation> deleteGatewaySecurityPolicyCallable()Deletes a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteGatewaySecurityPolicyRequest request =
DeleteGatewaySecurityPolicyRequest.newBuilder()
.setName(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.build();
ApiFuture<Operation> future =
networkSecurityClient.deleteGatewaySecurityPolicyCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteGatewaySecurityPolicyRequest,Operation> |
|
deleteGatewaySecurityPolicyOperationCallable()
public final OperationCallable<DeleteGatewaySecurityPolicyRequest,Empty,OperationMetadata> deleteGatewaySecurityPolicyOperationCallable()Deletes a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteGatewaySecurityPolicyRequest request =
DeleteGatewaySecurityPolicyRequest.newBuilder()
.setName(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
networkSecurityClient.deleteGatewaySecurityPolicyOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteGatewaySecurityPolicyRequest,Empty,OperationMetadata> |
|
deleteGatewaySecurityPolicyRuleAsync(DeleteGatewaySecurityPolicyRuleRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteGatewaySecurityPolicyRuleAsync(DeleteGatewaySecurityPolicyRuleRequest request)Deletes a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteGatewaySecurityPolicyRuleRequest request =
DeleteGatewaySecurityPolicyRuleRequest.newBuilder()
.setName(
GatewaySecurityPolicyRuleName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]", "[RULE]")
.toString())
.build();
networkSecurityClient.deleteGatewaySecurityPolicyRuleAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteGatewaySecurityPolicyRuleRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteGatewaySecurityPolicyRuleAsync(GatewaySecurityPolicyRuleName name)
public final OperationFuture<Empty,OperationMetadata> deleteGatewaySecurityPolicyRuleAsync(GatewaySecurityPolicyRuleName name)Deletes a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GatewaySecurityPolicyRuleName name =
GatewaySecurityPolicyRuleName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]", "[RULE]");
networkSecurityClient.deleteGatewaySecurityPolicyRuleAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
GatewaySecurityPolicyRuleNameRequired. A name of the GatewaySecurityPolicyRule to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteGatewaySecurityPolicyRuleAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteGatewaySecurityPolicyRuleAsync(String name)Deletes a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
GatewaySecurityPolicyRuleName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]", "[RULE]")
.toString();
networkSecurityClient.deleteGatewaySecurityPolicyRuleAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the GatewaySecurityPolicyRule to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteGatewaySecurityPolicyRuleCallable()
public final UnaryCallable<DeleteGatewaySecurityPolicyRuleRequest,Operation> deleteGatewaySecurityPolicyRuleCallable()Deletes a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteGatewaySecurityPolicyRuleRequest request =
DeleteGatewaySecurityPolicyRuleRequest.newBuilder()
.setName(
GatewaySecurityPolicyRuleName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]", "[RULE]")
.toString())
.build();
ApiFuture<Operation> future =
networkSecurityClient.deleteGatewaySecurityPolicyRuleCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteGatewaySecurityPolicyRuleRequest,Operation> |
|
deleteGatewaySecurityPolicyRuleOperationCallable()
public final OperationCallable<DeleteGatewaySecurityPolicyRuleRequest,Empty,OperationMetadata> deleteGatewaySecurityPolicyRuleOperationCallable()Deletes a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteGatewaySecurityPolicyRuleRequest request =
DeleteGatewaySecurityPolicyRuleRequest.newBuilder()
.setName(
GatewaySecurityPolicyRuleName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]", "[RULE]")
.toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
networkSecurityClient
.deleteGatewaySecurityPolicyRuleOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteGatewaySecurityPolicyRuleRequest,Empty,OperationMetadata> |
|
deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest request)Deletes a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteServerTlsPolicyRequest request =
DeleteServerTlsPolicyRequest.newBuilder()
.setName(
ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
.toString())
.build();
networkSecurityClient.deleteServerTlsPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteServerTlsPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteServerTlsPolicyAsync(ServerTlsPolicyName name)
public final OperationFuture<Empty,OperationMetadata> deleteServerTlsPolicyAsync(ServerTlsPolicyName name)Deletes a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ServerTlsPolicyName name =
ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
networkSecurityClient.deleteServerTlsPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
ServerTlsPolicyNameRequired. A name of the ServerTlsPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteServerTlsPolicyAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteServerTlsPolicyAsync(String name)Deletes a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]").toString();
networkSecurityClient.deleteServerTlsPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the ServerTlsPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteServerTlsPolicyCallable()
public final UnaryCallable<DeleteServerTlsPolicyRequest,Operation> deleteServerTlsPolicyCallable()Deletes a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteServerTlsPolicyRequest request =
DeleteServerTlsPolicyRequest.newBuilder()
.setName(
ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
.toString())
.build();
ApiFuture<Operation> future =
networkSecurityClient.deleteServerTlsPolicyCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteServerTlsPolicyRequest,Operation> |
|
deleteServerTlsPolicyOperationCallable()
public final OperationCallable<DeleteServerTlsPolicyRequest,Empty,OperationMetadata> deleteServerTlsPolicyOperationCallable()Deletes a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteServerTlsPolicyRequest request =
DeleteServerTlsPolicyRequest.newBuilder()
.setName(
ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
.toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
networkSecurityClient.deleteServerTlsPolicyOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteServerTlsPolicyRequest,Empty,OperationMetadata> |
|
deleteTlsInspectionPolicyAsync(DeleteTlsInspectionPolicyRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteTlsInspectionPolicyAsync(DeleteTlsInspectionPolicyRequest request)Deletes a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteTlsInspectionPolicyRequest request =
DeleteTlsInspectionPolicyRequest.newBuilder()
.setName(
TlsInspectionPolicyName.of("[PROJECT]", "[LOCATION]", "[TLS_INSPECTION_POLICY]")
.toString())
.setForce(true)
.build();
networkSecurityClient.deleteTlsInspectionPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteTlsInspectionPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteTlsInspectionPolicyAsync(TlsInspectionPolicyName name)
public final OperationFuture<Empty,OperationMetadata> deleteTlsInspectionPolicyAsync(TlsInspectionPolicyName name)Deletes a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
TlsInspectionPolicyName name =
TlsInspectionPolicyName.of("[PROJECT]", "[LOCATION]", "[TLS_INSPECTION_POLICY]");
networkSecurityClient.deleteTlsInspectionPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
TlsInspectionPolicyNameRequired. A name of the TlsInspectionPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteTlsInspectionPolicyAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteTlsInspectionPolicyAsync(String name)Deletes a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
TlsInspectionPolicyName.of("[PROJECT]", "[LOCATION]", "[TLS_INSPECTION_POLICY]")
.toString();
networkSecurityClient.deleteTlsInspectionPolicyAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the TlsInspectionPolicy to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteTlsInspectionPolicyCallable()
public final UnaryCallable<DeleteTlsInspectionPolicyRequest,Operation> deleteTlsInspectionPolicyCallable()Deletes a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteTlsInspectionPolicyRequest request =
DeleteTlsInspectionPolicyRequest.newBuilder()
.setName(
TlsInspectionPolicyName.of("[PROJECT]", "[LOCATION]", "[TLS_INSPECTION_POLICY]")
.toString())
.setForce(true)
.build();
ApiFuture<Operation> future =
networkSecurityClient.deleteTlsInspectionPolicyCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteTlsInspectionPolicyRequest,Operation> |
|
deleteTlsInspectionPolicyOperationCallable()
public final OperationCallable<DeleteTlsInspectionPolicyRequest,Empty,OperationMetadata> deleteTlsInspectionPolicyOperationCallable()Deletes a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteTlsInspectionPolicyRequest request =
DeleteTlsInspectionPolicyRequest.newBuilder()
.setName(
TlsInspectionPolicyName.of("[PROJECT]", "[LOCATION]", "[TLS_INSPECTION_POLICY]")
.toString())
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
networkSecurityClient.deleteTlsInspectionPolicyOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteTlsInspectionPolicyRequest,Empty,OperationMetadata> |
|
deleteUrlListAsync(DeleteUrlListRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteUrlListAsync(DeleteUrlListRequest request)Deletes a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteUrlListRequest request =
DeleteUrlListRequest.newBuilder()
.setName(UrlListName.of("[PROJECT]", "[LOCATION]", "[URL_LIST]").toString())
.build();
networkSecurityClient.deleteUrlListAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteUrlListRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteUrlListAsync(UrlListName name)
public final OperationFuture<Empty,OperationMetadata> deleteUrlListAsync(UrlListName name)Deletes a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UrlListName name = UrlListName.of("[PROJECT]", "[LOCATION]", "[URL_LIST]");
networkSecurityClient.deleteUrlListAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
UrlListNameRequired. A name of the UrlList to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteUrlListAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteUrlListAsync(String name)Deletes a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name = UrlListName.of("[PROJECT]", "[LOCATION]", "[URL_LIST]").toString();
networkSecurityClient.deleteUrlListAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the UrlList to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteUrlListCallable()
public final UnaryCallable<DeleteUrlListRequest,Operation> deleteUrlListCallable()Deletes a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteUrlListRequest request =
DeleteUrlListRequest.newBuilder()
.setName(UrlListName.of("[PROJECT]", "[LOCATION]", "[URL_LIST]").toString())
.build();
ApiFuture<Operation> future =
networkSecurityClient.deleteUrlListCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteUrlListRequest,Operation> |
|
deleteUrlListOperationCallable()
public final OperationCallable<DeleteUrlListRequest,Empty,OperationMetadata> deleteUrlListOperationCallable()Deletes a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
DeleteUrlListRequest request =
DeleteUrlListRequest.newBuilder()
.setName(UrlListName.of("[PROJECT]", "[LOCATION]", "[URL_LIST]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
networkSecurityClient.deleteUrlListOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteUrlListRequest,Empty,OperationMetadata> |
|
getAuthorizationPolicy(AuthorizationPolicyName name)
public final AuthorizationPolicy getAuthorizationPolicy(AuthorizationPolicyName name)Gets details of a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
AuthorizationPolicyName name =
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
AuthorizationPolicyNameRequired. A name of the AuthorizationPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
AuthorizationPolicy |
|
getAuthorizationPolicy(GetAuthorizationPolicyRequest request)
public final AuthorizationPolicy getAuthorizationPolicy(GetAuthorizationPolicyRequest request)Gets details of a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetAuthorizationPolicyRequest request =
GetAuthorizationPolicyRequest.newBuilder()
.setName(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.build();
AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetAuthorizationPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AuthorizationPolicy |
|
getAuthorizationPolicy(String name)
public final AuthorizationPolicy getAuthorizationPolicy(String name)Gets details of a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString();
AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the AuthorizationPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
AuthorizationPolicy |
|
getAuthorizationPolicyCallable()
public final UnaryCallable<GetAuthorizationPolicyRequest,AuthorizationPolicy> getAuthorizationPolicyCallable()Gets details of a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetAuthorizationPolicyRequest request =
GetAuthorizationPolicyRequest.newBuilder()
.setName(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.build();
ApiFuture<AuthorizationPolicy> future =
networkSecurityClient.getAuthorizationPolicyCallable().futureCall(request);
// Do something.
AuthorizationPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetAuthorizationPolicyRequest,AuthorizationPolicy> |
|
getAuthzPolicy(AuthzPolicyName name)
public final AuthzPolicy getAuthzPolicy(AuthzPolicyName name)Gets details of a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
AuthzPolicyName name = AuthzPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_POLICY]");
AuthzPolicy response = networkSecurityClient.getAuthzPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
AuthzPolicyNameRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
AuthzPolicy |
|
getAuthzPolicy(GetAuthzPolicyRequest request)
public final AuthzPolicy getAuthzPolicy(GetAuthzPolicyRequest request)Gets details of a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetAuthzPolicyRequest request =
GetAuthzPolicyRequest.newBuilder()
.setName(AuthzPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_POLICY]").toString())
.build();
AuthzPolicy response = networkSecurityClient.getAuthzPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetAuthzPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AuthzPolicy |
|
getAuthzPolicy(String name)
public final AuthzPolicy getAuthzPolicy(String name)Gets details of a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name = AuthzPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_POLICY]").toString();
AuthzPolicy response = networkSecurityClient.getAuthzPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
AuthzPolicy |
|
getAuthzPolicyCallable()
public final UnaryCallable<GetAuthzPolicyRequest,AuthzPolicy> getAuthzPolicyCallable()Gets details of a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetAuthzPolicyRequest request =
GetAuthzPolicyRequest.newBuilder()
.setName(AuthzPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_POLICY]").toString())
.build();
ApiFuture<AuthzPolicy> future =
networkSecurityClient.getAuthzPolicyCallable().futureCall(request);
// Do something.
AuthzPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetAuthzPolicyRequest,AuthzPolicy> |
|
getBackendAuthenticationConfig(BackendAuthenticationConfigName name)
public final BackendAuthenticationConfig getBackendAuthenticationConfig(BackendAuthenticationConfigName name)Gets details of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
BackendAuthenticationConfigName name =
BackendAuthenticationConfigName.of(
"[PROJECT]", "[LOCATION]", "[BACKEND_AUTHENTICATION_CONFIG]");
BackendAuthenticationConfig response =
networkSecurityClient.getBackendAuthenticationConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
BackendAuthenticationConfigNameRequired. A name of the BackendAuthenticationConfig to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
BackendAuthenticationConfig |
|
getBackendAuthenticationConfig(GetBackendAuthenticationConfigRequest request)
public final BackendAuthenticationConfig getBackendAuthenticationConfig(GetBackendAuthenticationConfigRequest request)Gets details of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetBackendAuthenticationConfigRequest request =
GetBackendAuthenticationConfigRequest.newBuilder()
.setName(
BackendAuthenticationConfigName.of(
"[PROJECT]", "[LOCATION]", "[BACKEND_AUTHENTICATION_CONFIG]")
.toString())
.build();
BackendAuthenticationConfig response =
networkSecurityClient.getBackendAuthenticationConfig(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetBackendAuthenticationConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
BackendAuthenticationConfig |
|
getBackendAuthenticationConfig(String name)
public final BackendAuthenticationConfig getBackendAuthenticationConfig(String name)Gets details of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
BackendAuthenticationConfigName.of(
"[PROJECT]", "[LOCATION]", "[BACKEND_AUTHENTICATION_CONFIG]")
.toString();
BackendAuthenticationConfig response =
networkSecurityClient.getBackendAuthenticationConfig(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the BackendAuthenticationConfig to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
BackendAuthenticationConfig |
|
getBackendAuthenticationConfigCallable()
public final UnaryCallable<GetBackendAuthenticationConfigRequest,BackendAuthenticationConfig> getBackendAuthenticationConfigCallable()Gets details of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetBackendAuthenticationConfigRequest request =
GetBackendAuthenticationConfigRequest.newBuilder()
.setName(
BackendAuthenticationConfigName.of(
"[PROJECT]", "[LOCATION]", "[BACKEND_AUTHENTICATION_CONFIG]")
.toString())
.build();
ApiFuture<BackendAuthenticationConfig> future =
networkSecurityClient.getBackendAuthenticationConfigCallable().futureCall(request);
// Do something.
BackendAuthenticationConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetBackendAuthenticationConfigRequest,BackendAuthenticationConfig> |
|
getClientTlsPolicy(ClientTlsPolicyName name)
public final ClientTlsPolicy getClientTlsPolicy(ClientTlsPolicyName name)Gets details of a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ClientTlsPolicyName name =
ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
ClientTlsPolicy response = networkSecurityClient.getClientTlsPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ClientTlsPolicyNameRequired. A name of the ClientTlsPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
ClientTlsPolicy |
|
getClientTlsPolicy(GetClientTlsPolicyRequest request)
public final ClientTlsPolicy getClientTlsPolicy(GetClientTlsPolicyRequest request)Gets details of a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetClientTlsPolicyRequest request =
GetClientTlsPolicyRequest.newBuilder()
.setName(
ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
.toString())
.build();
ClientTlsPolicy response = networkSecurityClient.getClientTlsPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetClientTlsPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ClientTlsPolicy |
|
getClientTlsPolicy(String name)
public final ClientTlsPolicy getClientTlsPolicy(String name)Gets details of a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]").toString();
ClientTlsPolicy response = networkSecurityClient.getClientTlsPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the ClientTlsPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
ClientTlsPolicy |
|
getClientTlsPolicyCallable()
public final UnaryCallable<GetClientTlsPolicyRequest,ClientTlsPolicy> getClientTlsPolicyCallable()Gets details of a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetClientTlsPolicyRequest request =
GetClientTlsPolicyRequest.newBuilder()
.setName(
ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
.toString())
.build();
ApiFuture<ClientTlsPolicy> future =
networkSecurityClient.getClientTlsPolicyCallable().futureCall(request);
// Do something.
ClientTlsPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetClientTlsPolicyRequest,ClientTlsPolicy> |
|
getGatewaySecurityPolicy(GatewaySecurityPolicyName name)
public final GatewaySecurityPolicy getGatewaySecurityPolicy(GatewaySecurityPolicyName name)Gets details of a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GatewaySecurityPolicyName name =
GatewaySecurityPolicyName.of("[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]");
GatewaySecurityPolicy response = networkSecurityClient.getGatewaySecurityPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
GatewaySecurityPolicyNameRequired. A name of the GatewaySecurityPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
GatewaySecurityPolicy |
|
getGatewaySecurityPolicy(GetGatewaySecurityPolicyRequest request)
public final GatewaySecurityPolicy getGatewaySecurityPolicy(GetGatewaySecurityPolicyRequest request)Gets details of a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetGatewaySecurityPolicyRequest request =
GetGatewaySecurityPolicyRequest.newBuilder()
.setName(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.build();
GatewaySecurityPolicy response = networkSecurityClient.getGatewaySecurityPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetGatewaySecurityPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
GatewaySecurityPolicy |
|
getGatewaySecurityPolicy(String name)
public final GatewaySecurityPolicy getGatewaySecurityPolicy(String name)Gets details of a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
GatewaySecurityPolicyName.of("[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString();
GatewaySecurityPolicy response = networkSecurityClient.getGatewaySecurityPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the GatewaySecurityPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
GatewaySecurityPolicy |
|
getGatewaySecurityPolicyCallable()
public final UnaryCallable<GetGatewaySecurityPolicyRequest,GatewaySecurityPolicy> getGatewaySecurityPolicyCallable()Gets details of a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetGatewaySecurityPolicyRequest request =
GetGatewaySecurityPolicyRequest.newBuilder()
.setName(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.build();
ApiFuture<GatewaySecurityPolicy> future =
networkSecurityClient.getGatewaySecurityPolicyCallable().futureCall(request);
// Do something.
GatewaySecurityPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetGatewaySecurityPolicyRequest,GatewaySecurityPolicy> |
|
getGatewaySecurityPolicyRule(GatewaySecurityPolicyRuleName name)
public final GatewaySecurityPolicyRule getGatewaySecurityPolicyRule(GatewaySecurityPolicyRuleName name)Gets details of a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GatewaySecurityPolicyRuleName name =
GatewaySecurityPolicyRuleName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]", "[RULE]");
GatewaySecurityPolicyRule response = networkSecurityClient.getGatewaySecurityPolicyRule(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
GatewaySecurityPolicyRuleNameRequired. The name of the GatewaySecurityPolicyRule to retrieve. Format: projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/* |
| Returns | |
|---|---|
| Type | Description |
GatewaySecurityPolicyRule |
|
getGatewaySecurityPolicyRule(GetGatewaySecurityPolicyRuleRequest request)
public final GatewaySecurityPolicyRule getGatewaySecurityPolicyRule(GetGatewaySecurityPolicyRuleRequest request)Gets details of a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetGatewaySecurityPolicyRuleRequest request =
GetGatewaySecurityPolicyRuleRequest.newBuilder()
.setName(
GatewaySecurityPolicyRuleName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]", "[RULE]")
.toString())
.build();
GatewaySecurityPolicyRule response =
networkSecurityClient.getGatewaySecurityPolicyRule(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetGatewaySecurityPolicyRuleRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
GatewaySecurityPolicyRule |
|
getGatewaySecurityPolicyRule(String name)
public final GatewaySecurityPolicyRule getGatewaySecurityPolicyRule(String name)Gets details of a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
GatewaySecurityPolicyRuleName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]", "[RULE]")
.toString();
GatewaySecurityPolicyRule response = networkSecurityClient.getGatewaySecurityPolicyRule(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the GatewaySecurityPolicyRule to retrieve. Format: projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/* |
| Returns | |
|---|---|
| Type | Description |
GatewaySecurityPolicyRule |
|
getGatewaySecurityPolicyRuleCallable()
public final UnaryCallable<GetGatewaySecurityPolicyRuleRequest,GatewaySecurityPolicyRule> getGatewaySecurityPolicyRuleCallable()Gets details of a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetGatewaySecurityPolicyRuleRequest request =
GetGatewaySecurityPolicyRuleRequest.newBuilder()
.setName(
GatewaySecurityPolicyRuleName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]", "[RULE]")
.toString())
.build();
ApiFuture<GatewaySecurityPolicyRule> future =
networkSecurityClient.getGatewaySecurityPolicyRuleCallable().futureCall(request);
// Do something.
GatewaySecurityPolicyRule response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetGatewaySecurityPolicyRuleRequest,GatewaySecurityPolicyRule> |
|
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = networkSecurityClient.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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future = networkSecurityClient.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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = networkSecurityClient.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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = networkSecurityClient.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 |
|
getServerTlsPolicy(GetServerTlsPolicyRequest request)
public final ServerTlsPolicy getServerTlsPolicy(GetServerTlsPolicyRequest request)Gets details of a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetServerTlsPolicyRequest request =
GetServerTlsPolicyRequest.newBuilder()
.setName(
ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
.toString())
.build();
ServerTlsPolicy response = networkSecurityClient.getServerTlsPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetServerTlsPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ServerTlsPolicy |
|
getServerTlsPolicy(ServerTlsPolicyName name)
public final ServerTlsPolicy getServerTlsPolicy(ServerTlsPolicyName name)Gets details of a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ServerTlsPolicyName name =
ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
ServerTlsPolicy response = networkSecurityClient.getServerTlsPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ServerTlsPolicyNameRequired. A name of the ServerTlsPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
ServerTlsPolicy |
|
getServerTlsPolicy(String name)
public final ServerTlsPolicy getServerTlsPolicy(String name)Gets details of a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]").toString();
ServerTlsPolicy response = networkSecurityClient.getServerTlsPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the ServerTlsPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
ServerTlsPolicy |
|
getServerTlsPolicyCallable()
public final UnaryCallable<GetServerTlsPolicyRequest,ServerTlsPolicy> getServerTlsPolicyCallable()Gets details of a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetServerTlsPolicyRequest request =
GetServerTlsPolicyRequest.newBuilder()
.setName(
ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
.toString())
.build();
ApiFuture<ServerTlsPolicy> future =
networkSecurityClient.getServerTlsPolicyCallable().futureCall(request);
// Do something.
ServerTlsPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetServerTlsPolicyRequest,ServerTlsPolicy> |
|
getSettings()
public final NetworkSecuritySettings getSettings()| Returns | |
|---|---|
| Type | Description |
NetworkSecuritySettings |
|
getStub()
public NetworkSecurityStub getStub()| Returns | |
|---|---|
| Type | Description |
NetworkSecurityStub |
|
getTlsInspectionPolicy(GetTlsInspectionPolicyRequest request)
public final TlsInspectionPolicy getTlsInspectionPolicy(GetTlsInspectionPolicyRequest request)Gets details of a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetTlsInspectionPolicyRequest request =
GetTlsInspectionPolicyRequest.newBuilder()
.setName(
TlsInspectionPolicyName.of("[PROJECT]", "[LOCATION]", "[TLS_INSPECTION_POLICY]")
.toString())
.build();
TlsInspectionPolicy response = networkSecurityClient.getTlsInspectionPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetTlsInspectionPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
TlsInspectionPolicy |
|
getTlsInspectionPolicy(TlsInspectionPolicyName name)
public final TlsInspectionPolicy getTlsInspectionPolicy(TlsInspectionPolicyName name)Gets details of a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
TlsInspectionPolicyName name =
TlsInspectionPolicyName.of("[PROJECT]", "[LOCATION]", "[TLS_INSPECTION_POLICY]");
TlsInspectionPolicy response = networkSecurityClient.getTlsInspectionPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
TlsInspectionPolicyNameRequired. A name of the TlsInspectionPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
TlsInspectionPolicy |
|
getTlsInspectionPolicy(String name)
public final TlsInspectionPolicy getTlsInspectionPolicy(String name)Gets details of a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name =
TlsInspectionPolicyName.of("[PROJECT]", "[LOCATION]", "[TLS_INSPECTION_POLICY]")
.toString();
TlsInspectionPolicy response = networkSecurityClient.getTlsInspectionPolicy(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the TlsInspectionPolicy to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
TlsInspectionPolicy |
|
getTlsInspectionPolicyCallable()
public final UnaryCallable<GetTlsInspectionPolicyRequest,TlsInspectionPolicy> getTlsInspectionPolicyCallable()Gets details of a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetTlsInspectionPolicyRequest request =
GetTlsInspectionPolicyRequest.newBuilder()
.setName(
TlsInspectionPolicyName.of("[PROJECT]", "[LOCATION]", "[TLS_INSPECTION_POLICY]")
.toString())
.build();
ApiFuture<TlsInspectionPolicy> future =
networkSecurityClient.getTlsInspectionPolicyCallable().futureCall(request);
// Do something.
TlsInspectionPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetTlsInspectionPolicyRequest,TlsInspectionPolicy> |
|
getUrlList(GetUrlListRequest request)
public final UrlList getUrlList(GetUrlListRequest request)Gets details of a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetUrlListRequest request =
GetUrlListRequest.newBuilder()
.setName(UrlListName.of("[PROJECT]", "[LOCATION]", "[URL_LIST]").toString())
.build();
UrlList response = networkSecurityClient.getUrlList(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetUrlListRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
UrlList |
|
getUrlList(UrlListName name)
public final UrlList getUrlList(UrlListName name)Gets details of a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UrlListName name = UrlListName.of("[PROJECT]", "[LOCATION]", "[URL_LIST]");
UrlList response = networkSecurityClient.getUrlList(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
UrlListNameRequired. A name of the UrlList to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
UrlList |
|
getUrlList(String name)
public final UrlList getUrlList(String name)Gets details of a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String name = UrlListName.of("[PROJECT]", "[LOCATION]", "[URL_LIST]").toString();
UrlList response = networkSecurityClient.getUrlList(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the UrlList to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
UrlList |
|
getUrlListCallable()
public final UnaryCallable<GetUrlListRequest,UrlList> getUrlListCallable()Gets details of a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GetUrlListRequest request =
GetUrlListRequest.newBuilder()
.setName(UrlListName.of("[PROJECT]", "[LOCATION]", "[URL_LIST]").toString())
.build();
ApiFuture<UrlList> future = networkSecurityClient.getUrlListCallable().futureCall(request);
// Do something.
UrlList response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetUrlListRequest,UrlList> |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listAuthorizationPolicies(ListAuthorizationPoliciesRequest request)
public final NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse listAuthorizationPolicies(ListAuthorizationPoliciesRequest request)Lists AuthorizationPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListAuthorizationPoliciesRequest request =
ListAuthorizationPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AuthorizationPolicy element :
networkSecurityClient.listAuthorizationPolicies(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListAuthorizationPoliciesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse |
|
listAuthorizationPolicies(LocationName parent)
public final NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse listAuthorizationPolicies(LocationName parent)Lists AuthorizationPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (AuthorizationPolicy element :
networkSecurityClient.listAuthorizationPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the AuthorizationPolicies should be
listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse |
|
listAuthorizationPolicies(String parent)
public final NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse listAuthorizationPolicies(String parent)Lists AuthorizationPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (AuthorizationPolicy element :
networkSecurityClient.listAuthorizationPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the AuthorizationPolicies should be
listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse |
|
listAuthorizationPoliciesCallable()
public final UnaryCallable<ListAuthorizationPoliciesRequest,ListAuthorizationPoliciesResponse> listAuthorizationPoliciesCallable()Lists AuthorizationPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListAuthorizationPoliciesRequest request =
ListAuthorizationPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAuthorizationPoliciesResponse response =
networkSecurityClient.listAuthorizationPoliciesCallable().call(request);
for (AuthorizationPolicy element : response.getAuthorizationPoliciesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAuthorizationPoliciesRequest,ListAuthorizationPoliciesResponse> |
|
listAuthorizationPoliciesPagedCallable()
public final UnaryCallable<ListAuthorizationPoliciesRequest,NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse> listAuthorizationPoliciesPagedCallable()Lists AuthorizationPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListAuthorizationPoliciesRequest request =
ListAuthorizationPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AuthorizationPolicy> future =
networkSecurityClient.listAuthorizationPoliciesPagedCallable().futureCall(request);
// Do something.
for (AuthorizationPolicy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAuthorizationPoliciesRequest,ListAuthorizationPoliciesPagedResponse> |
|
listAuthzPolicies(ListAuthzPoliciesRequest request)
public final NetworkSecurityClient.ListAuthzPoliciesPagedResponse listAuthzPolicies(ListAuthzPoliciesRequest request)Lists AuthzPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListAuthzPoliciesRequest request =
ListAuthzPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (AuthzPolicy element : networkSecurityClient.listAuthzPolicies(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListAuthzPoliciesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListAuthzPoliciesPagedResponse |
|
listAuthzPolicies(LocationName parent)
public final NetworkSecurityClient.ListAuthzPoliciesPagedResponse listAuthzPolicies(LocationName parent)Lists AuthzPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (AuthzPolicy element : networkSecurityClient.listAuthzPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListAuthzPoliciesPagedResponse |
|
listAuthzPolicies(String parent)
public final NetworkSecurityClient.ListAuthzPoliciesPagedResponse listAuthzPolicies(String parent)Lists AuthzPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (AuthzPolicy element : networkSecurityClient.listAuthzPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListAuthzPoliciesPagedResponse |
|
listAuthzPoliciesCallable()
public final UnaryCallable<ListAuthzPoliciesRequest,ListAuthzPoliciesResponse> listAuthzPoliciesCallable()Lists AuthzPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListAuthzPoliciesRequest request =
ListAuthzPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListAuthzPoliciesResponse response =
networkSecurityClient.listAuthzPoliciesCallable().call(request);
for (AuthzPolicy element : response.getAuthzPoliciesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAuthzPoliciesRequest,ListAuthzPoliciesResponse> |
|
listAuthzPoliciesPagedCallable()
public final UnaryCallable<ListAuthzPoliciesRequest,NetworkSecurityClient.ListAuthzPoliciesPagedResponse> listAuthzPoliciesPagedCallable()Lists AuthzPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListAuthzPoliciesRequest request =
ListAuthzPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<AuthzPolicy> future =
networkSecurityClient.listAuthzPoliciesPagedCallable().futureCall(request);
// Do something.
for (AuthzPolicy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAuthzPoliciesRequest,ListAuthzPoliciesPagedResponse> |
|
listBackendAuthenticationConfigs(ListBackendAuthenticationConfigsRequest request)
public final NetworkSecurityClient.ListBackendAuthenticationConfigsPagedResponse listBackendAuthenticationConfigs(ListBackendAuthenticationConfigsRequest request)Lists BackendAuthenticationConfigs 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListBackendAuthenticationConfigsRequest request =
ListBackendAuthenticationConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (BackendAuthenticationConfig element :
networkSecurityClient.listBackendAuthenticationConfigs(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListBackendAuthenticationConfigsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListBackendAuthenticationConfigsPagedResponse |
|
listBackendAuthenticationConfigs(LocationName parent)
public final NetworkSecurityClient.ListBackendAuthenticationConfigsPagedResponse listBackendAuthenticationConfigs(LocationName parent)Lists BackendAuthenticationConfigs 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (BackendAuthenticationConfig element :
networkSecurityClient.listBackendAuthenticationConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the BackendAuthenticationConfigs
should be listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListBackendAuthenticationConfigsPagedResponse |
|
listBackendAuthenticationConfigs(String parent)
public final NetworkSecurityClient.ListBackendAuthenticationConfigsPagedResponse listBackendAuthenticationConfigs(String parent)Lists BackendAuthenticationConfigs 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (BackendAuthenticationConfig element :
networkSecurityClient.listBackendAuthenticationConfigs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the BackendAuthenticationConfigs
should be listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListBackendAuthenticationConfigsPagedResponse |
|
listBackendAuthenticationConfigsCallable()
public final UnaryCallable<ListBackendAuthenticationConfigsRequest,ListBackendAuthenticationConfigsResponse> listBackendAuthenticationConfigsCallable()Lists BackendAuthenticationConfigs 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListBackendAuthenticationConfigsRequest request =
ListBackendAuthenticationConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListBackendAuthenticationConfigsResponse response =
networkSecurityClient.listBackendAuthenticationConfigsCallable().call(request);
for (BackendAuthenticationConfig element : response.getBackendAuthenticationConfigsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListBackendAuthenticationConfigsRequest,ListBackendAuthenticationConfigsResponse> |
|
listBackendAuthenticationConfigsPagedCallable()
public final UnaryCallable<ListBackendAuthenticationConfigsRequest,NetworkSecurityClient.ListBackendAuthenticationConfigsPagedResponse> listBackendAuthenticationConfigsPagedCallable()Lists BackendAuthenticationConfigs 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListBackendAuthenticationConfigsRequest request =
ListBackendAuthenticationConfigsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<BackendAuthenticationConfig> future =
networkSecurityClient.listBackendAuthenticationConfigsPagedCallable().futureCall(request);
// Do something.
for (BackendAuthenticationConfig element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListBackendAuthenticationConfigsRequest,ListBackendAuthenticationConfigsPagedResponse> |
|
listClientTlsPolicies(ListClientTlsPoliciesRequest request)
public final NetworkSecurityClient.ListClientTlsPoliciesPagedResponse listClientTlsPolicies(ListClientTlsPoliciesRequest request)Lists ClientTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListClientTlsPoliciesRequest request =
ListClientTlsPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ClientTlsPolicy element :
networkSecurityClient.listClientTlsPolicies(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListClientTlsPoliciesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListClientTlsPoliciesPagedResponse |
|
listClientTlsPolicies(LocationName parent)
public final NetworkSecurityClient.ListClientTlsPoliciesPagedResponse listClientTlsPolicies(LocationName parent)Lists ClientTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (ClientTlsPolicy element :
networkSecurityClient.listClientTlsPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the ClientTlsPolicies should be
listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListClientTlsPoliciesPagedResponse |
|
listClientTlsPolicies(String parent)
public final NetworkSecurityClient.ListClientTlsPoliciesPagedResponse listClientTlsPolicies(String parent)Lists ClientTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (ClientTlsPolicy element :
networkSecurityClient.listClientTlsPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the ClientTlsPolicies should be
listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListClientTlsPoliciesPagedResponse |
|
listClientTlsPoliciesCallable()
public final UnaryCallable<ListClientTlsPoliciesRequest,ListClientTlsPoliciesResponse> listClientTlsPoliciesCallable()Lists ClientTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListClientTlsPoliciesRequest request =
ListClientTlsPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListClientTlsPoliciesResponse response =
networkSecurityClient.listClientTlsPoliciesCallable().call(request);
for (ClientTlsPolicy element : response.getClientTlsPoliciesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListClientTlsPoliciesRequest,ListClientTlsPoliciesResponse> |
|
listClientTlsPoliciesPagedCallable()
public final UnaryCallable<ListClientTlsPoliciesRequest,NetworkSecurityClient.ListClientTlsPoliciesPagedResponse> listClientTlsPoliciesPagedCallable()Lists ClientTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListClientTlsPoliciesRequest request =
ListClientTlsPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ClientTlsPolicy> future =
networkSecurityClient.listClientTlsPoliciesPagedCallable().futureCall(request);
// Do something.
for (ClientTlsPolicy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListClientTlsPoliciesRequest,ListClientTlsPoliciesPagedResponse> |
|
listGatewaySecurityPolicies(ListGatewaySecurityPoliciesRequest request)
public final NetworkSecurityClient.ListGatewaySecurityPoliciesPagedResponse listGatewaySecurityPolicies(ListGatewaySecurityPoliciesRequest request)Lists GatewaySecurityPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListGatewaySecurityPoliciesRequest request =
ListGatewaySecurityPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (GatewaySecurityPolicy element :
networkSecurityClient.listGatewaySecurityPolicies(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListGatewaySecurityPoliciesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListGatewaySecurityPoliciesPagedResponse |
|
listGatewaySecurityPolicies(LocationName parent)
public final NetworkSecurityClient.ListGatewaySecurityPoliciesPagedResponse listGatewaySecurityPolicies(LocationName parent)Lists GatewaySecurityPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (GatewaySecurityPolicy element :
networkSecurityClient.listGatewaySecurityPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the GatewaySecurityPolicies should
be listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListGatewaySecurityPoliciesPagedResponse |
|
listGatewaySecurityPolicies(String parent)
public final NetworkSecurityClient.ListGatewaySecurityPoliciesPagedResponse listGatewaySecurityPolicies(String parent)Lists GatewaySecurityPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (GatewaySecurityPolicy element :
networkSecurityClient.listGatewaySecurityPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the GatewaySecurityPolicies should
be listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListGatewaySecurityPoliciesPagedResponse |
|
listGatewaySecurityPoliciesCallable()
public final UnaryCallable<ListGatewaySecurityPoliciesRequest,ListGatewaySecurityPoliciesResponse> listGatewaySecurityPoliciesCallable()Lists GatewaySecurityPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListGatewaySecurityPoliciesRequest request =
ListGatewaySecurityPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListGatewaySecurityPoliciesResponse response =
networkSecurityClient.listGatewaySecurityPoliciesCallable().call(request);
for (GatewaySecurityPolicy element : response.getGatewaySecurityPoliciesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListGatewaySecurityPoliciesRequest,ListGatewaySecurityPoliciesResponse> |
|
listGatewaySecurityPoliciesPagedCallable()
public final UnaryCallable<ListGatewaySecurityPoliciesRequest,NetworkSecurityClient.ListGatewaySecurityPoliciesPagedResponse> listGatewaySecurityPoliciesPagedCallable()Lists GatewaySecurityPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListGatewaySecurityPoliciesRequest request =
ListGatewaySecurityPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<GatewaySecurityPolicy> future =
networkSecurityClient.listGatewaySecurityPoliciesPagedCallable().futureCall(request);
// Do something.
for (GatewaySecurityPolicy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListGatewaySecurityPoliciesRequest,ListGatewaySecurityPoliciesPagedResponse> |
|
listGatewaySecurityPolicyRules(GatewaySecurityPolicyName parent)
public final NetworkSecurityClient.ListGatewaySecurityPolicyRulesPagedResponse listGatewaySecurityPolicyRules(GatewaySecurityPolicyName parent)Lists GatewaySecurityPolicyRules 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GatewaySecurityPolicyName parent =
GatewaySecurityPolicyName.of("[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]");
for (GatewaySecurityPolicyRule element :
networkSecurityClient.listGatewaySecurityPolicyRules(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
GatewaySecurityPolicyNameRequired. The project, location and GatewaySecurityPolicy from which the
GatewaySecurityPolicyRules should be listed, specified in the format
|
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListGatewaySecurityPolicyRulesPagedResponse |
|
listGatewaySecurityPolicyRules(ListGatewaySecurityPolicyRulesRequest request)
public final NetworkSecurityClient.ListGatewaySecurityPolicyRulesPagedResponse listGatewaySecurityPolicyRules(ListGatewaySecurityPolicyRulesRequest request)Lists GatewaySecurityPolicyRules 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListGatewaySecurityPolicyRulesRequest request =
ListGatewaySecurityPolicyRulesRequest.newBuilder()
.setParent(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (GatewaySecurityPolicyRule element :
networkSecurityClient.listGatewaySecurityPolicyRules(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListGatewaySecurityPolicyRulesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListGatewaySecurityPolicyRulesPagedResponse |
|
listGatewaySecurityPolicyRules(String parent)
public final NetworkSecurityClient.ListGatewaySecurityPolicyRulesPagedResponse listGatewaySecurityPolicyRules(String parent)Lists GatewaySecurityPolicyRules 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent =
GatewaySecurityPolicyName.of("[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString();
for (GatewaySecurityPolicyRule element :
networkSecurityClient.listGatewaySecurityPolicyRules(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project, location and GatewaySecurityPolicy from which the
GatewaySecurityPolicyRules should be listed, specified in the format
|
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListGatewaySecurityPolicyRulesPagedResponse |
|
listGatewaySecurityPolicyRulesCallable()
public final UnaryCallable<ListGatewaySecurityPolicyRulesRequest,ListGatewaySecurityPolicyRulesResponse> listGatewaySecurityPolicyRulesCallable()Lists GatewaySecurityPolicyRules 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListGatewaySecurityPolicyRulesRequest request =
ListGatewaySecurityPolicyRulesRequest.newBuilder()
.setParent(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListGatewaySecurityPolicyRulesResponse response =
networkSecurityClient.listGatewaySecurityPolicyRulesCallable().call(request);
for (GatewaySecurityPolicyRule element : response.getGatewaySecurityPolicyRulesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListGatewaySecurityPolicyRulesRequest,ListGatewaySecurityPolicyRulesResponse> |
|
listGatewaySecurityPolicyRulesPagedCallable()
public final UnaryCallable<ListGatewaySecurityPolicyRulesRequest,NetworkSecurityClient.ListGatewaySecurityPolicyRulesPagedResponse> listGatewaySecurityPolicyRulesPagedCallable()Lists GatewaySecurityPolicyRules 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListGatewaySecurityPolicyRulesRequest request =
ListGatewaySecurityPolicyRulesRequest.newBuilder()
.setParent(
GatewaySecurityPolicyName.of(
"[PROJECT]", "[LOCATION]", "[GATEWAY_SECURITY_POLICY]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<GatewaySecurityPolicyRule> future =
networkSecurityClient.listGatewaySecurityPolicyRulesPagedCallable().futureCall(request);
// Do something.
for (GatewaySecurityPolicyRule element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListGatewaySecurityPolicyRulesRequest,ListGatewaySecurityPolicyRulesPagedResponse> |
|
listLocations(ListLocationsRequest request)
public final NetworkSecurityClient.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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : networkSecurityClient.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 |
NetworkSecurityClient.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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
networkSecurityClient.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,NetworkSecurityClient.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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
networkSecurityClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
|
listServerTlsPolicies(ListServerTlsPoliciesRequest request)
public final NetworkSecurityClient.ListServerTlsPoliciesPagedResponse listServerTlsPolicies(ListServerTlsPoliciesRequest request)Lists ServerTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListServerTlsPoliciesRequest request =
ListServerTlsPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReturnPartialSuccess(true)
.build();
for (ServerTlsPolicy element :
networkSecurityClient.listServerTlsPolicies(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListServerTlsPoliciesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListServerTlsPoliciesPagedResponse |
|
listServerTlsPolicies(LocationName parent)
public final NetworkSecurityClient.ListServerTlsPoliciesPagedResponse listServerTlsPolicies(LocationName parent)Lists ServerTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (ServerTlsPolicy element :
networkSecurityClient.listServerTlsPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the ServerTlsPolicies should be
listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListServerTlsPoliciesPagedResponse |
|
listServerTlsPolicies(String parent)
public final NetworkSecurityClient.ListServerTlsPoliciesPagedResponse listServerTlsPolicies(String parent)Lists ServerTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (ServerTlsPolicy element :
networkSecurityClient.listServerTlsPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the ServerTlsPolicies should be
listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListServerTlsPoliciesPagedResponse |
|
listServerTlsPoliciesCallable()
public final UnaryCallable<ListServerTlsPoliciesRequest,ListServerTlsPoliciesResponse> listServerTlsPoliciesCallable()Lists ServerTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListServerTlsPoliciesRequest request =
ListServerTlsPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReturnPartialSuccess(true)
.build();
while (true) {
ListServerTlsPoliciesResponse response =
networkSecurityClient.listServerTlsPoliciesCallable().call(request);
for (ServerTlsPolicy element : response.getServerTlsPoliciesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListServerTlsPoliciesRequest,ListServerTlsPoliciesResponse> |
|
listServerTlsPoliciesPagedCallable()
public final UnaryCallable<ListServerTlsPoliciesRequest,NetworkSecurityClient.ListServerTlsPoliciesPagedResponse> listServerTlsPoliciesPagedCallable()Lists ServerTlsPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListServerTlsPoliciesRequest request =
ListServerTlsPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReturnPartialSuccess(true)
.build();
ApiFuture<ServerTlsPolicy> future =
networkSecurityClient.listServerTlsPoliciesPagedCallable().futureCall(request);
// Do something.
for (ServerTlsPolicy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListServerTlsPoliciesRequest,ListServerTlsPoliciesPagedResponse> |
|
listTlsInspectionPolicies(ListTlsInspectionPoliciesRequest request)
public final NetworkSecurityClient.ListTlsInspectionPoliciesPagedResponse listTlsInspectionPolicies(ListTlsInspectionPoliciesRequest request)Lists TlsInspectionPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListTlsInspectionPoliciesRequest request =
ListTlsInspectionPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (TlsInspectionPolicy element :
networkSecurityClient.listTlsInspectionPolicies(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListTlsInspectionPoliciesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListTlsInspectionPoliciesPagedResponse |
|
listTlsInspectionPolicies(LocationName parent)
public final NetworkSecurityClient.ListTlsInspectionPoliciesPagedResponse listTlsInspectionPolicies(LocationName parent)Lists TlsInspectionPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (TlsInspectionPolicy element :
networkSecurityClient.listTlsInspectionPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the TlsInspectionPolicies should be
listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListTlsInspectionPoliciesPagedResponse |
|
listTlsInspectionPolicies(String parent)
public final NetworkSecurityClient.ListTlsInspectionPoliciesPagedResponse listTlsInspectionPolicies(String parent)Lists TlsInspectionPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (TlsInspectionPolicy element :
networkSecurityClient.listTlsInspectionPolicies(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the TlsInspectionPolicies should be
listed, specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListTlsInspectionPoliciesPagedResponse |
|
listTlsInspectionPoliciesCallable()
public final UnaryCallable<ListTlsInspectionPoliciesRequest,ListTlsInspectionPoliciesResponse> listTlsInspectionPoliciesCallable()Lists TlsInspectionPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListTlsInspectionPoliciesRequest request =
ListTlsInspectionPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListTlsInspectionPoliciesResponse response =
networkSecurityClient.listTlsInspectionPoliciesCallable().call(request);
for (TlsInspectionPolicy element : response.getTlsInspectionPoliciesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTlsInspectionPoliciesRequest,ListTlsInspectionPoliciesResponse> |
|
listTlsInspectionPoliciesPagedCallable()
public final UnaryCallable<ListTlsInspectionPoliciesRequest,NetworkSecurityClient.ListTlsInspectionPoliciesPagedResponse> listTlsInspectionPoliciesPagedCallable()Lists TlsInspectionPolicies 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListTlsInspectionPoliciesRequest request =
ListTlsInspectionPoliciesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<TlsInspectionPolicy> future =
networkSecurityClient.listTlsInspectionPoliciesPagedCallable().futureCall(request);
// Do something.
for (TlsInspectionPolicy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListTlsInspectionPoliciesRequest,ListTlsInspectionPoliciesPagedResponse> |
|
listUrlLists(ListUrlListsRequest request)
public final NetworkSecurityClient.ListUrlListsPagedResponse listUrlLists(ListUrlListsRequest request)Lists UrlLists 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListUrlListsRequest request =
ListUrlListsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (UrlList element : networkSecurityClient.listUrlLists(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListUrlListsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListUrlListsPagedResponse |
|
listUrlLists(LocationName parent)
public final NetworkSecurityClient.ListUrlListsPagedResponse listUrlLists(LocationName parent)Lists UrlLists 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (UrlList element : networkSecurityClient.listUrlLists(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project and location from which the UrlLists should be listed,
specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListUrlListsPagedResponse |
|
listUrlLists(String parent)
public final NetworkSecurityClient.ListUrlListsPagedResponse listUrlLists(String parent)Lists UrlLists 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (UrlList element : networkSecurityClient.listUrlLists(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the UrlLists should be listed,
specified in the format |
| Returns | |
|---|---|
| Type | Description |
NetworkSecurityClient.ListUrlListsPagedResponse |
|
listUrlListsCallable()
public final UnaryCallable<ListUrlListsRequest,ListUrlListsResponse> listUrlListsCallable()Lists UrlLists 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListUrlListsRequest request =
ListUrlListsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListUrlListsResponse response = networkSecurityClient.listUrlListsCallable().call(request);
for (UrlList element : response.getUrlListsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListUrlListsRequest,ListUrlListsResponse> |
|
listUrlListsPagedCallable()
public final UnaryCallable<ListUrlListsRequest,NetworkSecurityClient.ListUrlListsPagedResponse> listUrlListsPagedCallable()Lists UrlLists 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ListUrlListsRequest request =
ListUrlListsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<UrlList> future =
networkSecurityClient.listUrlListsPagedCallable().futureCall(request);
// Do something.
for (UrlList element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListUrlListsRequest,ListUrlListsPagedResponse> |
|
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = networkSecurityClient.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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.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 = networkSecurityClient.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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response = networkSecurityClient.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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
networkSecurityClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
|
updateAuthorizationPolicyAsync(AuthorizationPolicy authorizationPolicy, FieldMask updateMask)
public final OperationFuture<AuthorizationPolicy,OperationMetadata> updateAuthorizationPolicyAsync(AuthorizationPolicy authorizationPolicy, FieldMask updateMask)Updates the parameters of a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
AuthorizationPolicy authorizationPolicy = AuthorizationPolicy.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AuthorizationPolicy response =
networkSecurityClient
.updateAuthorizationPolicyAsync(authorizationPolicy, updateMask)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
authorizationPolicy |
AuthorizationPolicyRequired. Updated AuthorizationPolicy resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the AuthorizationPolicy 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<AuthorizationPolicy,OperationMetadata> |
|
updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest request)
public final OperationFuture<AuthorizationPolicy,OperationMetadata> updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest request)Updates the parameters of a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateAuthorizationPolicyRequest request =
UpdateAuthorizationPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
.build();
AuthorizationPolicy response =
networkSecurityClient.updateAuthorizationPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateAuthorizationPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<AuthorizationPolicy,OperationMetadata> |
|
updateAuthorizationPolicyCallable()
public final UnaryCallable<UpdateAuthorizationPolicyRequest,Operation> updateAuthorizationPolicyCallable()Updates the parameters of a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateAuthorizationPolicyRequest request =
UpdateAuthorizationPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.updateAuthorizationPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateAuthorizationPolicyRequest,Operation> |
|
updateAuthorizationPolicyOperationCallable()
public final OperationCallable<UpdateAuthorizationPolicyRequest,AuthorizationPolicy,OperationMetadata> updateAuthorizationPolicyOperationCallable()Updates the parameters of a single AuthorizationPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateAuthorizationPolicyRequest request =
UpdateAuthorizationPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
.build();
OperationFuture<AuthorizationPolicy, OperationMetadata> future =
networkSecurityClient.updateAuthorizationPolicyOperationCallable().futureCall(request);
// Do something.
AuthorizationPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateAuthorizationPolicyRequest,AuthorizationPolicy,OperationMetadata> |
|
updateAuthzPolicyAsync(AuthzPolicy authzPolicy, FieldMask updateMask)
public final OperationFuture<AuthzPolicy,OperationMetadata> updateAuthzPolicyAsync(AuthzPolicy authzPolicy, FieldMask updateMask)Updates the parameters of a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
AuthzPolicy authzPolicy = AuthzPolicy.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AuthzPolicy response =
networkSecurityClient.updateAuthzPolicyAsync(authzPolicy, updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
authzPolicy |
AuthzPolicyRequired. |
updateMask |
FieldMaskRequired. Used to specify the fields to be overwritten in the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<AuthzPolicy,OperationMetadata> |
|
updateAuthzPolicyAsync(UpdateAuthzPolicyRequest request)
public final OperationFuture<AuthzPolicy,OperationMetadata> updateAuthzPolicyAsync(UpdateAuthzPolicyRequest request)Updates the parameters of a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateAuthzPolicyRequest request =
UpdateAuthzPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAuthzPolicy(AuthzPolicy.newBuilder().build())
.setRequestId("requestId693933066")
.build();
AuthzPolicy response = networkSecurityClient.updateAuthzPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateAuthzPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<AuthzPolicy,OperationMetadata> |
|
updateAuthzPolicyCallable()
public final UnaryCallable<UpdateAuthzPolicyRequest,Operation> updateAuthzPolicyCallable()Updates the parameters of a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateAuthzPolicyRequest request =
UpdateAuthzPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAuthzPolicy(AuthzPolicy.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
networkSecurityClient.updateAuthzPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateAuthzPolicyRequest,Operation> |
|
updateAuthzPolicyOperationCallable()
public final OperationCallable<UpdateAuthzPolicyRequest,AuthzPolicy,OperationMetadata> updateAuthzPolicyOperationCallable()Updates the parameters of a single AuthzPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateAuthzPolicyRequest request =
UpdateAuthzPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setAuthzPolicy(AuthzPolicy.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<AuthzPolicy, OperationMetadata> future =
networkSecurityClient.updateAuthzPolicyOperationCallable().futureCall(request);
// Do something.
AuthzPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateAuthzPolicyRequest,AuthzPolicy,OperationMetadata> |
|
updateBackendAuthenticationConfigAsync(BackendAuthenticationConfig backendAuthenticationConfig, FieldMask updateMask)
public final OperationFuture<BackendAuthenticationConfig,OperationMetadata> updateBackendAuthenticationConfigAsync(BackendAuthenticationConfig backendAuthenticationConfig, FieldMask updateMask)Updates the parameters of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
BackendAuthenticationConfig backendAuthenticationConfig =
BackendAuthenticationConfig.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
BackendAuthenticationConfig response =
networkSecurityClient
.updateBackendAuthenticationConfigAsync(backendAuthenticationConfig, updateMask)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
backendAuthenticationConfig |
BackendAuthenticationConfigRequired. Updated BackendAuthenticationConfig resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the BackendAuthenticationConfig 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<BackendAuthenticationConfig,OperationMetadata> |
|
updateBackendAuthenticationConfigAsync(UpdateBackendAuthenticationConfigRequest request)
public final OperationFuture<BackendAuthenticationConfig,OperationMetadata> updateBackendAuthenticationConfigAsync(UpdateBackendAuthenticationConfigRequest request)Updates the parameters of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateBackendAuthenticationConfigRequest request =
UpdateBackendAuthenticationConfigRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setBackendAuthenticationConfig(BackendAuthenticationConfig.newBuilder().build())
.build();
BackendAuthenticationConfig response =
networkSecurityClient.updateBackendAuthenticationConfigAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateBackendAuthenticationConfigRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BackendAuthenticationConfig,OperationMetadata> |
|
updateBackendAuthenticationConfigCallable()
public final UnaryCallable<UpdateBackendAuthenticationConfigRequest,Operation> updateBackendAuthenticationConfigCallable()Updates the parameters of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateBackendAuthenticationConfigRequest request =
UpdateBackendAuthenticationConfigRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setBackendAuthenticationConfig(BackendAuthenticationConfig.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.updateBackendAuthenticationConfigCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateBackendAuthenticationConfigRequest,Operation> |
|
updateBackendAuthenticationConfigOperationCallable()
public final OperationCallable<UpdateBackendAuthenticationConfigRequest,BackendAuthenticationConfig,OperationMetadata> updateBackendAuthenticationConfigOperationCallable()Updates the parameters of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateBackendAuthenticationConfigRequest request =
UpdateBackendAuthenticationConfigRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setBackendAuthenticationConfig(BackendAuthenticationConfig.newBuilder().build())
.build();
OperationFuture<BackendAuthenticationConfig, OperationMetadata> future =
networkSecurityClient
.updateBackendAuthenticationConfigOperationCallable()
.futureCall(request);
// Do something.
BackendAuthenticationConfig response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateBackendAuthenticationConfigRequest,BackendAuthenticationConfig,OperationMetadata> |
|
updateClientTlsPolicyAsync(ClientTlsPolicy clientTlsPolicy, FieldMask updateMask)
public final OperationFuture<ClientTlsPolicy,OperationMetadata> updateClientTlsPolicyAsync(ClientTlsPolicy clientTlsPolicy, FieldMask updateMask)Updates the parameters of a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ClientTlsPolicy clientTlsPolicy = ClientTlsPolicy.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
ClientTlsPolicy response =
networkSecurityClient.updateClientTlsPolicyAsync(clientTlsPolicy, updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
clientTlsPolicy |
ClientTlsPolicyRequired. Updated ClientTlsPolicy resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the ClientTlsPolicy 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<ClientTlsPolicy,OperationMetadata> |
|
updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest request)
public final OperationFuture<ClientTlsPolicy,OperationMetadata> updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest request)Updates the parameters of a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateClientTlsPolicyRequest request =
UpdateClientTlsPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
.build();
ClientTlsPolicy response = networkSecurityClient.updateClientTlsPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateClientTlsPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ClientTlsPolicy,OperationMetadata> |
|
updateClientTlsPolicyCallable()
public final UnaryCallable<UpdateClientTlsPolicyRequest,Operation> updateClientTlsPolicyCallable()Updates the parameters of a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateClientTlsPolicyRequest request =
UpdateClientTlsPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.updateClientTlsPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateClientTlsPolicyRequest,Operation> |
|
updateClientTlsPolicyOperationCallable()
public final OperationCallable<UpdateClientTlsPolicyRequest,ClientTlsPolicy,OperationMetadata> updateClientTlsPolicyOperationCallable()Updates the parameters of a single ClientTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateClientTlsPolicyRequest request =
UpdateClientTlsPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
.build();
OperationFuture<ClientTlsPolicy, OperationMetadata> future =
networkSecurityClient.updateClientTlsPolicyOperationCallable().futureCall(request);
// Do something.
ClientTlsPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateClientTlsPolicyRequest,ClientTlsPolicy,OperationMetadata> |
|
updateGatewaySecurityPolicyAsync(GatewaySecurityPolicy gatewaySecurityPolicy, FieldMask updateMask)
public final OperationFuture<GatewaySecurityPolicy,OperationMetadata> updateGatewaySecurityPolicyAsync(GatewaySecurityPolicy gatewaySecurityPolicy, FieldMask updateMask)Updates the parameters of a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GatewaySecurityPolicy gatewaySecurityPolicy = GatewaySecurityPolicy.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
GatewaySecurityPolicy response =
networkSecurityClient
.updateGatewaySecurityPolicyAsync(gatewaySecurityPolicy, updateMask)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
gatewaySecurityPolicy |
GatewaySecurityPolicyRequired. Updated GatewaySecurityPolicy resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy 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<GatewaySecurityPolicy,OperationMetadata> |
|
updateGatewaySecurityPolicyAsync(UpdateGatewaySecurityPolicyRequest request)
public final OperationFuture<GatewaySecurityPolicy,OperationMetadata> updateGatewaySecurityPolicyAsync(UpdateGatewaySecurityPolicyRequest request)Updates the parameters of a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateGatewaySecurityPolicyRequest request =
UpdateGatewaySecurityPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setGatewaySecurityPolicy(GatewaySecurityPolicy.newBuilder().build())
.build();
GatewaySecurityPolicy response =
networkSecurityClient.updateGatewaySecurityPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateGatewaySecurityPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<GatewaySecurityPolicy,OperationMetadata> |
|
updateGatewaySecurityPolicyCallable()
public final UnaryCallable<UpdateGatewaySecurityPolicyRequest,Operation> updateGatewaySecurityPolicyCallable()Updates the parameters of a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateGatewaySecurityPolicyRequest request =
UpdateGatewaySecurityPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setGatewaySecurityPolicy(GatewaySecurityPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.updateGatewaySecurityPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateGatewaySecurityPolicyRequest,Operation> |
|
updateGatewaySecurityPolicyOperationCallable()
public final OperationCallable<UpdateGatewaySecurityPolicyRequest,GatewaySecurityPolicy,OperationMetadata> updateGatewaySecurityPolicyOperationCallable()Updates the parameters of a single GatewaySecurityPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateGatewaySecurityPolicyRequest request =
UpdateGatewaySecurityPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setGatewaySecurityPolicy(GatewaySecurityPolicy.newBuilder().build())
.build();
OperationFuture<GatewaySecurityPolicy, OperationMetadata> future =
networkSecurityClient.updateGatewaySecurityPolicyOperationCallable().futureCall(request);
// Do something.
GatewaySecurityPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateGatewaySecurityPolicyRequest,GatewaySecurityPolicy,OperationMetadata> |
|
updateGatewaySecurityPolicyRuleAsync(GatewaySecurityPolicyRule gatewaySecurityPolicyRule, FieldMask updateMask)
public final OperationFuture<GatewaySecurityPolicyRule,OperationMetadata> updateGatewaySecurityPolicyRuleAsync(GatewaySecurityPolicyRule gatewaySecurityPolicyRule, FieldMask updateMask)Updates the parameters of a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
GatewaySecurityPolicyRule gatewaySecurityPolicyRule =
GatewaySecurityPolicyRule.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
GatewaySecurityPolicyRule response =
networkSecurityClient
.updateGatewaySecurityPolicyRuleAsync(gatewaySecurityPolicyRule, updateMask)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
gatewaySecurityPolicyRule |
GatewaySecurityPolicyRuleRequired. Updated GatewaySecurityPolicyRule resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy 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<GatewaySecurityPolicyRule,OperationMetadata> |
|
updateGatewaySecurityPolicyRuleAsync(UpdateGatewaySecurityPolicyRuleRequest request)
public final OperationFuture<GatewaySecurityPolicyRule,OperationMetadata> updateGatewaySecurityPolicyRuleAsync(UpdateGatewaySecurityPolicyRuleRequest request)Updates the parameters of a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateGatewaySecurityPolicyRuleRequest request =
UpdateGatewaySecurityPolicyRuleRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setGatewaySecurityPolicyRule(GatewaySecurityPolicyRule.newBuilder().build())
.build();
GatewaySecurityPolicyRule response =
networkSecurityClient.updateGatewaySecurityPolicyRuleAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateGatewaySecurityPolicyRuleRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<GatewaySecurityPolicyRule,OperationMetadata> |
|
updateGatewaySecurityPolicyRuleCallable()
public final UnaryCallable<UpdateGatewaySecurityPolicyRuleRequest,Operation> updateGatewaySecurityPolicyRuleCallable()Updates the parameters of a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateGatewaySecurityPolicyRuleRequest request =
UpdateGatewaySecurityPolicyRuleRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setGatewaySecurityPolicyRule(GatewaySecurityPolicyRule.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.updateGatewaySecurityPolicyRuleCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateGatewaySecurityPolicyRuleRequest,Operation> |
|
updateGatewaySecurityPolicyRuleOperationCallable()
public final OperationCallable<UpdateGatewaySecurityPolicyRuleRequest,GatewaySecurityPolicyRule,OperationMetadata> updateGatewaySecurityPolicyRuleOperationCallable()Updates the parameters of a single GatewaySecurityPolicyRule.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateGatewaySecurityPolicyRuleRequest request =
UpdateGatewaySecurityPolicyRuleRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setGatewaySecurityPolicyRule(GatewaySecurityPolicyRule.newBuilder().build())
.build();
OperationFuture<GatewaySecurityPolicyRule, OperationMetadata> future =
networkSecurityClient
.updateGatewaySecurityPolicyRuleOperationCallable()
.futureCall(request);
// Do something.
GatewaySecurityPolicyRule response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateGatewaySecurityPolicyRuleRequest,GatewaySecurityPolicyRule,OperationMetadata> |
|
updateServerTlsPolicyAsync(ServerTlsPolicy serverTlsPolicy, FieldMask updateMask)
public final OperationFuture<ServerTlsPolicy,OperationMetadata> updateServerTlsPolicyAsync(ServerTlsPolicy serverTlsPolicy, FieldMask updateMask)Updates the parameters of a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
ServerTlsPolicy serverTlsPolicy = ServerTlsPolicy.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
ServerTlsPolicy response =
networkSecurityClient.updateServerTlsPolicyAsync(serverTlsPolicy, updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
serverTlsPolicy |
ServerTlsPolicyRequired. Updated ServerTlsPolicy resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy 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<ServerTlsPolicy,OperationMetadata> |
|
updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest request)
public final OperationFuture<ServerTlsPolicy,OperationMetadata> updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest request)Updates the parameters of a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateServerTlsPolicyRequest request =
UpdateServerTlsPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
.build();
ServerTlsPolicy response = networkSecurityClient.updateServerTlsPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateServerTlsPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ServerTlsPolicy,OperationMetadata> |
|
updateServerTlsPolicyCallable()
public final UnaryCallable<UpdateServerTlsPolicyRequest,Operation> updateServerTlsPolicyCallable()Updates the parameters of a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateServerTlsPolicyRequest request =
UpdateServerTlsPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.updateServerTlsPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateServerTlsPolicyRequest,Operation> |
|
updateServerTlsPolicyOperationCallable()
public final OperationCallable<UpdateServerTlsPolicyRequest,ServerTlsPolicy,OperationMetadata> updateServerTlsPolicyOperationCallable()Updates the parameters of a single ServerTlsPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateServerTlsPolicyRequest request =
UpdateServerTlsPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
.build();
OperationFuture<ServerTlsPolicy, OperationMetadata> future =
networkSecurityClient.updateServerTlsPolicyOperationCallable().futureCall(request);
// Do something.
ServerTlsPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateServerTlsPolicyRequest,ServerTlsPolicy,OperationMetadata> |
|
updateTlsInspectionPolicyAsync(TlsInspectionPolicy tlsInspectionPolicy, FieldMask updateMask)
public final OperationFuture<TlsInspectionPolicy,OperationMetadata> updateTlsInspectionPolicyAsync(TlsInspectionPolicy tlsInspectionPolicy, FieldMask updateMask)Updates the parameters of a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
TlsInspectionPolicy tlsInspectionPolicy = TlsInspectionPolicy.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
TlsInspectionPolicy response =
networkSecurityClient
.updateTlsInspectionPolicyAsync(tlsInspectionPolicy, updateMask)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
tlsInspectionPolicy |
TlsInspectionPolicyRequired. Updated TlsInspectionPolicy resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the TlsInspectionPolicy 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<TlsInspectionPolicy,OperationMetadata> |
|
updateTlsInspectionPolicyAsync(UpdateTlsInspectionPolicyRequest request)
public final OperationFuture<TlsInspectionPolicy,OperationMetadata> updateTlsInspectionPolicyAsync(UpdateTlsInspectionPolicyRequest request)Updates the parameters of a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateTlsInspectionPolicyRequest request =
UpdateTlsInspectionPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTlsInspectionPolicy(TlsInspectionPolicy.newBuilder().build())
.build();
TlsInspectionPolicy response =
networkSecurityClient.updateTlsInspectionPolicyAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateTlsInspectionPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<TlsInspectionPolicy,OperationMetadata> |
|
updateTlsInspectionPolicyCallable()
public final UnaryCallable<UpdateTlsInspectionPolicyRequest,Operation> updateTlsInspectionPolicyCallable()Updates the parameters of a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateTlsInspectionPolicyRequest request =
UpdateTlsInspectionPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTlsInspectionPolicy(TlsInspectionPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.updateTlsInspectionPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateTlsInspectionPolicyRequest,Operation> |
|
updateTlsInspectionPolicyOperationCallable()
public final OperationCallable<UpdateTlsInspectionPolicyRequest,TlsInspectionPolicy,OperationMetadata> updateTlsInspectionPolicyOperationCallable()Updates the parameters of a single TlsInspectionPolicy.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateTlsInspectionPolicyRequest request =
UpdateTlsInspectionPolicyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTlsInspectionPolicy(TlsInspectionPolicy.newBuilder().build())
.build();
OperationFuture<TlsInspectionPolicy, OperationMetadata> future =
networkSecurityClient.updateTlsInspectionPolicyOperationCallable().futureCall(request);
// Do something.
TlsInspectionPolicy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateTlsInspectionPolicyRequest,TlsInspectionPolicy,OperationMetadata> |
|
updateUrlListAsync(UpdateUrlListRequest request)
public final OperationFuture<UrlList,OperationMetadata> updateUrlListAsync(UpdateUrlListRequest request)Updates the parameters of a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateUrlListRequest request =
UpdateUrlListRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setUrlList(UrlList.newBuilder().build())
.build();
UrlList response = networkSecurityClient.updateUrlListAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateUrlListRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<UrlList,OperationMetadata> |
|
updateUrlListAsync(UrlList urlList, FieldMask updateMask)
public final OperationFuture<UrlList,OperationMetadata> updateUrlListAsync(UrlList urlList, FieldMask updateMask)Updates the parameters of a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UrlList urlList = UrlList.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
UrlList response = networkSecurityClient.updateUrlListAsync(urlList, updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
urlList |
UrlListRequired. Updated UrlList resource. |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the UrlList 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<UrlList,OperationMetadata> |
|
updateUrlListCallable()
public final UnaryCallable<UpdateUrlListRequest,Operation> updateUrlListCallable()Updates the parameters of a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateUrlListRequest request =
UpdateUrlListRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setUrlList(UrlList.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkSecurityClient.updateUrlListCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateUrlListRequest,Operation> |
|
updateUrlListOperationCallable()
public final OperationCallable<UpdateUrlListRequest,UrlList,OperationMetadata> updateUrlListOperationCallable()Updates the parameters of a single UrlList.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
UpdateUrlListRequest request =
UpdateUrlListRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setUrlList(UrlList.newBuilder().build())
.build();
OperationFuture<UrlList, OperationMetadata> future =
networkSecurityClient.updateUrlListOperationCallable().futureCall(request);
// Do something.
UrlList response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateUrlListRequest,UrlList,OperationMetadata> |
|