1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="storage_v1.html">Cloud Storage JSON API</a> . <a href="storage_v1.buckets.html">buckets</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(bucket, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, provisionalUserProject=None, userProject=None)</a></code></p> 82<p class="firstline">Permanently deletes an empty bucket.</p> 83<p class="toc_element"> 84 <code><a href="#get">get(bucket, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p> 85<p class="firstline">Returns metadata for the specified bucket.</p> 86<p class="toc_element"> 87 <code><a href="#getIamPolicy">getIamPolicy(bucket, optionsRequestedPolicyVersion=None, provisionalUserProject=None, userProject=None)</a></code></p> 88<p class="firstline">Returns an IAM policy for the specified bucket.</p> 89<p class="toc_element"> 90 <code><a href="#insert">insert(project, body=None, predefinedAcl=None, predefinedDefaultObjectAcl=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p> 91<p class="firstline">Creates a new bucket.</p> 92<p class="toc_element"> 93 <code><a href="#list">list(project, maxResults=None, pageToken=None, prefix=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p> 94<p class="firstline">Retrieves a list of buckets for a given project.</p> 95<p class="toc_element"> 96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 97<p class="firstline">Retrieves the next page of results.</p> 98<p class="toc_element"> 99 <code><a href="#lockRetentionPolicy">lockRetentionPolicy(bucket, ifMetagenerationMatch, provisionalUserProject=None, userProject=None)</a></code></p> 100<p class="firstline">Locks retention policy on a bucket.</p> 101<p class="toc_element"> 102 <code><a href="#patch">patch(bucket, body=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, predefinedAcl=None, predefinedDefaultObjectAcl=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p> 103<p class="firstline">Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.</p> 104<p class="toc_element"> 105 <code><a href="#setIamPolicy">setIamPolicy(bucket, body=None, provisionalUserProject=None, userProject=None)</a></code></p> 106<p class="firstline">Updates an IAM policy for the specified bucket.</p> 107<p class="toc_element"> 108 <code><a href="#testIamPermissions">testIamPermissions(bucket, permissions, provisionalUserProject=None, userProject=None)</a></code></p> 109<p class="firstline">Tests a set of permissions on the given bucket to see which, if any, are held by the caller.</p> 110<p class="toc_element"> 111 <code><a href="#update">update(bucket, body=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, predefinedAcl=None, predefinedDefaultObjectAcl=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p> 112<p class="firstline">Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.</p> 113<h3>Method Details</h3> 114<div class="method"> 115 <code class="details" id="close">close()</code> 116 <pre>Close httplib2 connections.</pre> 117</div> 118 119<div class="method"> 120 <code class="details" id="delete">delete(bucket, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, provisionalUserProject=None, userProject=None)</code> 121 <pre>Permanently deletes an empty bucket. 122 123Args: 124 bucket: string, Name of a bucket. (required) 125 ifMetagenerationMatch: string, If set, only deletes the bucket if its metageneration matches this value. 126 ifMetagenerationNotMatch: string, If set, only deletes the bucket if its metageneration does not match this value. 127 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 128 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 129</pre> 130</div> 131 132<div class="method"> 133 <code class="details" id="get">get(bucket, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, projection=None, provisionalUserProject=None, userProject=None)</code> 134 <pre>Returns metadata for the specified bucket. 135 136Args: 137 bucket: string, Name of a bucket. (required) 138 ifMetagenerationMatch: string, Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. 139 ifMetagenerationNotMatch: string, Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. 140 projection: string, Set of properties to return. Defaults to noAcl. 141 Allowed values 142 full - Include all properties. 143 noAcl - Omit owner, acl and defaultObjectAcl properties. 144 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 145 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 146 147Returns: 148 An object of the form: 149 150 { # A bucket. 151 "acl": [ # Access controls on the bucket. 152 { # An access-control entry. 153 "bucket": "A String", # The name of the bucket. 154 "domain": "A String", # The domain associated with the entity, if any. 155 "email": "A String", # The email address associated with the entity, if any. 156 "entity": "A String", # The entity holding the permission, in one of the following forms: 157 # - user-userId 158 # - user-email 159 # - group-groupId 160 # - group-email 161 # - domain-domain 162 # - project-team-projectId 163 # - allUsers 164 # - allAuthenticatedUsers Examples: 165 # - The user liz@example.com would be user-liz@example.com. 166 # - The group example@googlegroups.com would be group-example@googlegroups.com. 167 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 168 "entityId": "A String", # The ID for the entity, if any. 169 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 170 "id": "A String", # The ID of the access-control entry. 171 "kind": "storage#bucketAccessControl", # The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. 172 "projectTeam": { # The project team associated with the entity, if any. 173 "projectNumber": "A String", # The project number. 174 "team": "A String", # The team. 175 }, 176 "role": "A String", # The access permission for the entity. 177 "selfLink": "A String", # The link to this access-control entry. 178 }, 179 ], 180 "autoclass": { # The bucket's Autoclass configuration. 181 "enabled": True or False, # Whether or not Autoclass is enabled on this bucket 182 "toggleTime": "A String", # A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. 183 }, 184 "billing": { # The bucket's billing configuration. 185 "requesterPays": True or False, # When set to true, Requester Pays is enabled for this bucket. 186 }, 187 "cors": [ # The bucket's Cross-Origin Resource Sharing (CORS) configuration. 188 { 189 "maxAgeSeconds": 42, # The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. 190 "method": [ # The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". 191 "A String", 192 ], 193 "origin": [ # The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". 194 "A String", 195 ], 196 "responseHeader": [ # The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. 197 "A String", 198 ], 199 }, 200 ], 201 "customPlacementConfig": { # The bucket's custom placement configuration for Custom Dual Regions. 202 "dataLocations": [ # The list of regional locations in which data is placed. 203 "A String", 204 ], 205 }, 206 "defaultEventBasedHold": True or False, # The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. 207 "defaultObjectAcl": [ # Default access controls to apply to new objects when no ACL is provided. 208 { # An access-control entry. 209 "bucket": "A String", # The name of the bucket. 210 "domain": "A String", # The domain associated with the entity, if any. 211 "email": "A String", # The email address associated with the entity, if any. 212 "entity": "A String", # The entity holding the permission, in one of the following forms: 213 # - user-userId 214 # - user-email 215 # - group-groupId 216 # - group-email 217 # - domain-domain 218 # - project-team-projectId 219 # - allUsers 220 # - allAuthenticatedUsers Examples: 221 # - The user liz@example.com would be user-liz@example.com. 222 # - The group example@googlegroups.com would be group-example@googlegroups.com. 223 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 224 "entityId": "A String", # The ID for the entity, if any. 225 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 226 "generation": "A String", # The content generation of the object, if applied to an object. 227 "id": "A String", # The ID of the access-control entry. 228 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 229 "object": "A String", # The name of the object, if applied to an object. 230 "projectTeam": { # The project team associated with the entity, if any. 231 "projectNumber": "A String", # The project number. 232 "team": "A String", # The team. 233 }, 234 "role": "A String", # The access permission for the entity. 235 "selfLink": "A String", # The link to this access-control entry. 236 }, 237 ], 238 "encryption": { # Encryption configuration for a bucket. 239 "defaultKmsKeyName": "A String", # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. 240 }, 241 "etag": "A String", # HTTP 1.1 Entity tag for the bucket. 242 "iamConfiguration": { # The bucket's IAM configuration. 243 "bucketPolicyOnly": { # The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature. 244 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 245 "lockedTime": "A String", # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable. 246 }, 247 "publicAccessPrevention": "A String", # The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported. 248 "uniformBucketLevelAccess": { # The bucket's uniform bucket-level access configuration. 249 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 250 "lockedTime": "A String", # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable. 251 }, 252 }, 253 "id": "A String", # The ID of the bucket. For buckets, the id and name properties are the same. 254 "kind": "storage#bucket", # The kind of item this is. For buckets, this is always storage#bucket. 255 "labels": { # User-provided labels, in key/value pairs. 256 "a_key": "A String", # An individual label entry. 257 }, 258 "lifecycle": { # The bucket's lifecycle configuration. See lifecycle management for more information. 259 "rule": [ # A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. 260 { 261 "action": { # The action to take. 262 "storageClass": "A String", # Target storage class. Required iff the type of the action is SetStorageClass. 263 "type": "A String", # Type of the action. Currently, only Delete and SetStorageClass are supported. 264 }, 265 "condition": { # The condition(s) under which the action will be taken. 266 "age": 42, # Age of an object (in days). This condition is satisfied when an object reaches the specified age. 267 "createdBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. 268 "customTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the custom time on an object is before this date in UTC. 269 "daysSinceCustomTime": 42, # Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply. 270 "daysSinceNoncurrentTime": 42, # Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent. 271 "isLive": True or False, # Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. 272 "matchesPattern": "A String", # A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the "Early Access" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released. 273 "matchesStorageClass": [ # Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. 274 "A String", 275 ], 276 "noncurrentTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects. 277 "numNewerVersions": 42, # Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. 278 }, 279 }, 280 ], 281 }, 282 "location": "A String", # The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. 283 "locationType": "A String", # The type of the bucket location. 284 "logging": { # The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. 285 "logBucket": "A String", # The destination bucket where the current bucket's logs should be placed. 286 "logObjectPrefix": "A String", # A prefix for log object names. 287 }, 288 "metageneration": "A String", # The metadata generation of this bucket. 289 "name": "A String", # The name of the bucket. 290 "owner": { # The owner of the bucket. This is always the project team's owner group. 291 "entity": "A String", # The entity, in the form project-owner-projectId. 292 "entityId": "A String", # The ID for the entity. 293 }, 294 "projectNumber": "A String", # The project number of the project the bucket belongs to. 295 "retentionPolicy": { # The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error. 296 "effectiveTime": "A String", # Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. 297 "isLocked": True or False, # Once locked, an object retention policy cannot be modified. 298 "retentionPeriod": "A String", # The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. 299 }, 300 "rpo": "A String", # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket. 301 "satisfiesPZS": True or False, # Reserved for future use. 302 "selfLink": "A String", # The URI of this bucket. 303 "storageClass": "A String", # The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. 304 "timeCreated": "A String", # The creation time of the bucket in RFC 3339 format. 305 "updated": "A String", # The modification time of the bucket in RFC 3339 format. 306 "versioning": { # The bucket's versioning configuration. 307 "enabled": True or False, # While set to true, versioning is fully enabled for this bucket. 308 }, 309 "website": { # The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. 310 "mainPageSuffix": "A String", # If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. 311 "notFoundPage": "A String", # If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. 312 }, 313}</pre> 314</div> 315 316<div class="method"> 317 <code class="details" id="getIamPolicy">getIamPolicy(bucket, optionsRequestedPolicyVersion=None, provisionalUserProject=None, userProject=None)</code> 318 <pre>Returns an IAM policy for the specified bucket. 319 320Args: 321 bucket: string, Name of a bucket. (required) 322 optionsRequestedPolicyVersion: integer, The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails. 323 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 324 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 325 326Returns: 327 An object of the form: 328 329 { # A bucket/object IAM policy. 330 "bindings": [ # An association between a role, which comes with a set of permissions, and members who may assume that role. 331 { 332 "condition": { # Represents an expression text. Example: title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" # The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. 333 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 334 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported. 335 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 336 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 337 }, 338 "members": [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: 339 # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account. 340 # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. 341 # - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. 342 # - serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . 343 # - group:emailid — An email address that represents a Google group. For example, group:admins@example.com. 344 # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. 345 # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project 346 # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project 347 # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project 348 "A String", 349 ], 350 "role": "A String", # The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole. 351 # The new IAM roles are: 352 # - roles/storage.admin — Full control of Google Cloud Storage resources. 353 # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. 354 # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage. 355 # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: 356 # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. 357 # - roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. 358 # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. 359 # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. 360 # - roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role. 361 }, 362 ], 363 "etag": "A String", # HTTP 1.1 Entity tag for the policy. 364 "kind": "storage#policy", # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. 365 "resourceId": "A String", # The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. 366 "version": 42, # The IAM policy format version. 367}</pre> 368</div> 369 370<div class="method"> 371 <code class="details" id="insert">insert(project, body=None, predefinedAcl=None, predefinedDefaultObjectAcl=None, projection=None, provisionalUserProject=None, userProject=None)</code> 372 <pre>Creates a new bucket. 373 374Args: 375 project: string, A valid API project identifier. (required) 376 body: object, The request body. 377 The object takes the form of: 378 379{ # A bucket. 380 "acl": [ # Access controls on the bucket. 381 { # An access-control entry. 382 "bucket": "A String", # The name of the bucket. 383 "domain": "A String", # The domain associated with the entity, if any. 384 "email": "A String", # The email address associated with the entity, if any. 385 "entity": "A String", # The entity holding the permission, in one of the following forms: 386 # - user-userId 387 # - user-email 388 # - group-groupId 389 # - group-email 390 # - domain-domain 391 # - project-team-projectId 392 # - allUsers 393 # - allAuthenticatedUsers Examples: 394 # - The user liz@example.com would be user-liz@example.com. 395 # - The group example@googlegroups.com would be group-example@googlegroups.com. 396 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 397 "entityId": "A String", # The ID for the entity, if any. 398 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 399 "id": "A String", # The ID of the access-control entry. 400 "kind": "storage#bucketAccessControl", # The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. 401 "projectTeam": { # The project team associated with the entity, if any. 402 "projectNumber": "A String", # The project number. 403 "team": "A String", # The team. 404 }, 405 "role": "A String", # The access permission for the entity. 406 "selfLink": "A String", # The link to this access-control entry. 407 }, 408 ], 409 "autoclass": { # The bucket's Autoclass configuration. 410 "enabled": True or False, # Whether or not Autoclass is enabled on this bucket 411 "toggleTime": "A String", # A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. 412 }, 413 "billing": { # The bucket's billing configuration. 414 "requesterPays": True or False, # When set to true, Requester Pays is enabled for this bucket. 415 }, 416 "cors": [ # The bucket's Cross-Origin Resource Sharing (CORS) configuration. 417 { 418 "maxAgeSeconds": 42, # The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. 419 "method": [ # The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". 420 "A String", 421 ], 422 "origin": [ # The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". 423 "A String", 424 ], 425 "responseHeader": [ # The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. 426 "A String", 427 ], 428 }, 429 ], 430 "customPlacementConfig": { # The bucket's custom placement configuration for Custom Dual Regions. 431 "dataLocations": [ # The list of regional locations in which data is placed. 432 "A String", 433 ], 434 }, 435 "defaultEventBasedHold": True or False, # The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. 436 "defaultObjectAcl": [ # Default access controls to apply to new objects when no ACL is provided. 437 { # An access-control entry. 438 "bucket": "A String", # The name of the bucket. 439 "domain": "A String", # The domain associated with the entity, if any. 440 "email": "A String", # The email address associated with the entity, if any. 441 "entity": "A String", # The entity holding the permission, in one of the following forms: 442 # - user-userId 443 # - user-email 444 # - group-groupId 445 # - group-email 446 # - domain-domain 447 # - project-team-projectId 448 # - allUsers 449 # - allAuthenticatedUsers Examples: 450 # - The user liz@example.com would be user-liz@example.com. 451 # - The group example@googlegroups.com would be group-example@googlegroups.com. 452 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 453 "entityId": "A String", # The ID for the entity, if any. 454 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 455 "generation": "A String", # The content generation of the object, if applied to an object. 456 "id": "A String", # The ID of the access-control entry. 457 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 458 "object": "A String", # The name of the object, if applied to an object. 459 "projectTeam": { # The project team associated with the entity, if any. 460 "projectNumber": "A String", # The project number. 461 "team": "A String", # The team. 462 }, 463 "role": "A String", # The access permission for the entity. 464 "selfLink": "A String", # The link to this access-control entry. 465 }, 466 ], 467 "encryption": { # Encryption configuration for a bucket. 468 "defaultKmsKeyName": "A String", # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. 469 }, 470 "etag": "A String", # HTTP 1.1 Entity tag for the bucket. 471 "iamConfiguration": { # The bucket's IAM configuration. 472 "bucketPolicyOnly": { # The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature. 473 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 474 "lockedTime": "A String", # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable. 475 }, 476 "publicAccessPrevention": "A String", # The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported. 477 "uniformBucketLevelAccess": { # The bucket's uniform bucket-level access configuration. 478 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 479 "lockedTime": "A String", # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable. 480 }, 481 }, 482 "id": "A String", # The ID of the bucket. For buckets, the id and name properties are the same. 483 "kind": "storage#bucket", # The kind of item this is. For buckets, this is always storage#bucket. 484 "labels": { # User-provided labels, in key/value pairs. 485 "a_key": "A String", # An individual label entry. 486 }, 487 "lifecycle": { # The bucket's lifecycle configuration. See lifecycle management for more information. 488 "rule": [ # A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. 489 { 490 "action": { # The action to take. 491 "storageClass": "A String", # Target storage class. Required iff the type of the action is SetStorageClass. 492 "type": "A String", # Type of the action. Currently, only Delete and SetStorageClass are supported. 493 }, 494 "condition": { # The condition(s) under which the action will be taken. 495 "age": 42, # Age of an object (in days). This condition is satisfied when an object reaches the specified age. 496 "createdBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. 497 "customTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the custom time on an object is before this date in UTC. 498 "daysSinceCustomTime": 42, # Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply. 499 "daysSinceNoncurrentTime": 42, # Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent. 500 "isLive": True or False, # Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. 501 "matchesPattern": "A String", # A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the "Early Access" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released. 502 "matchesStorageClass": [ # Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. 503 "A String", 504 ], 505 "noncurrentTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects. 506 "numNewerVersions": 42, # Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. 507 }, 508 }, 509 ], 510 }, 511 "location": "A String", # The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. 512 "locationType": "A String", # The type of the bucket location. 513 "logging": { # The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. 514 "logBucket": "A String", # The destination bucket where the current bucket's logs should be placed. 515 "logObjectPrefix": "A String", # A prefix for log object names. 516 }, 517 "metageneration": "A String", # The metadata generation of this bucket. 518 "name": "A String", # The name of the bucket. 519 "owner": { # The owner of the bucket. This is always the project team's owner group. 520 "entity": "A String", # The entity, in the form project-owner-projectId. 521 "entityId": "A String", # The ID for the entity. 522 }, 523 "projectNumber": "A String", # The project number of the project the bucket belongs to. 524 "retentionPolicy": { # The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error. 525 "effectiveTime": "A String", # Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. 526 "isLocked": True or False, # Once locked, an object retention policy cannot be modified. 527 "retentionPeriod": "A String", # The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. 528 }, 529 "rpo": "A String", # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket. 530 "satisfiesPZS": True or False, # Reserved for future use. 531 "selfLink": "A String", # The URI of this bucket. 532 "storageClass": "A String", # The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. 533 "timeCreated": "A String", # The creation time of the bucket in RFC 3339 format. 534 "updated": "A String", # The modification time of the bucket in RFC 3339 format. 535 "versioning": { # The bucket's versioning configuration. 536 "enabled": True or False, # While set to true, versioning is fully enabled for this bucket. 537 }, 538 "website": { # The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. 539 "mainPageSuffix": "A String", # If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. 540 "notFoundPage": "A String", # If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. 541 }, 542} 543 544 predefinedAcl: string, Apply a predefined set of access controls to this bucket. 545 Allowed values 546 authenticatedRead - Project team owners get OWNER access, and allAuthenticatedUsers get READER access. 547 private - Project team owners get OWNER access. 548 projectPrivate - Project team members get access according to their roles. 549 publicRead - Project team owners get OWNER access, and allUsers get READER access. 550 publicReadWrite - Project team owners get OWNER access, and allUsers get WRITER access. 551 predefinedDefaultObjectAcl: string, Apply a predefined set of default object access controls to this bucket. 552 Allowed values 553 authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access. 554 bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access. 555 bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access. 556 private - Object owner gets OWNER access. 557 projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles. 558 publicRead - Object owner gets OWNER access, and allUsers get READER access. 559 projection: string, Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full. 560 Allowed values 561 full - Include all properties. 562 noAcl - Omit owner, acl and defaultObjectAcl properties. 563 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 564 userProject: string, The project to be billed for this request. 565 566Returns: 567 An object of the form: 568 569 { # A bucket. 570 "acl": [ # Access controls on the bucket. 571 { # An access-control entry. 572 "bucket": "A String", # The name of the bucket. 573 "domain": "A String", # The domain associated with the entity, if any. 574 "email": "A String", # The email address associated with the entity, if any. 575 "entity": "A String", # The entity holding the permission, in one of the following forms: 576 # - user-userId 577 # - user-email 578 # - group-groupId 579 # - group-email 580 # - domain-domain 581 # - project-team-projectId 582 # - allUsers 583 # - allAuthenticatedUsers Examples: 584 # - The user liz@example.com would be user-liz@example.com. 585 # - The group example@googlegroups.com would be group-example@googlegroups.com. 586 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 587 "entityId": "A String", # The ID for the entity, if any. 588 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 589 "id": "A String", # The ID of the access-control entry. 590 "kind": "storage#bucketAccessControl", # The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. 591 "projectTeam": { # The project team associated with the entity, if any. 592 "projectNumber": "A String", # The project number. 593 "team": "A String", # The team. 594 }, 595 "role": "A String", # The access permission for the entity. 596 "selfLink": "A String", # The link to this access-control entry. 597 }, 598 ], 599 "autoclass": { # The bucket's Autoclass configuration. 600 "enabled": True or False, # Whether or not Autoclass is enabled on this bucket 601 "toggleTime": "A String", # A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. 602 }, 603 "billing": { # The bucket's billing configuration. 604 "requesterPays": True or False, # When set to true, Requester Pays is enabled for this bucket. 605 }, 606 "cors": [ # The bucket's Cross-Origin Resource Sharing (CORS) configuration. 607 { 608 "maxAgeSeconds": 42, # The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. 609 "method": [ # The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". 610 "A String", 611 ], 612 "origin": [ # The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". 613 "A String", 614 ], 615 "responseHeader": [ # The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. 616 "A String", 617 ], 618 }, 619 ], 620 "customPlacementConfig": { # The bucket's custom placement configuration for Custom Dual Regions. 621 "dataLocations": [ # The list of regional locations in which data is placed. 622 "A String", 623 ], 624 }, 625 "defaultEventBasedHold": True or False, # The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. 626 "defaultObjectAcl": [ # Default access controls to apply to new objects when no ACL is provided. 627 { # An access-control entry. 628 "bucket": "A String", # The name of the bucket. 629 "domain": "A String", # The domain associated with the entity, if any. 630 "email": "A String", # The email address associated with the entity, if any. 631 "entity": "A String", # The entity holding the permission, in one of the following forms: 632 # - user-userId 633 # - user-email 634 # - group-groupId 635 # - group-email 636 # - domain-domain 637 # - project-team-projectId 638 # - allUsers 639 # - allAuthenticatedUsers Examples: 640 # - The user liz@example.com would be user-liz@example.com. 641 # - The group example@googlegroups.com would be group-example@googlegroups.com. 642 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 643 "entityId": "A String", # The ID for the entity, if any. 644 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 645 "generation": "A String", # The content generation of the object, if applied to an object. 646 "id": "A String", # The ID of the access-control entry. 647 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 648 "object": "A String", # The name of the object, if applied to an object. 649 "projectTeam": { # The project team associated with the entity, if any. 650 "projectNumber": "A String", # The project number. 651 "team": "A String", # The team. 652 }, 653 "role": "A String", # The access permission for the entity. 654 "selfLink": "A String", # The link to this access-control entry. 655 }, 656 ], 657 "encryption": { # Encryption configuration for a bucket. 658 "defaultKmsKeyName": "A String", # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. 659 }, 660 "etag": "A String", # HTTP 1.1 Entity tag for the bucket. 661 "iamConfiguration": { # The bucket's IAM configuration. 662 "bucketPolicyOnly": { # The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature. 663 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 664 "lockedTime": "A String", # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable. 665 }, 666 "publicAccessPrevention": "A String", # The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported. 667 "uniformBucketLevelAccess": { # The bucket's uniform bucket-level access configuration. 668 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 669 "lockedTime": "A String", # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable. 670 }, 671 }, 672 "id": "A String", # The ID of the bucket. For buckets, the id and name properties are the same. 673 "kind": "storage#bucket", # The kind of item this is. For buckets, this is always storage#bucket. 674 "labels": { # User-provided labels, in key/value pairs. 675 "a_key": "A String", # An individual label entry. 676 }, 677 "lifecycle": { # The bucket's lifecycle configuration. See lifecycle management for more information. 678 "rule": [ # A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. 679 { 680 "action": { # The action to take. 681 "storageClass": "A String", # Target storage class. Required iff the type of the action is SetStorageClass. 682 "type": "A String", # Type of the action. Currently, only Delete and SetStorageClass are supported. 683 }, 684 "condition": { # The condition(s) under which the action will be taken. 685 "age": 42, # Age of an object (in days). This condition is satisfied when an object reaches the specified age. 686 "createdBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. 687 "customTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the custom time on an object is before this date in UTC. 688 "daysSinceCustomTime": 42, # Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply. 689 "daysSinceNoncurrentTime": 42, # Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent. 690 "isLive": True or False, # Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. 691 "matchesPattern": "A String", # A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the "Early Access" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released. 692 "matchesStorageClass": [ # Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. 693 "A String", 694 ], 695 "noncurrentTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects. 696 "numNewerVersions": 42, # Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. 697 }, 698 }, 699 ], 700 }, 701 "location": "A String", # The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. 702 "locationType": "A String", # The type of the bucket location. 703 "logging": { # The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. 704 "logBucket": "A String", # The destination bucket where the current bucket's logs should be placed. 705 "logObjectPrefix": "A String", # A prefix for log object names. 706 }, 707 "metageneration": "A String", # The metadata generation of this bucket. 708 "name": "A String", # The name of the bucket. 709 "owner": { # The owner of the bucket. This is always the project team's owner group. 710 "entity": "A String", # The entity, in the form project-owner-projectId. 711 "entityId": "A String", # The ID for the entity. 712 }, 713 "projectNumber": "A String", # The project number of the project the bucket belongs to. 714 "retentionPolicy": { # The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error. 715 "effectiveTime": "A String", # Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. 716 "isLocked": True or False, # Once locked, an object retention policy cannot be modified. 717 "retentionPeriod": "A String", # The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. 718 }, 719 "rpo": "A String", # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket. 720 "satisfiesPZS": True or False, # Reserved for future use. 721 "selfLink": "A String", # The URI of this bucket. 722 "storageClass": "A String", # The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. 723 "timeCreated": "A String", # The creation time of the bucket in RFC 3339 format. 724 "updated": "A String", # The modification time of the bucket in RFC 3339 format. 725 "versioning": { # The bucket's versioning configuration. 726 "enabled": True or False, # While set to true, versioning is fully enabled for this bucket. 727 }, 728 "website": { # The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. 729 "mainPageSuffix": "A String", # If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. 730 "notFoundPage": "A String", # If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. 731 }, 732}</pre> 733</div> 734 735<div class="method"> 736 <code class="details" id="list">list(project, maxResults=None, pageToken=None, prefix=None, projection=None, provisionalUserProject=None, userProject=None)</code> 737 <pre>Retrieves a list of buckets for a given project. 738 739Args: 740 project: string, A valid API project identifier. (required) 741 maxResults: integer, Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller. 742 pageToken: string, A previously-returned page token representing part of the larger set of results to view. 743 prefix: string, Filter results to buckets whose names begin with this prefix. 744 projection: string, Set of properties to return. Defaults to noAcl. 745 Allowed values 746 full - Include all properties. 747 noAcl - Omit owner, acl and defaultObjectAcl properties. 748 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 749 userProject: string, The project to be billed for this request. 750 751Returns: 752 An object of the form: 753 754 { # A list of buckets. 755 "items": [ # The list of items. 756 { # A bucket. 757 "acl": [ # Access controls on the bucket. 758 { # An access-control entry. 759 "bucket": "A String", # The name of the bucket. 760 "domain": "A String", # The domain associated with the entity, if any. 761 "email": "A String", # The email address associated with the entity, if any. 762 "entity": "A String", # The entity holding the permission, in one of the following forms: 763 # - user-userId 764 # - user-email 765 # - group-groupId 766 # - group-email 767 # - domain-domain 768 # - project-team-projectId 769 # - allUsers 770 # - allAuthenticatedUsers Examples: 771 # - The user liz@example.com would be user-liz@example.com. 772 # - The group example@googlegroups.com would be group-example@googlegroups.com. 773 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 774 "entityId": "A String", # The ID for the entity, if any. 775 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 776 "id": "A String", # The ID of the access-control entry. 777 "kind": "storage#bucketAccessControl", # The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. 778 "projectTeam": { # The project team associated with the entity, if any. 779 "projectNumber": "A String", # The project number. 780 "team": "A String", # The team. 781 }, 782 "role": "A String", # The access permission for the entity. 783 "selfLink": "A String", # The link to this access-control entry. 784 }, 785 ], 786 "autoclass": { # The bucket's Autoclass configuration. 787 "enabled": True or False, # Whether or not Autoclass is enabled on this bucket 788 "toggleTime": "A String", # A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. 789 }, 790 "billing": { # The bucket's billing configuration. 791 "requesterPays": True or False, # When set to true, Requester Pays is enabled for this bucket. 792 }, 793 "cors": [ # The bucket's Cross-Origin Resource Sharing (CORS) configuration. 794 { 795 "maxAgeSeconds": 42, # The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. 796 "method": [ # The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". 797 "A String", 798 ], 799 "origin": [ # The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". 800 "A String", 801 ], 802 "responseHeader": [ # The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. 803 "A String", 804 ], 805 }, 806 ], 807 "customPlacementConfig": { # The bucket's custom placement configuration for Custom Dual Regions. 808 "dataLocations": [ # The list of regional locations in which data is placed. 809 "A String", 810 ], 811 }, 812 "defaultEventBasedHold": True or False, # The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. 813 "defaultObjectAcl": [ # Default access controls to apply to new objects when no ACL is provided. 814 { # An access-control entry. 815 "bucket": "A String", # The name of the bucket. 816 "domain": "A String", # The domain associated with the entity, if any. 817 "email": "A String", # The email address associated with the entity, if any. 818 "entity": "A String", # The entity holding the permission, in one of the following forms: 819 # - user-userId 820 # - user-email 821 # - group-groupId 822 # - group-email 823 # - domain-domain 824 # - project-team-projectId 825 # - allUsers 826 # - allAuthenticatedUsers Examples: 827 # - The user liz@example.com would be user-liz@example.com. 828 # - The group example@googlegroups.com would be group-example@googlegroups.com. 829 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 830 "entityId": "A String", # The ID for the entity, if any. 831 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 832 "generation": "A String", # The content generation of the object, if applied to an object. 833 "id": "A String", # The ID of the access-control entry. 834 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 835 "object": "A String", # The name of the object, if applied to an object. 836 "projectTeam": { # The project team associated with the entity, if any. 837 "projectNumber": "A String", # The project number. 838 "team": "A String", # The team. 839 }, 840 "role": "A String", # The access permission for the entity. 841 "selfLink": "A String", # The link to this access-control entry. 842 }, 843 ], 844 "encryption": { # Encryption configuration for a bucket. 845 "defaultKmsKeyName": "A String", # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. 846 }, 847 "etag": "A String", # HTTP 1.1 Entity tag for the bucket. 848 "iamConfiguration": { # The bucket's IAM configuration. 849 "bucketPolicyOnly": { # The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature. 850 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 851 "lockedTime": "A String", # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable. 852 }, 853 "publicAccessPrevention": "A String", # The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported. 854 "uniformBucketLevelAccess": { # The bucket's uniform bucket-level access configuration. 855 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 856 "lockedTime": "A String", # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable. 857 }, 858 }, 859 "id": "A String", # The ID of the bucket. For buckets, the id and name properties are the same. 860 "kind": "storage#bucket", # The kind of item this is. For buckets, this is always storage#bucket. 861 "labels": { # User-provided labels, in key/value pairs. 862 "a_key": "A String", # An individual label entry. 863 }, 864 "lifecycle": { # The bucket's lifecycle configuration. See lifecycle management for more information. 865 "rule": [ # A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. 866 { 867 "action": { # The action to take. 868 "storageClass": "A String", # Target storage class. Required iff the type of the action is SetStorageClass. 869 "type": "A String", # Type of the action. Currently, only Delete and SetStorageClass are supported. 870 }, 871 "condition": { # The condition(s) under which the action will be taken. 872 "age": 42, # Age of an object (in days). This condition is satisfied when an object reaches the specified age. 873 "createdBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. 874 "customTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the custom time on an object is before this date in UTC. 875 "daysSinceCustomTime": 42, # Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply. 876 "daysSinceNoncurrentTime": 42, # Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent. 877 "isLive": True or False, # Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. 878 "matchesPattern": "A String", # A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the "Early Access" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released. 879 "matchesStorageClass": [ # Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. 880 "A String", 881 ], 882 "noncurrentTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects. 883 "numNewerVersions": 42, # Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. 884 }, 885 }, 886 ], 887 }, 888 "location": "A String", # The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. 889 "locationType": "A String", # The type of the bucket location. 890 "logging": { # The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. 891 "logBucket": "A String", # The destination bucket where the current bucket's logs should be placed. 892 "logObjectPrefix": "A String", # A prefix for log object names. 893 }, 894 "metageneration": "A String", # The metadata generation of this bucket. 895 "name": "A String", # The name of the bucket. 896 "owner": { # The owner of the bucket. This is always the project team's owner group. 897 "entity": "A String", # The entity, in the form project-owner-projectId. 898 "entityId": "A String", # The ID for the entity. 899 }, 900 "projectNumber": "A String", # The project number of the project the bucket belongs to. 901 "retentionPolicy": { # The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error. 902 "effectiveTime": "A String", # Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. 903 "isLocked": True or False, # Once locked, an object retention policy cannot be modified. 904 "retentionPeriod": "A String", # The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. 905 }, 906 "rpo": "A String", # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket. 907 "satisfiesPZS": True or False, # Reserved for future use. 908 "selfLink": "A String", # The URI of this bucket. 909 "storageClass": "A String", # The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. 910 "timeCreated": "A String", # The creation time of the bucket in RFC 3339 format. 911 "updated": "A String", # The modification time of the bucket in RFC 3339 format. 912 "versioning": { # The bucket's versioning configuration. 913 "enabled": True or False, # While set to true, versioning is fully enabled for this bucket. 914 }, 915 "website": { # The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. 916 "mainPageSuffix": "A String", # If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. 917 "notFoundPage": "A String", # If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. 918 }, 919 }, 920 ], 921 "kind": "storage#buckets", # The kind of item this is. For lists of buckets, this is always storage#buckets. 922 "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. 923}</pre> 924</div> 925 926<div class="method"> 927 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 928 <pre>Retrieves the next page of results. 929 930Args: 931 previous_request: The request for the previous page. (required) 932 previous_response: The response from the request for the previous page. (required) 933 934Returns: 935 A request object that you can call 'execute()' on to request the next 936 page. Returns None if there are no more items in the collection. 937 </pre> 938</div> 939 940<div class="method"> 941 <code class="details" id="lockRetentionPolicy">lockRetentionPolicy(bucket, ifMetagenerationMatch, provisionalUserProject=None, userProject=None)</code> 942 <pre>Locks retention policy on a bucket. 943 944Args: 945 bucket: string, Name of a bucket. (required) 946 ifMetagenerationMatch: string, Makes the operation conditional on whether bucket's current metageneration matches the given value. (required) 947 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 948 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 949 950Returns: 951 An object of the form: 952 953 { # A bucket. 954 "acl": [ # Access controls on the bucket. 955 { # An access-control entry. 956 "bucket": "A String", # The name of the bucket. 957 "domain": "A String", # The domain associated with the entity, if any. 958 "email": "A String", # The email address associated with the entity, if any. 959 "entity": "A String", # The entity holding the permission, in one of the following forms: 960 # - user-userId 961 # - user-email 962 # - group-groupId 963 # - group-email 964 # - domain-domain 965 # - project-team-projectId 966 # - allUsers 967 # - allAuthenticatedUsers Examples: 968 # - The user liz@example.com would be user-liz@example.com. 969 # - The group example@googlegroups.com would be group-example@googlegroups.com. 970 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 971 "entityId": "A String", # The ID for the entity, if any. 972 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 973 "id": "A String", # The ID of the access-control entry. 974 "kind": "storage#bucketAccessControl", # The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. 975 "projectTeam": { # The project team associated with the entity, if any. 976 "projectNumber": "A String", # The project number. 977 "team": "A String", # The team. 978 }, 979 "role": "A String", # The access permission for the entity. 980 "selfLink": "A String", # The link to this access-control entry. 981 }, 982 ], 983 "autoclass": { # The bucket's Autoclass configuration. 984 "enabled": True or False, # Whether or not Autoclass is enabled on this bucket 985 "toggleTime": "A String", # A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. 986 }, 987 "billing": { # The bucket's billing configuration. 988 "requesterPays": True or False, # When set to true, Requester Pays is enabled for this bucket. 989 }, 990 "cors": [ # The bucket's Cross-Origin Resource Sharing (CORS) configuration. 991 { 992 "maxAgeSeconds": 42, # The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. 993 "method": [ # The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". 994 "A String", 995 ], 996 "origin": [ # The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". 997 "A String", 998 ], 999 "responseHeader": [ # The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. 1000 "A String", 1001 ], 1002 }, 1003 ], 1004 "customPlacementConfig": { # The bucket's custom placement configuration for Custom Dual Regions. 1005 "dataLocations": [ # The list of regional locations in which data is placed. 1006 "A String", 1007 ], 1008 }, 1009 "defaultEventBasedHold": True or False, # The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. 1010 "defaultObjectAcl": [ # Default access controls to apply to new objects when no ACL is provided. 1011 { # An access-control entry. 1012 "bucket": "A String", # The name of the bucket. 1013 "domain": "A String", # The domain associated with the entity, if any. 1014 "email": "A String", # The email address associated with the entity, if any. 1015 "entity": "A String", # The entity holding the permission, in one of the following forms: 1016 # - user-userId 1017 # - user-email 1018 # - group-groupId 1019 # - group-email 1020 # - domain-domain 1021 # - project-team-projectId 1022 # - allUsers 1023 # - allAuthenticatedUsers Examples: 1024 # - The user liz@example.com would be user-liz@example.com. 1025 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1026 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1027 "entityId": "A String", # The ID for the entity, if any. 1028 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1029 "generation": "A String", # The content generation of the object, if applied to an object. 1030 "id": "A String", # The ID of the access-control entry. 1031 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1032 "object": "A String", # The name of the object, if applied to an object. 1033 "projectTeam": { # The project team associated with the entity, if any. 1034 "projectNumber": "A String", # The project number. 1035 "team": "A String", # The team. 1036 }, 1037 "role": "A String", # The access permission for the entity. 1038 "selfLink": "A String", # The link to this access-control entry. 1039 }, 1040 ], 1041 "encryption": { # Encryption configuration for a bucket. 1042 "defaultKmsKeyName": "A String", # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. 1043 }, 1044 "etag": "A String", # HTTP 1.1 Entity tag for the bucket. 1045 "iamConfiguration": { # The bucket's IAM configuration. 1046 "bucketPolicyOnly": { # The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature. 1047 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1048 "lockedTime": "A String", # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable. 1049 }, 1050 "publicAccessPrevention": "A String", # The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported. 1051 "uniformBucketLevelAccess": { # The bucket's uniform bucket-level access configuration. 1052 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1053 "lockedTime": "A String", # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable. 1054 }, 1055 }, 1056 "id": "A String", # The ID of the bucket. For buckets, the id and name properties are the same. 1057 "kind": "storage#bucket", # The kind of item this is. For buckets, this is always storage#bucket. 1058 "labels": { # User-provided labels, in key/value pairs. 1059 "a_key": "A String", # An individual label entry. 1060 }, 1061 "lifecycle": { # The bucket's lifecycle configuration. See lifecycle management for more information. 1062 "rule": [ # A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. 1063 { 1064 "action": { # The action to take. 1065 "storageClass": "A String", # Target storage class. Required iff the type of the action is SetStorageClass. 1066 "type": "A String", # Type of the action. Currently, only Delete and SetStorageClass are supported. 1067 }, 1068 "condition": { # The condition(s) under which the action will be taken. 1069 "age": 42, # Age of an object (in days). This condition is satisfied when an object reaches the specified age. 1070 "createdBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. 1071 "customTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the custom time on an object is before this date in UTC. 1072 "daysSinceCustomTime": 42, # Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply. 1073 "daysSinceNoncurrentTime": 42, # Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent. 1074 "isLive": True or False, # Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. 1075 "matchesPattern": "A String", # A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the "Early Access" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released. 1076 "matchesStorageClass": [ # Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. 1077 "A String", 1078 ], 1079 "noncurrentTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects. 1080 "numNewerVersions": 42, # Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. 1081 }, 1082 }, 1083 ], 1084 }, 1085 "location": "A String", # The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. 1086 "locationType": "A String", # The type of the bucket location. 1087 "logging": { # The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. 1088 "logBucket": "A String", # The destination bucket where the current bucket's logs should be placed. 1089 "logObjectPrefix": "A String", # A prefix for log object names. 1090 }, 1091 "metageneration": "A String", # The metadata generation of this bucket. 1092 "name": "A String", # The name of the bucket. 1093 "owner": { # The owner of the bucket. This is always the project team's owner group. 1094 "entity": "A String", # The entity, in the form project-owner-projectId. 1095 "entityId": "A String", # The ID for the entity. 1096 }, 1097 "projectNumber": "A String", # The project number of the project the bucket belongs to. 1098 "retentionPolicy": { # The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error. 1099 "effectiveTime": "A String", # Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. 1100 "isLocked": True or False, # Once locked, an object retention policy cannot be modified. 1101 "retentionPeriod": "A String", # The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. 1102 }, 1103 "rpo": "A String", # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket. 1104 "satisfiesPZS": True or False, # Reserved for future use. 1105 "selfLink": "A String", # The URI of this bucket. 1106 "storageClass": "A String", # The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. 1107 "timeCreated": "A String", # The creation time of the bucket in RFC 3339 format. 1108 "updated": "A String", # The modification time of the bucket in RFC 3339 format. 1109 "versioning": { # The bucket's versioning configuration. 1110 "enabled": True or False, # While set to true, versioning is fully enabled for this bucket. 1111 }, 1112 "website": { # The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. 1113 "mainPageSuffix": "A String", # If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. 1114 "notFoundPage": "A String", # If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. 1115 }, 1116}</pre> 1117</div> 1118 1119<div class="method"> 1120 <code class="details" id="patch">patch(bucket, body=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, predefinedAcl=None, predefinedDefaultObjectAcl=None, projection=None, provisionalUserProject=None, userProject=None)</code> 1121 <pre>Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. 1122 1123Args: 1124 bucket: string, Name of a bucket. (required) 1125 body: object, The request body. 1126 The object takes the form of: 1127 1128{ # A bucket. 1129 "acl": [ # Access controls on the bucket. 1130 { # An access-control entry. 1131 "bucket": "A String", # The name of the bucket. 1132 "domain": "A String", # The domain associated with the entity, if any. 1133 "email": "A String", # The email address associated with the entity, if any. 1134 "entity": "A String", # The entity holding the permission, in one of the following forms: 1135 # - user-userId 1136 # - user-email 1137 # - group-groupId 1138 # - group-email 1139 # - domain-domain 1140 # - project-team-projectId 1141 # - allUsers 1142 # - allAuthenticatedUsers Examples: 1143 # - The user liz@example.com would be user-liz@example.com. 1144 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1145 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1146 "entityId": "A String", # The ID for the entity, if any. 1147 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1148 "id": "A String", # The ID of the access-control entry. 1149 "kind": "storage#bucketAccessControl", # The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. 1150 "projectTeam": { # The project team associated with the entity, if any. 1151 "projectNumber": "A String", # The project number. 1152 "team": "A String", # The team. 1153 }, 1154 "role": "A String", # The access permission for the entity. 1155 "selfLink": "A String", # The link to this access-control entry. 1156 }, 1157 ], 1158 "autoclass": { # The bucket's Autoclass configuration. 1159 "enabled": True or False, # Whether or not Autoclass is enabled on this bucket 1160 "toggleTime": "A String", # A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. 1161 }, 1162 "billing": { # The bucket's billing configuration. 1163 "requesterPays": True or False, # When set to true, Requester Pays is enabled for this bucket. 1164 }, 1165 "cors": [ # The bucket's Cross-Origin Resource Sharing (CORS) configuration. 1166 { 1167 "maxAgeSeconds": 42, # The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. 1168 "method": [ # The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". 1169 "A String", 1170 ], 1171 "origin": [ # The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". 1172 "A String", 1173 ], 1174 "responseHeader": [ # The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. 1175 "A String", 1176 ], 1177 }, 1178 ], 1179 "customPlacementConfig": { # The bucket's custom placement configuration for Custom Dual Regions. 1180 "dataLocations": [ # The list of regional locations in which data is placed. 1181 "A String", 1182 ], 1183 }, 1184 "defaultEventBasedHold": True or False, # The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. 1185 "defaultObjectAcl": [ # Default access controls to apply to new objects when no ACL is provided. 1186 { # An access-control entry. 1187 "bucket": "A String", # The name of the bucket. 1188 "domain": "A String", # The domain associated with the entity, if any. 1189 "email": "A String", # The email address associated with the entity, if any. 1190 "entity": "A String", # The entity holding the permission, in one of the following forms: 1191 # - user-userId 1192 # - user-email 1193 # - group-groupId 1194 # - group-email 1195 # - domain-domain 1196 # - project-team-projectId 1197 # - allUsers 1198 # - allAuthenticatedUsers Examples: 1199 # - The user liz@example.com would be user-liz@example.com. 1200 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1201 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1202 "entityId": "A String", # The ID for the entity, if any. 1203 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1204 "generation": "A String", # The content generation of the object, if applied to an object. 1205 "id": "A String", # The ID of the access-control entry. 1206 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1207 "object": "A String", # The name of the object, if applied to an object. 1208 "projectTeam": { # The project team associated with the entity, if any. 1209 "projectNumber": "A String", # The project number. 1210 "team": "A String", # The team. 1211 }, 1212 "role": "A String", # The access permission for the entity. 1213 "selfLink": "A String", # The link to this access-control entry. 1214 }, 1215 ], 1216 "encryption": { # Encryption configuration for a bucket. 1217 "defaultKmsKeyName": "A String", # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. 1218 }, 1219 "etag": "A String", # HTTP 1.1 Entity tag for the bucket. 1220 "iamConfiguration": { # The bucket's IAM configuration. 1221 "bucketPolicyOnly": { # The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature. 1222 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1223 "lockedTime": "A String", # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable. 1224 }, 1225 "publicAccessPrevention": "A String", # The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported. 1226 "uniformBucketLevelAccess": { # The bucket's uniform bucket-level access configuration. 1227 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1228 "lockedTime": "A String", # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable. 1229 }, 1230 }, 1231 "id": "A String", # The ID of the bucket. For buckets, the id and name properties are the same. 1232 "kind": "storage#bucket", # The kind of item this is. For buckets, this is always storage#bucket. 1233 "labels": { # User-provided labels, in key/value pairs. 1234 "a_key": "A String", # An individual label entry. 1235 }, 1236 "lifecycle": { # The bucket's lifecycle configuration. See lifecycle management for more information. 1237 "rule": [ # A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. 1238 { 1239 "action": { # The action to take. 1240 "storageClass": "A String", # Target storage class. Required iff the type of the action is SetStorageClass. 1241 "type": "A String", # Type of the action. Currently, only Delete and SetStorageClass are supported. 1242 }, 1243 "condition": { # The condition(s) under which the action will be taken. 1244 "age": 42, # Age of an object (in days). This condition is satisfied when an object reaches the specified age. 1245 "createdBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. 1246 "customTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the custom time on an object is before this date in UTC. 1247 "daysSinceCustomTime": 42, # Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply. 1248 "daysSinceNoncurrentTime": 42, # Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent. 1249 "isLive": True or False, # Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. 1250 "matchesPattern": "A String", # A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the "Early Access" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released. 1251 "matchesStorageClass": [ # Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. 1252 "A String", 1253 ], 1254 "noncurrentTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects. 1255 "numNewerVersions": 42, # Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. 1256 }, 1257 }, 1258 ], 1259 }, 1260 "location": "A String", # The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. 1261 "locationType": "A String", # The type of the bucket location. 1262 "logging": { # The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. 1263 "logBucket": "A String", # The destination bucket where the current bucket's logs should be placed. 1264 "logObjectPrefix": "A String", # A prefix for log object names. 1265 }, 1266 "metageneration": "A String", # The metadata generation of this bucket. 1267 "name": "A String", # The name of the bucket. 1268 "owner": { # The owner of the bucket. This is always the project team's owner group. 1269 "entity": "A String", # The entity, in the form project-owner-projectId. 1270 "entityId": "A String", # The ID for the entity. 1271 }, 1272 "projectNumber": "A String", # The project number of the project the bucket belongs to. 1273 "retentionPolicy": { # The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error. 1274 "effectiveTime": "A String", # Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. 1275 "isLocked": True or False, # Once locked, an object retention policy cannot be modified. 1276 "retentionPeriod": "A String", # The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. 1277 }, 1278 "rpo": "A String", # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket. 1279 "satisfiesPZS": True or False, # Reserved for future use. 1280 "selfLink": "A String", # The URI of this bucket. 1281 "storageClass": "A String", # The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. 1282 "timeCreated": "A String", # The creation time of the bucket in RFC 3339 format. 1283 "updated": "A String", # The modification time of the bucket in RFC 3339 format. 1284 "versioning": { # The bucket's versioning configuration. 1285 "enabled": True or False, # While set to true, versioning is fully enabled for this bucket. 1286 }, 1287 "website": { # The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. 1288 "mainPageSuffix": "A String", # If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. 1289 "notFoundPage": "A String", # If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. 1290 }, 1291} 1292 1293 ifMetagenerationMatch: string, Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. 1294 ifMetagenerationNotMatch: string, Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. 1295 predefinedAcl: string, Apply a predefined set of access controls to this bucket. 1296 Allowed values 1297 authenticatedRead - Project team owners get OWNER access, and allAuthenticatedUsers get READER access. 1298 private - Project team owners get OWNER access. 1299 projectPrivate - Project team members get access according to their roles. 1300 publicRead - Project team owners get OWNER access, and allUsers get READER access. 1301 publicReadWrite - Project team owners get OWNER access, and allUsers get WRITER access. 1302 predefinedDefaultObjectAcl: string, Apply a predefined set of default object access controls to this bucket. 1303 Allowed values 1304 authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access. 1305 bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access. 1306 bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access. 1307 private - Object owner gets OWNER access. 1308 projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles. 1309 publicRead - Object owner gets OWNER access, and allUsers get READER access. 1310 projection: string, Set of properties to return. Defaults to full. 1311 Allowed values 1312 full - Include all properties. 1313 noAcl - Omit owner, acl and defaultObjectAcl properties. 1314 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1315 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 1316 1317Returns: 1318 An object of the form: 1319 1320 { # A bucket. 1321 "acl": [ # Access controls on the bucket. 1322 { # An access-control entry. 1323 "bucket": "A String", # The name of the bucket. 1324 "domain": "A String", # The domain associated with the entity, if any. 1325 "email": "A String", # The email address associated with the entity, if any. 1326 "entity": "A String", # The entity holding the permission, in one of the following forms: 1327 # - user-userId 1328 # - user-email 1329 # - group-groupId 1330 # - group-email 1331 # - domain-domain 1332 # - project-team-projectId 1333 # - allUsers 1334 # - allAuthenticatedUsers Examples: 1335 # - The user liz@example.com would be user-liz@example.com. 1336 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1337 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1338 "entityId": "A String", # The ID for the entity, if any. 1339 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1340 "id": "A String", # The ID of the access-control entry. 1341 "kind": "storage#bucketAccessControl", # The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. 1342 "projectTeam": { # The project team associated with the entity, if any. 1343 "projectNumber": "A String", # The project number. 1344 "team": "A String", # The team. 1345 }, 1346 "role": "A String", # The access permission for the entity. 1347 "selfLink": "A String", # The link to this access-control entry. 1348 }, 1349 ], 1350 "autoclass": { # The bucket's Autoclass configuration. 1351 "enabled": True or False, # Whether or not Autoclass is enabled on this bucket 1352 "toggleTime": "A String", # A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. 1353 }, 1354 "billing": { # The bucket's billing configuration. 1355 "requesterPays": True or False, # When set to true, Requester Pays is enabled for this bucket. 1356 }, 1357 "cors": [ # The bucket's Cross-Origin Resource Sharing (CORS) configuration. 1358 { 1359 "maxAgeSeconds": 42, # The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. 1360 "method": [ # The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". 1361 "A String", 1362 ], 1363 "origin": [ # The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". 1364 "A String", 1365 ], 1366 "responseHeader": [ # The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. 1367 "A String", 1368 ], 1369 }, 1370 ], 1371 "customPlacementConfig": { # The bucket's custom placement configuration for Custom Dual Regions. 1372 "dataLocations": [ # The list of regional locations in which data is placed. 1373 "A String", 1374 ], 1375 }, 1376 "defaultEventBasedHold": True or False, # The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. 1377 "defaultObjectAcl": [ # Default access controls to apply to new objects when no ACL is provided. 1378 { # An access-control entry. 1379 "bucket": "A String", # The name of the bucket. 1380 "domain": "A String", # The domain associated with the entity, if any. 1381 "email": "A String", # The email address associated with the entity, if any. 1382 "entity": "A String", # The entity holding the permission, in one of the following forms: 1383 # - user-userId 1384 # - user-email 1385 # - group-groupId 1386 # - group-email 1387 # - domain-domain 1388 # - project-team-projectId 1389 # - allUsers 1390 # - allAuthenticatedUsers Examples: 1391 # - The user liz@example.com would be user-liz@example.com. 1392 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1393 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1394 "entityId": "A String", # The ID for the entity, if any. 1395 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1396 "generation": "A String", # The content generation of the object, if applied to an object. 1397 "id": "A String", # The ID of the access-control entry. 1398 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1399 "object": "A String", # The name of the object, if applied to an object. 1400 "projectTeam": { # The project team associated with the entity, if any. 1401 "projectNumber": "A String", # The project number. 1402 "team": "A String", # The team. 1403 }, 1404 "role": "A String", # The access permission for the entity. 1405 "selfLink": "A String", # The link to this access-control entry. 1406 }, 1407 ], 1408 "encryption": { # Encryption configuration for a bucket. 1409 "defaultKmsKeyName": "A String", # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. 1410 }, 1411 "etag": "A String", # HTTP 1.1 Entity tag for the bucket. 1412 "iamConfiguration": { # The bucket's IAM configuration. 1413 "bucketPolicyOnly": { # The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature. 1414 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1415 "lockedTime": "A String", # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable. 1416 }, 1417 "publicAccessPrevention": "A String", # The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported. 1418 "uniformBucketLevelAccess": { # The bucket's uniform bucket-level access configuration. 1419 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1420 "lockedTime": "A String", # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable. 1421 }, 1422 }, 1423 "id": "A String", # The ID of the bucket. For buckets, the id and name properties are the same. 1424 "kind": "storage#bucket", # The kind of item this is. For buckets, this is always storage#bucket. 1425 "labels": { # User-provided labels, in key/value pairs. 1426 "a_key": "A String", # An individual label entry. 1427 }, 1428 "lifecycle": { # The bucket's lifecycle configuration. See lifecycle management for more information. 1429 "rule": [ # A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. 1430 { 1431 "action": { # The action to take. 1432 "storageClass": "A String", # Target storage class. Required iff the type of the action is SetStorageClass. 1433 "type": "A String", # Type of the action. Currently, only Delete and SetStorageClass are supported. 1434 }, 1435 "condition": { # The condition(s) under which the action will be taken. 1436 "age": 42, # Age of an object (in days). This condition is satisfied when an object reaches the specified age. 1437 "createdBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. 1438 "customTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the custom time on an object is before this date in UTC. 1439 "daysSinceCustomTime": 42, # Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply. 1440 "daysSinceNoncurrentTime": 42, # Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent. 1441 "isLive": True or False, # Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. 1442 "matchesPattern": "A String", # A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the "Early Access" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released. 1443 "matchesStorageClass": [ # Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. 1444 "A String", 1445 ], 1446 "noncurrentTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects. 1447 "numNewerVersions": 42, # Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. 1448 }, 1449 }, 1450 ], 1451 }, 1452 "location": "A String", # The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. 1453 "locationType": "A String", # The type of the bucket location. 1454 "logging": { # The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. 1455 "logBucket": "A String", # The destination bucket where the current bucket's logs should be placed. 1456 "logObjectPrefix": "A String", # A prefix for log object names. 1457 }, 1458 "metageneration": "A String", # The metadata generation of this bucket. 1459 "name": "A String", # The name of the bucket. 1460 "owner": { # The owner of the bucket. This is always the project team's owner group. 1461 "entity": "A String", # The entity, in the form project-owner-projectId. 1462 "entityId": "A String", # The ID for the entity. 1463 }, 1464 "projectNumber": "A String", # The project number of the project the bucket belongs to. 1465 "retentionPolicy": { # The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error. 1466 "effectiveTime": "A String", # Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. 1467 "isLocked": True or False, # Once locked, an object retention policy cannot be modified. 1468 "retentionPeriod": "A String", # The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. 1469 }, 1470 "rpo": "A String", # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket. 1471 "satisfiesPZS": True or False, # Reserved for future use. 1472 "selfLink": "A String", # The URI of this bucket. 1473 "storageClass": "A String", # The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. 1474 "timeCreated": "A String", # The creation time of the bucket in RFC 3339 format. 1475 "updated": "A String", # The modification time of the bucket in RFC 3339 format. 1476 "versioning": { # The bucket's versioning configuration. 1477 "enabled": True or False, # While set to true, versioning is fully enabled for this bucket. 1478 }, 1479 "website": { # The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. 1480 "mainPageSuffix": "A String", # If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. 1481 "notFoundPage": "A String", # If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. 1482 }, 1483}</pre> 1484</div> 1485 1486<div class="method"> 1487 <code class="details" id="setIamPolicy">setIamPolicy(bucket, body=None, provisionalUserProject=None, userProject=None)</code> 1488 <pre>Updates an IAM policy for the specified bucket. 1489 1490Args: 1491 bucket: string, Name of a bucket. (required) 1492 body: object, The request body. 1493 The object takes the form of: 1494 1495{ # A bucket/object IAM policy. 1496 "bindings": [ # An association between a role, which comes with a set of permissions, and members who may assume that role. 1497 { 1498 "condition": { # Represents an expression text. Example: title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" # The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. 1499 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1500 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported. 1501 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1502 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 1503 }, 1504 "members": [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: 1505 # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account. 1506 # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. 1507 # - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. 1508 # - serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . 1509 # - group:emailid — An email address that represents a Google group. For example, group:admins@example.com. 1510 # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. 1511 # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project 1512 # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project 1513 # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project 1514 "A String", 1515 ], 1516 "role": "A String", # The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole. 1517 # The new IAM roles are: 1518 # - roles/storage.admin — Full control of Google Cloud Storage resources. 1519 # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. 1520 # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage. 1521 # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: 1522 # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. 1523 # - roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. 1524 # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. 1525 # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. 1526 # - roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role. 1527 }, 1528 ], 1529 "etag": "A String", # HTTP 1.1 Entity tag for the policy. 1530 "kind": "storage#policy", # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. 1531 "resourceId": "A String", # The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. 1532 "version": 42, # The IAM policy format version. 1533} 1534 1535 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1536 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 1537 1538Returns: 1539 An object of the form: 1540 1541 { # A bucket/object IAM policy. 1542 "bindings": [ # An association between a role, which comes with a set of permissions, and members who may assume that role. 1543 { 1544 "condition": { # Represents an expression text. Example: title: "User account presence" description: "Determines whether the request has a user account" expression: "size(request.user) > 0" # The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently. 1545 "description": "A String", # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. 1546 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported. 1547 "location": "A String", # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file. 1548 "title": "A String", # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. 1549 }, 1550 "members": [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: 1551 # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account. 1552 # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. 1553 # - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. 1554 # - serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . 1555 # - group:emailid — An email address that represents a Google group. For example, group:admins@example.com. 1556 # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. 1557 # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project 1558 # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project 1559 # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project 1560 "A String", 1561 ], 1562 "role": "A String", # The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole. 1563 # The new IAM roles are: 1564 # - roles/storage.admin — Full control of Google Cloud Storage resources. 1565 # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. 1566 # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage. 1567 # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: 1568 # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. 1569 # - roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. 1570 # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. 1571 # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. 1572 # - roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role. 1573 }, 1574 ], 1575 "etag": "A String", # HTTP 1.1 Entity tag for the policy. 1576 "kind": "storage#policy", # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. 1577 "resourceId": "A String", # The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. 1578 "version": 42, # The IAM policy format version. 1579}</pre> 1580</div> 1581 1582<div class="method"> 1583 <code class="details" id="testIamPermissions">testIamPermissions(bucket, permissions, provisionalUserProject=None, userProject=None)</code> 1584 <pre>Tests a set of permissions on the given bucket to see which, if any, are held by the caller. 1585 1586Args: 1587 bucket: string, Name of a bucket. (required) 1588 permissions: string, Permissions to test. (required) (repeated) 1589 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1590 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 1591 1592Returns: 1593 An object of the form: 1594 1595 { # A storage.(buckets|objects).testIamPermissions response. 1596 "kind": "storage#testIamPermissionsResponse", # The kind of item this is. 1597 "permissions": [ # The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets or objects. The supported permissions are as follows: 1598 # - storage.buckets.delete — Delete bucket. 1599 # - storage.buckets.get — Read bucket metadata. 1600 # - storage.buckets.getIamPolicy — Read bucket IAM policy. 1601 # - storage.buckets.create — Create bucket. 1602 # - storage.buckets.list — List buckets. 1603 # - storage.buckets.setIamPolicy — Update bucket IAM policy. 1604 # - storage.buckets.update — Update bucket metadata. 1605 # - storage.objects.delete — Delete object. 1606 # - storage.objects.get — Read object data and metadata. 1607 # - storage.objects.getIamPolicy — Read object IAM policy. 1608 # - storage.objects.create — Create object. 1609 # - storage.objects.list — List objects. 1610 # - storage.objects.setIamPolicy — Update object IAM policy. 1611 # - storage.objects.update — Update object metadata. 1612 "A String", 1613 ], 1614}</pre> 1615</div> 1616 1617<div class="method"> 1618 <code class="details" id="update">update(bucket, body=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, predefinedAcl=None, predefinedDefaultObjectAcl=None, projection=None, provisionalUserProject=None, userProject=None)</code> 1619 <pre>Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. 1620 1621Args: 1622 bucket: string, Name of a bucket. (required) 1623 body: object, The request body. 1624 The object takes the form of: 1625 1626{ # A bucket. 1627 "acl": [ # Access controls on the bucket. 1628 { # An access-control entry. 1629 "bucket": "A String", # The name of the bucket. 1630 "domain": "A String", # The domain associated with the entity, if any. 1631 "email": "A String", # The email address associated with the entity, if any. 1632 "entity": "A String", # The entity holding the permission, in one of the following forms: 1633 # - user-userId 1634 # - user-email 1635 # - group-groupId 1636 # - group-email 1637 # - domain-domain 1638 # - project-team-projectId 1639 # - allUsers 1640 # - allAuthenticatedUsers Examples: 1641 # - The user liz@example.com would be user-liz@example.com. 1642 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1643 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1644 "entityId": "A String", # The ID for the entity, if any. 1645 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1646 "id": "A String", # The ID of the access-control entry. 1647 "kind": "storage#bucketAccessControl", # The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. 1648 "projectTeam": { # The project team associated with the entity, if any. 1649 "projectNumber": "A String", # The project number. 1650 "team": "A String", # The team. 1651 }, 1652 "role": "A String", # The access permission for the entity. 1653 "selfLink": "A String", # The link to this access-control entry. 1654 }, 1655 ], 1656 "autoclass": { # The bucket's Autoclass configuration. 1657 "enabled": True or False, # Whether or not Autoclass is enabled on this bucket 1658 "toggleTime": "A String", # A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. 1659 }, 1660 "billing": { # The bucket's billing configuration. 1661 "requesterPays": True or False, # When set to true, Requester Pays is enabled for this bucket. 1662 }, 1663 "cors": [ # The bucket's Cross-Origin Resource Sharing (CORS) configuration. 1664 { 1665 "maxAgeSeconds": 42, # The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. 1666 "method": [ # The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". 1667 "A String", 1668 ], 1669 "origin": [ # The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". 1670 "A String", 1671 ], 1672 "responseHeader": [ # The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. 1673 "A String", 1674 ], 1675 }, 1676 ], 1677 "customPlacementConfig": { # The bucket's custom placement configuration for Custom Dual Regions. 1678 "dataLocations": [ # The list of regional locations in which data is placed. 1679 "A String", 1680 ], 1681 }, 1682 "defaultEventBasedHold": True or False, # The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. 1683 "defaultObjectAcl": [ # Default access controls to apply to new objects when no ACL is provided. 1684 { # An access-control entry. 1685 "bucket": "A String", # The name of the bucket. 1686 "domain": "A String", # The domain associated with the entity, if any. 1687 "email": "A String", # The email address associated with the entity, if any. 1688 "entity": "A String", # The entity holding the permission, in one of the following forms: 1689 # - user-userId 1690 # - user-email 1691 # - group-groupId 1692 # - group-email 1693 # - domain-domain 1694 # - project-team-projectId 1695 # - allUsers 1696 # - allAuthenticatedUsers Examples: 1697 # - The user liz@example.com would be user-liz@example.com. 1698 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1699 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1700 "entityId": "A String", # The ID for the entity, if any. 1701 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1702 "generation": "A String", # The content generation of the object, if applied to an object. 1703 "id": "A String", # The ID of the access-control entry. 1704 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1705 "object": "A String", # The name of the object, if applied to an object. 1706 "projectTeam": { # The project team associated with the entity, if any. 1707 "projectNumber": "A String", # The project number. 1708 "team": "A String", # The team. 1709 }, 1710 "role": "A String", # The access permission for the entity. 1711 "selfLink": "A String", # The link to this access-control entry. 1712 }, 1713 ], 1714 "encryption": { # Encryption configuration for a bucket. 1715 "defaultKmsKeyName": "A String", # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. 1716 }, 1717 "etag": "A String", # HTTP 1.1 Entity tag for the bucket. 1718 "iamConfiguration": { # The bucket's IAM configuration. 1719 "bucketPolicyOnly": { # The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature. 1720 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1721 "lockedTime": "A String", # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable. 1722 }, 1723 "publicAccessPrevention": "A String", # The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported. 1724 "uniformBucketLevelAccess": { # The bucket's uniform bucket-level access configuration. 1725 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1726 "lockedTime": "A String", # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable. 1727 }, 1728 }, 1729 "id": "A String", # The ID of the bucket. For buckets, the id and name properties are the same. 1730 "kind": "storage#bucket", # The kind of item this is. For buckets, this is always storage#bucket. 1731 "labels": { # User-provided labels, in key/value pairs. 1732 "a_key": "A String", # An individual label entry. 1733 }, 1734 "lifecycle": { # The bucket's lifecycle configuration. See lifecycle management for more information. 1735 "rule": [ # A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. 1736 { 1737 "action": { # The action to take. 1738 "storageClass": "A String", # Target storage class. Required iff the type of the action is SetStorageClass. 1739 "type": "A String", # Type of the action. Currently, only Delete and SetStorageClass are supported. 1740 }, 1741 "condition": { # The condition(s) under which the action will be taken. 1742 "age": 42, # Age of an object (in days). This condition is satisfied when an object reaches the specified age. 1743 "createdBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. 1744 "customTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the custom time on an object is before this date in UTC. 1745 "daysSinceCustomTime": 42, # Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply. 1746 "daysSinceNoncurrentTime": 42, # Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent. 1747 "isLive": True or False, # Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. 1748 "matchesPattern": "A String", # A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the "Early Access" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released. 1749 "matchesStorageClass": [ # Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. 1750 "A String", 1751 ], 1752 "noncurrentTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects. 1753 "numNewerVersions": 42, # Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. 1754 }, 1755 }, 1756 ], 1757 }, 1758 "location": "A String", # The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. 1759 "locationType": "A String", # The type of the bucket location. 1760 "logging": { # The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. 1761 "logBucket": "A String", # The destination bucket where the current bucket's logs should be placed. 1762 "logObjectPrefix": "A String", # A prefix for log object names. 1763 }, 1764 "metageneration": "A String", # The metadata generation of this bucket. 1765 "name": "A String", # The name of the bucket. 1766 "owner": { # The owner of the bucket. This is always the project team's owner group. 1767 "entity": "A String", # The entity, in the form project-owner-projectId. 1768 "entityId": "A String", # The ID for the entity. 1769 }, 1770 "projectNumber": "A String", # The project number of the project the bucket belongs to. 1771 "retentionPolicy": { # The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error. 1772 "effectiveTime": "A String", # Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. 1773 "isLocked": True or False, # Once locked, an object retention policy cannot be modified. 1774 "retentionPeriod": "A String", # The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. 1775 }, 1776 "rpo": "A String", # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket. 1777 "satisfiesPZS": True or False, # Reserved for future use. 1778 "selfLink": "A String", # The URI of this bucket. 1779 "storageClass": "A String", # The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. 1780 "timeCreated": "A String", # The creation time of the bucket in RFC 3339 format. 1781 "updated": "A String", # The modification time of the bucket in RFC 3339 format. 1782 "versioning": { # The bucket's versioning configuration. 1783 "enabled": True or False, # While set to true, versioning is fully enabled for this bucket. 1784 }, 1785 "website": { # The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. 1786 "mainPageSuffix": "A String", # If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. 1787 "notFoundPage": "A String", # If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. 1788 }, 1789} 1790 1791 ifMetagenerationMatch: string, Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. 1792 ifMetagenerationNotMatch: string, Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. 1793 predefinedAcl: string, Apply a predefined set of access controls to this bucket. 1794 Allowed values 1795 authenticatedRead - Project team owners get OWNER access, and allAuthenticatedUsers get READER access. 1796 private - Project team owners get OWNER access. 1797 projectPrivate - Project team members get access according to their roles. 1798 publicRead - Project team owners get OWNER access, and allUsers get READER access. 1799 publicReadWrite - Project team owners get OWNER access, and allUsers get WRITER access. 1800 predefinedDefaultObjectAcl: string, Apply a predefined set of default object access controls to this bucket. 1801 Allowed values 1802 authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access. 1803 bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access. 1804 bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access. 1805 private - Object owner gets OWNER access. 1806 projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles. 1807 publicRead - Object owner gets OWNER access, and allUsers get READER access. 1808 projection: string, Set of properties to return. Defaults to full. 1809 Allowed values 1810 full - Include all properties. 1811 noAcl - Omit owner, acl and defaultObjectAcl properties. 1812 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1813 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 1814 1815Returns: 1816 An object of the form: 1817 1818 { # A bucket. 1819 "acl": [ # Access controls on the bucket. 1820 { # An access-control entry. 1821 "bucket": "A String", # The name of the bucket. 1822 "domain": "A String", # The domain associated with the entity, if any. 1823 "email": "A String", # The email address associated with the entity, if any. 1824 "entity": "A String", # The entity holding the permission, in one of the following forms: 1825 # - user-userId 1826 # - user-email 1827 # - group-groupId 1828 # - group-email 1829 # - domain-domain 1830 # - project-team-projectId 1831 # - allUsers 1832 # - allAuthenticatedUsers Examples: 1833 # - The user liz@example.com would be user-liz@example.com. 1834 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1835 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1836 "entityId": "A String", # The ID for the entity, if any. 1837 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1838 "id": "A String", # The ID of the access-control entry. 1839 "kind": "storage#bucketAccessControl", # The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. 1840 "projectTeam": { # The project team associated with the entity, if any. 1841 "projectNumber": "A String", # The project number. 1842 "team": "A String", # The team. 1843 }, 1844 "role": "A String", # The access permission for the entity. 1845 "selfLink": "A String", # The link to this access-control entry. 1846 }, 1847 ], 1848 "autoclass": { # The bucket's Autoclass configuration. 1849 "enabled": True or False, # Whether or not Autoclass is enabled on this bucket 1850 "toggleTime": "A String", # A date and time in RFC 3339 format representing the instant at which "enabled" was last toggled. 1851 }, 1852 "billing": { # The bucket's billing configuration. 1853 "requesterPays": True or False, # When set to true, Requester Pays is enabled for this bucket. 1854 }, 1855 "cors": [ # The bucket's Cross-Origin Resource Sharing (CORS) configuration. 1856 { 1857 "maxAgeSeconds": 42, # The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. 1858 "method": [ # The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "any method". 1859 "A String", 1860 ], 1861 "origin": [ # The list of Origins eligible to receive CORS response headers. Note: "*" is permitted in the list of origins, and means "any Origin". 1862 "A String", 1863 ], 1864 "responseHeader": [ # The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. 1865 "A String", 1866 ], 1867 }, 1868 ], 1869 "customPlacementConfig": { # The bucket's custom placement configuration for Custom Dual Regions. 1870 "dataLocations": [ # The list of regional locations in which data is placed. 1871 "A String", 1872 ], 1873 }, 1874 "defaultEventBasedHold": True or False, # The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed. 1875 "defaultObjectAcl": [ # Default access controls to apply to new objects when no ACL is provided. 1876 { # An access-control entry. 1877 "bucket": "A String", # The name of the bucket. 1878 "domain": "A String", # The domain associated with the entity, if any. 1879 "email": "A String", # The email address associated with the entity, if any. 1880 "entity": "A String", # The entity holding the permission, in one of the following forms: 1881 # - user-userId 1882 # - user-email 1883 # - group-groupId 1884 # - group-email 1885 # - domain-domain 1886 # - project-team-projectId 1887 # - allUsers 1888 # - allAuthenticatedUsers Examples: 1889 # - The user liz@example.com would be user-liz@example.com. 1890 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1891 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1892 "entityId": "A String", # The ID for the entity, if any. 1893 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1894 "generation": "A String", # The content generation of the object, if applied to an object. 1895 "id": "A String", # The ID of the access-control entry. 1896 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1897 "object": "A String", # The name of the object, if applied to an object. 1898 "projectTeam": { # The project team associated with the entity, if any. 1899 "projectNumber": "A String", # The project number. 1900 "team": "A String", # The team. 1901 }, 1902 "role": "A String", # The access permission for the entity. 1903 "selfLink": "A String", # The link to this access-control entry. 1904 }, 1905 ], 1906 "encryption": { # Encryption configuration for a bucket. 1907 "defaultKmsKeyName": "A String", # A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified. 1908 }, 1909 "etag": "A String", # HTTP 1.1 Entity tag for the bucket. 1910 "iamConfiguration": { # The bucket's IAM configuration. 1911 "bucketPolicyOnly": { # The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature. 1912 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1913 "lockedTime": "A String", # The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable. 1914 }, 1915 "publicAccessPrevention": "A String", # The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported. 1916 "uniformBucketLevelAccess": { # The bucket's uniform bucket-level access configuration. 1917 "enabled": True or False, # If set, access is controlled only by bucket-level or above IAM policies. 1918 "lockedTime": "A String", # The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable. 1919 }, 1920 }, 1921 "id": "A String", # The ID of the bucket. For buckets, the id and name properties are the same. 1922 "kind": "storage#bucket", # The kind of item this is. For buckets, this is always storage#bucket. 1923 "labels": { # User-provided labels, in key/value pairs. 1924 "a_key": "A String", # An individual label entry. 1925 }, 1926 "lifecycle": { # The bucket's lifecycle configuration. See lifecycle management for more information. 1927 "rule": [ # A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. 1928 { 1929 "action": { # The action to take. 1930 "storageClass": "A String", # Target storage class. Required iff the type of the action is SetStorageClass. 1931 "type": "A String", # Type of the action. Currently, only Delete and SetStorageClass are supported. 1932 }, 1933 "condition": { # The condition(s) under which the action will be taken. 1934 "age": 42, # Age of an object (in days). This condition is satisfied when an object reaches the specified age. 1935 "createdBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. 1936 "customTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the custom time on an object is before this date in UTC. 1937 "daysSinceCustomTime": 42, # Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply. 1938 "daysSinceNoncurrentTime": 42, # Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent. 1939 "isLive": True or False, # Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. 1940 "matchesPattern": "A String", # A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the "Early Access" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released. 1941 "matchesStorageClass": [ # Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY. 1942 "A String", 1943 ], 1944 "noncurrentTimeBefore": "A String", # A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects. 1945 "numNewerVersions": 42, # Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. 1946 }, 1947 }, 1948 ], 1949 }, 1950 "location": "A String", # The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. 1951 "locationType": "A String", # The type of the bucket location. 1952 "logging": { # The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. 1953 "logBucket": "A String", # The destination bucket where the current bucket's logs should be placed. 1954 "logObjectPrefix": "A String", # A prefix for log object names. 1955 }, 1956 "metageneration": "A String", # The metadata generation of this bucket. 1957 "name": "A String", # The name of the bucket. 1958 "owner": { # The owner of the bucket. This is always the project team's owner group. 1959 "entity": "A String", # The entity, in the form project-owner-projectId. 1960 "entityId": "A String", # The ID for the entity. 1961 }, 1962 "projectNumber": "A String", # The project number of the project the bucket belongs to. 1963 "retentionPolicy": { # The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error. 1964 "effectiveTime": "A String", # Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format. 1965 "isLocked": True or False, # Once locked, an object retention policy cannot be modified. 1966 "retentionPeriod": "A String", # The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes. 1967 }, 1968 "rpo": "A String", # The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket. 1969 "satisfiesPZS": True or False, # Reserved for future use. 1970 "selfLink": "A String", # The URI of this bucket. 1971 "storageClass": "A String", # The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. 1972 "timeCreated": "A String", # The creation time of the bucket in RFC 3339 format. 1973 "updated": "A String", # The modification time of the bucket in RFC 3339 format. 1974 "versioning": { # The bucket's versioning configuration. 1975 "enabled": True or False, # While set to true, versioning is fully enabled for this bucket. 1976 }, 1977 "website": { # The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. 1978 "mainPageSuffix": "A String", # If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. 1979 "notFoundPage": "A String", # If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. 1980 }, 1981}</pre> 1982</div> 1983 1984</body></html>