Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.
Arguments
bucket
string
Required. Name of a bucket.
ifMetagenerationMatch
string ( int64
format)
Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.
ifMetagenerationNotMatch
string ( int64
format)
Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.
predefinedAcl
enum
Apply a predefined set of access controls to this bucket.
authenticatedRead
private
projectPrivate
publicRead
publicReadWrite
predefinedDefaultObjectAcl
enum
Apply a predefined set of default object access controls to this bucket.
authenticatedRead
bucketOwnerFullControl
bucketOwnerRead
private
projectPrivate
publicRead
projection
enum
Set of properties to return. Defaults to full.
full
noAcl
userProject
string
The project to be billed for this request. Required for Requester Pays buckets.
body
object ( Bucket
)
Required.
Raised exceptions
ConnectionError
HttpError
TimeoutError
TypeError
ValueError
Response
If successful, the response contains an instance of Bucket
.
Subworkflow snippet
Some fields might be optional or required. To identify required fields, refer to the API documentation .
YAML
- update : call : googleapis.storage.v1.buckets.update args : bucket : ... ifMetagenerationMatch : ... ifMetagenerationNotMatch : ... predefinedAcl : ... predefinedDefaultObjectAcl : ... projection : ... userProject : ... body : acl : ... autoclass : enabled : ... toggleTime : ... billing : requesterPays : ... cors : maxAgeSeconds : ... method : ... origin : ... responseHeader : ... customPlacementConfig : dataLocations : ... defaultEventBasedHold : ... defaultObjectAcl : ... encryption : defaultKmsKeyName : ... etag : ... iamConfiguration : bucketPolicyOnly : enabled : ... lockedTime : ... publicAccessPrevention : ... uniformBucketLevelAccess : enabled : ... lockedTime : ... id : ... kind : ... labels : ... lifecycle : rule : action : storageClass : ... type : ... condition : age : ... createdBefore : ... customTimeBefore : ... daysSinceCustomTime : ... daysSinceNoncurrentTime : ... isLive : ... matchesPattern : ... matchesPrefix : ... matchesStorageClass : ... matchesSuffix : ... noncurrentTimeBefore : ... numNewerVersions : ... location : ... locationType : ... logging : logBucket : ... logObjectPrefix : ... metageneration : ... name : ... owner : entity : ... entityId : ... projectNumber : ... retentionPolicy : effectiveTime : ... isLocked : ... retentionPeriod : ... rpo : ... satisfiesPZS : ... selfLink : ... storageClass : ... timeCreated : ... updated : ... versioning : enabled : ... website : mainPageSuffix : ... notFoundPage : ... result : updateResult
JSON
[ { "update" : { "call" : "googleapis.storage.v1.buckets.update" , "args" : { "bucket" : "..." , "ifMetagenerationMatch" : "..." , "ifMetagenerationNotMatch" : "..." , "predefinedAcl" : "..." , "predefinedDefaultObjectAcl" : "..." , "projection" : "..." , "userProject" : "..." , "body" : { "acl" : "..." , "autoclass" : { "enabled" : "..." , "toggleTime" : "..." }, "billing" : { "requesterPays" : "..." }, "cors" : { "maxAgeSeconds" : "..." , "method" : "..." , "origin" : "..." , "responseHeader" : "..." }, "customPlacementConfig" : { "dataLocations" : "..." }, "defaultEventBasedHold" : "..." , "defaultObjectAcl" : "..." , "encryption" : { "defaultKmsKeyName" : "..." }, "etag" : "..." , "iamConfiguration" : { "bucketPolicyOnly" : { "enabled" : "..." , "lockedTime" : "..." }, "publicAccessPrevention" : "..." , "uniformBucketLevelAccess" : { "enabled" : "..." , "lockedTime" : "..." } }, "id" : "..." , "kind" : "..." , "labels" : "..." , "lifecycle" : { "rule" : { "action" : { "storageClass" : "..." , "type" : "..." }, "condition" : { "age" : "..." , "createdBefore" : "..." , "customTimeBefore" : "..." , "daysSinceCustomTime" : "..." , "daysSinceNoncurrentTime" : "..." , "isLive" : "..." , "matchesPattern" : "..." , "matchesPrefix" : "..." , "matchesStorageClass" : "..." , "matchesSuffix" : "..." , "noncurrentTimeBefore" : "..." , "numNewerVersions" : "..." } } }, "location" : "..." , "locationType" : "..." , "logging" : { "logBucket" : "..." , "logObjectPrefix" : "..." }, "metageneration" : "..." , "name" : "..." , "owner" : { "entity" : "..." , "entityId" : "..." }, "projectNumber" : "..." , "retentionPolicy" : { "effectiveTime" : "..." , "isLocked" : "..." , "retentionPeriod" : "..." }, "rpo" : "..." , "satisfiesPZS" : "..." , "selfLink" : "..." , "storageClass" : "..." , "timeCreated" : "..." , "updated" : "..." , "versioning" : { "enabled" : "..." }, "website" : { "mainPageSuffix" : "..." , "notFoundPage" : "..." } } }, "result" : "updateResult" } } ]

