אחסון אובייקטים באמצעות Google Cloud המסוף
איך מתחילים לעבוד עם Cloud Storage באמצעות מסוף Google Cloud .
העלויות של Cloud Storage מבוססות על המשאבים שבהם משתמשים. המדריך למתחילים הזה משתמש בדרך כלל במשאבים של Cloud Storage בשווי של פחות מ-0.01 דולר ארה"ב.
לחצו על תראו לי איך כדי לקרוא הסבר מפורט על המשימה ישירות במסוף Google Cloud :
לפני שמתחילים
- נכנסים לחשבון Google Cloud . אם אתם משתמשים חדשים ב- Google Cloud, צרו חשבון כדי שתוכלו להעריך את הביצועים של המוצרים שלנו בתרחישים מהעולם האמיתי. לקוחות חדשים מקבלים בחינם גם קרדיט בשווי 300$ להרצה, לבדיקה ולפריסה של עומסי העבודה.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Make sure that you have the following role or roles on the project: Storage Admin
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
- Click Grant access.
-
In the New principals field, enter your user identifier. This is typically the email address for a Google Account.
- Click Select a role, then search for the role.
- To grant additional roles, click Add another role and add each additional role.
- Click Save.
-
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Make sure that you have the following role or roles on the project: Storage Admin
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
- Click Grant access.
-
In the New principals field, enter your user identifier. This is typically the email address for a Google Account.
- Click Select a role, then search for the role.
- To grant additional roles, click Add another role and add each additional role.
- Click Save.
-
יצירת קטגוריה
קטגוריות הן הקונטיינרים הבסיסיים ששומרים את הנתונים שלכם ב-Cloud Storage.
כדי ליצור קטגוריה:
- במסוף Google Cloud , נכנסים לדף Buckets של Cloud Storage.
לוחצים על יצירה.
בקטע Get started (תחילת העבודה), מזינים שם ייחודי גלובלית לקטגוריה.
בקטע Choose where to store your data, בשדה Location type, בוחרים באפשרות Region. שימוש בערך ברירת המחדל בשדה הזה.
בקטע Choose how to store your data (בחירת אופן האחסון של הנתונים), משתמשים בערכי ברירת המחדל.
בקטע Choose how to control access to objects, מבטלים את הסימון בתיבת הסימון Enforce public access prevention on this bucket. כך תוכלו לשתף את האובייקט בהמשך.
בקטע Choose how to protect object data, משתמשים בערכי ברירת המחדל.
לוחצים על יצירה.
זהו, יצרתם קטגוריה של Cloud Storage!
העלאת אובייקט לקטגוריה
שומרים את התמונה הבאה במכשיר.

בדף Bucket details, בכרטיסייה Objects, לוחצים על Upload. אחר כך לוחצים על העלאת קבצים.
במכשיר, מאתרים את התמונה ששמרתם קודם ובוחרים אותה.
בסיום ההעלאה, צריכים להופיע שם הקובץ ופרטים לגביו כמו הגודל והסוג שלו.
הורדת האובייקט
כדי להוריד את התמונה מהקטגוריה, לוחצים על Download.
שיתוף האובייקט
כדי לתת גישה ציבורית לקטגוריה וליצור כתובת URL של התמונה שגלויה לכולם:
לוחצים על הכרטיסייה Permissions.
לוחצים על הענקת גישה.
בשדה New principals, מזינים
allUsers.ברשימה Select a role בוחרים באפשרות Cloud Storage. לאחר מכן בוחרים באפשרות Storage Object Viewer.
לוחצים על Save.
בתיבת הדו-שיח Are you sure you want to make this resource public? לוחצים על Allow public access.
כדי לוודא, לוחצים על הכרטיסייה Objects כדי לחזור אל רשימת האובייקטים. בעמודה Public access של האובייקט צריך להופיע Public to internet. הלחצן Copy URL מספק כתובת URL שניתנת לשיתוף, דומה לכתובת הבאה:
https://storage.googleapis.com/YOUR_BUCKET_NAME/kitten.png
כדי להסיר את הגישה הציבורית מהקטגוריה ולהפסיק את השיתוף של התמונה באופן ציבורי:
לוחצים על הכרטיסייה Permissions.
בעמודה Principal, מאתרים את החשבון הראשי allUsers ומסמנים את תיבת הסימון שמשויכת אליו.
לוחצים על הלחצן Remove Access (הסרת הגישה) ומאשרים כשמופיעה בקשה.
בכרטיסייה Objects, אתם אמורים לראות שכבר לא משויך לתמונה לחצן Copy URL.
יצירת תיקייה מדומה
בכרטיסייה Objects, לוחצים על Create folder.
בשדה שם מזינים
quickstart-folder.לוחצים על יצירה.
התיקייה המדומה מופיעה בקטגוריה עם סמל תיקייה שמבדיל אותה מאובייקטים.
כדי להעלות קובץ לתיקייה המדומה:
לוחצים על quickstart-folder.
לוחצים על העלאה ואז על העלאת קבצים.
במכשיר, מאתרים את התמונה ששמרתם קודם ובוחרים אותה.
בסיום ההעלאה, צריכים להופיע שם הקובץ ופרטים לגביו כמו הגודל והסוג שלו.
מחיקת האובייקטים
בחלונית Folder browser, לוחצים על שם הקטגוריה.
מסמנים את התיבה לצד quickstart-folder.
לוחצים על מחיקה ומאשרים כשמוצגת בקשה.
התיקייה המדומה וכל האובייקטים שבה נמחקים.
הסרת המשאבים
כדי לא לצבור חיובים לחשבון Google Cloud על המשאבים שבהם השתמשתם בדף הזה, פועלים לפי השלבים הבאים:
- במסוף Google Cloud , נכנסים לדף Buckets של Cloud Storage.
מסמנים את התיבה ליד הקטגוריה שיצרתם.
לוחצים על מחיקה ומאשרים כשמוצגת בקשה.
המאמרים הבאים
- עבודה עם המדריך למתחילים של Cloud Storage באמצעות Google Cloud CLI.
- סקירה כללית על המוצר Cloud Storage.
- מידע על סוגי אחסון.
- מידע על התמחור של Cloud Storage.
- מתחילים לעבוד עם ספריות הלקוח של Cloud Storage.