Go 1.11 telah mencapai akhir dukungan
dan akan
dihentikan penggunaannya
pada 31 Januari 2026. Setelah penghentian penggunaan, Anda tidak akan dapat men-deploy aplikasi Go 1.11, meskipun organisasi Anda sebelumnya menggunakan kebijakan organisasi untuk mengaktifkan kembali deployment runtime lama. Aplikasi Go 1.11 yang ada akan terus berjalan dan menerima traffic setelah
tanggal penghentiannya. Sebaiknya Anda
bermigrasi ke Go versi terbaru yang didukung.
Memahami Fitur Google Cloud Storage
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Bucket, objek, dan ACL
Bucket adalah lokasi penyimpanan tempat Anda membaca dan menulis file. Anda
harus selalu menentukan bucket saat menggunakan library klien App Engine untuk
Cloud Storage. Project Anda dapat mengakses beberapa bucket. Perlu diperhatikan bahwa library
klien tidak mendukung
pembuatan bucket.
Daftar kontrol akses (ACL) mengontrol akses ke bucket dan ke objek
yang ada di dalamnya. Project dan aplikasi App Engine Anda akan otomatis ditambahkan
ke ACL yang mengizinkan akses bucket saat Anda membuat bucket dalam project.
Perhatikan bahwa ACL yang mengizinkan akses bucket berbeda dengan kemungkinan
banyak ACL yang mengatur objek dalam bucket tersebut. Dengan demikian, aplikasi Anda memiliki hak istimewa baca dan
tulis ke bucket tempatnya diaktifkan, tetapi hanya memiliki
hak penuh atas objek yang dibuatnya di bucket. Akses aplikasi Anda ke objek
yang dibuat oleh aplikasi atau orang lain terbatas pada hak yang diberikan kepada aplikasi Anda oleh
pembuat objek.
Jika objek dibuat di bucket tanpa ACL yang ditentukan secara eksplisit untuknya,
objek tersebut akan menggunakan ACL objek default yang ditetapkan ke bucket oleh pemilik bucket. Jika
pemilik bucket belum menentukan ACL objek default, default objek adalah
public-read
, yang berarti bahwa siapa pun yang diizinkan akses bucket dapat membaca objek tersebut.
ACL dan library klien
Aplikasi yang menggunakan library klien dapat mengubah ACL bucket dan juga dapat menentukan ACL yang mengontrol akses ke objek yang dibuatnya.
Setelan ACL yang tersedia dijelaskan di bagian dokumentasi untuk
storage API.
Mengubah objek Cloud Storage
Setelah membuat objek dalam bucket, Anda tidak dapat memodifikasi atau menambahkannya. Sebagai gantinya,
Anda harus menimpa objek tersebut dengan objek baru bernama sama yang berisi
perubahan yang diinginkan.
Cloud Storage dan subdirektori
Dengan library klien App Engine untuk Cloud Storage, Anda dapat menyediakan pemisah subdirektori
saat membuat objek, tetapi tidak ada subdirektori yang sebenarnya di
Cloud Storage. Sebagai gantinya, subdirektori di Cloud Storage adalah bagian dari nama file
objek.
Misalnya, Anda mungkin berasumsi bahwa membuat objek
somewhere/over/the/rainbow.mp3
akan menyimpan file rainbow.mp3
di
subdirektori somewhere/over/the/
. Sebagai gantinya, nama objek ditetapkan ke
somewhere/over/the/rainbow.mp3
.
Langkah berikutnya
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-09-04 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)."]]