Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Gestire le funzionalità tramite i metadati
Questa pagina descrive come gestire alcune funzionalità dell'istanza di Vertex AI Workbench
modificando le coppie chiave-valore dei metadati dell'istanza.
Chiavi dei metadati
Per informazioni sulle funzionalità e sulle rispettive chiavi dei metadati,
consulta la tabella seguente.
Funzionalità
Descrizione
Chiave dei metadati
Valori accettati e predefiniti
Abilita Cloud Storage FUSE su un'immagine container
Monta /dev/fuse sul container e attiva
gcsfuse per l'utilizzo sul container.
container-allow-fuse
true: attiva Cloud Storage FUSE.
false (impostazione predefinita): non abilita Cloud Storage FUSE.
nbconvert
Consente di esportare e scaricare i notebook come tipo di file diverso.
true (impostazione predefinita): attiva gli attributi guest.
false: disattiva gli attributi degli ospiti.
Patch del sistema operativo pianificate
Pianifica gli aggiornamenti automatici del sistema operativo dell'istanza. In questo modo viene attivato il
servizio di upgrade
automatico di Debian e si applica solo alle immagini basate su VM.
install-unattended-upgrades
true: attiva gli aggiornamenti automatici del sistema operativo.
false (impostazione predefinita): disattiva gli aggiornamenti automatici del sistema operativo.
Utente Jupyter personalizzato
Specifica il nome dell'utente Jupyter predefinito. Questa impostazione
determina il nome della cartella per i tuoi blocchi note. Ad esempio,
invece della directory predefinita /home/jupyter/, puoi
modificare la directory in /home/CUSTOM_NAME.
Questa chiave di metadati non influisce sull'accesso all'istanza.
jupyter-user
Una stringa. Il valore predefinito è jupyter.
Download del file
Consente di scaricare file da JupyterLab.
notebook-disable-downloads
true: disattiva il download dei file.
false (impostazione predefinita): attiva il download dei file.
false (impostazione predefinita): attiva l'accesso al terminale.
Upgrade pianificati
Pianifica gli upgrade automatici dell'istanza.
notebook-upgrade-schedule
La pianificazione settimanale o mensile che hai impostato, nel
formato unix-cron, ad esempio 00 19 * * MON significa settimanale il
lunedì alle ore 19:00 del fuso orario di Greenwich (GMT).
Questa funzionalità è disattivata per impostazione predefinita.
Script post-avvio
Esegue uno script personalizzato dopo l'avvio.
post-startup-script
L'URI di uno script post-avvio in Cloud Storage, ad esempio:
gs://bucket/hello.sh. Questa funzionalità è disattivata per impostazione predefinita.
Comportamento dello script post-avvio
Definisce quando e come viene eseguito lo script post-avvio.
post-startup-script-behavior
run_once (impostazione predefinita): esegue lo script post-avvio
una volta dopo la creazione o l'upgrade dell'istanza.
run_every_start: esegue lo script post-avvio
dopo ogni avvio.
download_and_run_every_start: scarica di nuovo lo
script post-avvio dalla relativa origine, quindi lo esegue dopo
ogni avvio.
Segnalare l'integrità degli eventi
Controlla l'integrità ogni 30 secondi per le metriche VM.
report-event-health
true (impostazione predefinita): attiva la generazione di report sull'integrità degli eventi.
false: Disattiva i report sullo stato di integrità degli eventi.
Alcune chiavi dei metadati sono predefinite da Compute Engine. Per ulteriori
informazioni, consulta
Chiavi di metadati
predefinite.
Chiavi dei metadati protette
Alcune chiavi dei metadati sono riservate all'utilizzo esclusivo del sistema. Se assegni
valori a queste chiavi di metadati, i nuovi valori verranno sovrascritti dai
valori di sistema.
Le chiavi dei metadati riservate includono, a titolo esemplificativo:
data-disk-uri
enable-oslogin
framework
notebooks-api
notebooks-api-version
nvidia-driver-gcs-path
proxy-url
restriction
shutdown-script
title
version
Crea un'istanza con metadati specifici
Puoi creare un'istanza Vertex AI Workbench con metadati specifici
utilizzando la console Google Cloud , Google Cloud CLI,
Terraform o l'API Notebooks.
Console
Quando crei un'istanza di Vertex AI Workbench, puoi aggiungere
metadati nella sezione Ambiente di Opzioni avanzate.
gcloud
Quando crei un'istanza di Vertex AI Workbench, puoi aggiungere
metadati utilizzando il seguente comando:
Utilizza il metodo instances.patch con il valore dei metadati impostato su una stringa vuota e gce_setup.metadata in updateMask per rimuovere la funzionalità corrispondente.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[],[],null,["# Manage features through metadata\n================================\n\nThis page describes how to manage some Vertex AI Workbench instance features\nby modifying the instance's metadata key-value pairs.\n\nMetadata keys\n-------------\n\nFor information about features and their respective metadata keys,\nsee the following table.\n\nMetadata managed by Compute Engine\n----------------------------------\n\nSome of the metadata keys are predefined by Compute Engine. For more\ninformation, see\n[Predefined metadata\nkeys](/compute/docs/metadata/predefined-metadata-keys).\n\nProtected metadata keys\n-----------------------\n\nSome metadata keys are reserved for system use only. If you assign\nvalues to these metadata keys, the new values will be overwritten by the\nsystem values.\n\nReserved metadata keys include and are not limited to:\n\n- `data-disk-uri`\n- `enable-oslogin`\n- `framework`\n- `notebooks-api`\n- `notebooks-api-version`\n- `nvidia-driver-gcs-path`\n- `proxy-url`\n- `restriction`\n- `shutdown-script`\n- `title`\n- `version`\n\nCreate an instance with specific metadata\n-----------------------------------------\n\nYou can create a Vertex AI Workbench instance with specific metadata\nby using the Google Cloud console, the Google Cloud CLI,\nTerraform, or the Notebooks API. \n\n### Console\n\nWhen you create a Vertex AI Workbench instance, you can add\nmetadata in the **Environment** section of **Advanced options**.\n\n### gcloud\n\nWhen you create a Vertex AI Workbench instance, you can add\nmetadata by using the following command: \n\n```bash\ngcloud workbench instances create INSTANCE_NAME --metadata=KEY=VALUE\n```\n\n### Terraform\n\nTo add metadata, create the resource with metadata key-value pairs.\n\n\u003cbr /\u003e\n\nTo learn how to apply or remove a Terraform configuration, see\n[Basic Terraform commands](/docs/terraform/basic-commands).\n\n\u003cbr /\u003e\n\n resource \"google_workbench_instance\" \"default\" {\n name = \"workbench-instance-example\"\n location = \"us-central1-a\"\n\n gce_setup {\n machine_type = \"n1-standard-1\"\n vm_image {\n project = \"cloud-notebooks-managed\"\n family = \"workbench-instances\"\n }\n metadata = {\n key = \"value\"\n }\n }\n }\n\n### Notebooks API\n\nUse the [`instances.create`](/vertex-ai/docs/workbench/reference/rest/v2/projects.locations.instances/create)\nmethod with metadata values to manage the corresponding features.\n\nUpdate an instance's metadata\n-----------------------------\n\nYou can update the metadata of a Vertex AI Workbench instance\nby using the Google Cloud console, the Google Cloud CLI,\nTerraform, or the Notebooks API. \n\n### Console\n\nTo update the metadata of a Vertex AI Workbench instance,\ndo the following:\n\n1. In the Google Cloud console, go to the **Instances** page.\n\n [Go to Instances](https://console.cloud.google.com/vertex-ai/workbench/instances)\n2. In the list of instances, click the name of the instance that you want\n to update.\n\n3. On the **Instance details** page, click **Software and security**.\n\n4. In the **Metadata** section, update the metadata key-value pairs that\n you want to change.\n\n5. Click **Submit**.\n\n### gcloud\n\nYou can update the metadata on a Vertex AI Workbench instance\nby using the following command: \n\n```bash\ngcloud workbench instances update INSTANCE_NAME --metadata=KEY=VALUE\n```\n\n### Terraform\n\nYou can change the metadata key-value pairs to manage\nthe corresponding features on Vertex AI Workbench instances.\n\n\u003cbr /\u003e\n\nTo learn how to apply or remove a Terraform configuration, see\n[Basic Terraform commands](/docs/terraform/basic-commands).\n\n\u003cbr /\u003e\n\n resource \"google_workbench_instance\" \"default\" {\n name = \"workbench-instance-example\"\n location = \"us-central1-a\"\n\n gce_setup {\n machine_type = \"n1-standard-1\"\n vm_image {\n project = \"cloud-notebooks-managed\"\n family = \"workbench-instances\"\n }\n metadata = {\n key = \"updated_value\"\n }\n }\n }\n\n### Notebooks API\n\nUse the [`instances.patch`](/vertex-ai/docs/workbench/reference/rest/v2/projects.locations.instances/patch)\nmethod with metadata values and `gce_setup.metadata` in the `updateMask`\nto manage the corresponding features.\n\nRemove metadata from an instance\n--------------------------------\n\nYou can remove metadata from a Vertex AI Workbench instance\nby using the Google Cloud console, the Google Cloud CLI,\nTerraform, or the Notebooks API. \n\n### Console\n\nTo remove metadata from a Vertex AI Workbench instance,\ndo the following:\n\n1. In the Google Cloud console, go to the **Instances** page.\n\n [Go to Instances](https://console.cloud.google.com/vertex-ai/workbench/instances)\n2. In the list of instances, click the name of the instance that you want\n to modify.\n\n3. On the **Instance details** page, click **Software and security**.\n\n4. In the **Metadata** section, to the right of a key-value pair that\n you want to delete, click\n delete **Delete**.\n\n5. Click **Submit**.\n\n### gcloud\n\nYou can remove metadata from a Vertex AI Workbench instance\nby using the following command: \n\n```bash\ngcloud workbench instances update INSTANCE_NAME --metadata=KEY\n```\n\n### Terraform\n\nYou can remove metadata key-value pairs to manage the\ncorresponding features of a Vertex AI Workbench instance.\n\n\u003cbr /\u003e\n\nTo learn how to apply or remove a Terraform configuration, see\n[Basic Terraform commands](/docs/terraform/basic-commands).\n\n\u003cbr /\u003e\n\n resource \"google_workbench_instance\" \"default\" {\n name = \"workbench-instance-example\"\n location = \"us-central1-a\"\n\n gce_setup {\n machine_type = \"n1-standard-1\"\n vm_image {\n project = \"cloud-notebooks-managed\"\n family = \"workbench-instances\"\n }\n metadata = {\n }\n }\n }\n\n### Notebooks API\n\nUse the [`instances.patch`](/vertex-ai/docs/workbench/reference/rest/v2/projects.locations.instances/patch)\nmethod with the metadata value set to an empty string and\n`gce_setup.metadata` in the `updateMask` to remove the\ncorresponding feature."]]