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.objects.html">objects</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#compose">compose(destinationBucket, destinationObject, body, ifGenerationMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, kmsKeyName=None, provisionalUserProject=None)</a></code></p> 79<p class="firstline">Concatenates a list of existing objects into a new object in the same bucket.</p> 80<p class="toc_element"> 81 <code><a href="#copy">copy(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationNotMatch=None, ifGenerationMatch=None, provisionalUserProject=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</a></code></p> 82<p class="firstline">Copies a source object to a destination object. Optionally overrides metadata.</p> 83<p class="toc_element"> 84 <code><a href="#delete">delete(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, provisionalUserProject=None, ifMetagenerationNotMatch=None)</a></code></p> 85<p class="firstline">Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, provisionalUserProject=None, ifMetagenerationNotMatch=None, projection=None)</a></code></p> 88<p class="firstline">Retrieves an object or its metadata.</p> 89<p class="toc_element"> 90 <code><a href="#getIamPolicy">getIamPolicy(bucket, object, generation=None, userProject=None, provisionalUserProject=None)</a></code></p> 91<p class="firstline">Returns an IAM policy for the specified object.</p> 92<p class="toc_element"> 93 <code><a href="#get_media">get_media(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, provisionalUserProject=None, ifMetagenerationNotMatch=None, projection=None)</a></code></p> 94<p class="firstline">Retrieves an object or its metadata.</p> 95<p class="toc_element"> 96 <code><a href="#insert">insert(bucket, body=None, projection=None, kmsKeyName=None, media_body=None, predefinedAcl=None, ifGenerationMatch=None, provisionalUserProject=None, ifGenerationNotMatch=None, name=None, ifMetagenerationMatch=None, userProject=None, contentEncoding=None, media_mime_type=None, ifMetagenerationNotMatch=None)</a></code></p> 97<p class="firstline">Stores a new object and metadata.</p> 98<p class="toc_element"> 99 <code><a href="#list">list(bucket, projection=None, versions=None, userProject=None, delimiter=None, maxResults=None, pageToken=None, prefix=None, includeTrailingDelimiter=None, provisionalUserProject=None)</a></code></p> 100<p class="firstline">Retrieves a list of objects matching the criteria.</p> 101<p class="toc_element"> 102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 103<p class="firstline">Retrieves the next page of results.</p> 104<p class="toc_element"> 105 <code><a href="#patch">patch(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, provisionalUserProject=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</a></code></p> 106<p class="firstline">Patches an object's metadata.</p> 107<p class="toc_element"> 108 <code><a href="#rewrite">rewrite(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, maxBytesRewrittenPerCall=None, ifSourceGenerationNotMatch=None, ifGenerationMatch=None, ifSourceMetagenerationNotMatch=None, destinationKmsKeyName=None, rewriteToken=None, provisionalUserProject=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</a></code></p> 109<p class="firstline">Rewrites a source object to a destination object. Optionally overrides metadata.</p> 110<p class="toc_element"> 111 <code><a href="#setIamPolicy">setIamPolicy(bucket, object, body, generation=None, userProject=None, provisionalUserProject=None)</a></code></p> 112<p class="firstline">Updates an IAM policy for the specified object.</p> 113<p class="toc_element"> 114 <code><a href="#testIamPermissions">testIamPermissions(bucket, object, permissions, generation=None, userProject=None, provisionalUserProject=None)</a></code></p> 115<p class="firstline">Tests a set of permissions on the given object to see which, if any, are held by the caller.</p> 116<p class="toc_element"> 117 <code><a href="#update">update(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, provisionalUserProject=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</a></code></p> 118<p class="firstline">Updates an object's metadata.</p> 119<p class="toc_element"> 120 <code><a href="#watchAll">watchAll(bucket, body, projection=None, prefix=None, pageToken=None, maxResults=None, provisionalUserProject=None, versions=None, userProject=None, delimiter=None, includeTrailingDelimiter=None)</a></code></p> 121<p class="firstline">Watch for changes on all objects in a bucket.</p> 122<h3>Method Details</h3> 123<div class="method"> 124 <code class="details" id="compose">compose(destinationBucket, destinationObject, body, ifGenerationMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, kmsKeyName=None, provisionalUserProject=None)</code> 125 <pre>Concatenates a list of existing objects into a new object in the same bucket. 126 127Args: 128 destinationBucket: string, Name of the bucket containing the source objects. The destination object is stored in this bucket. (required) 129 destinationObject: string, Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 130 body: object, The request body. (required) 131 The object takes the form of: 132 133{ # A Compose request. 134 "kind": "storage#composeRequest", # The kind of item this is. 135 "destination": { # An object. # Properties of the resulting object. 136 "generation": "A String", # The content generation of this object. Used for object versioning. 137 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 138 "mediaLink": "A String", # Media download link. 139 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 140 "owner": { # The owner of the object. This will always be the uploader of the object. 141 "entityId": "A String", # The ID for the entity. 142 "entity": "A String", # The entity, in the form user-userId. 143 }, 144 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 145 "acl": [ # Access controls on the object. 146 { # An access-control entry. 147 "domain": "A String", # The domain associated with the entity, if any. 148 "generation": "A String", # The content generation of the object, if applied to an object. 149 "object": "A String", # The name of the object, if applied to an object. 150 "bucket": "A String", # The name of the bucket. 151 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 152 "entity": "A String", # The entity holding the permission, in one of the following forms: 153 # - user-userId 154 # - user-email 155 # - group-groupId 156 # - group-email 157 # - domain-domain 158 # - project-team-projectId 159 # - allUsers 160 # - allAuthenticatedUsers Examples: 161 # - The user liz@example.com would be user-liz@example.com. 162 # - The group example@googlegroups.com would be group-example@googlegroups.com. 163 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 164 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 165 "role": "A String", # The access permission for the entity. 166 "id": "A String", # The ID of the access-control entry. 167 "entityId": "A String", # The ID for the entity, if any. 168 "projectTeam": { # The project team associated with the entity, if any. 169 "projectNumber": "A String", # The project number. 170 "team": "A String", # The team. 171 }, 172 "email": "A String", # The email address associated with the entity, if any. 173 "selfLink": "A String", # The link to this access-control entry. 174 }, 175 ], 176 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 177 "size": "A String", # Content-Length of the data in bytes. 178 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 179 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 180 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 181 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 182 "etag": "A String", # HTTP 1.1 Entity tag for the object. 183 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 184 "metadata": { # User-provided metadata, in key/value pairs. 185 "a_key": "A String", # An individual metadata entry. 186 }, 187 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 188 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 189 "contentLanguage": "A String", # Content-Language of the object data. 190 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 191 "encryptionAlgorithm": "A String", # The encryption algorithm. 192 "keySha256": "A String", # SHA256 hash value of the encryption key. 193 }, 194 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 195 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 196 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 197 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 198 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 199 "name": "A String", # The name of the object. Required if not specified by URL parameter. 200 "bucket": "A String", # The name of the bucket containing this object. 201 "contentEncoding": "A String", # Content-Encoding of the object data. 202 "selfLink": "A String", # The link to this object. 203 "contentDisposition": "A String", # Content-Disposition of the object data. 204 "storageClass": "A String", # Storage class of the object. 205 }, 206 "sourceObjects": [ # The list of source objects that will be concatenated into a single object. 207 { 208 "generation": "A String", # The generation of this object to use as the source. 209 "name": "A String", # The source object's name. All source objects must reside in the same bucket. 210 "objectPreconditions": { # Conditions that must be met for this operation to execute. 211 "ifGenerationMatch": "A String", # Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail. 212 }, 213 }, 214 ], 215 } 216 217 ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. 218 ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value. 219 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 220 destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object. 221 Allowed values 222 authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access. 223 bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access. 224 bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access. 225 private - Object owner gets OWNER access. 226 projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles. 227 publicRead - Object owner gets OWNER access, and allUsers get READER access. 228 kmsKeyName: string, Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. 229 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 230 231Returns: 232 An object of the form: 233 234 { # An object. 235 "generation": "A String", # The content generation of this object. Used for object versioning. 236 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 237 "mediaLink": "A String", # Media download link. 238 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 239 "owner": { # The owner of the object. This will always be the uploader of the object. 240 "entityId": "A String", # The ID for the entity. 241 "entity": "A String", # The entity, in the form user-userId. 242 }, 243 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 244 "acl": [ # Access controls on the object. 245 { # An access-control entry. 246 "domain": "A String", # The domain associated with the entity, if any. 247 "generation": "A String", # The content generation of the object, if applied to an object. 248 "object": "A String", # The name of the object, if applied to an object. 249 "bucket": "A String", # The name of the bucket. 250 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 251 "entity": "A String", # The entity holding the permission, in one of the following forms: 252 # - user-userId 253 # - user-email 254 # - group-groupId 255 # - group-email 256 # - domain-domain 257 # - project-team-projectId 258 # - allUsers 259 # - allAuthenticatedUsers Examples: 260 # - The user liz@example.com would be user-liz@example.com. 261 # - The group example@googlegroups.com would be group-example@googlegroups.com. 262 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 263 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 264 "role": "A String", # The access permission for the entity. 265 "id": "A String", # The ID of the access-control entry. 266 "entityId": "A String", # The ID for the entity, if any. 267 "projectTeam": { # The project team associated with the entity, if any. 268 "projectNumber": "A String", # The project number. 269 "team": "A String", # The team. 270 }, 271 "email": "A String", # The email address associated with the entity, if any. 272 "selfLink": "A String", # The link to this access-control entry. 273 }, 274 ], 275 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 276 "size": "A String", # Content-Length of the data in bytes. 277 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 278 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 279 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 280 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 281 "etag": "A String", # HTTP 1.1 Entity tag for the object. 282 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 283 "metadata": { # User-provided metadata, in key/value pairs. 284 "a_key": "A String", # An individual metadata entry. 285 }, 286 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 287 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 288 "contentLanguage": "A String", # Content-Language of the object data. 289 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 290 "encryptionAlgorithm": "A String", # The encryption algorithm. 291 "keySha256": "A String", # SHA256 hash value of the encryption key. 292 }, 293 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 294 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 295 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 296 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 297 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 298 "name": "A String", # The name of the object. Required if not specified by URL parameter. 299 "bucket": "A String", # The name of the bucket containing this object. 300 "contentEncoding": "A String", # Content-Encoding of the object data. 301 "selfLink": "A String", # The link to this object. 302 "contentDisposition": "A String", # Content-Disposition of the object data. 303 "storageClass": "A String", # Storage class of the object. 304 }</pre> 305</div> 306 307<div class="method"> 308 <code class="details" id="copy">copy(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationNotMatch=None, ifGenerationMatch=None, provisionalUserProject=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</code> 309 <pre>Copies a source object to a destination object. Optionally overrides metadata. 310 311Args: 312 sourceBucket: string, Name of the bucket in which to find the source object. (required) 313 sourceObject: string, Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 314 destinationBucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 315 destinationObject: string, Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. (required) 316 body: object, The request body. (required) 317 The object takes the form of: 318 319{ # An object. 320 "generation": "A String", # The content generation of this object. Used for object versioning. 321 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 322 "mediaLink": "A String", # Media download link. 323 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 324 "owner": { # The owner of the object. This will always be the uploader of the object. 325 "entityId": "A String", # The ID for the entity. 326 "entity": "A String", # The entity, in the form user-userId. 327 }, 328 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 329 "acl": [ # Access controls on the object. 330 { # An access-control entry. 331 "domain": "A String", # The domain associated with the entity, if any. 332 "generation": "A String", # The content generation of the object, if applied to an object. 333 "object": "A String", # The name of the object, if applied to an object. 334 "bucket": "A String", # The name of the bucket. 335 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 336 "entity": "A String", # The entity holding the permission, in one of the following forms: 337 # - user-userId 338 # - user-email 339 # - group-groupId 340 # - group-email 341 # - domain-domain 342 # - project-team-projectId 343 # - allUsers 344 # - allAuthenticatedUsers Examples: 345 # - The user liz@example.com would be user-liz@example.com. 346 # - The group example@googlegroups.com would be group-example@googlegroups.com. 347 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 348 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 349 "role": "A String", # The access permission for the entity. 350 "id": "A String", # The ID of the access-control entry. 351 "entityId": "A String", # The ID for the entity, if any. 352 "projectTeam": { # The project team associated with the entity, if any. 353 "projectNumber": "A String", # The project number. 354 "team": "A String", # The team. 355 }, 356 "email": "A String", # The email address associated with the entity, if any. 357 "selfLink": "A String", # The link to this access-control entry. 358 }, 359 ], 360 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 361 "size": "A String", # Content-Length of the data in bytes. 362 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 363 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 364 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 365 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 366 "etag": "A String", # HTTP 1.1 Entity tag for the object. 367 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 368 "metadata": { # User-provided metadata, in key/value pairs. 369 "a_key": "A String", # An individual metadata entry. 370 }, 371 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 372 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 373 "contentLanguage": "A String", # Content-Language of the object data. 374 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 375 "encryptionAlgorithm": "A String", # The encryption algorithm. 376 "keySha256": "A String", # SHA256 hash value of the encryption key. 377 }, 378 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 379 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 380 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 381 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 382 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 383 "name": "A String", # The name of the object. Required if not specified by URL parameter. 384 "bucket": "A String", # The name of the bucket containing this object. 385 "contentEncoding": "A String", # Content-Encoding of the object data. 386 "selfLink": "A String", # The link to this object. 387 "contentDisposition": "A String", # Content-Disposition of the object data. 388 "storageClass": "A String", # Storage class of the object. 389 } 390 391 projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. 392 Allowed values 393 full - Include all properties. 394 noAcl - Omit the owner, acl property. 395 sourceGeneration: string, If present, selects a specific revision of the source object (as opposed to the latest version, the default). 396 ifSourceGenerationNotMatch: string, Makes the operation conditional on whether the source object's current generation does not match the given value. 397 ifSourceMetagenerationNotMatch: string, Makes the operation conditional on whether the source object's current metageneration does not match the given value. 398 ifGenerationMatch: string, Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. 399 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 400 ifGenerationNotMatch: string, Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. 401 ifMetagenerationMatch: string, Makes the operation conditional on whether the destination object's current metageneration matches the given value. 402 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 403 destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object. 404 Allowed values 405 authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access. 406 bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access. 407 bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access. 408 private - Object owner gets OWNER access. 409 projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles. 410 publicRead - Object owner gets OWNER access, and allUsers get READER access. 411 ifSourceGenerationMatch: string, Makes the operation conditional on whether the source object's current generation matches the given value. 412 ifSourceMetagenerationMatch: string, Makes the operation conditional on whether the source object's current metageneration matches the given value. 413 ifMetagenerationNotMatch: string, Makes the operation conditional on whether the destination object's current metageneration does not match the given value. 414 415Returns: 416 An object of the form: 417 418 { # An object. 419 "generation": "A String", # The content generation of this object. Used for object versioning. 420 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 421 "mediaLink": "A String", # Media download link. 422 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 423 "owner": { # The owner of the object. This will always be the uploader of the object. 424 "entityId": "A String", # The ID for the entity. 425 "entity": "A String", # The entity, in the form user-userId. 426 }, 427 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 428 "acl": [ # Access controls on the object. 429 { # An access-control entry. 430 "domain": "A String", # The domain associated with the entity, if any. 431 "generation": "A String", # The content generation of the object, if applied to an object. 432 "object": "A String", # The name of the object, if applied to an object. 433 "bucket": "A String", # The name of the bucket. 434 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 435 "entity": "A String", # The entity holding the permission, in one of the following forms: 436 # - user-userId 437 # - user-email 438 # - group-groupId 439 # - group-email 440 # - domain-domain 441 # - project-team-projectId 442 # - allUsers 443 # - allAuthenticatedUsers Examples: 444 # - The user liz@example.com would be user-liz@example.com. 445 # - The group example@googlegroups.com would be group-example@googlegroups.com. 446 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 447 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 448 "role": "A String", # The access permission for the entity. 449 "id": "A String", # The ID of the access-control entry. 450 "entityId": "A String", # The ID for the entity, if any. 451 "projectTeam": { # The project team associated with the entity, if any. 452 "projectNumber": "A String", # The project number. 453 "team": "A String", # The team. 454 }, 455 "email": "A String", # The email address associated with the entity, if any. 456 "selfLink": "A String", # The link to this access-control entry. 457 }, 458 ], 459 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 460 "size": "A String", # Content-Length of the data in bytes. 461 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 462 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 463 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 464 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 465 "etag": "A String", # HTTP 1.1 Entity tag for the object. 466 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 467 "metadata": { # User-provided metadata, in key/value pairs. 468 "a_key": "A String", # An individual metadata entry. 469 }, 470 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 471 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 472 "contentLanguage": "A String", # Content-Language of the object data. 473 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 474 "encryptionAlgorithm": "A String", # The encryption algorithm. 475 "keySha256": "A String", # SHA256 hash value of the encryption key. 476 }, 477 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 478 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 479 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 480 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 481 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 482 "name": "A String", # The name of the object. Required if not specified by URL parameter. 483 "bucket": "A String", # The name of the bucket containing this object. 484 "contentEncoding": "A String", # Content-Encoding of the object data. 485 "selfLink": "A String", # The link to this object. 486 "contentDisposition": "A String", # Content-Disposition of the object data. 487 "storageClass": "A String", # Storage class of the object. 488 }</pre> 489</div> 490 491<div class="method"> 492 <code class="details" id="delete">delete(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, provisionalUserProject=None, ifMetagenerationNotMatch=None)</code> 493 <pre>Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used. 494 495Args: 496 bucket: string, Name of the bucket in which the object resides. (required) 497 object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 498 ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. 499 generation: string, If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default). 500 ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value. 501 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 502 ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. 503 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 504 ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value. 505</pre> 506</div> 507 508<div class="method"> 509 <code class="details" id="get">get(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, provisionalUserProject=None, ifMetagenerationNotMatch=None, projection=None)</code> 510 <pre>Retrieves an object or its metadata. 511 512Args: 513 bucket: string, Name of the bucket in which the object resides. (required) 514 object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 515 ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. 516 generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default). 517 ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value. 518 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 519 ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. 520 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 521 ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value. 522 projection: string, Set of properties to return. Defaults to noAcl. 523 Allowed values 524 full - Include all properties. 525 noAcl - Omit the owner, acl property. 526 527Returns: 528 An object of the form: 529 530 { # An object. 531 "generation": "A String", # The content generation of this object. Used for object versioning. 532 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 533 "mediaLink": "A String", # Media download link. 534 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 535 "owner": { # The owner of the object. This will always be the uploader of the object. 536 "entityId": "A String", # The ID for the entity. 537 "entity": "A String", # The entity, in the form user-userId. 538 }, 539 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 540 "acl": [ # Access controls on the object. 541 { # An access-control entry. 542 "domain": "A String", # The domain associated with the entity, if any. 543 "generation": "A String", # The content generation of the object, if applied to an object. 544 "object": "A String", # The name of the object, if applied to an object. 545 "bucket": "A String", # The name of the bucket. 546 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 547 "entity": "A String", # The entity holding the permission, in one of the following forms: 548 # - user-userId 549 # - user-email 550 # - group-groupId 551 # - group-email 552 # - domain-domain 553 # - project-team-projectId 554 # - allUsers 555 # - allAuthenticatedUsers Examples: 556 # - The user liz@example.com would be user-liz@example.com. 557 # - The group example@googlegroups.com would be group-example@googlegroups.com. 558 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 559 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 560 "role": "A String", # The access permission for the entity. 561 "id": "A String", # The ID of the access-control entry. 562 "entityId": "A String", # The ID for the entity, if any. 563 "projectTeam": { # The project team associated with the entity, if any. 564 "projectNumber": "A String", # The project number. 565 "team": "A String", # The team. 566 }, 567 "email": "A String", # The email address associated with the entity, if any. 568 "selfLink": "A String", # The link to this access-control entry. 569 }, 570 ], 571 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 572 "size": "A String", # Content-Length of the data in bytes. 573 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 574 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 575 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 576 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 577 "etag": "A String", # HTTP 1.1 Entity tag for the object. 578 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 579 "metadata": { # User-provided metadata, in key/value pairs. 580 "a_key": "A String", # An individual metadata entry. 581 }, 582 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 583 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 584 "contentLanguage": "A String", # Content-Language of the object data. 585 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 586 "encryptionAlgorithm": "A String", # The encryption algorithm. 587 "keySha256": "A String", # SHA256 hash value of the encryption key. 588 }, 589 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 590 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 591 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 592 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 593 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 594 "name": "A String", # The name of the object. Required if not specified by URL parameter. 595 "bucket": "A String", # The name of the bucket containing this object. 596 "contentEncoding": "A String", # Content-Encoding of the object data. 597 "selfLink": "A String", # The link to this object. 598 "contentDisposition": "A String", # Content-Disposition of the object data. 599 "storageClass": "A String", # Storage class of the object. 600 }</pre> 601</div> 602 603<div class="method"> 604 <code class="details" id="getIamPolicy">getIamPolicy(bucket, object, generation=None, userProject=None, provisionalUserProject=None)</code> 605 <pre>Returns an IAM policy for the specified object. 606 607Args: 608 bucket: string, Name of the bucket in which the object resides. (required) 609 object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 610 generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default). 611 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 612 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 613 614Returns: 615 An object of the form: 616 617 { # A bucket/object IAM policy. 618 "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. 619 "bindings": [ # An association between a role, which comes with a set of permissions, and members who may assume that role. 620 { 621 "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. 622 # The new IAM roles are: 623 # - roles/storage.admin — Full control of Google Cloud Storage resources. 624 # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. 625 # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage. 626 # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: 627 # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. 628 # - roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. 629 # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. 630 # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. 631 # - 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. 632 "members": [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: 633 # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account. 634 # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. 635 # - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. 636 # - serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . 637 # - group:emailid — An email address that represents a Google group. For example, group:admins@example.com. 638 # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. 639 # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project 640 # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project 641 # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project 642 "A String", 643 ], 644 "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. 645 "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. 646 "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. 647 "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. 648 "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. 649 }, 650 }, 651 ], 652 "etag": "A String", # HTTP 1.1 Entity tag for the policy. 653 "kind": "storage#policy", # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. 654 }</pre> 655</div> 656 657<div class="method"> 658 <code class="details" id="get_media">get_media(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, provisionalUserProject=None, ifMetagenerationNotMatch=None, projection=None)</code> 659 <pre>Retrieves an object or its metadata. 660 661Args: 662 bucket: string, Name of the bucket in which the object resides. (required) 663 object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 664 ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. 665 generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default). 666 ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value. 667 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 668 ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. 669 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 670 ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value. 671 projection: string, Set of properties to return. Defaults to noAcl. 672 Allowed values 673 full - Include all properties. 674 noAcl - Omit the owner, acl property. 675 676Returns: 677 The media object as a string. 678 679 </pre> 680</div> 681 682<div class="method"> 683 <code class="details" id="insert">insert(bucket, body=None, projection=None, kmsKeyName=None, media_body=None, predefinedAcl=None, ifGenerationMatch=None, provisionalUserProject=None, ifGenerationNotMatch=None, name=None, ifMetagenerationMatch=None, userProject=None, contentEncoding=None, media_mime_type=None, ifMetagenerationNotMatch=None)</code> 684 <pre>Stores a new object and metadata. 685 686Args: 687 bucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. (required) 688 body: object, The request body. 689 The object takes the form of: 690 691{ # An object. 692 "generation": "A String", # The content generation of this object. Used for object versioning. 693 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 694 "mediaLink": "A String", # Media download link. 695 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 696 "owner": { # The owner of the object. This will always be the uploader of the object. 697 "entityId": "A String", # The ID for the entity. 698 "entity": "A String", # The entity, in the form user-userId. 699 }, 700 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 701 "acl": [ # Access controls on the object. 702 { # An access-control entry. 703 "domain": "A String", # The domain associated with the entity, if any. 704 "generation": "A String", # The content generation of the object, if applied to an object. 705 "object": "A String", # The name of the object, if applied to an object. 706 "bucket": "A String", # The name of the bucket. 707 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 708 "entity": "A String", # The entity holding the permission, in one of the following forms: 709 # - user-userId 710 # - user-email 711 # - group-groupId 712 # - group-email 713 # - domain-domain 714 # - project-team-projectId 715 # - allUsers 716 # - allAuthenticatedUsers Examples: 717 # - The user liz@example.com would be user-liz@example.com. 718 # - The group example@googlegroups.com would be group-example@googlegroups.com. 719 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 720 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 721 "role": "A String", # The access permission for the entity. 722 "id": "A String", # The ID of the access-control entry. 723 "entityId": "A String", # The ID for the entity, if any. 724 "projectTeam": { # The project team associated with the entity, if any. 725 "projectNumber": "A String", # The project number. 726 "team": "A String", # The team. 727 }, 728 "email": "A String", # The email address associated with the entity, if any. 729 "selfLink": "A String", # The link to this access-control entry. 730 }, 731 ], 732 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 733 "size": "A String", # Content-Length of the data in bytes. 734 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 735 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 736 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 737 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 738 "etag": "A String", # HTTP 1.1 Entity tag for the object. 739 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 740 "metadata": { # User-provided metadata, in key/value pairs. 741 "a_key": "A String", # An individual metadata entry. 742 }, 743 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 744 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 745 "contentLanguage": "A String", # Content-Language of the object data. 746 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 747 "encryptionAlgorithm": "A String", # The encryption algorithm. 748 "keySha256": "A String", # SHA256 hash value of the encryption key. 749 }, 750 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 751 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 752 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 753 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 754 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 755 "name": "A String", # The name of the object. Required if not specified by URL parameter. 756 "bucket": "A String", # The name of the bucket containing this object. 757 "contentEncoding": "A String", # Content-Encoding of the object data. 758 "selfLink": "A String", # The link to this object. 759 "contentDisposition": "A String", # Content-Disposition of the object data. 760 "storageClass": "A String", # Storage class of the object. 761 } 762 763 projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. 764 Allowed values 765 full - Include all properties. 766 noAcl - Omit the owner, acl property. 767 kmsKeyName: string, Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. 768 media_body: string, The filename of the media request body, or an instance of a MediaUpload object. 769 predefinedAcl: string, Apply a predefined set of access controls to this object. 770 Allowed values 771 authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access. 772 bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access. 773 bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access. 774 private - Object owner gets OWNER access. 775 projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles. 776 publicRead - Object owner gets OWNER access, and allUsers get READER access. 777 ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. 778 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 779 ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. 780 name: string, Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. 781 ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value. 782 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 783 contentEncoding: string, If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded. 784 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object. 785 ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value. 786 787Returns: 788 An object of the form: 789 790 { # An object. 791 "generation": "A String", # The content generation of this object. Used for object versioning. 792 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 793 "mediaLink": "A String", # Media download link. 794 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 795 "owner": { # The owner of the object. This will always be the uploader of the object. 796 "entityId": "A String", # The ID for the entity. 797 "entity": "A String", # The entity, in the form user-userId. 798 }, 799 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 800 "acl": [ # Access controls on the object. 801 { # An access-control entry. 802 "domain": "A String", # The domain associated with the entity, if any. 803 "generation": "A String", # The content generation of the object, if applied to an object. 804 "object": "A String", # The name of the object, if applied to an object. 805 "bucket": "A String", # The name of the bucket. 806 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 807 "entity": "A String", # The entity holding the permission, in one of the following forms: 808 # - user-userId 809 # - user-email 810 # - group-groupId 811 # - group-email 812 # - domain-domain 813 # - project-team-projectId 814 # - allUsers 815 # - allAuthenticatedUsers Examples: 816 # - The user liz@example.com would be user-liz@example.com. 817 # - The group example@googlegroups.com would be group-example@googlegroups.com. 818 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 819 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 820 "role": "A String", # The access permission for the entity. 821 "id": "A String", # The ID of the access-control entry. 822 "entityId": "A String", # The ID for the entity, if any. 823 "projectTeam": { # The project team associated with the entity, if any. 824 "projectNumber": "A String", # The project number. 825 "team": "A String", # The team. 826 }, 827 "email": "A String", # The email address associated with the entity, if any. 828 "selfLink": "A String", # The link to this access-control entry. 829 }, 830 ], 831 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 832 "size": "A String", # Content-Length of the data in bytes. 833 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 834 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 835 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 836 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 837 "etag": "A String", # HTTP 1.1 Entity tag for the object. 838 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 839 "metadata": { # User-provided metadata, in key/value pairs. 840 "a_key": "A String", # An individual metadata entry. 841 }, 842 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 843 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 844 "contentLanguage": "A String", # Content-Language of the object data. 845 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 846 "encryptionAlgorithm": "A String", # The encryption algorithm. 847 "keySha256": "A String", # SHA256 hash value of the encryption key. 848 }, 849 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 850 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 851 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 852 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 853 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 854 "name": "A String", # The name of the object. Required if not specified by URL parameter. 855 "bucket": "A String", # The name of the bucket containing this object. 856 "contentEncoding": "A String", # Content-Encoding of the object data. 857 "selfLink": "A String", # The link to this object. 858 "contentDisposition": "A String", # Content-Disposition of the object data. 859 "storageClass": "A String", # Storage class of the object. 860 }</pre> 861</div> 862 863<div class="method"> 864 <code class="details" id="list">list(bucket, projection=None, versions=None, userProject=None, delimiter=None, maxResults=None, pageToken=None, prefix=None, includeTrailingDelimiter=None, provisionalUserProject=None)</code> 865 <pre>Retrieves a list of objects matching the criteria. 866 867Args: 868 bucket: string, Name of the bucket in which to look for objects. (required) 869 projection: string, Set of properties to return. Defaults to noAcl. 870 Allowed values 871 full - Include all properties. 872 noAcl - Omit the owner, acl property. 873 versions: boolean, If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning. 874 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 875 delimiter: string, Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted. 876 maxResults: integer, Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller. 877 pageToken: string, A previously-returned page token representing part of the larger set of results to view. 878 prefix: string, Filter results to objects whose names begin with this prefix. 879 includeTrailingDelimiter: boolean, If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes. 880 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 881 882Returns: 883 An object of the form: 884 885 { # A list of objects. 886 "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. 887 "items": [ # The list of items. 888 { # An object. 889 "generation": "A String", # The content generation of this object. Used for object versioning. 890 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 891 "mediaLink": "A String", # Media download link. 892 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 893 "owner": { # The owner of the object. This will always be the uploader of the object. 894 "entityId": "A String", # The ID for the entity. 895 "entity": "A String", # The entity, in the form user-userId. 896 }, 897 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 898 "acl": [ # Access controls on the object. 899 { # An access-control entry. 900 "domain": "A String", # The domain associated with the entity, if any. 901 "generation": "A String", # The content generation of the object, if applied to an object. 902 "object": "A String", # The name of the object, if applied to an object. 903 "bucket": "A String", # The name of the bucket. 904 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 905 "entity": "A String", # The entity holding the permission, in one of the following forms: 906 # - user-userId 907 # - user-email 908 # - group-groupId 909 # - group-email 910 # - domain-domain 911 # - project-team-projectId 912 # - allUsers 913 # - allAuthenticatedUsers Examples: 914 # - The user liz@example.com would be user-liz@example.com. 915 # - The group example@googlegroups.com would be group-example@googlegroups.com. 916 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 917 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 918 "role": "A String", # The access permission for the entity. 919 "id": "A String", # The ID of the access-control entry. 920 "entityId": "A String", # The ID for the entity, if any. 921 "projectTeam": { # The project team associated with the entity, if any. 922 "projectNumber": "A String", # The project number. 923 "team": "A String", # The team. 924 }, 925 "email": "A String", # The email address associated with the entity, if any. 926 "selfLink": "A String", # The link to this access-control entry. 927 }, 928 ], 929 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 930 "size": "A String", # Content-Length of the data in bytes. 931 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 932 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 933 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 934 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 935 "etag": "A String", # HTTP 1.1 Entity tag for the object. 936 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 937 "metadata": { # User-provided metadata, in key/value pairs. 938 "a_key": "A String", # An individual metadata entry. 939 }, 940 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 941 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 942 "contentLanguage": "A String", # Content-Language of the object data. 943 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 944 "encryptionAlgorithm": "A String", # The encryption algorithm. 945 "keySha256": "A String", # SHA256 hash value of the encryption key. 946 }, 947 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 948 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 949 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 950 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 951 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 952 "name": "A String", # The name of the object. Required if not specified by URL parameter. 953 "bucket": "A String", # The name of the bucket containing this object. 954 "contentEncoding": "A String", # Content-Encoding of the object data. 955 "selfLink": "A String", # The link to this object. 956 "contentDisposition": "A String", # Content-Disposition of the object data. 957 "storageClass": "A String", # Storage class of the object. 958 }, 959 ], 960 "kind": "storage#objects", # The kind of item this is. For lists of objects, this is always storage#objects. 961 "prefixes": [ # The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter. 962 "A String", 963 ], 964 }</pre> 965</div> 966 967<div class="method"> 968 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 969 <pre>Retrieves the next page of results. 970 971Args: 972 previous_request: The request for the previous page. (required) 973 previous_response: The response from the request for the previous page. (required) 974 975Returns: 976 A request object that you can call 'execute()' on to request the next 977 page. Returns None if there are no more items in the collection. 978 </pre> 979</div> 980 981<div class="method"> 982 <code class="details" id="patch">patch(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, provisionalUserProject=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</code> 983 <pre>Patches an object's metadata. 984 985Args: 986 bucket: string, Name of the bucket in which the object resides. (required) 987 object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 988 body: object, The request body. (required) 989 The object takes the form of: 990 991{ # An object. 992 "generation": "A String", # The content generation of this object. Used for object versioning. 993 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 994 "mediaLink": "A String", # Media download link. 995 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 996 "owner": { # The owner of the object. This will always be the uploader of the object. 997 "entityId": "A String", # The ID for the entity. 998 "entity": "A String", # The entity, in the form user-userId. 999 }, 1000 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 1001 "acl": [ # Access controls on the object. 1002 { # An access-control entry. 1003 "domain": "A String", # The domain associated with the entity, if any. 1004 "generation": "A String", # The content generation of the object, if applied to an object. 1005 "object": "A String", # The name of the object, if applied to an object. 1006 "bucket": "A String", # The name of the bucket. 1007 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1008 "entity": "A String", # The entity holding the permission, in one of the following forms: 1009 # - user-userId 1010 # - user-email 1011 # - group-groupId 1012 # - group-email 1013 # - domain-domain 1014 # - project-team-projectId 1015 # - allUsers 1016 # - allAuthenticatedUsers Examples: 1017 # - The user liz@example.com would be user-liz@example.com. 1018 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1019 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1020 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1021 "role": "A String", # The access permission for the entity. 1022 "id": "A String", # The ID of the access-control entry. 1023 "entityId": "A String", # The ID for the entity, if any. 1024 "projectTeam": { # The project team associated with the entity, if any. 1025 "projectNumber": "A String", # The project number. 1026 "team": "A String", # The team. 1027 }, 1028 "email": "A String", # The email address associated with the entity, if any. 1029 "selfLink": "A String", # The link to this access-control entry. 1030 }, 1031 ], 1032 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 1033 "size": "A String", # Content-Length of the data in bytes. 1034 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 1035 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 1036 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 1037 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 1038 "etag": "A String", # HTTP 1.1 Entity tag for the object. 1039 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 1040 "metadata": { # User-provided metadata, in key/value pairs. 1041 "a_key": "A String", # An individual metadata entry. 1042 }, 1043 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 1044 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 1045 "contentLanguage": "A String", # Content-Language of the object data. 1046 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 1047 "encryptionAlgorithm": "A String", # The encryption algorithm. 1048 "keySha256": "A String", # SHA256 hash value of the encryption key. 1049 }, 1050 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 1051 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 1052 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 1053 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 1054 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 1055 "name": "A String", # The name of the object. Required if not specified by URL parameter. 1056 "bucket": "A String", # The name of the bucket containing this object. 1057 "contentEncoding": "A String", # Content-Encoding of the object data. 1058 "selfLink": "A String", # The link to this object. 1059 "contentDisposition": "A String", # Content-Disposition of the object data. 1060 "storageClass": "A String", # Storage class of the object. 1061 } 1062 1063 projection: string, Set of properties to return. Defaults to full. 1064 Allowed values 1065 full - Include all properties. 1066 noAcl - Omit the owner, acl property. 1067 generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default). 1068 predefinedAcl: string, Apply a predefined set of access controls to this object. 1069 Allowed values 1070 authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access. 1071 bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access. 1072 bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access. 1073 private - Object owner gets OWNER access. 1074 projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles. 1075 publicRead - Object owner gets OWNER access, and allUsers get READER access. 1076 ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. 1077 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1078 ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. 1079 ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value. 1080 userProject: string, The project to be billed for this request, for Requester Pays buckets. 1081 ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value. 1082 1083Returns: 1084 An object of the form: 1085 1086 { # An object. 1087 "generation": "A String", # The content generation of this object. Used for object versioning. 1088 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 1089 "mediaLink": "A String", # Media download link. 1090 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 1091 "owner": { # The owner of the object. This will always be the uploader of the object. 1092 "entityId": "A String", # The ID for the entity. 1093 "entity": "A String", # The entity, in the form user-userId. 1094 }, 1095 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 1096 "acl": [ # Access controls on the object. 1097 { # An access-control entry. 1098 "domain": "A String", # The domain associated with the entity, if any. 1099 "generation": "A String", # The content generation of the object, if applied to an object. 1100 "object": "A String", # The name of the object, if applied to an object. 1101 "bucket": "A String", # The name of the bucket. 1102 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1103 "entity": "A String", # The entity holding the permission, in one of the following forms: 1104 # - user-userId 1105 # - user-email 1106 # - group-groupId 1107 # - group-email 1108 # - domain-domain 1109 # - project-team-projectId 1110 # - allUsers 1111 # - allAuthenticatedUsers Examples: 1112 # - The user liz@example.com would be user-liz@example.com. 1113 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1114 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1115 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1116 "role": "A String", # The access permission for the entity. 1117 "id": "A String", # The ID of the access-control entry. 1118 "entityId": "A String", # The ID for the entity, if any. 1119 "projectTeam": { # The project team associated with the entity, if any. 1120 "projectNumber": "A String", # The project number. 1121 "team": "A String", # The team. 1122 }, 1123 "email": "A String", # The email address associated with the entity, if any. 1124 "selfLink": "A String", # The link to this access-control entry. 1125 }, 1126 ], 1127 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 1128 "size": "A String", # Content-Length of the data in bytes. 1129 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 1130 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 1131 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 1132 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 1133 "etag": "A String", # HTTP 1.1 Entity tag for the object. 1134 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 1135 "metadata": { # User-provided metadata, in key/value pairs. 1136 "a_key": "A String", # An individual metadata entry. 1137 }, 1138 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 1139 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 1140 "contentLanguage": "A String", # Content-Language of the object data. 1141 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 1142 "encryptionAlgorithm": "A String", # The encryption algorithm. 1143 "keySha256": "A String", # SHA256 hash value of the encryption key. 1144 }, 1145 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 1146 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 1147 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 1148 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 1149 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 1150 "name": "A String", # The name of the object. Required if not specified by URL parameter. 1151 "bucket": "A String", # The name of the bucket containing this object. 1152 "contentEncoding": "A String", # Content-Encoding of the object data. 1153 "selfLink": "A String", # The link to this object. 1154 "contentDisposition": "A String", # Content-Disposition of the object data. 1155 "storageClass": "A String", # Storage class of the object. 1156 }</pre> 1157</div> 1158 1159<div class="method"> 1160 <code class="details" id="rewrite">rewrite(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, maxBytesRewrittenPerCall=None, ifSourceGenerationNotMatch=None, ifGenerationMatch=None, ifSourceMetagenerationNotMatch=None, destinationKmsKeyName=None, rewriteToken=None, provisionalUserProject=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</code> 1161 <pre>Rewrites a source object to a destination object. Optionally overrides metadata. 1162 1163Args: 1164 sourceBucket: string, Name of the bucket in which to find the source object. (required) 1165 sourceObject: string, Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 1166 destinationBucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. (required) 1167 destinationObject: string, Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 1168 body: object, The request body. (required) 1169 The object takes the form of: 1170 1171{ # An object. 1172 "generation": "A String", # The content generation of this object. Used for object versioning. 1173 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 1174 "mediaLink": "A String", # Media download link. 1175 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 1176 "owner": { # The owner of the object. This will always be the uploader of the object. 1177 "entityId": "A String", # The ID for the entity. 1178 "entity": "A String", # The entity, in the form user-userId. 1179 }, 1180 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 1181 "acl": [ # Access controls on the object. 1182 { # An access-control entry. 1183 "domain": "A String", # The domain associated with the entity, if any. 1184 "generation": "A String", # The content generation of the object, if applied to an object. 1185 "object": "A String", # The name of the object, if applied to an object. 1186 "bucket": "A String", # The name of the bucket. 1187 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1188 "entity": "A String", # The entity holding the permission, in one of the following forms: 1189 # - user-userId 1190 # - user-email 1191 # - group-groupId 1192 # - group-email 1193 # - domain-domain 1194 # - project-team-projectId 1195 # - allUsers 1196 # - allAuthenticatedUsers Examples: 1197 # - The user liz@example.com would be user-liz@example.com. 1198 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1199 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1200 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1201 "role": "A String", # The access permission for the entity. 1202 "id": "A String", # The ID of the access-control entry. 1203 "entityId": "A String", # The ID for the entity, if any. 1204 "projectTeam": { # The project team associated with the entity, if any. 1205 "projectNumber": "A String", # The project number. 1206 "team": "A String", # The team. 1207 }, 1208 "email": "A String", # The email address associated with the entity, if any. 1209 "selfLink": "A String", # The link to this access-control entry. 1210 }, 1211 ], 1212 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 1213 "size": "A String", # Content-Length of the data in bytes. 1214 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 1215 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 1216 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 1217 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 1218 "etag": "A String", # HTTP 1.1 Entity tag for the object. 1219 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 1220 "metadata": { # User-provided metadata, in key/value pairs. 1221 "a_key": "A String", # An individual metadata entry. 1222 }, 1223 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 1224 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 1225 "contentLanguage": "A String", # Content-Language of the object data. 1226 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 1227 "encryptionAlgorithm": "A String", # The encryption algorithm. 1228 "keySha256": "A String", # SHA256 hash value of the encryption key. 1229 }, 1230 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 1231 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 1232 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 1233 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 1234 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 1235 "name": "A String", # The name of the object. Required if not specified by URL parameter. 1236 "bucket": "A String", # The name of the bucket containing this object. 1237 "contentEncoding": "A String", # Content-Encoding of the object data. 1238 "selfLink": "A String", # The link to this object. 1239 "contentDisposition": "A String", # Content-Disposition of the object data. 1240 "storageClass": "A String", # Storage class of the object. 1241 } 1242 1243 projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. 1244 Allowed values 1245 full - Include all properties. 1246 noAcl - Omit the owner, acl property. 1247 sourceGeneration: string, If present, selects a specific revision of the source object (as opposed to the latest version, the default). 1248 maxBytesRewrittenPerCall: string, The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid. 1249 ifSourceGenerationNotMatch: string, Makes the operation conditional on whether the source object's current generation does not match the given value. 1250 ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. 1251 ifSourceMetagenerationNotMatch: string, Makes the operation conditional on whether the source object's current metageneration does not match the given value. 1252 destinationKmsKeyName: string, Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any. 1253 rewriteToken: string, Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request. 1254 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1255 ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. 1256 ifMetagenerationMatch: string, Makes the operation conditional on whether the destination object's current metageneration matches the given value. 1257 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 1258 destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object. 1259 Allowed values 1260 authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access. 1261 bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access. 1262 bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access. 1263 private - Object owner gets OWNER access. 1264 projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles. 1265 publicRead - Object owner gets OWNER access, and allUsers get READER access. 1266 ifSourceGenerationMatch: string, Makes the operation conditional on whether the source object's current generation matches the given value. 1267 ifSourceMetagenerationMatch: string, Makes the operation conditional on whether the source object's current metageneration matches the given value. 1268 ifMetagenerationNotMatch: string, Makes the operation conditional on whether the destination object's current metageneration does not match the given value. 1269 1270Returns: 1271 An object of the form: 1272 1273 { # A rewrite response. 1274 "objectSize": "A String", # The total size of the object being copied in bytes. This property is always present in the response. 1275 "kind": "storage#rewriteResponse", # The kind of item this is. 1276 "resource": { # An object. # A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes. 1277 "generation": "A String", # The content generation of this object. Used for object versioning. 1278 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 1279 "mediaLink": "A String", # Media download link. 1280 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 1281 "owner": { # The owner of the object. This will always be the uploader of the object. 1282 "entityId": "A String", # The ID for the entity. 1283 "entity": "A String", # The entity, in the form user-userId. 1284 }, 1285 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 1286 "acl": [ # Access controls on the object. 1287 { # An access-control entry. 1288 "domain": "A String", # The domain associated with the entity, if any. 1289 "generation": "A String", # The content generation of the object, if applied to an object. 1290 "object": "A String", # The name of the object, if applied to an object. 1291 "bucket": "A String", # The name of the bucket. 1292 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1293 "entity": "A String", # The entity holding the permission, in one of the following forms: 1294 # - user-userId 1295 # - user-email 1296 # - group-groupId 1297 # - group-email 1298 # - domain-domain 1299 # - project-team-projectId 1300 # - allUsers 1301 # - allAuthenticatedUsers Examples: 1302 # - The user liz@example.com would be user-liz@example.com. 1303 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1304 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1305 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1306 "role": "A String", # The access permission for the entity. 1307 "id": "A String", # The ID of the access-control entry. 1308 "entityId": "A String", # The ID for the entity, if any. 1309 "projectTeam": { # The project team associated with the entity, if any. 1310 "projectNumber": "A String", # The project number. 1311 "team": "A String", # The team. 1312 }, 1313 "email": "A String", # The email address associated with the entity, if any. 1314 "selfLink": "A String", # The link to this access-control entry. 1315 }, 1316 ], 1317 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 1318 "size": "A String", # Content-Length of the data in bytes. 1319 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 1320 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 1321 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 1322 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 1323 "etag": "A String", # HTTP 1.1 Entity tag for the object. 1324 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 1325 "metadata": { # User-provided metadata, in key/value pairs. 1326 "a_key": "A String", # An individual metadata entry. 1327 }, 1328 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 1329 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 1330 "contentLanguage": "A String", # Content-Language of the object data. 1331 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 1332 "encryptionAlgorithm": "A String", # The encryption algorithm. 1333 "keySha256": "A String", # SHA256 hash value of the encryption key. 1334 }, 1335 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 1336 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 1337 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 1338 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 1339 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 1340 "name": "A String", # The name of the object. Required if not specified by URL parameter. 1341 "bucket": "A String", # The name of the bucket containing this object. 1342 "contentEncoding": "A String", # Content-Encoding of the object data. 1343 "selfLink": "A String", # The link to this object. 1344 "contentDisposition": "A String", # Content-Disposition of the object data. 1345 "storageClass": "A String", # Storage class of the object. 1346 }, 1347 "done": True or False, # true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response. 1348 "totalBytesRewritten": "A String", # The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response. 1349 "rewriteToken": "A String", # A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy. 1350 }</pre> 1351</div> 1352 1353<div class="method"> 1354 <code class="details" id="setIamPolicy">setIamPolicy(bucket, object, body, generation=None, userProject=None, provisionalUserProject=None)</code> 1355 <pre>Updates an IAM policy for the specified object. 1356 1357Args: 1358 bucket: string, Name of the bucket in which the object resides. (required) 1359 object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 1360 body: object, The request body. (required) 1361 The object takes the form of: 1362 1363{ # A bucket/object IAM policy. 1364 "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. 1365 "bindings": [ # An association between a role, which comes with a set of permissions, and members who may assume that role. 1366 { 1367 "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. 1368 # The new IAM roles are: 1369 # - roles/storage.admin — Full control of Google Cloud Storage resources. 1370 # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. 1371 # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage. 1372 # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: 1373 # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. 1374 # - roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. 1375 # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. 1376 # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. 1377 # - 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. 1378 "members": [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: 1379 # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account. 1380 # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. 1381 # - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. 1382 # - serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . 1383 # - group:emailid — An email address that represents a Google group. For example, group:admins@example.com. 1384 # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. 1385 # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project 1386 # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project 1387 # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project 1388 "A String", 1389 ], 1390 "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. 1391 "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. 1392 "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. 1393 "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. 1394 "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. 1395 }, 1396 }, 1397 ], 1398 "etag": "A String", # HTTP 1.1 Entity tag for the policy. 1399 "kind": "storage#policy", # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. 1400} 1401 1402 generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default). 1403 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 1404 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1405 1406Returns: 1407 An object of the form: 1408 1409 { # A bucket/object IAM policy. 1410 "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. 1411 "bindings": [ # An association between a role, which comes with a set of permissions, and members who may assume that role. 1412 { 1413 "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. 1414 # The new IAM roles are: 1415 # - roles/storage.admin — Full control of Google Cloud Storage resources. 1416 # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. 1417 # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage. 1418 # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: 1419 # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. 1420 # - roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. 1421 # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. 1422 # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. 1423 # - 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. 1424 "members": [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: 1425 # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account. 1426 # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. 1427 # - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. 1428 # - serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . 1429 # - group:emailid — An email address that represents a Google group. For example, group:admins@example.com. 1430 # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. 1431 # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project 1432 # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project 1433 # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project 1434 "A String", 1435 ], 1436 "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. 1437 "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. 1438 "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. 1439 "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. 1440 "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. 1441 }, 1442 }, 1443 ], 1444 "etag": "A String", # HTTP 1.1 Entity tag for the policy. 1445 "kind": "storage#policy", # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. 1446 }</pre> 1447</div> 1448 1449<div class="method"> 1450 <code class="details" id="testIamPermissions">testIamPermissions(bucket, object, permissions, generation=None, userProject=None, provisionalUserProject=None)</code> 1451 <pre>Tests a set of permissions on the given object to see which, if any, are held by the caller. 1452 1453Args: 1454 bucket: string, Name of the bucket in which the object resides. (required) 1455 object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 1456 permissions: string, Permissions to test. (required) (repeated) 1457 generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default). 1458 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 1459 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1460 1461Returns: 1462 An object of the form: 1463 1464 { # A storage.(buckets|objects).testIamPermissions response. 1465 "kind": "storage#testIamPermissionsResponse", # The kind of item this is. 1466 "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: 1467 # - storage.buckets.delete — Delete bucket. 1468 # - storage.buckets.get — Read bucket metadata. 1469 # - storage.buckets.getIamPolicy — Read bucket IAM policy. 1470 # - storage.buckets.create — Create bucket. 1471 # - storage.buckets.list — List buckets. 1472 # - storage.buckets.setIamPolicy — Update bucket IAM policy. 1473 # - storage.buckets.update — Update bucket metadata. 1474 # - storage.objects.delete — Delete object. 1475 # - storage.objects.get — Read object data and metadata. 1476 # - storage.objects.getIamPolicy — Read object IAM policy. 1477 # - storage.objects.create — Create object. 1478 # - storage.objects.list — List objects. 1479 # - storage.objects.setIamPolicy — Update object IAM policy. 1480 # - storage.objects.update — Update object metadata. 1481 "A String", 1482 ], 1483 }</pre> 1484</div> 1485 1486<div class="method"> 1487 <code class="details" id="update">update(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, provisionalUserProject=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</code> 1488 <pre>Updates an object's metadata. 1489 1490Args: 1491 bucket: string, Name of the bucket in which the object resides. (required) 1492 object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required) 1493 body: object, The request body. (required) 1494 The object takes the form of: 1495 1496{ # An object. 1497 "generation": "A String", # The content generation of this object. Used for object versioning. 1498 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 1499 "mediaLink": "A String", # Media download link. 1500 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 1501 "owner": { # The owner of the object. This will always be the uploader of the object. 1502 "entityId": "A String", # The ID for the entity. 1503 "entity": "A String", # The entity, in the form user-userId. 1504 }, 1505 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 1506 "acl": [ # Access controls on the object. 1507 { # An access-control entry. 1508 "domain": "A String", # The domain associated with the entity, if any. 1509 "generation": "A String", # The content generation of the object, if applied to an object. 1510 "object": "A String", # The name of the object, if applied to an object. 1511 "bucket": "A String", # The name of the bucket. 1512 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1513 "entity": "A String", # The entity holding the permission, in one of the following forms: 1514 # - user-userId 1515 # - user-email 1516 # - group-groupId 1517 # - group-email 1518 # - domain-domain 1519 # - project-team-projectId 1520 # - allUsers 1521 # - allAuthenticatedUsers Examples: 1522 # - The user liz@example.com would be user-liz@example.com. 1523 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1524 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1525 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1526 "role": "A String", # The access permission for the entity. 1527 "id": "A String", # The ID of the access-control entry. 1528 "entityId": "A String", # The ID for the entity, if any. 1529 "projectTeam": { # The project team associated with the entity, if any. 1530 "projectNumber": "A String", # The project number. 1531 "team": "A String", # The team. 1532 }, 1533 "email": "A String", # The email address associated with the entity, if any. 1534 "selfLink": "A String", # The link to this access-control entry. 1535 }, 1536 ], 1537 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 1538 "size": "A String", # Content-Length of the data in bytes. 1539 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 1540 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 1541 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 1542 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 1543 "etag": "A String", # HTTP 1.1 Entity tag for the object. 1544 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 1545 "metadata": { # User-provided metadata, in key/value pairs. 1546 "a_key": "A String", # An individual metadata entry. 1547 }, 1548 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 1549 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 1550 "contentLanguage": "A String", # Content-Language of the object data. 1551 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 1552 "encryptionAlgorithm": "A String", # The encryption algorithm. 1553 "keySha256": "A String", # SHA256 hash value of the encryption key. 1554 }, 1555 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 1556 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 1557 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 1558 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 1559 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 1560 "name": "A String", # The name of the object. Required if not specified by URL parameter. 1561 "bucket": "A String", # The name of the bucket containing this object. 1562 "contentEncoding": "A String", # Content-Encoding of the object data. 1563 "selfLink": "A String", # The link to this object. 1564 "contentDisposition": "A String", # Content-Disposition of the object data. 1565 "storageClass": "A String", # Storage class of the object. 1566 } 1567 1568 projection: string, Set of properties to return. Defaults to full. 1569 Allowed values 1570 full - Include all properties. 1571 noAcl - Omit the owner, acl property. 1572 generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default). 1573 predefinedAcl: string, Apply a predefined set of access controls to this object. 1574 Allowed values 1575 authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access. 1576 bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access. 1577 bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access. 1578 private - Object owner gets OWNER access. 1579 projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles. 1580 publicRead - Object owner gets OWNER access, and allUsers get READER access. 1581 ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. 1582 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1583 ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. 1584 ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value. 1585 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 1586 ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value. 1587 1588Returns: 1589 An object of the form: 1590 1591 { # An object. 1592 "generation": "A String", # The content generation of this object. Used for object versioning. 1593 "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. 1594 "mediaLink": "A String", # Media download link. 1595 "kmsKeyName": "A String", # Cloud KMS Key used to encrypt this object, if the object is encrypted by such a key. 1596 "owner": { # The owner of the object. This will always be the uploader of the object. 1597 "entityId": "A String", # The ID for the entity. 1598 "entity": "A String", # The entity, in the form user-userId. 1599 }, 1600 "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. 1601 "acl": [ # Access controls on the object. 1602 { # An access-control entry. 1603 "domain": "A String", # The domain associated with the entity, if any. 1604 "generation": "A String", # The content generation of the object, if applied to an object. 1605 "object": "A String", # The name of the object, if applied to an object. 1606 "bucket": "A String", # The name of the bucket. 1607 "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. 1608 "entity": "A String", # The entity holding the permission, in one of the following forms: 1609 # - user-userId 1610 # - user-email 1611 # - group-groupId 1612 # - group-email 1613 # - domain-domain 1614 # - project-team-projectId 1615 # - allUsers 1616 # - allAuthenticatedUsers Examples: 1617 # - The user liz@example.com would be user-liz@example.com. 1618 # - The group example@googlegroups.com would be group-example@googlegroups.com. 1619 # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. 1620 "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. 1621 "role": "A String", # The access permission for the entity. 1622 "id": "A String", # The ID of the access-control entry. 1623 "entityId": "A String", # The ID for the entity, if any. 1624 "projectTeam": { # The project team associated with the entity, if any. 1625 "projectNumber": "A String", # The project number. 1626 "team": "A String", # The team. 1627 }, 1628 "email": "A String", # The email address associated with the entity, if any. 1629 "selfLink": "A String", # The link to this access-control entry. 1630 }, 1631 ], 1632 "id": "A String", # The ID of the object, including the bucket name, object name, and generation number. 1633 "size": "A String", # Content-Length of the data in bytes. 1634 "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. 1635 "timeCreated": "A String", # The creation time of the object in RFC 3339 format. 1636 "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. 1637 "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices. 1638 "etag": "A String", # HTTP 1.1 Entity tag for the object. 1639 "temporaryHold": True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. 1640 "metadata": { # User-provided metadata, in key/value pairs. 1641 "a_key": "A String", # An individual metadata entry. 1642 }, 1643 "updated": "A String", # The modification time of the object metadata in RFC 3339 format. 1644 "contentType": "A String", # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. 1645 "contentLanguage": "A String", # Content-Language of the object data. 1646 "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. 1647 "encryptionAlgorithm": "A String", # The encryption algorithm. 1648 "keySha256": "A String", # SHA256 hash value of the encryption key. 1649 }, 1650 "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. 1651 "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. 1652 "retentionExpirationTime": "A String", # A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). 1653 "eventBasedHold": True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), 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 the 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. 1654 "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. 1655 "name": "A String", # The name of the object. Required if not specified by URL parameter. 1656 "bucket": "A String", # The name of the bucket containing this object. 1657 "contentEncoding": "A String", # Content-Encoding of the object data. 1658 "selfLink": "A String", # The link to this object. 1659 "contentDisposition": "A String", # Content-Disposition of the object data. 1660 "storageClass": "A String", # Storage class of the object. 1661 }</pre> 1662</div> 1663 1664<div class="method"> 1665 <code class="details" id="watchAll">watchAll(bucket, body, projection=None, prefix=None, pageToken=None, maxResults=None, provisionalUserProject=None, versions=None, userProject=None, delimiter=None, includeTrailingDelimiter=None)</code> 1666 <pre>Watch for changes on all objects in a bucket. 1667 1668Args: 1669 bucket: string, Name of the bucket in which to look for objects. (required) 1670 body: object, The request body. (required) 1671 The object takes the form of: 1672 1673{ # An notification channel used to watch for resource changes. 1674 "resourceUri": "A String", # A version-specific identifier for the watched resource. 1675 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". 1676 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. 1677 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional. 1678 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. 1679 "params": { # Additional parameters controlling delivery channel behavior. Optional. 1680 "a_key": "A String", # Declares a new parameter by name. 1681 }, 1682 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. 1683 "address": "A String", # The address where notifications are delivered for this channel. 1684 "type": "A String", # The type of delivery mechanism used for this channel. 1685 "id": "A String", # A UUID or similar unique string that identifies this channel. 1686 } 1687 1688 projection: string, Set of properties to return. Defaults to noAcl. 1689 Allowed values 1690 full - Include all properties. 1691 noAcl - Omit the owner, acl property. 1692 prefix: string, Filter results to objects whose names begin with this prefix. 1693 pageToken: string, A previously-returned page token representing part of the larger set of results to view. 1694 maxResults: integer, Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller. 1695 provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket. 1696 versions: boolean, If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning. 1697 userProject: string, The project to be billed for this request. Required for Requester Pays buckets. 1698 delimiter: string, Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted. 1699 includeTrailingDelimiter: boolean, If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes. 1700 1701Returns: 1702 An object of the form: 1703 1704 { # An notification channel used to watch for resource changes. 1705 "resourceUri": "A String", # A version-specific identifier for the watched resource. 1706 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". 1707 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. 1708 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional. 1709 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. 1710 "params": { # Additional parameters controlling delivery channel behavior. Optional. 1711 "a_key": "A String", # Declares a new parameter by name. 1712 }, 1713 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. 1714 "address": "A String", # The address where notifications are delivered for this channel. 1715 "type": "A String", # The type of delivery mechanism used for this channel. 1716 "id": "A String", # A UUID or similar unique string that identifies this channel. 1717 }</pre> 1718</div> 1719 1720</body></html>