List storage objects in projects

This page shows you how to list objects within Google Distributed Cloud (GDC) air-gapped storage buckets.

Before you begin

A project namespace manages bucket resources in the management API server. You must have a project to work with buckets and objects.

Required IAM roles

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

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

For more information, see 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 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 for the global API server.

List objects in storage buckets

Console

  1. In the navigation menu, click Object Storage.
  2. Click the name of the bucket containing the objects.
  3. Wait to be redirected to the Bucket details page with objects listed in a table.
  4. Click on an object's name and select either the Live Object tab or Version history tab to view further details.

gdcloud

List the objects in the top level directory of a bucket:

gdcloud storage ls s3://FULLY_QUALIFIED_BUCKET_NAME

List all versions of objects in the top level directory of a bucket:


gdcloud storage ls --all-versions s3://FULLY_QUALIFIED_BUCKET_NAME

List the objects in a bucket with a prefix:

gdcloud storage ls s3://FULLY_QUALIFIED_BUCKET_NAME/<Prefix>/

List all versions of objects in a bucket with a prefix:

gdcloud storage ls --all-versions s3://FULLY_QUALIFIED_BUCKET_NAME/<Prefix>/