diff --git a/getting-started/update/README.md b/getting-started/update/README.md index c5044130..f1e12741 100644 --- a/getting-started/update/README.md +++ b/getting-started/update/README.md @@ -178,16 +178,15 @@ If you have no buckets in your project, use the [GCS guide] to select a name and then create the bucket: ```sh -gsutil mb gs://$BUCKET_NAME +gcloud storage buckets create gs://$BUCKET_NAME ``` The `gsutil` tool provides a single command to configure buckets to send notifications to Cloud Pub/Sub: ```sh -gsutil notifications create \ - -t projects/$GOOGLE_CLOUD_PROJECT/topics/gcs-updates -f json \ - gs://$BUCKET_NAME/ +gcloud storage buckets notifications create gs://$BUCKET_NAME/ \ + --topic=projects/$GOOGLE_CLOUD_PROJECT/topics/gcs-updates --payload-format=json # Output: Created Cloud Pub/Sub topic projects/.../topics/gcs-updates # Created notification config projects/_/buckets/$BUCKET_NAME/notificationConfigs/... ``` @@ -274,7 +273,7 @@ gcloud beta eventarc triggers create gcs-updates-trigger \ ### Use `gsutil` to create a new GCS Object ```sh -echo "The quick brown fox jumps over the lazy dog" | gsutil -q cp - gs://$BUCKET_NAME/fox.txt +echo "The quick brown fox jumps over the lazy dog" | gcloud storage cp - gs://$BUCKET_NAME/fox.txt # Output: none ``` @@ -344,6 +343,7 @@ gcloud container images delete gcr.io/$GOOGLE_CLOUD_PROJECT/getting-started-cpp/ ### Remove all the notification in the Bucket ```sh +# gsutil command 'notifications delete' with a bucket URL cannot be translated automatically. gcloud storage requires a specific notification ID or the --all flag. gsutil notifications delete gs://$BUCKET_NAME # Output: none ``` diff --git a/populate-bucket/README.md b/populate-bucket/README.md index 658a6fef..831b69d7 100644 --- a/populate-bucket/README.md +++ b/populate-bucket/README.md @@ -178,7 +178,7 @@ kubectl --namespace ${NAMESPACE} autoscale deployment worker --max 200 --min 1 ```bash BUCKET_NAME=${GOOGLE_CLOUD_PROJECT}-bucket-1000000 -gsutil mb -p ${GOOGLE_CLOUD_PROJECT} gs://${BUCKET_NAME} +gcloud storage buckets create gs://${BUCKET_NAME} --project=${GOOGLE_CLOUD_PROJECT} ``` ### Run the program locally to schedule the work