Search in sources :

Example 1 with GetBigQueryExportRequest

use of com.google.cloud.securitycenter.v1.GetBigQueryExportRequest in project java-securitycenter by googleapis.

the class GetBigQueryExport method getBigQueryExport.

// Retrieve an existing BigQuery export.
public static void getBigQueryExport(String parent, String bigQueryExportId) throws IOException {
    // the "close" method on the client to safely clean up any remaining background resources.
    try (SecurityCenterClient client = SecurityCenterClient.create()) {
        GetBigQueryExportRequest bigQueryExportRequest = GetBigQueryExportRequest.newBuilder().setName(String.format("%s/bigQueryExports/%s", parent, bigQueryExportId)).build();
        BigQueryExport response = client.getBigQueryExport(bigQueryExportRequest);
        System.out.printf("Retrieved the BigQuery export: %s", response.getName());
    }
}
Also used : GetBigQueryExportRequest(com.google.cloud.securitycenter.v1.GetBigQueryExportRequest) BigQueryExport(com.google.cloud.securitycenter.v1.BigQueryExport) SecurityCenterClient(com.google.cloud.securitycenter.v1.SecurityCenterClient)

Aggregations

BigQueryExport (com.google.cloud.securitycenter.v1.BigQueryExport)1 GetBigQueryExportRequest (com.google.cloud.securitycenter.v1.GetBigQueryExportRequest)1 SecurityCenterClient (com.google.cloud.securitycenter.v1.SecurityCenterClient)1