גישה Google Cloud לשירותים ולממשקי API

בדף הזה מוסבר איך לגשת ל Google Cloud שירותים ולממשקי API דרך מחברת Colab Enterprise.

סקירה כללית

כשמריצים קוד במחברת Colab Enterprise, אפשר לגשת לשירותים ולממשקי API באמצעות פרטי הכניסה שמשויכים לחשבון Google שלכם, שנקראים גם פרטי הכניסה של המשתמש. Google Cloud המשמעות היא שלסביבת זמן הריצה שבה אתם משתמשים יש את אותה רמת גישה ל- Google Cloud שיש למשתמש. כך קל יותר לכתוב ולהריץ קוד שמקיים אינטראקציה עם Google Cloud שירותים וממשקי API.

ב-Colab Enterprise אפשר להשתמש ב-Application Default Credentials ‏(ADC) כדי לאמת את פרטי הכניסה של המשתמש לשירותים ולממשקי API של Google Cloud . בדף הזה מתוארות הדרכים הבאות להעברת פרטי הכניסה של המשתמש ל-ADC:

לפני שמתחילים

  1. נכנסים לחשבון Google Cloud . אם אתם משתמשים חדשים ב- Google Cloud, צרו חשבון כדי שתוכלו להעריך את הביצועים של המוצרים שלנו בתרחישים מהעולם האמיתי. לקוחות חדשים מקבלים בחינם גם קרדיט בשווי 300$ להרצה, לבדיקה ולפריסה של עומסי העבודה.
  2. 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Agent Platform, Dataform, and Compute Engine APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the APIs