Store, Process, and Manage Data on Google Cloud - Command Line

목록
- Cloud Storage: Qwik Start - CLI/SDk ⬅️ 오늘의 Lab!
- Cloud Run Functions: Qwik Start - Command Line
- Pub/Sub: Qwik Start - Command Line
- Store, Process, and Manage Data on Google Cloud - Command Line: Challenge Lab
Google Cloud 명령줄을 사용하여 스토리지 버킷을 만들고, 여기에 객체를 업로드하고, 폴더 및 하위 폴더를 만들고, 객체에 공개적으로 액세스할 수 있도록 설정하는 방법을 해보자!

➡️ 실습을 위한 프로젝트 리전 설정
gcloud config set compute/region "REGION"
gcloud storage buckets create gs://<YOUR-BUCKET-NAME>
➡️ Cloud Shell에서 gcloud storage 명령어를 사용하여 Bucket 생성

curl https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Ada_Lovelace_portrait.jpg/800px-Ada_Lovelace_portrait.jpg --output ada.jpg
gcloud storage cp ada.jpg gs://YOUR-BUCKET-NAME

rm ada.jpg

gcloud storage cp -r gs://YOUR-BUCKET-NAME/ada.jpg .

gcloud storage cp gs://YOUR-BUCKET-NAME/ada.jpg gs://YOUR-BUCKET-NAME/image-folder/

gcloud storage ls gs://YOUR-BUCKET-NAME

gcloud storage ls -l gs://YOUR-BUCKET-NAME/ada.jpg

gcloud storage objects update gs://YOUR-BUCKET-NAME/ada.jpg --add-acl-grant=entity=allUsers,role=READER