Supprimer des buckets de stockage pour des projets
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment supprimer des buckets de stockage air-gapped Google Distributed Cloud (GDC).
Avant de commencer
Un espace de noms de projet gère les ressources de bucket sur le serveur de l'API Management. Vous devez disposer d'un projet pour travailler avec des buckets et des objets.
Vous devez également disposer des autorisations de bucket appropriées pour effectuer l'opération suivante. Consultez Accorder l'accès à un bucket.
Supprimer des buckets de stockage
Console
Dans le menu de navigation, cliquez sur Stockage d'objets.
Cliquez sur deleteSupprimer à la fin de la ligne du bucket à supprimer.
Patientez quelques minutes, puis actualisez la page pour vérifier que le bucket a bien été supprimé.
CLI
Vous pouvez supprimer des buckets de stockage à l'aide de la CLI. Les buckets doivent être vides pour pouvoir être supprimés.
Vous pouvez exécuter la commande suivante pour vérifier que le bucket a bien été supprimé par chiffrement. BucketReady doit être défini sur False et Reason sur BucketCryptoShredded.
kubectlgetBucketsBUCKET_NAME-nNAMESPACE_NAME
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis guide details how to delete Google Distributed Cloud (GDC) air-gapped storage buckets, emphasizing that a project namespace is required to manage bucket resources.\u003c/p\u003e\n"],["\u003cp\u003eDeleting buckets via the console involves navigating to \u003cstrong\u003eObject Storage\u003c/strong\u003e, selecting the bucket, and clicking \u003cstrong\u003eDelete\u003c/strong\u003e, but note that there will be a delay before the change takes place.\u003c/p\u003e\n"],["\u003cp\u003eUsing the CLI to delete a bucket requires first ensuring that the bucket is empty, using commands to remove files recursively, then deleting the empty bucket with a \u003ccode\u003ekubectl\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eBuckets with retention policies cannot be immediately deleted, but can be crypto shredded, which is a permanent action that requires deleting the associated AEADKey; only v1 encrypted buckets are supported.\u003c/p\u003e\n"],["\u003cp\u003eCrypto shredding the bucket can be verified by running a command to check that the \u003ccode\u003eBucketReady\u003c/code\u003e status is \u003ccode\u003eFalse\u003c/code\u003e, and the \u003ccode\u003eReason\u003c/code\u003e is \u003ccode\u003eBucketCryptoShredded\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Delete storage buckets for projects\n\nThis page shows you how to delete Google Distributed Cloud (GDC) air-gapped storage buckets.\n\nBefore you begin\n----------------\n\nA project namespace manages bucket resources in the Management API server. You\nmust have a [project](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/project-management) to work with buckets and objects.\n\nYou must also have the appropriate bucket permissions to perform the following\noperation. See [Grant bucket access](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/grant-obtain-storage-access#grant_bucket_access).\n\nDelete storage buckets\n----------------------\n\n**Warning:** Buckets with retention policy would be blocked for deletion until the locked date expire. Therefore, you can crypto shred the bucket before it can be deleted following [Crypto shred bucket](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/delete-storage-buckets#crypto_shred_bucket). \n\n### Console\n\n1. In the navigation menu, click **Object Storage**.\n2. Click delete **Delete** at the end of the row of the bucket to be deleted.\n3. Wait a few minutes and refresh the page to check that the bucket is deleted.\n\n### CLI\n\nYou can delete storage buckets by using the CLI. **Buckets must be empty before\nyou can delete them.**\n\n1. Use the `GET` or `DESCRIBE` command from the [View bucket configuration](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/list-view-storage-buckets#view_bucket_configurations) section to get the fully qualified bucket name.\n\n2. If the bucket is not empty, delete files within the bucket:\n\n gdcloud storage rm --recursive -a s3://\u003cvar translate=\"no\"\u003eBUCKET\u003c/var\u003e/**\n\n3. Delete the empty bucket:\n\n kubectl delete buckets/\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e --namespace \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e\n\nCrypto shred bucket\n-------------------\n\n| **Note:** Only `v1` encryption bucket can be crypto shred, for `v2` encryption bucket, use [Crypto shred objects in buckets with encryption v2](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/delete-storage-objects#crypto_shred_objects_in_buckets_with_encryption_v2)\n| **Warning:** This step is not recoverable and you will lose all data encrypted in the bucket.\n\nRetrieve the information about the AEADKey based on [Verify bucket resource creation](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/create-storage-buckets#verify_bucket_and_related_resource_creation) and follow [Delete a key](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/kms/create-delete-keys#delete) to delete the AEADKey, then the entire bucket would be crypto shredded.\n\nYou can run the following command to verify the bucket has been successfully crypto shredded. The `BucketReady` should be `False` and `Reason` to be `BucketCryptoShredded`. \n\n kubectl get Buckets \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eNAMESPACE_NAME\u003c/var\u003e"]]