Object storage in Google Distributed Cloud (GDC) air-gapped lets you copy files, update
custom metadata, and move objects across project buckets by using the
gdcloud CLI. These operations help you organize bucket contents,
track custom attributes, and prepare data for application workloads in your
project.

## Before you begin

Storage buckets are resources scoped to a specific [project](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform/pa-user/project-management.md.txt). The project acts as a container, grouping your buckets and enabling their management through the Management API server. Before you can perform the operations on this page, you must either create a new project or select an existing one where you have sufficient permissions.

### Required IAM roles

Contact your IAM Project Admin to request the following roles in your project
namespace:

- **Bucket Project Admin** (`project-bucket-admin`): create, update, and delete storage buckets.
- **Bucket Object Project Viewer** (`project-bucket-object-viewer`): view and check details of storage buckets and objects.

For more information, see [Grant bucket access](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/grant-obtain-storage-access.md.txt#grant_bucket_access).

### Prepare your environment

To run commands against the management API server or the global API server, do the following:

1. [Sign in and generate](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/iam/sign-in.md.txt#zonal-resources-kubeconfig) the kubeconfig file for the zonal management API server if you don't have one.
2. For dual-zone buckets, do the following:
   - Verify with your Infrastructure Operator (IO) that the `BucketLocationConfig` custom resource has been created for your paired zones.
   - [Generate the kubeconfig file](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/iam/sign-in.md.txt#global-resources-kubeconfig) for the global API server.

## Copy, modify, and move objects

Copy an object:

```bash
gdcloud storage cp FILE  [FILE...] s3://FULLY_QUALIFIED_BUCKET_NAME [/PREFIX ]
```

Modify an object's metadata:

```bash
gdcloud storage objects update s3://FULLY_QUALIFIED_BUCKET_NAME1/OBJECT --custom-metadata=Key1=Value1
```

Move an object:

When moving an object, a copy of the object moves to another location, either in the same bucket or to another path in the same bucket. After, the original object is deleted.

```bash
gdcloud storage mv s3://FULLY_QUALIFIED_BUCKET_NAME1/OBJECT1 s3://FULLY_QUALIFIED_BUCKET_NAME2[/OBJECT2]
```

> [!NOTE]
> **Note:** The flags `--disable-multipart` and `--multipart-chunk-size-mb=SIZE` are not yet supported at this time.