Skip to main content

bucket_access_controls

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

Overview

Namebucket_access_controls
TypeResource
Idgoogle.storage.bucket_access_controls

Fields

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. | | entityId | string | The ID for the entity, if any. | | etag | string | HTTP 1.1 Entity tag for the access-control entry. | | kind | string | The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl. | | projectTeam | object | The project team associated with the entity, if any. | | role | string | The access permission for the entity. | | selfLink | string | The link to this access-control entry. |

Methods

NameAccessible byRequired ParamsDescription
getSELECTbucket, entityReturns the ACL entry for the specified entity on the specified bucket.
listSELECTbucketRetrieves ACL entries on the specified bucket.
insertINSERTbucketCreates a new ACL entry on the specified bucket.
deleteDELETEbucket, entityPermanently deletes the ACL entry for the specified entity on the specified bucket.
patchUPDATEbucket, entityPatches an ACL entry on the specified bucket.
updateREPLACEbucket, entityUpdates an ACL entry on the specified bucket.

SELECT examples

Retrieves ACL entries on the specified bucket.

SELECT
id,
bucket,
domain,
email,
entity,
entityId,
etag,
kind,
projectTeam,
role,
selfLink
FROM google.storage.bucket_access_controls
WHERE bucket = '{{ bucket }}';

INSERT example

Use the following StackQL query and manifest file to create a new bucket_access_controls resource.

/*+ create */
INSERT INTO google.storage.bucket_access_controls (
bucket,
bucket,
domain,
email,
entity,
entityId,
etag,
projectTeam,
role
)
SELECT
'{{ bucket }}',
'{{ bucket }}',
'{{ domain }}',
'{{ email }}',
'{{ entity }}',
'{{ entityId }}',
'{{ etag }}',
'{{ projectTeam }}',
'{{ role }}'
;

UPDATE example

Updates a bucket_access_controls resource.

/*+ update */
UPDATE google.storage.bucket_access_controls
SET
bucket = '{{ bucket }}',
domain = '{{ domain }}',
email = '{{ email }}',
entity = '{{ entity }}',
entityId = '{{ entityId }}',
etag = '{{ etag }}',
projectTeam = '{{ projectTeam }}',
role = '{{ role }}'
WHERE
bucket = '{{ bucket }}'
AND entity = '{{ entity }}';

REPLACE example

Replaces all fields in the specified bucket_access_controls resource.

/*+ update */
REPLACE google.storage.bucket_access_controls
SET
bucket = '{{ bucket }}',
domain = '{{ domain }}',
email = '{{ email }}',
entity = '{{ entity }}',
entityId = '{{ entityId }}',
etag = '{{ etag }}',
projectTeam = '{{ projectTeam }}',
role = '{{ role }}'
WHERE
bucket = '{{ bucket }}'
AND entity = '{{ entity }}';

DELETE example

Deletes the specified bucket_access_controls resource.

/*+ delete */
DELETE FROM google.storage.bucket_access_controls
WHERE bucket = '{{ bucket }}'
AND entity = '{{ entity }}';