Class BigQueryExportServiceClient (0.31.0)

GitHub RepositoryProduct Reference

Service Description: Service for managing BigQuery export configurations for Chronicle instances.

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 (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   BigQueryExportName name = BigQueryExportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   BigQueryExport response = bigQueryExportServiceClient.getBigQueryExport(name);
 }
 

Note: close() needs to be called on the BigQueryExportServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

GetBigQueryExport

Get the BigQuery export configuration for a Chronicle instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBigQueryExport(GetBigQueryExportRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBigQueryExport(BigQueryExportName name)

  • getBigQueryExport(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBigQueryExportCallable()

UpdateBigQueryExport

Update the BigQuery export configuration for a Chronicle instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateBigQueryExport(UpdateBigQueryExportRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateBigQueryExport(BigQueryExport bigQueryExport, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateBigQueryExportCallable()

ProvisionBigQueryExport

Provision the BigQuery export for a Chronicle instance. This will create {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets and set default export settings for each data source.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • provisionBigQueryExport(ProvisionBigQueryExportRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • provisionBigQueryExport(InstanceName parent)

  • provisionBigQueryExport(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • provisionBigQueryExportCallable()

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 BigQueryExportServiceSettings 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
 BigQueryExportServiceSettings bigQueryExportServiceSettings =
     BigQueryExportServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create(bigQueryExportServiceSettings);
 

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
 BigQueryExportServiceSettings bigQueryExportServiceSettings =
     BigQueryExportServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create(bigQueryExportServiceSettings);
 

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
 BigQueryExportServiceSettings bigQueryExportServiceSettings =
     BigQueryExportServiceSettings.newHttpJsonBuilder().build();
 BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create(bigQueryExportServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > BigQueryExportServiceClient

Static Methods

create()

public static final BigQueryExportServiceClient create()

Constructs an instance of BigQueryExportServiceClient with default settings.

Returns
Type Description
BigQueryExportServiceClient
Exceptions
Type Description
IOException

create(BigQueryExportServiceSettings settings)

public static final BigQueryExportServiceClient create(BigQueryExportServiceSettings settings)

Constructs an instance of BigQueryExportServiceClient, 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 BigQueryExportServiceSettings
Returns
Type Description
BigQueryExportServiceClient
Exceptions
Type Description
IOException

create(BigQueryExportServiceStub stub)

public static final BigQueryExportServiceClient create(BigQueryExportServiceStub stub)

Constructs an instance of BigQueryExportServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(BigQueryExportServiceSettings).

Parameter
Name Description
stub BigQueryExportServiceStub
Returns
Type Description
BigQueryExportServiceClient

Constructors

BigQueryExportServiceClient(BigQueryExportServiceSettings settings)

protected BigQueryExportServiceClient(BigQueryExportServiceSettings settings)

Constructs an instance of BigQueryExportServiceClient, 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 BigQueryExportServiceSettings

BigQueryExportServiceClient(BigQueryExportServiceStub stub)

protected BigQueryExportServiceClient(BigQueryExportServiceStub stub)
Parameter
Name Description
stub BigQueryExportServiceStub

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()

getBigQueryExport(BigQueryExportName name)

public final BigQueryExport getBigQueryExport(BigQueryExportName name)

Get the BigQuery export configuration for a Chronicle instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   BigQueryExportName name = BigQueryExportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   BigQueryExport response = bigQueryExportServiceClient.getBigQueryExport(name);
 }
 
Parameter
Name Description
name BigQueryExportName

Required. The resource name of the BigqueryExport to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/bigQueryExport

Returns
Type Description
BigQueryExport

getBigQueryExport(GetBigQueryExportRequest request)

public final BigQueryExport getBigQueryExport(GetBigQueryExportRequest request)

Get the BigQuery export configuration for a Chronicle instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   GetBigQueryExportRequest request =
       GetBigQueryExportRequest.newBuilder()
           .setName(BigQueryExportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   BigQueryExport response = bigQueryExportServiceClient.getBigQueryExport(request);
 }
 
Parameter
Name Description
request GetBigQueryExportRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BigQueryExport

getBigQueryExport(String name)

public final BigQueryExport getBigQueryExport(String name)

Get the BigQuery export configuration for a Chronicle instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   String name = BigQueryExportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
   BigQueryExport response = bigQueryExportServiceClient.getBigQueryExport(name);
 }
 
Parameter
Name Description
name String

Required. The resource name of the BigqueryExport to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/bigQueryExport

Returns
Type Description
BigQueryExport

getBigQueryExportCallable()

public final UnaryCallable<GetBigQueryExportRequest,BigQueryExport> getBigQueryExportCallable()

Get the BigQuery export configuration for a Chronicle instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   GetBigQueryExportRequest request =
       GetBigQueryExportRequest.newBuilder()
           .setName(BigQueryExportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   ApiFuture<BigQueryExport> future =
       bigQueryExportServiceClient.getBigQueryExportCallable().futureCall(request);
   // Do something.
   BigQueryExport response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetBigQueryExportRequest,BigQueryExport>

getSettings()

public final BigQueryExportServiceSettings getSettings()
Returns
Type Description
BigQueryExportServiceSettings

getStub()

public BigQueryExportServiceStub getStub()
Returns
Type Description
BigQueryExportServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

provisionBigQueryExport(InstanceName parent)

public final BigQueryExport provisionBigQueryExport(InstanceName parent)

Provision the BigQuery export for a Chronicle instance. This will create {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets and set default export settings for each data source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   BigQueryExport response = bigQueryExportServiceClient.provisionBigQueryExport(parent);
 }
 
Parameter
Name Description
parent InstanceName

Required. The instance for which BigQuery export is being provisioned. Format: projects/{project}/locations/{location}/instances/{instance}

Returns
Type Description
BigQueryExport

provisionBigQueryExport(ProvisionBigQueryExportRequest request)

public final BigQueryExport provisionBigQueryExport(ProvisionBigQueryExportRequest request)

Provision the BigQuery export for a Chronicle instance. This will create {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets and set default export settings for each data source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   ProvisionBigQueryExportRequest request =
       ProvisionBigQueryExportRequest.newBuilder()
           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   BigQueryExport response = bigQueryExportServiceClient.provisionBigQueryExport(request);
 }
 
Parameter
Name Description
request ProvisionBigQueryExportRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BigQueryExport

provisionBigQueryExport(String parent)

public final BigQueryExport provisionBigQueryExport(String parent)

Provision the BigQuery export for a Chronicle instance. This will create {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets and set default export settings for each data source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
   BigQueryExport response = bigQueryExportServiceClient.provisionBigQueryExport(parent);
 }
 
Parameter
Name Description
parent String

Required. The instance for which BigQuery export is being provisioned. Format: projects/{project}/locations/{location}/instances/{instance}

Returns
Type Description
BigQueryExport

provisionBigQueryExportCallable()

public final UnaryCallable<ProvisionBigQueryExportRequest,BigQueryExport> provisionBigQueryExportCallable()

Provision the BigQuery export for a Chronicle instance. This will create {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets and set default export settings for each data source.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   ProvisionBigQueryExportRequest request =
       ProvisionBigQueryExportRequest.newBuilder()
           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   ApiFuture<BigQueryExport> future =
       bigQueryExportServiceClient.provisionBigQueryExportCallable().futureCall(request);
   // Do something.
   BigQueryExport response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ProvisionBigQueryExportRequest,BigQueryExport>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateBigQueryExport(BigQueryExport bigQueryExport, FieldMask updateMask)

public final BigQueryExport updateBigQueryExport(BigQueryExport bigQueryExport, FieldMask updateMask)

Update the BigQuery export configuration for a Chronicle instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   BigQueryExport response =
       bigQueryExportServiceClient.updateBigQueryExport(bigQueryExport, updateMask);
 }
 
Parameters
Name Description
bigQueryExport BigQueryExport

Required. The BigQueryExport settings to update. Format: projects/{project}/locations/{location}/instances/{instance}/bigQueryExport

updateMask FieldMask

Optional. The list of fields to update.

Returns
Type Description
BigQueryExport

updateBigQueryExport(UpdateBigQueryExportRequest request)

public final BigQueryExport updateBigQueryExport(UpdateBigQueryExportRequest request)

Update the BigQuery export configuration for a Chronicle instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   UpdateBigQueryExportRequest request =
       UpdateBigQueryExportRequest.newBuilder()
           .setBigQueryExport(BigQueryExport.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   BigQueryExport response = bigQueryExportServiceClient.updateBigQueryExport(request);
 }
 
Parameter
Name Description
request UpdateBigQueryExportRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BigQueryExport

updateBigQueryExportCallable()

public final UnaryCallable<UpdateBigQueryExportRequest,BigQueryExport> updateBigQueryExportCallable()

Update the BigQuery export configuration for a Chronicle instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BigQueryExportServiceClient bigQueryExportServiceClient =
     BigQueryExportServiceClient.create()) {
   UpdateBigQueryExportRequest request =
       UpdateBigQueryExportRequest.newBuilder()
           .setBigQueryExport(BigQueryExport.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<BigQueryExport> future =
       bigQueryExportServiceClient.updateBigQueryExportCallable().futureCall(request);
   // Do something.
   BigQueryExport response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateBigQueryExportRequest,BigQueryExport>