Arcade Adventure: Google Cloud ML APIs | GSP277

Solution for Arcade Adventure: Google Cloud ML APIs | GSP277. 1 lab: GSP277. Fast copy-paste commands for Google Cloud.

GSP277 — APIs Explorer: Qwik Start

Estimated time: 10 minutes

# 🚀 APIs Explorer: Qwik Start | GSP277 > ⚠️ **Disclaimer:** This is an independent, community-made walkthrough created for educational purposes, hands-on practice, and Google Cloud certification preparation. This guide is designed to help learners understand Google APIs Explorer, Cloud Storage, access control, and the Cloud Vision API through practical exercises. Always attempt the lab yourself first and follow Google Cloud Skills Boost / Qwiklabs Terms of Service. This walkthrough is not affi

clear
# Professional ANSI Color Variables
CYAN='\033[1;36m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;34m'
RESET='\033[0m'
BOLD='\033[1m'

echo -e "${CYAN}${BOLD}"
echo "   ____       _    _ _             __   ___             "
echo "  / __ \     | |  (_) |           / _| / _ \            "
echo " | |  | |_ __| |__  _| |_  ___   | |_ | | | |_ __ ___  "
echo " | |  | | '__| '_ \| | __| / _ \ |  _|| | | | '_ \ / __| "
echo " | |__| | |  | |_) | | |_ | (_) || |  | |_| | |_) \__ \ "
echo "  \____/|_|  |_.__/|_|\__| \___/ |_|   \___/| .__/|___/ "
echo "                                            | |         "
echo "                                            |_|         "
echo -e "${RESET}"

echo -e "${YELLOW}▶ Detecting Project ID...${RESET}"
export PROJECT_ID=$(gcloud config get-value project)
export BUCKET_NAME="${PROJECT_ID}-bucket"

echo -e "${BLUE}▶ Creating Cloud Storage bucket (gs://${BUCKET_NAME})...${RESET}"
# Create bucket and explicitly disable Uniform Bucket-Level Access to allow fine-grained ACLs
gcloud storage buckets create gs://$BUCKET_NAME
gcloud storage buckets update gs://$BUCKET_NAME --no-uniform-bucket-level-access

echo -e "${YELLOW}▶ Downloading sample image 'demo-image.jpg'...${RESET}"
curl -L -o demo-image.jpg https://raw.githubusercontent.com/Orbit-of-Ops/Labs-Solutions/main/APIs%20Explorer%20Qwik%20Start/demo-image.jpg

echo -e "${BLUE}▶ Uploading image to Cloud Storage...${RESET}"
gcloud storage cp demo-image.jpg gs://$BUCKET_NAME/

echo -e "${CYAN}▶ Modifying Access Control List (ACL) to make the image public...${RESET}"
gsutil acl ch -u allUsers:R gs://$BUCKET_NAME/demo-image.jpg

echo -e "${GREEN}✓ Storage infrastructure successfully provisioned and ACLs applied! You may now click 'Check my progress' on all tasks in the lab page.${RESET}"