Skip to main content

default_object_access_controls

Creates, updates, deletes, gets or lists a default_object_access_controls resource.

Overview

Namedefault_object_access_controls
TypeResource
Idgoogle.storage.default_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, entityuserProjectReturns the default object ACL entry for the specified entity on the specified bucket.
listselectbucketifMetagenerationMatch, ifMetagenerationNotMatch, userProjectRetrieves default object ACL entries on the specified bucket.
insertinsertbucketuserProjectCreates a new default object ACL entry on the specified bucket.
patchupdatebucket, entityuserProjectPatches a default object ACL entry on the specified bucket.
updatereplacebucket, entityuserProjectUpdates a default object ACL entry on the specified bucket.
deletedeletebucket, entityuserProjectPermanently deletes the default object ACL entry for the specified entity on the specified bucket.

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
ifMetagenerationMatchstring (int64)
ifMetagenerationNotMatchstring (int64)
userProjectstring

SELECT examples

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

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

INSERT examples

Creates a new default object ACL entry on the specified bucket.

INSERT INTO google.storage.default_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,
userProject
)
SELECT
'{{ bucket }}',
'{{ domain }}',
'{{ email }}',
'{{ entity }}',
'{{ entityId }}',
'{{ etag }}',
'{{ generation }}',
'{{ id }}',
'{{ kind }}',
'{{ object }}',
'{{ projectTeam }}',
'{{ role }}',
'{{ selfLink }}',
'{{ bucket }}',
'{{ userProject }}'
RETURNING
id,
bucket,
domain,
email,
entity,
entityId,
etag,
generation,
kind,
object,
projectTeam,
role,
selfLink
;

UPDATE examples

Patches a default object ACL entry on the specified bucket.

UPDATE google.storage.default_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 entity = '{{ entity }}' --required
AND userProject = '{{ userProject}}'
RETURNING
id,
bucket,
domain,
email,
entity,
entityId,
etag,
generation,
kind,
object,
projectTeam,
role,
selfLink;

REPLACE examples

Updates a default object ACL entry on the specified bucket.

REPLACE google.storage.default_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 entity = '{{ entity }}' --required
AND userProject = '{{ userProject}}'
RETURNING
id,
bucket,
domain,
email,
entity,
entityId,
etag,
generation,
kind,
object,
projectTeam,
role,
selfLink;

DELETE examples

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

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