Skip to main content

object_access_controls

Creates, updates, deletes, gets or lists an object_access_controls resource.

Overview

Nameobject_access_controls
TypeResource
Idgoogle.storage.object_access_controls

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstringThe ID of the access-control entry.
bucketstringThe name of the bucket.
domainstringThe domain associated with the entity, if any.
emailstringThe email address associated with the entity, if any.
entitystringThe 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 liz@example.com would be user-liz@example.com. - The group example@googlegroups.com would be group-example@googlegroups.com. - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
entityIdstringThe ID for the entity, if any.
etagstringHTTP 1.1 Entity tag for the access-control entry.
generationstring (int64)The content generation of the object, if applied to an object.
kindstringThe kind of item this is. For object access control entries, this is always storage#objectAccessControl. (default: storage#objectAccessControl)
objectstringThe name of the object, if applied to an object.
projectTeamobjectThe project team associated with the entity, if any.
rolestringThe access permission for the entity.
selfLinkstringThe link to this access-control entry.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbucket, object, entitygeneration, userProjectReturns the ACL entry for the specified entity on the specified object.
listselectbucket, objectgeneration, userProjectRetrieves ACL entries on the specified object.
insertinsertbucket, objectgeneration, userProjectCreates a new ACL entry on the specified object.
patchupdatebucket, object, entitygeneration, userProjectPatches an ACL entry on the specified object.
updatereplacebucket, object, entitygeneration, userProjectUpdates an ACL entry on the specified object.
deletedeletebucket, object, entitygeneration, userProjectPermanently deletes the ACL entry for the specified entity on the specified object.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
bucketstring
entitystring
objectstring
generationstring (int64)
userProjectstring

SELECT examples

Returns the ACL entry for the specified entity on the specified object.

SELECT
id,
bucket,
domain,
email,
entity,
entityId,
etag,
generation,
kind,
object,
projectTeam,
role,
selfLink
FROM google.storage.object_access_controls
WHERE bucket = '{{ bucket }}' -- required
AND object = '{{ object }}' -- required
AND entity = '{{ entity }}' -- required
AND generation = '{{ generation }}'
AND userProject = '{{ userProject }}';

INSERT examples

Creates a new ACL entry on the specified object.

INSERT INTO google.storage.object_access_controls (
data__bucket,
data__domain,
data__email,
data__entity,
data__entityId,
data__etag,
data__generation,
data__id,
data__kind,
data__object,
data__projectTeam,
data__role,
data__selfLink,
bucket,
object,
generation,
userProject
)
SELECT
'{{ bucket }}',
'{{ domain }}',
'{{ email }}',
'{{ entity }}',
'{{ entityId }}',
'{{ etag }}',
'{{ generation }}',
'{{ id }}',
'{{ kind }}',
'{{ object }}',
'{{ projectTeam }}',
'{{ role }}',
'{{ selfLink }}',
'{{ bucket }}',
'{{ object }}',
'{{ generation }}',
'{{ userProject }}'
RETURNING
id,
bucket,
domain,
email,
entity,
entityId,
etag,
generation,
kind,
object,
projectTeam,
role,
selfLink
;

UPDATE examples

Patches an ACL entry on the specified object.

UPDATE google.storage.object_access_controls
SET
data__bucket = '{{ bucket }}',
data__domain = '{{ domain }}',
data__email = '{{ email }}',
data__entity = '{{ entity }}',
data__entityId = '{{ entityId }}',
data__etag = '{{ etag }}',
data__generation = '{{ generation }}',
data__id = '{{ id }}',
data__kind = '{{ kind }}',
data__object = '{{ object }}',
data__projectTeam = '{{ projectTeam }}',
data__role = '{{ role }}',
data__selfLink = '{{ selfLink }}'
WHERE
bucket = '{{ bucket }}' --required
AND object = '{{ object }}' --required
AND entity = '{{ entity }}' --required
AND generation = '{{ generation}}'
AND userProject = '{{ userProject}}'
RETURNING
id,
bucket,
domain,
email,
entity,
entityId,
etag,
generation,
kind,
object,
projectTeam,
role,
selfLink;

REPLACE examples

Updates an ACL entry on the specified object.

REPLACE google.storage.object_access_controls
SET
data__bucket = '{{ bucket }}',
data__domain = '{{ domain }}',
data__email = '{{ email }}',
data__entity = '{{ entity }}',
data__entityId = '{{ entityId }}',
data__etag = '{{ etag }}',
data__generation = '{{ generation }}',
data__id = '{{ id }}',
data__kind = '{{ kind }}',
data__object = '{{ object }}',
data__projectTeam = '{{ projectTeam }}',
data__role = '{{ role }}',
data__selfLink = '{{ selfLink }}'
WHERE
bucket = '{{ bucket }}' --required
AND object = '{{ object }}' --required
AND entity = '{{ entity }}' --required
AND generation = '{{ generation}}'
AND userProject = '{{ userProject}}'
RETURNING
id,
bucket,
domain,
email,
entity,
entityId,
etag,
generation,
kind,
object,
projectTeam,
role,
selfLink;

DELETE examples

Permanently deletes the ACL entry for the specified entity on the specified object.

DELETE FROM google.storage.object_access_controls
WHERE bucket = '{{ bucket }}' --required
AND object = '{{ object }}' --required
AND entity = '{{ entity }}' --required
AND generation = '{{ generation }}'
AND userProject = '{{ userProject }}';