gdcloud compute instances add-metadata

שם

‫gdcloud compute instances add-metadata – הוספת מטא-נתונים למכונה וירטואלית.

SYNOPSIS

gdcloud compute instances add-metadata INSTANCE_NAME [flags]

דוגמאות

To add metadata for key "example-key" for a virtual machine instance named "example-instance" in project "example-project", run:

    gdcloud compute instances add-metadata example-instance --project example-project --metadata=example-key="example value"

To add metadata under key "important-data" to an instance named "example-instance" using file "example-file"
    gdcloud compute instances add-metadata example-instance --project example-project \
    --metadata-from-file=important-data=example-file.txt

דגלים אופציונליים

      --metadata stringToString             List of comma-separated key-value pair metadata to add to the virtual machine instance.
                                             For example, --metadata=key1="val1",key2="val2". At least one of the flags --metadata or --metadata-from-file is required. (default [])
      --metadata-from-file stringToString   List of comma-separated KEY=LOCAL_FILE_PATH metadata to add to the virtual machine instance. The value of the key is read from the file provided.
                                             For example, --metadata-from-file=key1=filepath1,key2=filepath2. At least one of the flags --metadata or --metadata-from-file is required. (default [])

GDCLOUD WIDE FLAGS

הדגלים האלה זמינים לכל הפקודות: --configuration, ‏ --format, ‏ --help, ‏ --project, ‏ --quiet.

מידע נוסף זמין בדף סקירה כללית של מדריך העזר ל-CLI של gcloud.