From 7cd1899fb1a4290664354fc8285ac9cd03bc4506 Mon Sep 17 00:00:00 2001 From: gurusai-voleti Date: Thu, 8 Jan 2026 10:36:55 +0000 Subject: [PATCH] chore: Migrate gsutil usage to gcloud storage --- pubsub/streaming-analytics/README.md | 8 ++++---- pubsublite/streaming-analytics/README.md | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pubsub/streaming-analytics/README.md b/pubsub/streaming-analytics/README.md index 89c1476b9c5..761ce88e09b 100644 --- a/pubsub/streaming-analytics/README.md +++ b/pubsub/streaming-analytics/README.md @@ -51,7 +51,7 @@ Dataflow]. BUCKET_NAME=your-gcs-bucket PROJECT_NAME=$(gcloud config get-value project) - gsutil mb gs://$BUCKET_NAME + gcloud storage buckets create gs://$BUCKET_NAME ``` 1. Start a [Google Cloud Scheduler] job that publishes one message to a [Google @@ -155,7 +155,7 @@ in the [GCP Console Storage page]. You may need to wait a few minutes for the files to appear. ```bash -gsutil ls gs://$BUCKET_NAME/samples/ +gcloud storage ls gs://$BUCKET_NAME/samples/ ``` ## Cleanup @@ -185,10 +185,10 @@ gsutil ls gs://$BUCKET_NAME/samples/ ```bash # Delete only the files created by this sample. - gsutil -m rm -rf "gs://$BUCKET_NAME/samples/output*" + gcloud storage rm --recursive --continue-on-error "gs://$BUCKET_NAME/samples/output*" # [optional] Remove the Cloud Storage bucket. - gsutil rb gs://$BUCKET_NAME + gcloud storage buckets delete gs://$BUCKET_NAME ``` [Google Cloud Pub/Sub]: https://cloud.google.com/pubsub/docs/ diff --git a/pubsublite/streaming-analytics/README.md b/pubsublite/streaming-analytics/README.md index 86fadffbe25..391d4b78f73 100644 --- a/pubsublite/streaming-analytics/README.md +++ b/pubsublite/streaming-analytics/README.md @@ -55,7 +55,7 @@ Resources needed for this example: export PROJECT_ID=$(gcloud config get-value project) export BUCKET=your-gcs-bucket - gsutil mb gs://$BUCKET + gcloud storage buckets create gs://$BUCKET ``` 1. Create a Pub/Sub Lite topic and subscription. Set `LITE_LOCATION` to a @@ -130,7 +130,7 @@ mvn compile exec:java \ Storage bucket. ```sh -gsutil ls "gs://$BUCKET/samples/output*" +gcloud storage ls "gs://$BUCKET/samples/output*" ``` ## (Optional) Creating a custom Dataflow template @@ -199,7 +199,7 @@ input parameters. 1. Delete the Cloud Storage objects: ```sh - gsutil -m rm -rf "gs://$BUCKET/samples/output*" + gcloud storage rm --recursive --continue-on-error "gs://$BUCKET/samples/output*" ``` 1. Delete the template image in Cloud Registry and delete the Flex template if @@ -207,13 +207,13 @@ input parameters. ```sh gcloud container images delete $TEMPLATE_IMAGE - gsutil rm $TEMPLATE_PATH + gcloud storage rm $TEMPLATE_PATH ``` 1. Delete the Cloud Storage bucket: ```sh - gsutil rb "gs://$BUCKET" + gcloud storage buckets delete "gs://$BUCKET" ``` [Apache Beam]: https://beam.apache.org/