-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#### storage:v1 The following keys were added: - resources.objects.methods.move (Total Keys: 29)
- Loading branch information
1 parent
5cf231b
commit 6cbba22
Showing
2 changed files
with
200 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,9 @@ <h2>Instance Methods</h2> | |
<p class="toc_element"> | ||
<code><a href="#list_next">list_next()</a></code></p> | ||
<p class="firstline">Retrieves the next page of results.</p> | ||
<p class="toc_element"> | ||
<code><a href="#move">move(bucket, sourceObject, destinationObject, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, ifSourceGenerationMatch=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationMatch=None, ifSourceMetagenerationNotMatch=None, userProject=None)</a></code></p> | ||
<p class="firstline">Moves the source object to the destination object in the same bucket.</p> | ||
<p class="toc_element"> | ||
<code><a href="#patch">patch(bucket, object, body=None, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, overrideUnlockedRetention=None, predefinedAcl=None, projection=None, userProject=None)</a></code></p> | ||
<p class="firstline">Patches an object's metadata.</p> | ||
|
@@ -1113,6 +1116,109 @@ <h3>Method Details</h3> | |
</pre> | ||
</div> | ||
|
||
<div class="method"> | ||
<code class="details" id="move">move(bucket, sourceObject, destinationObject, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, ifSourceGenerationMatch=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationMatch=None, ifSourceMetagenerationNotMatch=None, userProject=None)</code> | ||
<pre>Moves the source object to the destination object in the same bucket. | ||
|
||
Args: | ||
bucket: string, Name of the bucket in which the object resides. (required) | ||
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](https://cloud.google.com/storage/docs/request-endpoints#encoding). (required) | ||
destinationObject: string, Name of the destination object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). (required) | ||
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. `ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. | ||
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.`ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. | ||
ifMetagenerationMatch: string, Makes the operation conditional on whether the destination object's current metageneration matches the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. | ||
ifMetagenerationNotMatch: string, Makes the operation conditional on whether the destination object's current metageneration does not match the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. | ||
ifSourceGenerationMatch: string, Makes the operation conditional on whether the source object's current generation matches the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. | ||
ifSourceGenerationNotMatch: string, Makes the operation conditional on whether the source object's current generation does not match the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. | ||
ifSourceMetagenerationMatch: string, Makes the operation conditional on whether the source object's current metageneration matches the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. | ||
ifSourceMetagenerationNotMatch: string, Makes the operation conditional on whether the source object's current metageneration does not match the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. | ||
userProject: string, The project to be billed for this request. Required for Requester Pays buckets. | ||
|
||
Returns: | ||
An object of the form: | ||
|
||
{ # An object. | ||
"acl": [ # Access controls on the object. | ||
{ # An access-control entry. | ||
"bucket": "A String", # The name of the bucket. | ||
"domain": "A String", # The domain associated with the entity, if any. | ||
"email": "A String", # The email address associated with the entity, if any. | ||
"entity": "A String", # The entity holding the permission, in one of the following forms: | ||
# - user-userId | ||
# - user-email | ||
# - group-groupId | ||
# - group-email | ||
# - domain-domain | ||
# - project-team-projectId | ||
# - allUsers | ||
# - allAuthenticatedUsers Examples: | ||
# - The user [email protected] would be [email protected]. | ||
# - The group [email protected] would be [email protected]. | ||
# - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. | ||
"entityId": "A String", # The ID for the entity, if any. | ||
"etag": "A String", # HTTP 1.1 Entity tag for the access-control entry. | ||
"generation": "A String", # The content generation of the object, if applied to an object. | ||
"id": "A String", # The ID of the access-control entry. | ||
"kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl. | ||
"object": "A String", # The name of the object, if applied to an object. | ||
"projectTeam": { # The project team associated with the entity, if any. | ||
"projectNumber": "A String", # The project number. | ||
"team": "A String", # The team. | ||
}, | ||
"role": "A String", # The access permission for the entity. | ||
"selfLink": "A String", # The link to this access-control entry. | ||
}, | ||
], | ||
"bucket": "A String", # The name of the bucket containing this object. | ||
"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. | ||
"componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations. | ||
"contentDisposition": "A String", # Content-Disposition of the object data. | ||
"contentEncoding": "A String", # Content-Encoding of the object data. | ||
"contentLanguage": "A String", # Content-Language of the object data. | ||
"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. | ||
"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 [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). | ||
"customTime": "A String", # A timestamp in RFC 3339 format specified by the user for an object. | ||
"customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key. | ||
"encryptionAlgorithm": "A String", # The encryption algorithm. | ||
"keySha256": "A String", # SHA256 hash value of the encryption key. | ||
}, | ||
"etag": "A String", # HTTP 1.1 Entity tag for the object. | ||
"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. | ||
"generation": "A String", # The content generation of this object. Used for object versioning. | ||
"hardDeleteTime": "A String", # This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. | ||
"id": "A String", # The ID of the object, including the bucket name, object name, and generation number. | ||
"kind": "storage#object", # The kind of item this is. For objects, this is always storage#object. | ||
"kmsKeyName": "A String", # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. | ||
"md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). | ||
"mediaLink": "A String", # Media download link. | ||
"metadata": { # User-provided metadata, in key/value pairs. | ||
"a_key": "A String", # An individual metadata entry. | ||
}, | ||
"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. | ||
"name": "A String", # The name of the object. Required if not specified by URL parameter. | ||
"owner": { # The owner of the object. This will always be the uploader of the object. | ||
"entity": "A String", # The entity, in the form user-userId. | ||
"entityId": "A String", # The ID for the entity. | ||
}, | ||
"restoreToken": "A String", # Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. | ||
"retention": { # A collection of object level retention parameters. | ||
"mode": "A String", # The bucket's object retention mode, can only be Unlocked or Locked. | ||
"retainUntilTime": "A String", # A time in RFC 3339 format until which object retention protects this object. | ||
}, | ||
"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). | ||
"selfLink": "A String", # The link to this object. | ||
"size": "A String", # Content-Length of the data in bytes. | ||
"softDeleteTime": "A String", # The time at which the object became soft-deleted in RFC 3339 format. | ||
"storageClass": "A String", # Storage class of the object. | ||
"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. | ||
"timeCreated": "A String", # The creation time of the object in RFC 3339 format. | ||
"timeDeleted": "A String", # The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. | ||
"timeFinalized": "A String", # The time when the object was finalized. | ||
"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. | ||
"updated": "A String", # The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. | ||
}</pre> | ||
</div> | ||
|
||
<div class="method"> | ||
<code class="details" id="patch">patch(bucket, object, body=None, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, overrideUnlockedRetention=None, predefinedAcl=None, projection=None, userProject=None)</code> | ||
<pre>Patches an object's metadata. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters