Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Excluir uma instância
É possível excluir uma instância de forma programática quando você usa uma das
bibliotecas de cliente do Bigtable ou manualmente usando o
console doGoogle Cloud , a Google Cloud CLI ou a
CLI cbt
:
Console
Abra a lista de instâncias do Bigtable no console Google Cloud .
// Deletes an instance from the project.// Initialize request argument(s).DeleteInstanceRequestrequest=newDeleteInstanceRequest{InstanceName=newInstanceName(projectId,instanceId)};try{// Make request.Console.WriteLine("Waiting for operation to complete...");bigtableInstanceAdminClient.DeleteInstance(request);}catch(Exceptionex){Console.WriteLine($"Exception while deleting {instanceId} instance");Console.WriteLine(ex.Message);}
print("\nDeleting instance")ifnotinstance.exists():print("Instance {} does not exist.".format(instance_id))else:instance.delete()print("Deleted instance: {}".format(instance_id))
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-27 UTC."],[[["\u003cp\u003eDeleting a Bigtable instance is permanent and cannot be undone, resulting in the loss of all data within the instance's clusters.\u003c/p\u003e\n"],["\u003cp\u003eInstances can be deleted manually using the Google Cloud console, the Google Cloud CLI (gcloud), or the cbt CLI.\u003c/p\u003e\n"],["\u003cp\u003eDeleting an instance programmatically can be achieved by leveraging the provided Bigtable client libraries for various languages like C++, C#, Java, Node.js, PHP, Python, and Ruby.\u003c/p\u003e\n"],["\u003cp\u003eThe process for deleting an instance through the console involves opening the instance list, selecting the instance, and confirming the deletion in the dialog box.\u003c/p\u003e\n"],["\u003cp\u003eThe Google cloud CLI (gcloud) and cbt CLI require you to use specific commands to delete your instances, with the \u003ccode\u003edeleteinstance\u003c/code\u003e and \u003ccode\u003einstances delete\u003c/code\u003e commands being the main ones respectively, requiring the unique instance ID.\u003c/p\u003e\n"]]],[],null,["# Delete an instance\n==================\n\n| **Warning:** When you delete a Bigtable instance, you permanently delete the instance's clusters and all of the data in those clusters. Deleting an instance cannot be undone.\n\nYou can delete an instance programmatically when you use one of the\n[Bigtable client libraries](/bigtable/docs/reference/libraries) or manually using the\nGoogle Cloud console, the Google Cloud CLI, or the\ncbt CLI\n: \n\n### Console\n\n1.\n Open the list of Bigtable instances in the Google Cloud console.\n\n\n [Open the instance list](https://console.cloud.google.com/bigtable/instances)\n2.\n Click the instance you want to delete, then click **Delete instance**.\n A confirmation dialog appears.\n\n3.\n Follow the instructions in the confirmation dialog, then click **Delete**.\n The instance is permanently deleted.\n\n### gcloud\n\n1. [Install the Google Cloud CLI](/bigtable/docs/installing-cloud-sdk) if you haven't already.\n2.\n If you don't know the instance ID, use the\n [`bigtable instances\n list` command](/sdk/gcloud/reference/bigtable/instances/list) to view a list of your project's instances:\n\n gcloud bigtable instances list\n\n3. Use the [`bigtable instances delete` command](/sdk/gcloud/reference/bigtable/instances/delete) to\n delete an instance:\n\n gcloud bigtable instances delete \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eINSTANCE_ID\u003c/code\u003e\u003c/var\u003e with the permanent identifier for your instance.\n\n### cbt\n\n1. [Install the\n `cbt` CLI](/bigtable/docs/installing-cloud-sdk) if you haven't already.\n2.\n If you don't know the instance ID, use the `listinstances` command to view a list of your\n project's instances:\n\n cbt listinstances\n\n3. Use the `deleteinstance` command to delete an instance:\n\n cbt deleteinstance \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eINSTANCE_ID\u003c/code\u003e\u003c/var\u003e with the permanent identifier for your instance.\n\n### C++\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, 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 namespace cbt = ::google::cloud::bigtable;\n namespace cbta = ::google::cloud::bigtable_admin;\n using ::google::cloud::Status;\n [](cbta::BigtableInstanceAdminClient instance_admin,\n std::string const& project_id, std::string const& instance_id) {\n std::string instance_name = cbt::InstanceName(project_id, instance_id);\n Status status = instance_admin.DeleteInstance(instance_name);\n if (!status.ok()) throw std::runtime_error(status.message());\n std::cout \u003c\u003c \"Successfully deleted the instance \" \u003c\u003c instance_id \u003c\u003c \"\\n\";\n }\n\n### C#\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, 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 // Deletes an instance from the project.\n // Initialize request argument(s).\n DeleteInstanceRequest request = new DeleteInstanceRequest\n {\n InstanceName = new InstanceName(projectId, instanceId)\n };\n try\n {\n // Make request.\n Console.WriteLine(\"Waiting for operation to complete...\");\n bigtableInstanceAdminClient.DeleteInstance(request);\n }\n catch (Exception ex)\n {\n Console.WriteLine($\"Exception while deleting {instanceId} instance\");\n Console.WriteLine(ex.Message);\n }\n\n### Java\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, 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 try {\n adminClient.deleteInstance(instanceId);\n System.out.println(\"Instance deleted: \" + instanceId);\n } catch (NotFoundException e) {\n System.err.println(\"Failed to delete non-existent instance: \" + e.getMessage());\n }\n\n### Node.js\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, 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 console.log('Deleting Instance');\n await instance.delete();\n console.log(`Instance deleted: ${instance.id}`);\n\n### PHP\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, 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 use Google\\ApiCore\\ApiException;\n use Google\\Cloud\\Bigtable\\Admin\\V2\\Client\\BigtableInstanceAdminClient;\n use Google\\Cloud\\Bigtable\\Admin\\V2\\DeleteInstanceRequest;\n\n /**\n * Delete a bigtable instance\n *\n * @param string $projectId The Google Cloud project ID\n * @param string $instanceId The ID of the Bigtable instance to be deleted\n */\n function delete_instance(\n string $projectId,\n string $instanceId\n ): void {\n $instanceAdminClient = new BigtableInstanceAdminClient();\n $instanceName = $instanceAdminClient-\u003einstanceName($projectId, $instanceId);\n\n printf('Deleting Instance' . PHP_EOL);\n try {\n $deleteInstanceRequest = (new DeleteInstanceRequest())\n -\u003esetName($instanceName);\n $instanceAdminClient-\u003edeleteInstance($deleteInstanceRequest);\n printf('Deleted Instance: %s.' . PHP_EOL, $instanceId);\n } catch (ApiException $e) {\n if ($e-\u003egetStatus() === 'NOT_FOUND') {\n printf('Instance %s does not exists.' . PHP_EOL, $instanceId);\n } else {\n throw $e;\n }\n }\n }\n\n### Python\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, 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 print(\"\\nDeleting instance\")\n if not instance.exists():\n print(\"Instance {} does not exist.\".format(instance_id))\n else:\n instance.delete()\n print(\"Deleted instance: {}\".format(instance_id))\n\n### Ruby\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, 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 instance.delete"]]