Get a BigQuery export configuration
Stay organized with collections
Save and categorize content based on your preferences.
Retrieve an existing BigQuery export configuration.
Code sample
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],[],[],[],null,["# Get a BigQuery export configuration\n\nRetrieve an existing BigQuery export configuration.\n\nCode sample\n-----------\n\n### Java\n\n\nTo authenticate to Security Command Center, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n\n import com.google.cloud.securitycenter.v1.https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.BigQueryExport.html;\n import com.google.cloud.securitycenter.v1.https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.html;\n import com.google.cloud.securitycenter.v1.https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.SecurityCenterClient.html;\n import java.io.IOException;\n\n public class GetBigQueryExport {\n\n public static void main(String[] args) throws IOException {\n // TODO(Developer): Modify the following variable values.\n\n // parent: Use any one of the following resource paths:\n // - organizations/{organization_id}\n // - folders/{folder_id}\n // - projects/{project_id}\n String parent = String.format(\"projects/%s\", \"your-google-cloud-project-id\");\n\n // bigQueryExportId: Unique identifier that is used to identify the export.\n String bigQueryExportId = \"export-id\";\n\n getBigQueryExport(parent, bigQueryExportId);\n }\n\n // Retrieve an existing BigQuery export.\n public static void getBigQueryExport(String parent, String bigQueryExportId) throws IOException {\n // Initialize client that will be used to send requests. This client only needs to be created\n // once, and can be reused for multiple requests. After completing all of your requests, call\n // the \"close\" method on the client to safely clean up any remaining background resources.\n try (https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.SecurityCenterClient.html client = https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.SecurityCenterClient.html.create()) {\n\n https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.html bigQueryExportRequest =\n https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.GetBigQueryExportRequest.html.newBuilder()\n .setName(String.format(\"%s/bigQueryExports/%s\", parent, bigQueryExportId))\n .build();\n\n https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.BigQueryExport.html response = client.getBigQueryExport(bigQueryExportRequest);\n System.out.printf(\"Retrieved the BigQuery export: %s\", response.https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.BigQueryExport.html#com_google_cloud_securitycenter_v1_BigQueryExport_getName__());\n }\n }\n }\n\n### Python\n\n\nTo authenticate to Security Command Center, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n def get_bigquery_export(parent: str, bigquery_export_id: str):\n from google.cloud import securitycenter\n\n \"\"\"\n Retrieve an existing BigQuery export.\n Args:\n parent: Use any one of the following resource paths:\n - organizations/{organization_id}\n - folders/{folder_id}\n - projects/{project_id}\n bigquery_export_id: Unique identifier that is used to identify the export.\n \"\"\"\n\n client = securitycenter.SecurityCenterClient()\n\n request = securitycenter.https://cloud.google.com/python/docs/reference/securitycenter/latest/google.cloud.securitycenter_v1.types.GetBigQueryExportRequest.html()\n request.name = f\"{parent}/bigQueryExports/{bigquery_export_id}\"\n\n response = client.https://cloud.google.com/python/docs/reference/securitycenter/latest/google.cloud.securitycenter_v1.services.security_center.SecurityCenterClient.html#google_cloud_securitycenter_v1_services_security_center_SecurityCenterClient_get_big_query_export(request)\n print(f\"Retrieved the BigQuery export: {response.name}\")\n\nWhat's next\n-----------\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=securitycenter)."]]