Copier, modifier et déplacer des objets de stockage dans des projets
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment copier, modifier et déplacer des objets dans des buckets de stockage isolés de 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.
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 page outlines how to copy, modify, and move objects within Google Distributed Cloud air-gapped storage buckets.\u003c/p\u003e\n"],["\u003cp\u003eA project namespace is required for managing bucket resources, and proper bucket permissions are needed to carry out any operations.\u003c/p\u003e\n"],["\u003cp\u003eObjects can be copied using the \u003ccode\u003egdcloud storage cp\u003c/code\u003e command, specifying the file source and the bucket destination.\u003c/p\u003e\n"],["\u003cp\u003eObject metadata can be modified with the \u003ccode\u003egdcloud storage objects update\u003c/code\u003e command, allowing you to add or change custom metadata.\u003c/p\u003e\n"],["\u003cp\u003eObjects can be moved between buckets using the \u003ccode\u003egdcloud storage mv\u003c/code\u003e command, specifying the source bucket and object, as well as the destination bucket.\u003c/p\u003e\n"]]],[],null,["# Copy, modify, and move storage objects in projects\n\nThis page shows you how to copy, modify, and move objects within 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\nCopy, modify, and move objects\n------------------------------\n\nCopy an object: \n\n gdcloud storage cp \u003cvar translate=\"no\"\u003eFILE\u003c/var\u003e [\u003cvar translate=\"no\"\u003eFILE\u003c/var\u003e...] s3://\u003cvar translate=\"no\"\u003eBUCKET\u003c/var\u003e [/\u003cvar translate=\"no\"\u003ePREFIX\u003c/var\u003e ]\n\nModify an object's metadata: \n\n gdcloud storage objects update s3://\u003cvar translate=\"no\"\u003eBUCKET1\u003c/var\u003e/\u003cvar translate=\"no\"\u003eOBJECT\u003c/var\u003e --custom-metadata=Key1=Value1\n\nMove an object: \n\n gdcloud storage mv s3://\u003cvar translate=\"no\"\u003eBUCKET1\u003c/var\u003e/\u003cvar translate=\"no\"\u003eOBJECT1\u003c/var\u003e s3://\u003cvar translate=\"no\"\u003eBUCKET2\u003c/var\u003e[/\u003cvar translate=\"no\"\u003eOBJECT2\u003c/var\u003e]\n\n| **Note:** The flags `--disable-multipart` and `--multipart-chunk-size-mb=SIZE` are not yet supported at this time."]]