Go 1.11 ha raggiunto la fine del supporto
e verrà
ritirato
il 31 gennaio 2026. Dopo il ritiro, non potrai eseguire il deployment delle applicazioni Go 1.11, anche se la tua organizzazione ha utilizzato in precedenza un criterio dell'organizzazione per riattivare i deployment dei runtime legacy. Le tue applicazioni Go
1.11 continueranno a essere eseguite e a ricevere traffico dopo la
data di ritiro. Ti
consigliamo di
eseguire la migrazione all'ultima versione supportata di Go.
Informazioni sulle funzionalità di Google Cloud Storage
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Bucket, oggetti e ACL
Un bucket è la posizione di archiviazione da cui leggi e scrivi file. Devi sempre specificare un bucket quando utilizzi la libreria client App Engine per Cloud Storage. Il tuo progetto può accedere a più bucket. Tieni presente che la libreria del client non supporta la creazione di bucket.
Gli elenchi di controllo dell'accesso (ACL) controllano l'accesso ai bucket e agli oggetti
contenuti al loro interno. Il progetto e l'app App Engine vengono aggiunti automaticamente all'ACL che consente l'accesso al bucket quando crei un bucket nel progetto.
Tieni presente che l'ACL che consente l'accesso al bucket è distinto dai potenzialmente numerosi ACL che regolano gli oggetti al suo interno. Pertanto, la tua app dispone dei privilegi di lettura e scrittura per i bucket per i quali è attivata, ma ha pieni diritti solo per gli oggetti che crea nel bucket. L'accesso della tua app agli oggetti
creati da altre app o persone è limitato ai diritti concessi alla tua app dal
creatore degli oggetti.
Se un oggetto viene creato nel bucket senza un ACL definito esplicitamente, viene utilizzato l'ACL predefinito dell'oggetto assegnato al bucket dal proprietario del bucket. Se il proprietario del bucket non ha specificato un ACL dell'oggetto predefinito, l'impostazione predefinita dell'oggetto è public-read
, il che significa che chiunque abbia accesso al bucket può leggere l'oggetto.
ACL e libreria client
Un'app che utilizza la libreria client può modificare l'ACL del bucket e anche specificare un ACL che controlla l'accesso agli oggetti che crea.
Le impostazioni ACL disponibili sono descritte nella documentazione dell'
API di archiviazione.
Modifica degli oggetti Cloud Storage
Una volta creato un oggetto in un bucket, non puoi modificarlo né aggiungervi elementi. Devi invece sovrascrivere l'oggetto con un nuovo oggetto con lo stesso nome che contenga le modifiche che ti interessano.
Cloud Storage e sottodirectory
La libreria client App Engine per Cloud Storage ti consente di specificare delimitatori di sottodirectory quando crei un oggetto, ma in Cloud Storage non esistono sottodirectory vere e proprie. Una sottodirectory in Cloud Storage fa invece parte del nome del file dell'oggetto.
Ad esempio, potresti supporre che la creazione di un oggettosomewhere/over/the/rainbow.mp3
consenta di memorizzare il file rainbow.mp3
nella
sottodirectory somewhere/over/the/
. Il nome dell'oggetto viene invece impostato su
somewhere/over/the/rainbow.mp3
.
Passaggi successivi
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-09-04 UTC.
[[["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."],[[["\u003cp\u003eThis API supports first-generation runtimes and can be used when upgrading to corresponding second-generation runtimes, with a migration guide available for App Engine Go 1.12+ runtime updates.\u003c/p\u003e\n"],["\u003cp\u003eA bucket serves as the storage location for reading and writing files, and it must be specified when using the App Engine client library, although the library does not support bucket creation.\u003c/p\u003e\n"],["\u003cp\u003eAccess control lists (ACLs) manage access to buckets and their contents, automatically granting your project and App Engine app bucket access, but object access depends on the creator's permissions.\u003c/p\u003e\n"],["\u003cp\u003eWhile the client library allows for subdirectory delimiters in object creation, Cloud Storage does not have true subdirectories; they are simply part of the object's filename.\u003c/p\u003e\n"],["\u003cp\u003eOnce an object is created in Cloud Storage it cannot be directly modified, and instead must be overwritten with a new object containing the desired changes.\u003c/p\u003e\n"]]],[],null,["# Understanding Google Cloud Storage Features\n\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| go\n| /services/access). If you are updating to the App Engine Go 1.12+ runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/go-differences) to learn about your migration options for legacy bundled services.\n\nBuckets, objects, and ACLs\n--------------------------\n\nA bucket is the storage location you read files from and write files to. You\nmust always specify a bucket when using the App Engine client library for\nCloud Storage. Your project can access multiple buckets. Note that the client\nlibrary doesn't support\n[bucket creation](/appengine/docs/legacy/standard/go111/googlecloudstorageclient/setting-up-cloud-storage#activating_a_cloud_storage_bucket).\n\nAccess control lists (ACLs) control access to the buckets and to the objects\ncontained in them. Your project and your App Engine app are automatically added\nto the ACL that permits bucket access when you create a bucket in your project.\n\nNote that the ACL that permits bucket access is distinct from the potentially\nmany ACLs governing the objects in that bucket. Thus, your app has read and\nwrite privileges to the bucket(s) it is activated for, but it only has full\nrights to the objects it creates in the bucket. Your app's access to objects\ncreated by other apps or persons is limited to the rights given to your app by\nthe objects' creator.\n\nIf an object is created in the bucket without an ACL explicitly defined for it,\nit uses the default object ACL assigned to the bucket by the bucket owner. If\nthe bucket owner has not specified a default object ACL, the object default is\n`public-read`, which means that anyone allowed bucket access can read the object.\n\nACLs and the client library\n---------------------------\n\nAn app using the client library can change the bucket ACL and can also specify an ACL that controls access to the objects it creates. The available ACL settings are described under documentation for the [storage API](/go/docs/reference/cloud.google.com/go/storage/latest#functions).\n\nModifying Cloud Storage objects\n-------------------------------\n\nOnce you create an object in a bucket, you cannot modify or append to it. Instead,\nyou must overwrite the object with a new object of the same name that contains\nyour desired changes.\n\nCloud Storage and subdirectories\n--------------------------------\n\nThe App Engine client library for Cloud Storage lets you supply subdirectory\ndelimiters when you create an object, but there are no true subdirectories in\nCloud Storage. Instead, a subdirectory in Cloud Storage is a part of the object\nfilename.\n\nFor example, you might assume that creating an object\n`somewhere/over/the/rainbow.mp3` would store the file `rainbow.mp3` in the\nsubdirectory `somewhere/over/the/`. Instead, the object name is set to\n`somewhere/over/the/rainbow.mp3`.\n\nWhat's next\n-----------\n\n- Visit the [API Reference documentation](https://godoc.org/cloud.google.com/go/storage).\n- Learn how to [set up Cloud Storage](/appengine/docs/legacy/standard/go111/googlecloudstorageclient/setting-up-cloud-storage)."]]