The Objects resource represents an object within Cloud Storage. Objects are pieces of data that you have uploaded to Cloud Storage. For more information, see Object Name Requirements.
Every object in Cloud Storage resides in a
bucket. The object is owned by its
original uploader, who will always retain OWNER permission on it.
In addition to the acl property, objects contain
objectAccessControls, for use in
fine-grained manipulation of an existing object's access controls.
To try out the methods for this resource, see Methods.
Resource representations
{ "kind": "storage#object", "id": string, "selfLink": string, "mediaLink": string, "name": string, "bucket": string, "generation": "long", "metageneration": "long", "contentType": string, "storageClass": string, "size": "unsigned long", "softDeleteTime": "datetime", "restoreToken": string, "hardDeleteTime": "datetime", "md5Hash": string, "contentEncoding": string, "contentDisposition": string, "contentLanguage": string, "cacheControl": string, "crc32c": string, "componentCount": integer, "etag": string, "kmsKeyName": string, "temporaryHold": boolean, "eventBasedHold": boolean, "retentionExpirationTime": "datetime", "retention": { "retainUntilTime": "datetime", "mode": string } "timeCreated": "datetime", "timeFinalized": "datetime", "updated": "datetime", "timeDeleted": "datetime", "timeStorageClassUpdated": "datetime", "customTime": "datetime", "metadata": { (key): string }, "acl": [ objectAccessControls Resource ], "owner": { "entity": string, "entityId": string }, "customerEncryption": { "encryptionAlgorithm": string, "keySha256": string } "contexts": { "custom": { (key): { "value": string, "createTime": "datetime", "updateTime": "datetime" } } } }
| Property name | Value | Description | Notes |
|---|---|---|---|
acl[] |
list |
Access controls on the object, containing one or more objectAccessControls Resources. Only requests that use the If |
writable |
bucket |
string |
The name of the bucket containing this object. | |
cacheControl |
string |
Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default is "public, max-age=3600". |
writable |
componentCount |
integer |
Returned for composite objects only. Number of non-composite objects in the composite object. componentCount includes non-composite objects that were part of any composite objects used to compose the current object. |
|
contentDisposition |
string |
Content-Disposition of the object data. | writable |
contentEncoding |
string |
Content-Encoding of the object data. | writable |
contentLanguage |
string |
Content-Language of the object data. | writable |
contentType |
string |
Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. | writable |
contexts |
object |
Contexts attached to an object, in key-value pairs. For more information about object contexts, see |