Questa pagina illustra i campi dei metadati archiviati insieme ai bucket in Cloud Storage.
Introduzione
Ai bucket Cloud Storage sono associati metadati. I metadati identificano le proprietà del bucket e specificano come deve essere gestito quando viene eseguito l'accesso.
I metadati vengono archiviati come coppie key: value, dove value può assumere diversi modi, tra cui stringhe, array o persino coppie key:value nidificate. Ad esempio, il nome del bucket è una stringa, mentre una configurazione di gestione del ciclo di vita degli oggetti del bucket è un array di regole in cui ogni regola contiene diverse coppie di figlikey: value.
La mutabilità dei metadati varia:
Alcuni puoi solo visualizzarli.
Alcune possono essere impostate solo al momento della creazione del bucket e non possono essere modificate o rimosse.
Alcuni puoi aggiungerli e modificarli, ma non rimuoverli.
Alcuni puoi aggiungerli, modificarli e rimuoverli in qualsiasi momento.
Metadati non modificabili
I seguenti metadati vengono impostati durante la creazione del bucket e non possono essere modificati o rimossi:
Il numero di generazione di un bucket identifica in modo univoco la versione del
bucket anche se più versioni di un bucket condividono lo stesso nome.
Il valore di generazione di un bucket non cambia mai.
Non è garantito che i numeri di generazione aumentino per le versioni successive, ma solo che ogni nuova versione abbia un numero di generazione univoco.
Non esiste alcuna relazione tra i numeri di generazione di bucket non correlati.
Numero di metagenerazione
Il numero di metagenerazione di un bucket identifica in modo univoco lo stato dei metadati del bucket. Il numero di metagenerazione è 1 al momento della creazione del bucket e aumenta ogni volta che modifichi i metadati del bucket.
Metadati modificabili
I metadati dei bucket modificabili sono metadati i cui valori in genere puoi modificare in qualsiasi momento. In alcuni casi, ad esempio se il bucket è soggetto a un
vincolo del criterio dell'organizzazione, esistono limitazioni alla modifica
di determinati valori dei metadati.
[[["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-05 UTC."],[],[],null,["# Bucket metadata\n\n[Get metadata](/storage/docs/getting-bucket-metadata)\n\n[Get bucket size](/storage/docs/getting-bucket-size)\n\nThis page discusses the metadata fields that are stored along with [buckets](/storage/docs/buckets)\nin Cloud Storage.\n\nIntroduction\n------------\n\nCloud Storage buckets have *metadata* associated with them. Metadata\nidentifies properties of the bucket and specifies how the bucket should be\nhandled when it's accessed.\n\nMetadata is stored as `key: value` pairs, where the `value` can take a variety\nof forms, including strings, arrays, or even nested `key:value` pairs. For\nexample, the bucket name is a string, while a bucket Object Lifecycle Management\nconfiguration is an array of rules in which each rule contains several child\n`key: value` pairs.\n\nThe mutability of metadata varies:\n\n- Some you can only view.\n\n- Some you can only set when the bucket is first [created](/storage/docs/creating-buckets), and cannot edit\n or remove.\n\n- Some you can add and edit, but not remove.\n\n- Some you can add, edit, and remove at any time.\n\nNon-editable metadata\n---------------------\n\nThe following metadata is set during bucket creation, and cannot be edited or\nremoved:\n\n- [Bucket name](/storage/docs/buckets#naming)\n\n- The [project](/storage/docs/projects) the bucket is a part of\n\n- Generation number\n\n - A bucket's generation number uniquely identifies the version of the\n bucket even if more than one version of a bucket share the same name.\n\n - A bucket's generation value never changes.\n\n - There is no guarantee that generation numbers increase for successive\n versions, only that each new version has a unique generation number.\n\n - There is no relationship between generation numbers of unrelated buckets.\n\n- Metageneration number\n\n - A bucket's metageneration number uniquely identifies the metadata state of the bucket. The metageneration number is `1` at the time of bucket creation and increases each time you modify the bucket's metadata.\n\nEditable metadata\n-----------------\n\nEditable bucket metadata is metadata whose values you can typically modify at\nany time. In some cases, such as the bucket being subject to an\n[organization policy constraint](/storage/docs/org-policy-constraints), there are restrictions on modifying\ncertain metadata values.\n\n^1^ This metadata cannot be viewed or managed using the XML API.\n\n^2^ You can use the XML API to set this metadata during bucket\ncreation, but not to view or manage this metadata.\n\nWhat's next\n-----------\n\n- Learn how to [view bucket metadata](/storage/docs/getting-bucket-metadata).\n- Read more about [object metadata](/storage/docs/metadata)."]]