מחיקת מכונה באופן אסינכרוני

מחיקת מכונה באופן אסינכרוני.

דוגמת קוד

Python

במאמר ספריות הלקוח של Bigtable מוסבר איך להתקין את ספריית הלקוח ולהשתמש בה ב-Bigtable.

כדי לבצע אימות ב-Bigtable, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

from google.api_core.exceptions import NotFound

from google.cloud import bigtable_admin_v2

async with bigtable_admin_v2.BigtableInstanceAdminAsyncClient() as client:
    instance_path = client.instance_path(project_id, instance_id)

    print("\nDeleting instance")
    try:
        await client.delete_instance(name=instance_path)
        print(f"Deleted instance: {instance_id}")
    except NotFound:
        print(f"Instance {instance_id} does not exist.")

המאמרים הבאים

כדי לחפש ולסנן דוגמאות קוד למוצרים אחרים של Google Cloud , ראו דפדפן לדוגמה שלGoogle Cloud .