Using object holds | Cloud Storage

文章推薦指數: 80 %
投票人數:10人

Placing an object hold · In the Google Cloud Console, go to the Cloud Storage Browser page. · In the list of buckets, click on the name of the bucket that has the ... WhyGoogle close DiscoverwhyleadingbusinesseschooseGoogleCloud Whetheryourbusinessisearlyinitsjourneyorwellonitswaytodigitaltransformation,GoogleCloudcanhelpyousolveyourtoughestchallenges. Learnmore Keybenefits Overview Topreasonsbusinesseschooseus. Multicloud Runyourappswhereveryouneedthem. Trustandsecurity Keepyourdatasecureandcompliant. Globalinfrastructure BuildonthesameinfrastructureasGoogle. Datacloud Unifydataacrossyourorganization. Opencloud Scalewithopen,flexibletechnology. Sustainability Runonthecleanestcloudintheindustry. Productivityandcollaboration ConnectyourteamswithAI-poweredapps. Resources Events BrowseupcomingGoogleCloudevents. Blog Readourlatestproductnewsandstories. Customerstories Explorecasestudiesandvideos. Analystreports Readwhatindustryanalystssayaboutus. Solutions close IndustrySolutions Reducecost,increaseoperationalagility,andcapturenewmarketopportunities. Retail Analyticsandcollaborationtoolsfortheretailvaluechain. ConsumerPackagedGoods SolutionsforCPGdigitaltransformationandbrandgrowth. FinancialServices Computing,datamanagement,andanalyticstoolsforfinancialservices. HealthcareandLifeSciences Health-specificsolutionstoenhancethepatientexperience. MediaandEntertainment Solutionsforcontentproductionanddistributionoperations. Telecommunications Hybridandmulti-cloudservicestodeployandmonetize5G. Gaming AI-drivensolutionstobuildandscalegamesfaster. Manufacturing MigrationandAItoolstooptimizethemanufacturingvaluechain. SupplyChainandLogistics Digitalsupplychainsolutionsbuiltinthecloud. Government Datastorage,AI,andanalyticssolutionsforgovernmentagencies. Education Teachingtoolstoprovidemoreengaginglearningexperiences. Notseeingwhatyou'relookingfor? Seeallindustrysolutions Notseeingwhatyou'relookingfor? Seeallsolutions ApplicationModernization Developandrunapplicationsanywhere,usingcloud-nativetechnologieslikecontainers,serverless,andservicemesh. HybridandMulti-cloudApplicationPlatform Platformformodernizinglegacyappsandbuildingnewapps. Cloud-NativeAppDevelopment End-to-endsolutionforbuilding,deploying,andmanagingapps. APIManagement AccelerateapplicationdesignanddevelopmentwithanAPI-firstapproach. ServerlessSolutions Fullymanagedenvironmentfordeveloping,deployingandscalingapps. DevOps ProcessesandresourcesforimplementingDevOpsinyourorg. ContinuousDelivery(CD) End-to-endautomationfromsourcetoproduction. ContinuousIntegration(CI) Fastfeedbackoncodechangesatscale. MainframeModernization Automatedtoolsandprescriptiveguidanceformovingtothecloud. CAMP ProgramthatusesDORAtoimproveyoursoftwaredeliverycapabilities. Hosting Servicesandinfrastructureforbuildingwebappsandwebsites. SiteReliabilityEngineering(SRE) ToolsandresourcesforadoptingSREinyourorg. ArtificialIntelligence AddintelligenceandefficiencytoyourbusinesswithAIandmachinelearning. BuildanduseAI Productstobuildanduseartificialintelligence. ContactCenterAI AImodelforspeakingwithcustomersandassistinghumanagents. AgentAssist AI-poweredconversationswithhumanagents. CloudTalentSolution AIwithjobsearchandtalentacquisitioncapabilities. DocumentAI MachinelearningandAItounlockinsightsfromyourdocuments. LendingDocAI Mortgagedocumentdatacaptureatscalewithmachinelearning. ProcurementDocAI Procurementdocumentdatacaptureatscalewithmachinelearning. Intelligentproducts CreateengagingproductownershipexperienceswithAI. DataScience PutyourdatatoworkwithDataScienceonGoogleCloud. ContractDocAI SpecializedAIforbetteringcontractunderstanding. ContactCenterAIInsights AI-poweredunderstandingtobettercustomerexperience. BusinessApplicationPlatform Speedupthepaceofinnovationwithoutcoding,usingAPIs,apps,andautomation. NewBusinessChannelsUsingAPIs Attractandempoweranecosystemofdevelopersandpartners. UnlockingLegacyApplicationsUsingAPIs Cloudservicesforextendingandmodernizinglegacyapps. OpenBankingAPIx SimplifyandacceleratesecuredeliveryofopenbankingcompliantAPIs. Databases Migrateandmanageenterprisedatawithsecurity,reliability,highavailability,andfullymanageddataservices. DatabaseMigration Guidesandtoolstosimplifyyourdatabasemigrationlifecycle. DatabaseModernization Upgradestomodernizeyouroperationaldatabaseinfrastructure. GoogleCloudDatabases Databaseservicestomigrate,manage,andmodernizedata. MigrateOracleworkloadstoGoogleCloud Rehost,replatform,rewriteyourOracleworkloads. OpenSourceDatabases Fullymanagedopensourcedatabaseswithenterprise-gradesupport. SQLServeronGoogleCloud OptionsforrunningSQLServervirtualmachinesonGoogleCloud. DataCloud Unifydataacrossyourorganizationwithanopenandsimplifiedapproachtodata-driventransformationthatisunmatchedforspeed,scale,andsecuritywithAIbuilt-in. Databasessolutions Migrateandmanageenterprisedatawithsecurity,reliability,highavailability,andfullymanageddataservices. Smartanalyticssolutions Generateinstantinsightsfromdataatanyscalewithaserverless,fullymanagedanalyticsplatformthatsignificantlysimplifiesanalytics. AIsolutions AddintelligenceandefficiencytoyourbusinesswithAIandmachinelearning. DigitalTransformation Acceleratebusinessrecoveryandensureabetterfuturewithsolutionsthatenablehybridandmulti-cloud,generateintelligentinsights,andkeepyourworkersconnected. BusinessContinuity Proactivelyplanandprioritizeworkloads. DigitalInnovation Reimagineyouroperationsandunlocknewopportunities. OperationalEfficiency Prioritizeinvestmentsandoptimizecosts. COVID-19Solutions Getworkdonemoresafelyandsecurely. COVID-19SolutionsfortheHealthcareIndustry HowGoogleishelpinghealthcaremeetextraordinarychallenges. InfrastructureModernization MigratequicklywithsolutionsforSAP,VMware,Windows,Oracle,andotherworkloads. ApplicationMigration Discoveryandanalysistoolsformovingtothecloud. SAPonGoogleCloud CertificationsforrunningSAPapplicationsandSAPHANA. HighPerformanceComputing Compute,storage,andnetworkingoptionstosupportanyworkload. WindowsonGoogleCloud ToolsandpartnersforrunningWindowsworkloads. DataCenterMigration MigrationsolutionsforVMs,apps,databases,andmore. ActiveAssist Automaticcloudresourceoptimizationandincreasedsecurity. VirtualDesktops Remoteworksolutionsfordesktopsandapplications(VDI&DaaS). RapidAssessment&MigrationProgram(RAMP) End-to-endmigrationprogramtosimplifyyourpathtothecloud. BackupandDisasterRecovery Ensureyourbusinesscontinuityneedsaremet. ProductivityandCollaboration Changethewayteamsworkwithsolutionsdesignedforhumansandbuiltforimpact. GoogleWorkspace Collaborationandproductivitytoolsforenterprises. GoogleWorkspaceEssentials Securevideomeetingsandmoderncollaborationforteams. CloudIdentity UnifiedplatformforITadminstomanageuserdevicesandapps. ChromeEnterprise ChromeOS,ChromeBrowser,andChromedevicesbuiltforbusiness. CloudSearch Enterprisesearchforemployeestoquicklyfindcompanyinformation. Security Detect,investigate,andrespondtoonlinethreatstohelpprotectyourbusiness. SecurityAnalyticsandOperations Solutionforanalyzingpetabytesofsecuritytelemetry. WebAppandAPIProtection ThreatandfraudprotectionforyourwebapplicationsandAPIs. SecurityandResilienceFramework Solutionsforeachphaseofthesecurityandresiliencelifecycle. Riskandcomplianceascode(RCaC) Solutiontomodernizeyourgovernance,risk,andcompliancefunctionwithautomation. SmartAnalytics Generateinstantinsightsfromdataatanyscalewithaserverless,fullymanagedanalyticsplatformthatsignificantlysimplifiesanalytics. DataWarehouseModernization Datawarehousetojumpstartyourmigrationandunlockinsights. DataLakeModernization Servicesforbuildingandmodernizingyourdatalake. SparkonGoogleCloud RunandwriteSparkwhereyouneedit,serverlessandintegrated. StreamAnalytics Insightsfromingesting,processing,andanalyzingeventstreams. BusinessIntelligence SolutionsformodernizingyourBIstackandcreatingrichdataexperiences. DataScience PutyourdatatoworkwithDataScienceonGoogleCloud. MarketingAnalytics Solutionsforcollecting,analyzing,andactivatingcustomerdata. GeospatialAnalyticsandAI Solutionsforbuildingamoreprosperousandsustainablebusiness. Datasets DatafromGoogle,public,andcommercialproviderstoenrichyouranalyticsandAIinitiatives. StartupsandSMB AcceleratestartupandSMBgrowthwithtailoredsolutionsandprograms. StartupSolutions GrowyourstartupandsolveyourtoughestchallengesusingGoogle’sproventechnology. StartupProgram Getfinancial,business,andtechnicalsupporttotakeyourstartuptothenextlevel. SmallandMediumBusiness Exploresolutionsforwebhosting,appdevelopment,AI,andanalytics. SoftwareasaService BuildbetterSaaSproducts,scaleefficiently,andgrowyourbusiness. Products close FeaturedProducts ComputeEngine VirtualmachinesrunninginGoogle’sdatacenter. CloudStorage Objectstoragethat’ssecure,durable,andscalable. CloudSDK Command-linetoolsandlibrariesforGoogleCloud. CloudSQL RelationaldatabaseserviceforMySQL,PostgreSQLandSQLServer. GoogleKubernetesEngine Managedenvironmentforrunningcontainerizedapps. BigQuery Datawarehouseforbusinessagilityandinsights. CloudCDN Contentdeliverynetworkfordeliveringwebandvideo. Dataflow Streaminganalyticsforstreamandbatchprocessing. Operations Monitoring,logging,andapplicationperformancesuite. CloudRun Fullymanagedenvironmentforrunningcontainerizedapps. Anthos Platformformodernizingexistingappsandbuildingnewones. Notseeingwhatyou'relookingfor? Seeallproducts(100+) AIandMachineLearning VertexAI UnifiedMLPlatformfortraining,hosting,andmanagingMLmodels. Speech-to-Text Speechrecognitionandtranscriptionsupporting125languages. VisionAI Customandpre-trainedmodelstodetectemotion,text,more. Text-to-Speech Speechsynthesisin220+voicesand40+languages. CloudTranslation Languagedetection,translation,andglossarysupport. CloudNaturalLanguage Sentimentanalysisandclassificationofunstructuredtext. AutoML Custommachinelearningmodeltraininganddevelopment. VideoAI Videoclassificationandrecognitionusingmachinelearning. AIInfrastructure Optionsforeverybusinesstotraindeeplearningandmachinelearningmodelscost-effectively. Dialogflow Conversationapplicationsandsystemsdevelopmentsuiteforvirtualagents. AutoMLTables ServicefortrainingMLmodelswithstructureddata. Notseeingwhatyou'relookingfor? SeeallAIandmachinelearningproducts APIManagement ApigeeAPIManagement ManagethefulllifecycleofAPIsanywherewithvisibilityandcontrol. ApigeeIntegration API-firstintegrationtoconnectexistingdataandapplications. CloudEndpoints DeploymentanddevelopmentmanagementforAPIsonGoogleCloud. CloudHealthcareAPI SolutiontobridgeexistingcaresystemsandappsonGoogleCloud. AppSheet No-codedevelopmentplatformtobuildandextendapplications. APIGateway Develop,deploy,secure,andmanageAPIswithafullymanagedgateway. Compute ComputeEngine VirtualmachinesrunninginGoogle’sdatacenter. AppEngine Serverlessapplicationplatformforappsandbackends. CloudGPUs GPUsforML,scientificcomputing,and3Dvisualization. MigrateforComputeEngine ServerandvirtualmachinemigrationtoComputeEngine. SpotVMs Computeinstancesforbatchjobsandfault-tolerantworkloads. ShieldedVMs ReinforcedvirtualmachinesonGoogleCloud. Sole-TenantNodes Dedicatedhardwareforcompliance,licensing,andmanagement. BareMetal InfrastructuretorunspecializedworkloadsonGoogleCloud. Recommender UsagerecommendationsforGoogleCloudproductsandservices. VMwareEngine Fullymanaged,nativeVMwareCloudFoundationsoftwarestack. CloudRun Fullymanagedenvironmentforrunningcontainerizedapps. Notseeingwhatyou'relookingfor? Seeallcomputeproducts Containers GoogleKubernetesEngine Managedenvironmentforrunningcontainerizedapps. ContainerRegistry Registryforstoring,managing,andsecuringDockerimages. ContainerSecurity Containerenvironmentsecurityforeachstageofthelifecycle. CloudBuild SolutionforrunningbuildstepsinaDockercontainer. DeepLearningContainers Containerswithdatascienceframeworks,libraries,andtools. KubernetesApplications Containerizedappswithprebuiltdeploymentandunifiedbilling. ArtifactRegistry Packagemanagerforbuildartifactsanddependencies. Knative ComponentstocreateKubernetes-nativecloud-basedsoftware. CloudRun Fullymanagedenvironmentforrunningcontainerizedapps. CloudCode IDEsupporttowrite,run,anddebugKubernetesapplications. DataAnalytics BigQuery Datawarehouseforbusinessagilityandinsights. Looker PlatformforBI,dataapplications,andembeddedanalytics. Dataflow Streaminganalyticsforstreamandbatchprocessing. Pub/Sub Messagingserviceforeventingestionanddelivery. Dataproc ServiceforrunningApacheSparkandApacheHadoopclusters. CloudDataFusion Dataintegrationforbuildingandmanagingdatapipelines. CloudComposer WorkfloworchestrationservicebuiltonApacheAirflow. Dataprep Servicetopreparedataforanalysisandmachinelearning. Dataplex Intelligentdatafabricforunifyingdatamanagementacrosssilos. DataCatalog Metadataservicefordiscovering,understanding,andmanagingdata. AnalyticsHub Serviceforsecurelyandefficientlyexchangingdataanalyticsassets. Notseeingwhatyou'relookingfor? Seealldataanalyticsproducts Databases CloudBigtable Cloud-nativewide-columndatabaseforlargescale,low-latencyworkloads. Firestore Cloud-nativedocumentdatabaseforbuildingrichmobile,web,andIoTapps. Memorystore In-memorydatabaseformanagedRedisandMemcached. CloudSpanner Cloud-nativerelationaldatabasewithunlimitedscaleand99.999%availability. CloudSQL FullymanageddatabaseforMySQL,PostgreSQL,andSQLServer. DatabaseMigrationService Serverless,minimaldowntimemigrationstoCloudSQL. BareMetalSolutionforOracle InfrastructuretorunspecializedOracleworkloadsonGoogleCloud. FirebaseRealtimeDatabase NoSQLdatabaseforstoringandsyncingdatainrealtime. Datastream Serverlesschangedatacaptureandreplicationservice. DeveloperTools ArtifactRegistry Universalpackagemanagerforbuildartifactsanddependencies. CloudBuild Continuousintegrationandcontinuousdeliveryplatform. CloudCode IDEsupporttowrite,run,anddebugKubernetesapplications. CloudDeploymentManager ServiceforcreatingandmanagingGoogleCloudresources. CloudSDK CommandlinetoolsandlibrariesforGoogleCloud. CloudScheduler Cronjobschedulerfortaskautomationandmanagement. CloudSourceRepositories PrivateGitrepositorytostore,manage,andtrackcode. CloudTasks Taskmanagementserviceforasynchronoustaskexecution. GoogleCloudDeploy FullymanagedcontinuousdeliverytoGoogleKubernetesEngine. Tekton Kubernetes-nativeresourcesfordeclaringCI/CDpipelines. ToolsforPowerShell FullcloudcontrolfromWindowsPowerShell. Notseeingwhatyou'relookingfor? Seealldevelopertools HealthcareandLifeSciences ApigeeHealthcareAPIx FHIRAPI-baseddigitalserviceproduction. CloudHealthcareAPI SolutionforbridgingexistingcaresystemsandappsonGoogleCloud. CloudLifeSciences Toolsformanaging,processing,andtransformingbiomedicaldata. HealthcareNaturalLanguageAI Real-timeinsightsfromunstructuredmedicaltext. HybridandMulticloud Anthos Platformformodernizingexistingappsandbuildingnewones. Looker PlatformforBI,dataapplications,andembeddedanalytics. CloudRunforAnthos IntegrationthatprovidesaserverlessdevelopmentplatformonGKE. GoogleCloudMarketplaceforAnthos Containerizedappswithprebuiltdeploymentandunifiedbilling. MigrateforAnthos TooltomoveworkloadsandexistingapplicationstoGKE. Operations Monitoring,logging,andapplicationperformancesuite. CloudBuild ServiceforexecutingbuildsonGoogleCloudinfrastructure. TrafficDirector Trafficcontrolpaneandmanagementforopenservicemesh. ApigeeAPIManagement APImanagement,development,andsecurityplatform. GoogleDistributedCloud Fullymanagedsolutionsfortheedgeanddatacenters. InternetofThings CloudIoTCore IoTdevicemanagement,integration,andconnectionservice. EdgeTPU ASICdesignedtorunMLinferenceandAIattheedge. ManagementTools AnthosConfigManagement Automatepolicyandsecurityforyourdeployments. CarbonFootprint DashboardtoviewandexportGoogleCloudcarbonemissionsreports. CloudAPIs ProgrammaticinterfacesforGoogleCloudservices. CloudConsole Web-basedinterfaceformanagingandmonitoringcloudapps. CloudMobileApp ApptomanageGoogleCloudservicesfromyourmobiledevice. CloudShell Interactiveshellenvironmentwithabuilt-incommandline. ConfigConnector Kubernetesadd-onformanagingGoogleCloudresources. CostManagement Toolsformonitoring,controlling,andoptimizingyourcosts. IntelligentManagement Toolsforeasilymanagingperformance,security,andcost. PrivateCatalog Servicecatalogforadminsmanaginginternalenterprisesolutions. TerraformonGoogleCloud OpensourcetooltoprovisionGoogleCloudresourceswithdeclarativeconfigurationfiles. MediaandGaming GameServers GameservermanagementservicerunningonGoogleKubernetesEngine. OpenCue Opensourcerendermanagerforvisualeffectsandanimation. TranscoderAPI Convertvideofilesandpackagethemforoptimizeddelivery. Migration ApplicationMigration Appmigrationtothecloudforlow-costrefreshcycles. BigQueryDataTransferService DataimportserviceforschedulingandmovingdataintoBigQuery. CloudFoundationToolkit ReferencetemplatesforDeploymentManagerandTerraform. DatabaseMigrationService Serverless,minimaldowntimemigrationstoCloudSQL. MigrateforAnthos ComponentsformigratingVMsintosystemcontainersonGKE. MigrateforComputeEngine ComponentsformigratingVMsandphysicalserverstoComputeEngine. RapidAssessment&MigrationProgram(RAMP) End-to-endmigrationprogramtosimplifyyourpathtothecloud. TransferAppliance StorageserverformovinglargevolumesofdatatoGoogleCloud. StorageTransferService Datatransfersfromonlineandon-premisessourcestoCloudStorage. VMwareEngine MigrateandrunyourVMwareworkloadsnativelyonGoogleCloud. Networking CloudArmor SecuritypoliciesanddefenseagainstwebandDDoSattacks. CloudCDN Contentdeliverynetworkforservingwebandvideocontent. CloudDNS Domainnamesystemforreliableandlow-latencynamelookups. CloudLoadBalancing Servicefordistributingtrafficacrossapplicationsandregions. CloudNAT NATserviceforgivingprivateinstancesinternetaccess. HybridConnectivity ConnectivityoptionsforVPN,peering,andenterpriseneeds. NetworkConnectivityCenter Connectivitymanagementtohelpsimplifyandscalenetworks. NetworkIntelligenceCenter Networkmonitoring,verification,andoptimizationplatform. NetworkServiceTiers Cloudnetworkoptionsbasedonperformance,availability,andcost. NetworkTelemetry VPCflowlogsfornetworkmonitoring,forensics,andsecurity. TrafficDirector Trafficcontrolpaneandmanagementforopenservicemesh. Notseeingwhatyou'relookingfor? Seeallnetworkingproducts Operations CloudLogging GoogleCloudaudit,platform,andapplicationlogsmanagement. CloudMonitoring Infrastructureandapplicationhealthwithrichmetrics. ErrorReporting Applicationerroridentificationandanalysis. KubernetesEngineMonitoring GKEappdevelopmentandtroubleshooting. CloudTrace Tracingsystemcollectinglatencydatafromapplications. CloudProfiler CPUandheapprofilerforanalyzingapplicationperformance. CloudDebugger Real-timeapplicationstateinspectionandin-productiondebugging. IntelligentOperations Toolsforeasilyoptimizingperformance,security,andcost. SecurityandIdentity CloudIAM PermissionsmanagementsystemforGoogleCloudresources. AssuredWorkloads Complianceandsecuritycontrolsforsensitiveworkloads. CloudKeyManagement ManageencryptionkeysonGoogleCloud. ConfidentialComputing EncryptdatainusewithConfidentialVMs. SecurityCommandCenter PlatformfordefendingagainstthreatstoyourGoogleCloudassets. CloudDataLossPrevention Sensitivedatainspection,classification,andredactionplatform. ManagedServiceforMicrosoftActiveDirectory HardenedservicerunningMicrosoft®ActiveDirectory(AD). AccessTransparency Cloudprovidervisibilitythroughnearreal-timelogs. TitanSecurityKey Two-factorauthenticationdeviceforuseraccountprotection. SecretManager StoreAPIkeys,passwords,certificates,andothersensitivedata. BeyondCorpEnterprise Zerotrustsolutionforsecureapplicationandresourceaccess. Notseeingwhatyou'relookingfor? Seeallsecurityandidentityproducts ServerlessComputing CloudRun Fullymanagedenvironmentforrunningcontainerizedapps. CloudFunctions Platformforcreatingfunctionsthatrespondtocloudevents. AppEngine Serverlessapplicationplatformforappsandbackends. Workflows WorkfloworchestrationforserverlessproductsandAPIservices. Storage AllStorageProducts Cloud-basedstorageservicesforyourbusiness. CloudStorage Objectstoragethat’ssecure,durable,andscalable. Filestore Filestoragethatishighlyscalableandsecure. PersistentDisk BlockstorageforvirtualmachineinstancesrunningonGoogleCloud. CloudStorageforFirebase Objectstorageforstoringandservinguser-generatedcontent. LocalSSD Blockstoragethatislocallyattachedforhigh-performanceneeds. ArchivalStorage Dataarchivethatoffersonlineaccessspeedatultralowcost. StorageTransferService Datatransfersfromonlineandon-premisessourcestoCloudStorage. GoogleWorkspaceEssentials Securevideomeetingsandmoderncollaborationforteams. Pricing close Savemoneywithourtransparentapproachtopricing GoogleCloud'spay-as-you-gopricingoffersautomaticsavingsbasedonmonthlyusageanddiscountedratesforprepaidresources.Contactustodaytogetaquote. Requestaquote GoogleCloud Pricingoverview Payonlyforwhatyouusewithnolock-in. Pricelist Getpricingdetailsforindividualproducts. Pricingcalculator Calculateyourcloudsavings. GoogleCloudFreeProgram $300infreecreditsand20+freeproducts. RelatedProducts GoogleWorkspace GoogleMapsPlatform ChromeEnterprise Apigee Looker Firebase Gettingstarted close GetstartedwithGoogleCloud Startbuildingrightawayonoursecure,intelligentplatform.Newcustomersget$300infreecreditstousetowardGoogleCloudproductsandservices. Getstartedforfree Self-serviceResources Quickstarts Viewshorttutorialstohelpyougetstarted. Bestpractices Exploredocsforcommonworkloads. GoogleCloudcertification Prepareandregisterforcertifications. Experthelpandtraining Consulting Partnerwithourexpertsoncloudprojects. TechnicalAccountManagement GetongoingguidancefromGoogle. Training Enrollinon-demandorclassroomtraining. Partnersandthird-partytools GoogleCloudpartners Explorebenefitsofworkingwithapartner. Becomeapartner JointhePartnerAdvantageprogram. GoogleCloudMarketplace Deployready-to-gosolutionsinafewclicks. Morewaystogetstarted Docs Support Docs Support Language English Deutsch Español–AméricaLatina Français Português–Brasil 中文–简体 日本語 한국어 Signin CloudStorage Overview Guides Reference Samples Support Resources ContactUs Getstartedforfree WhyGoogle More Solutions More Products More Pricing More Gettingstarted More Docs Overview Guides Reference Samples Support Resources Support Console ContactUs Getstartedforfree CloudStorage WhatisCloudStorage? ProductOverview Quickstarts Allquickstarts UsingtheConsole Usingthegsutiltool Samples AllCloudStoragecodesamples Allcodesamplesforallproducts How-toguides Allhow-toguides CreatingbucketsCreatingstoragebucketsBucketnamingguidelinesBucketlocationsStorageclassesDomain-namedbucketverification WorkingwithbucketsListingbuckets BucketmetadataOverviewGettingbucketinformationChangingthedefaultstorageclassofabucketMovingandrenamingbucketsLabelingbuckets RequesterPaysOverviewUsingRequesterPaysDeletingbuckets UploadinganddownloadingobjectsOverviewUploadingobjectsDownloadingobjects ResumableuploadsOverviewPerformingresumableuploadsXMLAPImultipartuploadsStreamingtransfers WorkingwithobjectsObjectnamingguidelinesListingobjectsCopying,renaming,andmovingobjectsChangingobjectstorageclasses ObjectmetadataOverviewViewingandeditingobjectmetadata CompositeobjectsOverviewComposingobjectsDeletingobjects Controllingdatalifecycles ObjectVersioningOverviewUsingObjectVersioningWorkingwithversionedobjects RetentionpoliciesandretentionpolicylocksOverviewUsingandlockingretentionpolicies ObjectholdsOverviewUsingobjectholds ObjectLifecycleManagementOverviewManagingobjectlifecycles ControllingaccessOverviewofaccesscontrolMakingdatapublicAccessingpublicdata CloudIdentityandAccessManagement(IAM)OverviewUsingCloudIAMpermissionsCloudIAMreferencesforCloudStorage Uniformbucket-levelaccessOverviewUsinguniformbucket-levelaccess Accesscontrollists(ACLs)OverviewCreatingandmanagingaccesscontrollists(ACLs)Sharingandcollaborationscenarios PublicaccesspreventionOverviewUsingpublicaccessprevention Cross-originresourcesharing(CORS)OverviewConfiguringcross-originresourcesharing(CORS) EncryptingdataDataencryptionoptions Customer-managedencryptionkeysOverviewUsingcustomer-managedencryptionkeys Customer-suppliedencryptionkeysOverviewUsingcustomer-suppliedencryptionkeysGoogle-managedencryptionkeysClient-sidekeys Trackingchanges,usage,andaccess Pub/SubnotificationsforCloudStorageOverviewConfiguringPub/SubnotificationsforCloudStorageCloudAuditLogswithCloudStorageUsagelogs&storagelogsBandwidthusage WorkingwithprojectsProjectsOrganizationpolicyconstraintsforCloudStorage ManagingserviceaccountsandHMACkeysHMACkeysoverviewGettingaserviceagentManagingHMACkeysforserviceaccounts AuthenticatingwithV4signingSignedURLsoverviewV4signingprocesswithCloudStoragetoolsV4signingprocesswithyourownprogramCanonicalrequestsSignaturesMigratingfromAmazonS3toCloudStorage Inter-regionreplicationTurboreplicationoverviewManagingturboreplication Concepts Allconcepts Keyterms Folders Interoperability RequestguidelinesRequestendpointsRetrystrategyRequestrateandaccessdistributionguidelinesBatchingrequests Caching Objecttranscoding HashesandeTags Generationsandpreconditions Consistency Bestpractices Tutorials Alltutorials Hostingastaticwebsite Staticwebsiteexamplesandtips Event-drivenCloudFunctionswithCloudStorage WorkingwithBigData InteractivetutorialforCloudStoragewiththeConsole GoogleCloudtutorialsusingCloudStorage DiscoverwhyleadingbusinesseschooseGoogleCloud Learnmore Keybenefits Overview Multicloud Trustandsecurity Globalinfrastructure Datacloud Opencloud Sustainability Productivityandcollaboration Resources Events Blog Customerstories Analystreports IndustrySolutions Retail ConsumerPackagedGoods FinancialServices HealthcareandLifeSciences MediaandEntertainment Telecommunications Gaming Manufacturing SupplyChainandLogistics Government Education Seeallindustrysolutions Seeallsolutions ApplicationModernization HybridandMulti-cloudApplicationPlatform Cloud-NativeAppDevelopment APIManagement ServerlessSolutions DevOps ContinuousDelivery(CD) ContinuousIntegration(CI) MainframeModernization CAMP Hosting SiteReliabilityEngineering(SRE) ArtificialIntelligence BuildanduseAI ContactCenterAI AgentAssist CloudTalentSolution DocumentAI LendingDocAI ProcurementDocAI Intelligentproducts DataScience ContractDocAI ContactCenterAIInsights BusinessApplicationPlatform NewBusinessChannelsUsingAPIs UnlockingLegacyApplicationsUsingAPIs OpenBankingAPIx Databases DatabaseMigration DatabaseModernization GoogleCloudDatabases MigrateOracleworkloadstoGoogleCloud OpenSourceDatabases SQLServeronGoogleCloud DataCloud Databasessolutions Smartanalyticssolutions AIsolutions DigitalTransformation BusinessContinuity DigitalInnovation OperationalEfficiency COVID-19Solutions COVID-19SolutionsfortheHealthcareIndustry InfrastructureModernization ApplicationMigration SAPonGoogleCloud HighPerformanceComputing WindowsonGoogleCloud DataCenterMigration ActiveAssist VirtualDesktops RapidAssessment&MigrationProgram(RAMP) BackupandDisasterRecovery ProductivityandCollaboration GoogleWorkspace GoogleWorkspaceEssentials CloudIdentity ChromeEnterprise CloudSearch Security SecurityAnalyticsandOperations WebAppandAPIProtection SecurityandResilienceFramework Riskandcomplianceascode(RCaC) SmartAnalytics DataWarehouseModernization DataLakeModernization SparkonGoogleCloud StreamAnalytics BusinessIntelligence DataScience MarketingAnalytics GeospatialAnalyticsandAI Datasets StartupsandSMB StartupSolutions StartupProgram SmallandMediumBusiness SoftwareasaService FeaturedProducts ComputeEngine CloudStorage CloudSDK CloudSQL GoogleKubernetesEngine BigQuery CloudCDN Dataflow Operations CloudRun Anthos Seeallproducts(100+) AIandMachineLearning VertexAI Speech-to-Text VisionAI Text-to-Speech CloudTranslation CloudNaturalLanguage AutoML VideoAI AIInfrastructure Dialogflow AutoMLTables SeeallAIandmachinelearningproducts APIManagement ApigeeAPIManagement ApigeeIntegration CloudEndpoints CloudHealthcareAPI AppSheet APIGateway Compute ComputeEngine AppEngine CloudGPUs MigrateforComputeEngine SpotVMs ShieldedVMs Sole-TenantNodes BareMetal Recommender VMwareEngine CloudRun Seeallcomputeproducts Containers GoogleKubernetesEngine ContainerRegistry ContainerSecurity CloudBuild DeepLearningContainers KubernetesApplications ArtifactRegistry Knative CloudRun CloudCode DataAnalytics BigQuery Looker Dataflow Pub/Sub Dataproc CloudDataFusion CloudComposer Dataprep Dataplex DataCatalog AnalyticsHub Seealldataanalyticsproducts Databases CloudBigtable Firestore Memorystore CloudSpanner CloudSQL DatabaseMigrationService BareMetalSolutionforOracle FirebaseRealtimeDatabase Datastream DeveloperTools ArtifactRegistry CloudBuild CloudCode CloudDeploymentManager CloudSDK CloudScheduler CloudSourceRepositories CloudTasks GoogleCloudDeploy Tekton ToolsforPowerShell Seealldevelopertools HealthcareandLifeSciences ApigeeHealthcareAPIx CloudHealthcareAPI CloudLifeSciences HealthcareNaturalLanguageAI HybridandMulticloud Anthos Looker CloudRunforAnthos GoogleCloudMarketplaceforAnthos MigrateforAnthos Operations CloudBuild TrafficDirector ApigeeAPIManagement GoogleDistributedCloud InternetofThings CloudIoTCore EdgeTPU ManagementTools AnthosConfigManagement CarbonFootprint CloudAPIs CloudConsole CloudMobileApp CloudShell ConfigConnector CostManagement IntelligentManagement PrivateCatalog TerraformonGoogleCloud MediaandGaming GameServers OpenCue TranscoderAPI Migration ApplicationMigration BigQueryDataTransferService CloudFoundationToolkit DatabaseMigrationService MigrateforAnthos MigrateforComputeEngine RapidAssessment&MigrationProgram(RAMP) TransferAppliance StorageTransferService VMwareEngine Networking CloudArmor CloudCDN CloudDNS CloudLoadBalancing CloudNAT HybridConnectivity NetworkConnectivityCenter NetworkIntelligenceCenter NetworkServiceTiers NetworkTelemetry TrafficDirector Seeallnetworkingproducts Operations CloudLogging CloudMonitoring ErrorReporting KubernetesEngineMonitoring CloudTrace CloudProfiler CloudDebugger IntelligentOperations SecurityandIdentity CloudIAM AssuredWorkloads CloudKeyManagement ConfidentialComputing SecurityCommandCenter CloudDataLossPrevention ManagedServiceforMicrosoftActiveDirectory AccessTransparency TitanSecurityKey SecretManager BeyondCorpEnterprise Seeallsecurityandidentityproducts ServerlessComputing CloudRun CloudFunctions AppEngine Workflows Storage AllStorageProducts CloudStorage Filestore PersistentDisk CloudStorageforFirebase LocalSSD ArchivalStorage StorageTransferService GoogleWorkspaceEssentials Savemoneywithourtransparentapproachtopricing Requestaquote GoogleCloud Pricingoverview Pricelist Pricingcalculator GoogleCloudFreeProgram RelatedProducts GoogleWorkspace GoogleMapsPlatform ChromeEnterprise Apigee Looker Firebase GetstartedwithGoogleCloud Getstartedforfree Self-serviceResources Quickstarts Bestpractices GoogleCloudcertification Experthelpandtraining Consulting TechnicalAccountManagement Training Partnersandthird-partytools GoogleCloudpartners Becomeapartner GoogleCloudMarketplace Morewaystogetstarted Home Docs CloudStorage Documentation Guides Sendfeedback Usingobjectholds Gotoconcepts Thispagedescribeshowtouseobjectholds,includingplacingholdsbydefault onnewobjectsandplacingholdsonindividualobjects. Prerequisites BeforeusingthisfeatureinCloudStorage,youshould: Havesufficientpermissiontoviewandupdatebucketsandobjects inCloudStorage: Ifyouowntheprojectthatcontainsthebucket,youmostlikelyhave thenecessarypermissions. IfyouuseIAM,youshouldhavestorage.buckets.update, storage.buckets.get,storage.objects.update,and storage.objects.getpermissionsontherelevantbucket.See UsingIAMPermissionsforinstructionsonhowtogetarole,such asStorageAdmin,thathasthesepermissions. IfyouuseACLs,youshouldhaveOWNERpermissionontherelevantbucket andontheobjectswithinit.SeeSettingACLsforinstructionson howtodothis. Workingwiththedefaultevent-basedholdproperty Thefollowingtasksshowyouhowtosetandviewthe defaultevent-basedholdpropertyonabucket.Whenthispropertyis enabled,newobjectsaddedtothebucketautomaticallygetanevent-basedhold placedonthem. Settingthedefaultevent-basedholdproperty Toenableordisablethedefaultevent-basedholdpropertyforabucket: Console IntheGoogleCloudConsole,gototheCloudStorageBrowserpage. GotoBrowser Inthelistofbuckets,clickonthenameofthebucketthatyouwantto setthedefaultevent-basedholdpropertyfor. SelecttheProtectiontabnearthetopofthepage. ThecurrentstatusforthebucketappearsintheDefaultevent-based holdoptionsection. IntheDefaultevent-basedholdoptionsection,clickthecurrent statustochangeit. ThestatusappearsaseitherEnabledorDisabled. Tolearnhowtogetdetailederrorinformationaboutfailedoperationsinthe CloudStoragebrowser,see Troubleshooting. gsutilUsethegsutilretentionevent-defaultcommand: gsutilretentionevent-defaultSTATEgs://BUCKET_NAME Where: STATEiseithersettousedefaultevent-based holdsorreleasetonotusedefaultevent-basedholds. BUCKET_NAMEisthenameoftherelevantbucket. Forexample,my-bucket. Codesamples C++ Formoreinformation,seethe CloudStorageC++APIreferencedocumentation. Thefollowingsampleenablesdefaultevent-basedholdsonabucket: ViewonGitHub Feedback namespacegcs=::google::cloud::storage; using::google::cloud::StatusOr; [](gcs::Clientclient,std::stringconst&bucket_name){ StatusOr<:bucketmetadata>original= client.GetBucketMetadata(bucket_name); if(!original)throwstd::runtime_error(original.status().message()); StatusOr<:bucketmetadata>patched_metadata=client.PatchBucket( bucket_name, gcs::BucketMetadataPatchBuilder().SetDefaultEventBasedHold(true), gcs::IfMetagenerationMatch(original->metageneration())); if(!patched_metadata){ throwstd::runtime_error(patched_metadata.status().message()); } std::cout<default_event_based_hold()?"enabled" :"disabled") <original= client.GetBucketMetadata(bucket_name); if(!original)throwstd::runtime_error(original.status().message()); StatusOr<:bucketmetadata>patched_metadata=client.PatchBucket( bucket_name, gcs::BucketMetadataPatchBuilder().SetDefaultEventBasedHold(false), gcs::IfMetagenerationMatch(original->metageneration())); if(!patched_metadata){ throwstd::runtime_error(patched_metadata.status().message()); } std::cout<default_event_based_hold()?"enabled" :"disabled") <bucket($bucketName); $bucket->update(['defaultEventBasedHold'=>true]); printf('Defaultevent-basedholdwasenabledfor%s'.PHP_EOL,$bucketName); } Thefollowingsampledisablesdefaultevent-basedholdsonabucket: ViewonGitHub Feedback useGoogle\Cloud\Storage\StorageClient; /** *Disablesadefaultevent-basedholdforabucket. * *@paramstring$bucketNameThenameofyourCloudStoragebucket. */ functiondisable_default_event_based_hold($bucketName) { //$bucketName='my-bucket'; $storage=newStorageClient(); $bucket=$storage->bucket($bucketName); $bucket->update(['defaultEventBasedHold'=>false]); printf('Defaultevent-basedholdwasdisabledfor%s'.PHP_EOL,$bucketName); } Python Formoreinformation,seethe CloudStoragePythonAPIreferencedocumentation. Thefollowingsampleenablesdefaultevent-basedholdsonabucket: ViewonGitHub Feedback fromgoogle.cloudimportstorage defenable_default_event_based_hold(bucket_name): """Enablesthedefaulteventbasedholdonagivenbucket""" #bucket_name="my-bucket" storage_client=storage.Client() bucket=storage_client.bucket(bucket_name) bucket.default_event_based_hold=True bucket.patch() print("Defaulteventbasedholdwasenabledfor{}".format(bucket_name)) Thefollowingsampledisablesdefaultevent-basedholdsonabucket: ViewonGitHub Feedback fromgoogle.cloudimportstorage defdisable_default_event_based_hold(bucket_name): """Disablesthedefaulteventbasedholdonagivenbucket""" #bucket_name="my-bucket" storage_client=storage.Client() bucket=storage_client.get_bucket(bucket_name) bucket.default_event_based_hold=False bucket.patch() print("Defaulteventbasedholdwasdisabledfor{}".format(bucket_name)) Ruby Formoreinformation,seethe CloudStorageRubyAPIreferencedocumentation. Thefollowingsampleenablesdefaultevent-basedholdsonabucket: ViewonGitHub Feedback defenable_default_event_based_holdbucket_name: #TheIDofyourGCSbucket #bucket_name="your-unique-bucket-name" require"google/cloud/storage" storage=Google::Cloud::Storage.new bucket=storage.bucketbucket_name bucket.updatedo|b| b.default_event_based_hold=true end puts"Defaultevent-basedholdwasenabledfor#{bucket_name}." end Thefollowingsampledisablesdefaultevent-basedholdsonabucket: ViewonGitHub Feedback defdisable_default_event_based_holdbucket_name: #TheIDofyourGCSbucket #bucket_name="your-unique-bucket-name" require"google/cloud/storage" storage=Google::Cloud::Storage.new bucket=storage.bucketbucket_name bucket.updatedo|b| b.default_event_based_hold=false end puts"Defaultevent-basedholdwasdisabledfor#{bucket_name}." end RESTAPIs JSONAPI Getanauthorizationaccesstokenfromthe OAuth2.0Playground. ConfiguretheplaygroundtouseyourownOAuthcredentials.Forinstructions,see APIauthentication. Createa.jsonfilethatcontainsthefollowinginformation: { "defaultEventBasedHold":STATE } WhereSTATEiseithertrueorfalse. UsecURLtocalltheJSONAPIwithaPATCHBucket request: curl-XPATCH--data-binary@JSON_FILE_NAME.json\ -H"Authorization:BearerOAUTH2_TOKEN"\ -H"Content-Type:application/json"\ "https://storage.googleapis.com/storage/v1/b/BUCKET_NAME?fields=defaultEventBasedHold" Where: JSON_FILE_NAMEisthenameofthefile youcreatedinStep2. OAUTH2_TOKENistheaccesstokenyou generatedinStep1. BUCKET_NAMEisthenameoftherelevant bucket.Forexample,my-bucket. XMLAPITheXMLAPIcannotbeusedtoworkwithobjectholds.Use oneoftheotherCloudStoragetools,suchasgsutil,instead. Gettingthedefaultholdstatusofabucket Toviewwhetherabucketplacesevent-basedholdsonnewobjectsbydefault: Console IntheGoogleCloudConsole,gototheCloudStorageBrowserpage. GotoBrowser Inthelistofbuckets,clickonthenameofthebucketthatyouwantto checkthedefaultevent-basedstatusfor. SelecttheProtectiontabnearthetopofthepage. ThestatusappearsintheDefaultevent-basedholdoptionsection. Tolearnhowtogetdetailederrorinformationaboutfailedoperationsinthe CloudStoragebrowser,see Troubleshooting. gsutilUsethefollowinggsutillscommand: gsutills-L-bgs://BUCKET_NAME WhereBUCKET_NAMEisthenameoftherelevant bucket.Forexample,my-bucket. Theresponselookslikethefollowingexample: gs://my-bucket/: Storageclass:STANDARD ... ... DefaultEvent-BasedHold:True ... Ifthebucketdoesnotplaceevent-basedholdsonnewobjectsbydefault, gsutilomitsDefaultEvent-BasedHoldfromtheoutputentirely. Codesamples C++ Formoreinformation,seethe CloudStorageC++APIreferencedocumentation. ViewonGitHub Feedback namespacegcs=::google::cloud::storage; using::google::cloud::StatusOr; [](gcs::Clientclient,std::stringconst&bucket_name){ StatusOr<:bucketmetadata>bucket_metadata= client.GetBucketMetadata(bucket_name); if(!bucket_metadata){ throwstd::runtime_error(bucket_metadata.status().message()); } std::cout<name()<default_event_based_hold()?"enabled" :"disabled") <bucket($bucketName); if($bucket->info()['defaultEventBasedHold']){ printf('Defaultevent-basedholdisenabledfor'.$bucketName.PHP_EOL); }else{ printf('Defaultevent-basedholdisnotenabledfor'.$bucketName.PHP_EOL); } } Python Formoreinformation,seethe CloudStoragePythonAPIreferencedocumentation. ViewonGitHub Feedback fromgoogle.cloudimportstorage defget_default_event_based_hold(bucket_name): """Getsthedefaulteventbasedholdonagivenbucket""" #bucket_name="my-bucket" storage_client=storage.Client() bucket=storage_client.get_bucket(bucket_name) ifbucket.default_event_based_hold: print("Defaultevent-basedholdisenabledfor{}".format(bucket_name)) else: print( "Defaultevent-basedholdisnotenabledfor{}".format( bucket_name ) ) Ruby Formoreinformation,seethe CloudStorageRubyAPIreferencedocumentation. ViewonGitHub Feedback defget_default_event_based_holdbucket_name: #TheIDofyourGCSbucket #bucket_name="your-unique-bucket-name" require"google/cloud/storage" storage=Google::Cloud::Storage.new bucket=storage.bucketbucket_name ifbucket.default_event_based_hold? puts"Defaultevent-basedholdisenabledfor#{bucket_name}." else puts"Defaultevent-basedholdisnotenabledfor#{bucket_name}." end end RESTAPIs JSONAPI Getanauthorizationaccesstokenfromthe OAuth2.0Playground. ConfiguretheplaygroundtouseyourownOAuthcredentials.Forinstructions,see APIauthentication. UsecURLtocalltheJSONAPIwithaGETBucket requestthatincludesthedesiredfields: curl-XGET-H"Authorization:BearerOAUTH2_TOKEN"\ "https://storage.googleapis.com/storage/v1/b/BUCKET_NAME?fields=defaultEventBasedHold" Where OAUTH2_TOKENistheaccesstokenyou generatedinStep1. BUCKET_NAMEisthenameoftherelevant bucket.Forexample,my-bucket. Ifthebuckethasadefaultevent-basedholdenabledforit,the responselookslikethefollowingexample: { "retentionPolicy":true } XMLAPITheXMLAPIcannotbeusedtoworkwithobjectholds.Use oneoftheotherCloudStoragetools,suchasgsutil,instead. Workingwithobjectholds Thefollowingtasksshowyouhowtoplace,view,andreleaseholdson objects. Placinganobjecthold Toplaceaholdonanobjectinyourbucket: Console IntheGoogleCloudConsole,gototheCloudStorageBrowserpage. GotoBrowser Inthelistofbuckets,clickonthenameofthebucketthathasthe objectsyouwanttoplaceholdson. Selectthecheckboxnexttothenamesofobjectsyouwanttoplaceholds on. ClicktheManageholdsbutton. TheManageholdswindowappears. Selectthecheckboxforthetypesofholdyouwanttoplaceonthe selectedobjects ClickSaveholdsettings. Tolearnhowtogetdetailederrorinformationaboutfailedoperationsinthe CloudStoragebrowser,see Troubleshooting. gsutilUsethegsutilretentioncommand: gsutilretentionHOLD_TYPEsetgs://BUCKET_NAME/OBJECT_NAME Where: HOLD_TYPEisthetypeofholdyouwanttoapply toyourobject.Forexample,temporevent.SeeObjectholdsfor moreinformationaboutholdtypes. BUCKET_NAMEisthenameoftherelevantbucket. Forexample,my-bucket. OBJECT_NAMEisthenameoftherelevantobject. Forexample,pets/dog.png. Codesamples C++ Formoreinformation,seethe CloudStorageC++APIreferencedocumentation. Thefollowingsamplesetsanevent-basedholdonanobject: google/cloud/storage/examples/storage_object_hold_samples.cc ViewonGitHub Feedback namespacegcs=::google::cloud::storage; using::google::cloud::StatusOr; [](gcs::Clientclient,std::stringconst&bucket_name, std::stringconst&object_name){ StatusOr<:objectmetadata>original= client.GetObjectMetadata(bucket_name,object_name); if(!original)throwstd::runtime_error(original.status().message()); StatusOr<:objectmetadata>updated=client.PatchObject( bucket_name,object_name, gcs::ObjectMetadataPatchBuilder().SetEventBasedHold(true), gcs::IfMetagenerationMatch(original->metageneration())); if(!updated)throwstd::runtime_error(updated.status().message()); std::cout<name() <bucket()<event_based_hold()?"enabled":"disabled")<original= client.GetObjectMetadata(bucket_name,object_name); if(!original)throwstd::runtime_error(original.status().message()); StatusOr<:objectmetadata>updated=client.PatchObject( bucket_name,object_name, gcs::ObjectMetadataPatchBuilder().SetTemporaryHold(true), gcs::IfMetagenerationMatch(original->metageneration())); if(!updated)throwstd::runtime_error(updated.status().message()); std::cout<name() <bucket()<temporary_hold()?"enabled":"disabled")<bucket($bucketName); $object=$bucket->object($objectName); $object->update(['eventBasedHold'=>true]); printf('Event-basedholdwassetfor%s'.PHP_EOL,$objectName); } Thefollowingsamplesetsatemporaryholdonanobject: storage/src/set_temporary_hold.php ViewonGitHub Feedback useGoogle\Cloud\Storage\StorageClient; /** *Setsatemporaryholdforanobject. * *@paramstring$bucketNameThenameofyourCloudStoragebucket. *@paramstring$objectNameThenameofyourCloudStorageobject. */ functionset_temporary_hold($bucketName,$objectName) { //$bucketName='my-bucket'; //$objectName='my-object'; $storage=newStorageClient(); $bucket=$storage->bucket($bucketName); $object=$bucket->object($objectName); $object->update(['temporaryHold'=>true]); printf('Temporaryholdwassetfor%s'.PHP_EOL,$objectName); } Python Formoreinformation,seethe CloudStoragePythonAPIreferencedocumentation. Thefollowingsamplesetsanevent-basedholdonanobject: samples/snippets/storage_set_event_based_hold.py ViewonGitHub Feedback fromgoogle.cloudimportstorage defset_event_based_hold(bucket_name,blob_name): """Setsaeventbasedholdonagivenblob""" #bucket_name="my-bucket" #blob_name="my-blob" storage_client=storage.Client() bucket=storage_client.bucket(bucket_name) blob=bucket.blob(blob_name) blob.event_based_hold=True blob.patch() print("Eventbasedholdwassetfor{}".format(blob_name)) Thefollowingsamplesetsatemporaryholdonanobject: samples/snippets/storage_set_temporary_hold.py ViewonGitHub Feedback fromgoogle.cloudimportstorage defset_temporary_hold(bucket_name,blob_name): """Setsatemporaryholdonagivenblob""" #bucket_name="my-bucket" #blob_name="my-blob" storage_client=storage.Client() bucket=storage_client.bucket(bucket_name) blob=bucket.blob(blob_name) blob.temporary_hold=True blob.patch() print("Temporaryholdwassetfor#{blob_name}") Ruby Formoreinformation,seethe CloudStorageRubyAPIreferencedocumentation. Thefollowingsamplesetsanevent-basedholdonanobject: google-cloud-storage/samples/storage_set_event_based_hold.rb ViewonGitHub Feedback defset_event_based_holdbucket_name:,file_name: #TheIDofyourGCSbucket #bucket_name="your-unique-bucket-name" #TheIDofyourGCSobject #file_name="your-file-name" require"google/cloud/storage" storage=Google::Cloud::Storage.new bucket=storage.bucketbucket_name file=bucket.filefile_name file.set_event_based_hold! puts"Event-basedholdwassetfor#{file_name}." end Thefollowingsamplesetsatemporaryholdonanobject: google-cloud-storage/samples/storage_set_temporary_hold.rb ViewonGitHub Feedback defset_temporary_holdbucket_name:,file_name: #TheIDofyourGCSbucket #bucket_name="your-unique-bucket-name" #TheIDofyourGCSobject #file_name="your-file-name" require"google/cloud/storage" storage=Google::Cloud::Storage.new bucket=storage.bucketbucket_name file=bucket.filefile_name file.set_temporary_hold! puts"Temporaryholdwassetfor#{file_name}." end RESTAPIs JSONAPI Getanauthorizationaccesstokenfromthe OAuth2.0Playground. ConfiguretheplaygroundtouseyourownOAuthcredentials.Forinstructions,see APIauthentication. Createa.jsonfilethatcontainsthefollowinginformation: { "HOLD_TYPE":true } WhereHOLD_TYPEisthetypeofholdyouwant toapplytoyourobject.Forexample,temporaryHoldor eventBasedHold.SeeObjectholdsformoreinformation aboutholdtypes. UsecURLtocalltheJSONAPIwithaPATCHObject request: curl-XPATCH--data-binary@JSON_FILE_NAME.json\ -H"Authorization:BearerOAUTH2_TOKEN"\ -H"Content-Type:application/json"\ "https://storage.googleapis.com/storage/v1/b/BUCKET_NAME/o/OBJECT_NAME" Where: JSON_FILE_NAMEisthenameofthefile youcreatedinStep2. OAUTH2_TOKENistheaccesstokenyou generatedinStep1. BUCKET_NAMEisthenameoftherelevant bucket.Forexample,my-bucket. OBJECT_NAMEisthenameoftherelevant object.Forexample,pets/dog.png. XMLAPITheXMLAPIcannotbeusedtoworkwithobjectholds.Use oneoftheotherCloudStoragetools,suchasgsutil,instead. Gettingtheholdstatusforanobject Note:YoucannotviewobjectholdsusingtheXMLAPI.Use oneoftheotherCloudStoragetools,suchasgsutil,instead. Toviewwhat,ifany,holdsexistonanobject,followthegeneralinstructions forViewingObjectMetadata. Releasinganobjecthold Toreleaseaholdonanobjectinyourbucket: Console IntheGoogleCloudConsole,gototheCloudStorageBrowserpage. GotoBrowser Inthelistofbuckets,clickonthenameofthebucketthathasthe objectsyouremoveholdsfrom. Selectthecheckboxnexttothenamesofobjectsyouwanttoremove holdsfrom. ClicktheManageholdsbutton. TheManageholdswindowappears. De-selectthecheckboxfortheholdsyouwanttoremove. ClickSaveholdsettings. Tolearnhowtogetdetailederrorinformationaboutfailedoperationsinthe CloudStoragebrowser,see Troubleshooting. gsutilUsethegsutilretentioncommand: gsutilretentionHOLD_TYPEreleasegs://BUCKET_NAME/OBJECT_NAME Where: HOLD_TYPEisthetypeofholdyouwanttorelease fromyourobject.Forexample,temporevent.SeeObjectholdsfor moreinformationaboutholdtypes. BUCKET_NAMEisthenameoftherelevantbucket. Forexample,my-bucket. OBJECT_NAMEisthenameoftherelevantobject. Forexample,pets/dog.png. Codesamples C++ Formoreinformation,seethe CloudStorageC++APIreferencedocumentation. Thefollowingsamplesetsanevent-basedholdonanobject: google/cloud/storage/examples/storage_object_hold_samples.cc ViewonGitHub Feedback namespacegcs=::google::cloud::storage; using::google::cloud::StatusOr; [](gcs::Clientclient,std::stringconst&bucket_name, std::stringconst&object_name){ StatusOr<:objectmetadata>original= client.GetObjectMetadata(bucket_name,object_name); if(!original)throwstd::runtime_error(original.status().message()); StatusOr<:objectmetadata>updated=client.PatchObject( bucket_name,object_name, gcs::ObjectMetadataPatchBuilder().SetEventBasedHold(false), gcs::IfMetagenerationMatch(original->metageneration())); if(!updated)throwstd::runtime_error(updated.status().message()); std::cout<name() <bucket()<event_based_hold()?"enabled":"disabled")<original= client.GetObjectMetadata(bucket_name,object_name); if(!original)throwstd::runtime_error(original.status().message()); StatusOr<:objectmetadata>updated=client.PatchObject( bucket_name,object_name, gcs::ObjectMetadataPatchBuilder().SetTemporaryHold(false), gcs::IfMetagenerationMatch(original->metageneration())); if(!updated)throwstd::runtime_error(updated.status().message()); std::cout<name() <bucket()<temporary_hold()?"enabled":"disabled")<bucket($bucketName); $object=$bucket->object($objectName); $object->update(['eventBasedHold'=>false]); printf('Event-basedholdwasreleasedfor%s'.PHP_EOL,$objectName); } Thefollowingsamplereleasesatemporaryholdonanobject: storage/src/release_temporary_hold.php ViewonGitHub Feedback useGoogle\Cloud\Storage\StorageClient; /** *Releasesatemporaryholdforanobject. * *@paramstring$bucketNameThenameofyourCloudStoragebucket. *@paramstring$objectNameThenameofyourCloudStorageobject. */ functionrelease_temporary_hold($bucketName,$objectName) { //$bucketName='my-bucket'; //$objectName='my-object'; $storage=newStorageClient(); $bucket=$storage->bucket($bucketName); $object=$bucket->object($objectName); $object->update(['temporaryHold'=>false]); printf('Temporaryholdwasreleasedfor%s'.PHP_EOL,$objectName); } Python Formoreinformation,seethe CloudStoragePythonAPIreferencedocumentation. Thefollowingsamplereleasesanevent-basedholdonanobject: samples/snippets/storage_release_event_based_hold.py ViewonGitHub Feedback fromgoogle.cloudimportstorage defrelease_event_based_hold(bucket_name,blob_name): """Releasestheeventbasedholdonagivenblob""" #bucket_name="my-bucket" #blob_name="my-blob" storage_client=storage.Client() bucket=storage_client.bucket(bucket_name) blob=bucket.blob(blob_name) blob.event_based_hold=False blob.patch() print("Eventbasedholdwasreleasedfor{}".format(blob_name)) Thefollowingsamplereleasesatemporaryholdonanobject: samples/snippets/storage_release_temporary_hold.py ViewonGitHub Feedback fromgoogle.cloudimportstorage defrelease_temporary_hold(bucket_name,blob_name): """Releasesthetemporaryholdonagivenblob""" #bucket_name="my-bucket" #blob_name="my-blob" storage_client=storage.Client() bucket=storage_client.bucket(bucket_name) blob=bucket.blob(blob_name) blob.temporary_hold=False blob.patch() print("Temporaryholdwasreleasefor#{blob_name}") Ruby Formoreinformation,seethe CloudStorageRubyAPIreferencedocumentation. Thefollowingsamplereleasesanevent-basedholdonanobject: google-cloud-storage/samples/storage_release_event_based_hold.rb ViewonGitHub Feedback defrelease_event_based_holdbucket_name:,file_name: #TheIDofyourGCSbucket #bucket_name="your-unique-bucket-name" #TheIDofyourGCSobject #file_name="your-file-name" require"google/cloud/storage" storage=Google::Cloud::Storage.new bucket=storage.bucketbucket_name file=bucket.filefile_name file.release_event_based_hold! puts"Event-basedholdwasreleasedfor#{file_name}." end Thefollowingsamplereleasesatemporaryholdonanobject: google-cloud-storage/samples/storage_release_temporary_hold.rb ViewonGitHub Feedback defrelease_temporary_holdbucket_name:,file_name: #TheIDofyourGCSbucket #bucket_name="your-unique-bucket-name" #TheIDofyourGCSobject #file_name="your-file-name" require"google/cloud/storage" storage=Google::Cloud::Storage.new bucket=storage.bucketbucket_name file=bucket.filefile_name file.release_temporary_hold! puts"Temporaryholdwasreleasedfor#{file_name}." end RESTAPIs JSONAPI Getanauthorizationaccesstokenfromthe OAuth2.0Playground. ConfiguretheplaygroundtouseyourownOAuthcredentials.Forinstructions,see APIauthentication. Createa.jsonfilethatcontainsthefollowinginformation: { "HOLD_TYPE":false } WhereHOLD_TYPEisthetypeofholdyouwant toreleasefromyourobject.Forexample,temporaryHoldor eventBasedHold.SeeObjectholdsformoreinformation aboutholdtypes. UsecURLtocalltheJSONAPIwithaPATCHObject request: curl-XPATCH--data-binary@JSON_FILE_NAME.json\ -H"Authorization:BearerOAUTH2_TOKEN"\ -H"Content-Type:application/json"\ "https://storage.googleapis.com/storage/v1/b/BUCKET_NAME/o/OBJECT_NAME" Where: JSON_FILE_NAMEisthenameofthefileyou createdinStep2. OAUTH2_TOKENistheaccesstokenyou generatedinStep1. BUCKET_NAMEisthenameoftherelevant bucket.Forexample,my-bucket. OBJECT_NAMEisthenameoftherelevant object.Forexample,pets/dog.png. XMLAPITheXMLAPIcannotbeusedtoworkwithobjectholds.Use oneoftheotherCloudStoragetools,suchasgsutil,instead. What'snext Learnmoreaboutobjectholds,includingthedifferenttypesofholds thatanobjectcanhave. Learnhowtouseretentionpolicies. Sendfeedback Exceptasotherwisenoted,thecontentofthispageislicensedundertheCreativeCommonsAttribution4.0License,andcodesamplesarelicensedundertheApache2.0License.Fordetails,seetheGoogleDevelopersSitePolicies.JavaisaregisteredtrademarkofOracleand/oritsaffiliates. Lastupdated2021-11-29UTC. [{ "type":"thumb-down", "id":"hardToUnderstand", "label":"Hardtounderstand" },{ "type":"thumb-down", "id":"incorrectInformationOrSampleCode", "label":"Incorrectinformationorsamplecode" },{ "type":"thumb-down", "id":"missingTheInformationSamplesINeed", "label":"Missingtheinformation/samplesIneed" },{ "type":"thumb-down", "id":"otherDown", "label":"Other" }] [{ "type":"thumb-up", "id":"easyToUnderstand", "label":"Easytounderstand" },{ "type":"thumb-up", "id":"solvedMyProblem", "label":"Solvedmyproblem" },{ "type":"thumb-up", "id":"otherUp", "label":"Other" }] Needtotellusmore? WhyGoogle ChoosingGoogleCloud Trustandsecurity Opencloud Multicloud Globalinfrastructure Sustainability Customersandcasestudies Analystreports Whitepapers Blog Productsandpricing GoogleCloudpricing GoogleWorkspacepricing MapsPlatformpricing Seeallproducts Solutions Infrastructuremodernization Databases Applicationmodernization Smartanalytics ArtificialIntelligence Security Productivity&worktransformation Industrysolutions DevOpssolutions Smallbusinesssolutions Seeallsolutions Resources GoogleClouddocumentation GoogleCloudquickstarts GoogleCloudMarketplace GoogleWorkspaceMarketplace Learnaboutcloudcomputing Support Codesamples Tutorials Training Certifications GoogleDevelopers GoogleCloudforStartups Systemstatus ReleaseNotes Engage Contactsales FindaPartner BecomeaPartner Events Podcast DeveloperCenter PressCorner GoogleCloudonYouTube GoogleCloudTechonYouTube GoogleWorkspaceonYouTube FollowonTwitter JoinUserResearch We'rehiring.JoinGoogleCloud! GoogleCloudCommunity AboutGoogle Privacy Siteterms GoogleCloudterms Carbonneutralsince2007 SignupfortheGoogleCloudnewsletter Subscribe Language English Deutsch Español–AméricaLatina Français Português–Brasil 中文–简体 日本語 한국어



請為這篇文章評分?