Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.
Arguments
Parameters | |
---|---|
bucket |
Required. Name of a bucket.
|
ifMetagenerationMatch |
Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.
|
ifMetagenerationNotMatch |
Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.
|
predefinedAcl |
Apply a predefined set of access controls to this bucket.
|
Enum type. Can be one of the following: | |
authenticatedRead |
Project team owners get OWNER access, and allAuthenticatedUsers get READER access. |
private |
Project team owners get OWNER access. |
projectPrivate |
Project team members get access according to their roles. |
publicRead |
Project team owners get OWNER access, and allUsers get READER access. |
publicReadWrite |
Project team owners get OWNER access, and allUsers get WRITER access. |
predefinedDefaultObjectAcl |
Apply a predefined set of default object access controls to this bucket.
|
Enum type. Can be one of the following: | |
authenticatedRead |
Object owner gets OWNER access, and allAuthenticatedUsers get READER access. |
bucketOwnerFullControl |
Object owner gets OWNER access, and project team owners get OWNER access. |
bucketOwnerRead |
Object owner gets OWNER access, and project team owners get READER access. |
private |
Object owner gets OWNER access. |
projectPrivate |
Object owner gets OWNER access, and project team members get access according to their roles. |
publicRead |
Object owner gets OWNER access, and allUsers get READER access. |
projection |
Set of properties to return. Defaults to full.
|
Enum type. Can be one of the following: | |
full |
Include all properties. |
noAcl |
Omit owner, acl and defaultObjectAcl properties. |
userProject |
The project to be billed for this request. Required for Requester Pays buckets.
|
body |
Required.
|
Raised exceptions
Exceptions | |
---|---|
ConnectionError |
In case of a network problem (such as DNS failure or refused connection). |
HttpError |
If the response status is >= 400 (excluding 429 and 503). |
TimeoutError |
If a long-running operation takes longer to finish than the specified timeout limit. |
TypeError |
If an operation or function receives an argument of the wrong type. |
ValueError |
If an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout. |
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" } } ]