@google-cloud/storage - npm
文章推薦指數: 80 %
@google-cloud/storage. TypeScript icon, indicating that this package has built-in type declarations. 5.16.0 • Public • Published 21 days ago. @google-cloud/storage5.16.0 • Public • Published22daysagoReadmeExploreBETA19Dependencies1,291Dependents114Versions GoogleCloudStorage:Node.jsClient Node.jsidiomaticclientforCloudStorage. CloudStorageallowsworld-wide storageandretrievalofanyamountofdataatanytime.YoucanuseGoogle CloudStorageforarangeofscenariosincludingservingwebsitecontent, storingdataforarchivalanddisasterrecovery,ordistributinglargedata objectstousersviadirectdownload. Acomprehensivelistofchangesineachversionmaybefoundin theCHANGELOG. GoogleCloudStorageNode.jsClientAPIReference GoogleCloudStorageDocumentation github.com/googleapis/nodejs-storage ReadmoreabouttheclientlibrariesforCloudAPIs,includingtheolder GoogleAPIsClientLibraries,inClientLibrariesExplained. Tableofcontents: Quickstart Beforeyoubegin Installingtheclientlibrary Usingtheclientlibrary Samples Versioning Contributing License Quickstart Beforeyoubegin SelectorcreateaCloudPlatformproject. Enablebillingforyourproject. EnabletheGoogleCloudStorageAPI. Setupauthenticationwithaserviceaccountsoyoucanaccessthe APIfromyourlocalworkstation. Installingtheclientlibrary npminstall@google-cloud/storage Usingtheclientlibrary //ImportstheGoogleCloudclientlibrary const{Storage}=require('@google-cloud/storage'); //FormoreinformationonwaystoinitializeStorage,pleasesee //https://googleapis.dev/nodejs/storage/latest/Storage.html //CreatesaclientusingApplicationDefaultCredentials conststorage=newStorage(); //CreatesaclientfromaGoogleserviceaccountkey //conststorage=newStorage({keyFilename:'key.json'}); /** *TODO(developer):Uncommentthesevariablesbeforerunningthesample. */ //TheIDofyourGCSbucket //constbucketName='your-unique-bucket-name'; asyncfunctioncreateBucket(){ //Createsthenewbucket awaitstorage.createBucket(bucketName); console.log(`Bucket${bucketName}created.`); } createBucket().catch(console.error); Samples Samplesareinthesamples/directory.Eachsample'sREADME.mdhasinstructionsforrunningitssample. Sample SourceCode Tryit AddBucketConditionalBinding sourcecode AddBucketDefaultOwnerAcl sourcecode AddBucketIamMember sourcecode StorageAddBucketLabel. sourcecode AddBucketOwnerAcl sourcecode BucketWebsiteConfiguration. sourcecode AddFileOwnerAcl sourcecode StorageGetBucketMetadata. sourcecode ChangeBucket'sDefaultStorageClass. sourcecode StorageFileConvertCSEKtoCMEK. sourcecode StorageCombinefiles. sourcecode StorageConfigureBucketCors. sourcecode ConfigureRetries sourcecode CopyFile sourcecode CopyOldVersionOfFile. sourcecode CreateBucketWithStorageClassandLocation. sourcecode CreateNewBucket sourcecode CreateNotification sourcecode DeleteBucket sourcecode DeleteFile sourcecode DeleteNotification sourcecode DeleteOldVersionOfFile. sourcecode DisableBucketLifecycleManagement sourcecode StorageDisableBucketVersioning. sourcecode DisableDefaultEventBasedHold sourcecode DisableRequesterPays sourcecode DisableUniformBucketLevelAccess sourcecode DownloadEncryptedFile sourcecode DownloadFile sourcecode DownloadFileUsingRequesterPays sourcecode StorageDownloadPublicFile. sourcecode EnableBucketLifecycleManagement sourcecode StorageEnableBucketVersioning. sourcecode EnableDefaultEventBasedHold sourcecode EnableDefaultKMSKey sourcecode EnableRequesterPays sourcecode EnableUniformBucketLevelAccess sourcecode ChangeFile'sStorageClass. sourcecode StorageSetFileMetadata. sourcecode GenerateEncryptionKey sourcecode GenerateSignedUrl sourcecode GenerateV4ReadSignedUrl sourcecode GenerateV4SignedPolicy sourcecode GenerateV4UploadSignedUrl sourcecode GetDefaultEventBasedHold sourcecode GetMetadata sourcecode GetMetadataNotifications sourcecode GetPublicAccessPrevention sourcecode GetRequesterPaysStatus sourcecode GetRetentionPolicy sourcecode StorageGetServiceAccount. sourcecode GetUniformBucketLevelAccess sourcecode ActivateHMACSAKey. sourcecode CreateHMACSAKey. sourcecode DeactivateHMACSAKey. sourcecode DeleteHMACSAKey. sourcecode GetHMACSAKeyMetadata. sourcecode ListHMACSAKeysMetadata. sourcecode ListBuckets sourcecode ListFiles sourcecode ListFilesByPrefix sourcecode ListFilesPaginate sourcecode ListFileswithOldVersions. sourcecode ListNotifications sourcecode LockRetentionPolicy sourcecode StorageMakeBucketPublic. sourcecode MakePublic sourcecode MoveFile sourcecode PrintBucketAcl sourcecode PrintBucketAclForUser sourcecode PrintFileAcl sourcecode PrintFileAclForUser sourcecode Quickstart sourcecode ReleaseEventBasedHold sourcecode ReleaseTemporaryHold sourcecode RemoveBucketConditionalBinding sourcecode StorageRemoveBucketCorsConfiguration. sourcecode RemoveBucketDefaultOwner sourcecode RemoveBucketIamMember sourcecode StorageRemoveBucketLabel. sourcecode RemoveBucketOwnerAcl sourcecode RemoveDefaultKMSKey. sourcecode RemoveFileOwnerAcl sourcecode RemoveRetentionPolicy sourcecode RenameFile sourcecode RotateEncryptionKey sourcecode SetEventBasedHold sourcecode SetPublicAccessPreventionEnforced sourcecode SetPublicAccessPreventionInherited sourcecode SetPublicAccessPreventionUnspecified sourcecode SetRetentionPolicy sourcecode SetTemporaryHold sourcecode StreamFileDownload sourcecode StreamFileUpload sourcecode Uploadadirectorytoabucket. sourcecode UploadEncryptedFile sourcecode UploadFile sourcecode UploadFileWithKmsKey sourcecode ViewBucketIamMembers sourcecode TheGoogleCloudStorageNode.jsClientAPIReferencedocumentation alsocontainssamples. SupportedNode.jsVersions OurclientlibrariesfollowtheNode.jsreleaseschedule. Librariesarecompatiblewithallcurrentactiveandmaintenanceversionsof Node.js. Clientlibrariestargetingsomeend-of-lifeversionsofNode.jsareavailable,and canbeinstalledvianpmdist-tags. Thedist-tagsfollowthenamingconventionlegacy-(version). LegacyNode.jsversionsaresupportedasabesteffort: Legacyversionswillnotbetestedincontinuousintegration. Somesecuritypatchesmaynotbeabletobebackported. Dependencieswillnotbekeptup-to-date,andfeatureswillnotbebackported. Legacytagsavailable legacy-8:installclientlibrariesfromthisdist-tagforversions compatiblewithNode.js8. Versioning ThislibraryfollowsSemanticVersioning. ThislibraryisconsideredtobeGeneralAvailability(GA).Thismeansit isstable;thecodesurfacewillnotchangeinbackwards-incompatibleways unlessabsolutelynecessary(e.g.becauseofcriticalsecurityissues)orwith anextensivedeprecationperiod.IssuesandrequestsagainstGAlibraries areaddressedwiththehighestpriority. MoreInformation:GoogleCloudPlatformLaunchStages Contributing Contributionswelcome!SeetheContributingGuide. PleasenotethatthisREADME.md,thesamples/README.md, andavarietyofconfigurationfilesinthisrepository(including.nycrcandtsconfig.json) aregeneratedfromacentraltemplate.Toeditoneofthesefiles,makeanedit toitstemplatesin directory. License ApacheVersion2.0 SeeLICENSE KeywordsgoogleapisclientgoogleapiclientgoogleapisgoogleapigooglegooglecloudplatformgooglecloudcloudgooglestoragestorageInstallnpmi@google-cloud/storageRepositoryGitgithub.com/googleapis/nodejs-storageHomepagegithub.com/googleapis/nodejs-storage#readmeDownloadsWeeklyDownloads1,505,230Version5.16.0LicenseApache-2.0UnpackedSize621kBTotalFiles26Lastpublish22daysagoCollaboratorsTryonRunKitReportmalware
延伸文章資訊
- 1常見雲端儲存與資料庫服務計價方式與使用優勢 - iKala Cloud
本文介紹Cloud Storage、Cloud Datastore、Cloud Bigtable、Cloud SQL 這四項 ... 想了解Google Cloud 雲端儲存、資料庫歡迎閱讀更多...
- 2Cloud Storage - 備份 - Google Cloud
- 3Cloud Storage
Google Cloud partners integrate their industry-leading tools with Cloud Storage for enhanced supp...
- 4One 會員方案可協助你充分善用Google 服務的優勢
你可以與家人共享會員方案,除了在Google 雲端硬碟、Gmail 和Google 相簿中取得更多儲存空間外,還可享有專家諮詢服務及其他福利。
- 5Cloud Storage簡介- Google Cloud Platform In Practice - GitBook
Cloud Storage (GCS) 為Google新一代Object Storage,以Google Datacenter的規模,提供GCP的開發者使用。是為具備高性能、全球網際網路存取規模...