- 0.85.0 (latest)
- 0.83.0
- 0.81.0
- 0.79.0
- 0.78.0
- 0.77.0
- 0.76.0
- 0.75.0
- 0.73.0
- 0.71.0
- 0.70.0
- 0.67.0
- 0.66.0
- 0.65.0
- 0.63.0
- 0.62.0
- 0.61.0
- 0.60.0
- 0.59.0
- 0.58.0
- 0.57.0
- 0.56.0
- 0.55.0
- 0.54.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.4
- 0.5.1
- 0.4.4
| GitHub Repository | Product Reference |
Service Description: The Network Security API for DNS Threat Detectors.
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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
DnsThreatDetectorName name =
DnsThreatDetectorName.of("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]");
DnsThreatDetector response = dnsThreatDetectorServiceClient.getDnsThreatDetector(name);
}
Note: close() needs to be called on the DnsThreatDetectorServiceClient 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 |
|---|---|---|
ListDnsThreatDetectors |
Lists DnsThreatDetectors 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.
|
GetDnsThreatDetector |
Gets the details of a single DnsThreatDetector. |
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.
|
CreateDnsThreatDetector |
Creates a new DnsThreatDetector 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.
|
UpdateDnsThreatDetector |
Updates a single DnsThreatDetector. |
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.
|
DeleteDnsThreatDetector |
Deletes a single DnsThreatDetector. |
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.
|
ListLocations |
Lists information about the supported locations for this service. |
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 DnsThreatDetectorServiceSettings 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
DnsThreatDetectorServiceSettings dnsThreatDetectorServiceSettings =
DnsThreatDetectorServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create(dnsThreatDetectorServiceSettings);
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
DnsThreatDetectorServiceSettings dnsThreatDetectorServiceSettings =
DnsThreatDetectorServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create(dnsThreatDetectorServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
DnsThreatDetectorServiceSettings dnsThreatDetectorServiceSettings =
DnsThreatDetectorServiceSettings.newHttpJsonBuilder().build();
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create(dnsThreatDetectorServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final DnsThreatDetectorServiceClient create()Constructs an instance of DnsThreatDetectorServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetectorServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(DnsThreatDetectorServiceSettings settings)
public static final DnsThreatDetectorServiceClient create(DnsThreatDetectorServiceSettings settings)Constructs an instance of DnsThreatDetectorServiceClient, 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 |
DnsThreatDetectorServiceSettings |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetectorServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(DnsThreatDetectorServiceStub stub)
public static final DnsThreatDetectorServiceClient create(DnsThreatDetectorServiceStub stub)Constructs an instance of DnsThreatDetectorServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DnsThreatDetectorServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
DnsThreatDetectorServiceStub |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetectorServiceClient |
|
Constructors
DnsThreatDetectorServiceClient(DnsThreatDetectorServiceSettings settings)
protected DnsThreatDetectorServiceClient(DnsThreatDetectorServiceSettings settings)Constructs an instance of DnsThreatDetectorServiceClient, 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 |
DnsThreatDetectorServiceSettings |
DnsThreatDetectorServiceClient(DnsThreatDetectorServiceStub stub)
protected DnsThreatDetectorServiceClient(DnsThreatDetectorServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
DnsThreatDetectorServiceStub |
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()createDnsThreatDetector(CreateDnsThreatDetectorRequest request)
public final DnsThreatDetector createDnsThreatDetector(CreateDnsThreatDetectorRequest request)Creates a new DnsThreatDetector 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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
CreateDnsThreatDetectorRequest request =
CreateDnsThreatDetectorRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDnsThreatDetectorId("dnsThreatDetectorId-1579667324")
.setDnsThreatDetector(DnsThreatDetector.newBuilder().build())
.build();
DnsThreatDetector response = dnsThreatDetectorServiceClient.createDnsThreatDetector(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateDnsThreatDetectorRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetector |
|
createDnsThreatDetector(LocationName parent, DnsThreatDetector dnsThreatDetector, String dnsThreatDetectorId)
public final DnsThreatDetector createDnsThreatDetector(LocationName parent, DnsThreatDetector dnsThreatDetector, String dnsThreatDetectorId)Creates a new DnsThreatDetector 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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
DnsThreatDetector dnsThreatDetector = DnsThreatDetector.newBuilder().build();
String dnsThreatDetectorId = "dnsThreatDetectorId-1579667324";
DnsThreatDetector response =
dnsThreatDetectorServiceClient.createDnsThreatDetector(
parent, dnsThreatDetector, dnsThreatDetectorId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The value for the parent of the DnsThreatDetector resource. |
dnsThreatDetector |
DnsThreatDetectorRequired. The |
dnsThreatDetectorId |
StringOptional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier. |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetector |
|
createDnsThreatDetector(String parent, DnsThreatDetector dnsThreatDetector, String dnsThreatDetectorId)
public final DnsThreatDetector createDnsThreatDetector(String parent, DnsThreatDetector dnsThreatDetector, String dnsThreatDetectorId)Creates a new DnsThreatDetector 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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
DnsThreatDetector dnsThreatDetector = DnsThreatDetector.newBuilder().build();
String dnsThreatDetectorId = "dnsThreatDetectorId-1579667324";
DnsThreatDetector response =
dnsThreatDetectorServiceClient.createDnsThreatDetector(
parent, dnsThreatDetector, dnsThreatDetectorId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The value for the parent of the DnsThreatDetector resource. |
dnsThreatDetector |
DnsThreatDetectorRequired. The |
dnsThreatDetectorId |
StringOptional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier. |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetector |
|
createDnsThreatDetectorCallable()
public final UnaryCallable<CreateDnsThreatDetectorRequest,DnsThreatDetector> createDnsThreatDetectorCallable()Creates a new DnsThreatDetector 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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
CreateDnsThreatDetectorRequest request =
CreateDnsThreatDetectorRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDnsThreatDetectorId("dnsThreatDetectorId-1579667324")
.setDnsThreatDetector(DnsThreatDetector.newBuilder().build())
.build();
ApiFuture<DnsThreatDetector> future =
dnsThreatDetectorServiceClient.createDnsThreatDetectorCallable().futureCall(request);
// Do something.
DnsThreatDetector response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateDnsThreatDetectorRequest,DnsThreatDetector> |
|
deleteDnsThreatDetector(DeleteDnsThreatDetectorRequest request)
public final void deleteDnsThreatDetector(DeleteDnsThreatDetectorRequest request)Deletes a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
DeleteDnsThreatDetectorRequest request =
DeleteDnsThreatDetectorRequest.newBuilder()
.setName(
DnsThreatDetectorName.of("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]")
.toString())
.build();
dnsThreatDetectorServiceClient.deleteDnsThreatDetector(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteDnsThreatDetectorRequestThe request object containing all of the parameters for the API call. |
deleteDnsThreatDetector(DnsThreatDetectorName name)
public final void deleteDnsThreatDetector(DnsThreatDetectorName name)Deletes a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
DnsThreatDetectorName name =
DnsThreatDetectorName.of("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]");
dnsThreatDetectorServiceClient.deleteDnsThreatDetector(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
DnsThreatDetectorNameRequired. Name of the DnsThreatDetector resource. |
deleteDnsThreatDetector(String name)
public final void deleteDnsThreatDetector(String name)Deletes a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
String name =
DnsThreatDetectorName.of("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]").toString();
dnsThreatDetectorServiceClient.deleteDnsThreatDetector(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Name of the DnsThreatDetector resource. |
deleteDnsThreatDetectorCallable()
public final UnaryCallable<DeleteDnsThreatDetectorRequest,Empty> deleteDnsThreatDetectorCallable()Deletes a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
DeleteDnsThreatDetectorRequest request =
DeleteDnsThreatDetectorRequest.newBuilder()
.setName(
DnsThreatDetectorName.of("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]")
.toString())
.build();
ApiFuture<Empty> future =
dnsThreatDetectorServiceClient.deleteDnsThreatDetectorCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteDnsThreatDetectorRequest,Empty> |
|
getDnsThreatDetector(DnsThreatDetectorName name)
public final DnsThreatDetector getDnsThreatDetector(DnsThreatDetectorName name)Gets the details of a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
DnsThreatDetectorName name =
DnsThreatDetectorName.of("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]");
DnsThreatDetector response = dnsThreatDetectorServiceClient.getDnsThreatDetector(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
DnsThreatDetectorNameRequired. Name of the DnsThreatDetector resource. |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetector |
|
getDnsThreatDetector(GetDnsThreatDetectorRequest request)
public final DnsThreatDetector getDnsThreatDetector(GetDnsThreatDetectorRequest request)Gets the details of a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
GetDnsThreatDetectorRequest request =
GetDnsThreatDetectorRequest.newBuilder()
.setName(
DnsThreatDetectorName.of("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]")
.toString())
.build();
DnsThreatDetector response = dnsThreatDetectorServiceClient.getDnsThreatDetector(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetDnsThreatDetectorRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetector |
|
getDnsThreatDetector(String name)
public final DnsThreatDetector getDnsThreatDetector(String name)Gets the details of a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
String name =
DnsThreatDetectorName.of("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]").toString();
DnsThreatDetector response = dnsThreatDetectorServiceClient.getDnsThreatDetector(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. Name of the DnsThreatDetector resource. |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetector |
|
getDnsThreatDetectorCallable()
public final UnaryCallable<GetDnsThreatDetectorRequest,DnsThreatDetector> getDnsThreatDetectorCallable()Gets the details of a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
GetDnsThreatDetectorRequest request =
GetDnsThreatDetectorRequest.newBuilder()
.setName(
DnsThreatDetectorName.of("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]")
.toString())
.build();
ApiFuture<DnsThreatDetector> future =
dnsThreatDetectorServiceClient.getDnsThreatDetectorCallable().futureCall(request);
// Do something.
DnsThreatDetector response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetDnsThreatDetectorRequest,DnsThreatDetector> |
|
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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = dnsThreatDetectorServiceClient.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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future =
dnsThreatDetectorServiceClient.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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = dnsThreatDetectorServiceClient.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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
dnsThreatDetectorServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
|
getSettings()
public final DnsThreatDetectorServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
DnsThreatDetectorServiceSettings |
|
getStub()
public DnsThreatDetectorServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
DnsThreatDetectorServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listDnsThreatDetectors(ListDnsThreatDetectorsRequest request)
public final DnsThreatDetectorServiceClient.ListDnsThreatDetectorsPagedResponse listDnsThreatDetectors(ListDnsThreatDetectorsRequest request)Lists DnsThreatDetectors 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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
ListDnsThreatDetectorsRequest request =
ListDnsThreatDetectorsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (DnsThreatDetector element :
dnsThreatDetectorServiceClient.listDnsThreatDetectors(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListDnsThreatDetectorsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetectorServiceClient.ListDnsThreatDetectorsPagedResponse |
|
listDnsThreatDetectors(LocationName parent)
public final DnsThreatDetectorServiceClient.ListDnsThreatDetectorsPagedResponse listDnsThreatDetectors(LocationName parent)Lists DnsThreatDetectors 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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (DnsThreatDetector element :
dnsThreatDetectorServiceClient.listDnsThreatDetectors(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent value for |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetectorServiceClient.ListDnsThreatDetectorsPagedResponse |
|
listDnsThreatDetectors(String parent)
public final DnsThreatDetectorServiceClient.ListDnsThreatDetectorsPagedResponse listDnsThreatDetectors(String parent)Lists DnsThreatDetectors 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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (DnsThreatDetector element :
dnsThreatDetectorServiceClient.listDnsThreatDetectors(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent value for |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetectorServiceClient.ListDnsThreatDetectorsPagedResponse |
|
listDnsThreatDetectorsCallable()
public final UnaryCallable<ListDnsThreatDetectorsRequest,ListDnsThreatDetectorsResponse> listDnsThreatDetectorsCallable()Lists DnsThreatDetectors 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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
ListDnsThreatDetectorsRequest request =
ListDnsThreatDetectorsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListDnsThreatDetectorsResponse response =
dnsThreatDetectorServiceClient.listDnsThreatDetectorsCallable().call(request);
for (DnsThreatDetector element : response.getDnsThreatDetectorsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDnsThreatDetectorsRequest,ListDnsThreatDetectorsResponse> |
|
listDnsThreatDetectorsPagedCallable()
public final UnaryCallable<ListDnsThreatDetectorsRequest,DnsThreatDetectorServiceClient.ListDnsThreatDetectorsPagedResponse> listDnsThreatDetectorsPagedCallable()Lists DnsThreatDetectors 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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
ListDnsThreatDetectorsRequest request =
ListDnsThreatDetectorsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<DnsThreatDetector> future =
dnsThreatDetectorServiceClient.listDnsThreatDetectorsPagedCallable().futureCall(request);
// Do something.
for (DnsThreatDetector element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDnsThreatDetectorsRequest,ListDnsThreatDetectorsPagedResponse> |
|
listLocations(ListLocationsRequest request)
public final DnsThreatDetectorServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : dnsThreatDetectorServiceClient.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 |
DnsThreatDetectorServiceClient.ListLocationsPagedResponse |
|
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
dnsThreatDetectorServiceClient.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,DnsThreatDetectorServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
dnsThreatDetectorServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
|
setIamPolicy(SetIamPolicyRequest request)
public final Policy setIamPolicy(SetIamPolicyRequest request)Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = dnsThreatDetectorServiceClient.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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future =
dnsThreatDetectorServiceClient.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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response =
dnsThreatDetectorServiceClient.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 (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
dnsThreatDetectorServiceClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
|
updateDnsThreatDetector(DnsThreatDetector dnsThreatDetector, FieldMask updateMask)
public final DnsThreatDetector updateDnsThreatDetector(DnsThreatDetector dnsThreatDetector, FieldMask updateMask)Updates a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
DnsThreatDetector dnsThreatDetector = DnsThreatDetector.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DnsThreatDetector response =
dnsThreatDetectorServiceClient.updateDnsThreatDetector(dnsThreatDetector, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
dnsThreatDetector |
DnsThreatDetectorRequired. The DnsThreatDetector resource being updated. |
updateMask |
FieldMaskOptional. The field mask is used to specify the fields to be overwritten in the DnsThreatDetector 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 mask is not provided then all fields present in the request will be overwritten. |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetector |
|
updateDnsThreatDetector(UpdateDnsThreatDetectorRequest request)
public final DnsThreatDetector updateDnsThreatDetector(UpdateDnsThreatDetectorRequest request)Updates a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
UpdateDnsThreatDetectorRequest request =
UpdateDnsThreatDetectorRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDnsThreatDetector(DnsThreatDetector.newBuilder().build())
.build();
DnsThreatDetector response = dnsThreatDetectorServiceClient.updateDnsThreatDetector(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateDnsThreatDetectorRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DnsThreatDetector |
|
updateDnsThreatDetectorCallable()
public final UnaryCallable<UpdateDnsThreatDetectorRequest,DnsThreatDetector> updateDnsThreatDetectorCallable()Updates a single DnsThreatDetector.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient =
DnsThreatDetectorServiceClient.create()) {
UpdateDnsThreatDetectorRequest request =
UpdateDnsThreatDetectorRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDnsThreatDetector(DnsThreatDetector.newBuilder().build())
.build();
ApiFuture<DnsThreatDetector> future =
dnsThreatDetectorServiceClient.updateDnsThreatDetectorCallable().futureCall(request);
// Do something.
DnsThreatDetector response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateDnsThreatDetectorRequest,DnsThreatDetector> |
|