Delete a BigQuery export configuration
Stay organized with collections
Save and categorize content based on your preferences.
Delete 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,["# Delete a BigQuery export configuration\n\nDelete 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.DeleteBigQueryExportRequest.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 DeleteBigQueryExport {\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 deleteBigQueryExport(parent, bigQueryExportId);\n }\n\n // Delete an existing BigQuery export.\n public static void deleteBigQueryExport(String parent, String bigQueryExportId)\n 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.DeleteBigQueryExportRequest.html bigQueryExportRequest =\n https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/com.google.cloud.securitycenter.v1.DeleteBigQueryExportRequest.html.newBuilder()\n .setName(String.format(\"%s/bigQueryExports/%s\", parent, bigQueryExportId))\n .build();\n\n client.deleteBigQueryExport(bigQueryExportRequest);\n System.out.printf(\"BigQuery export request deleted successfully: %s\", bigQueryExportId);\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 delete_bigquery_export(parent: str, bigquery_export_id: str):\n \"\"\"\n Delete 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 from google.cloud import securitycenter\n\n client = securitycenter.SecurityCenterClient()\n\n request = securitycenter.https://cloud.google.com/python/docs/reference/securitycenter/latest/google.cloud.securitycenter_v1.types.DeleteBigQueryExportRequest.html()\n request.name = f\"{parent}/bigQueryExports/{bigquery_export_id}\"\n\n 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_delete_big_query_export(request)\n print(f\"BigQuery export request deleted successfully: {bigquery_export_id}\")\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)."]]