Skip to main content

bucket_access

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

Overview

Namebucket_access
TypeResource
Idlinode.object_storage.bucket_access

Fields

The following fields are returned by SELECT queries:

Access settings for the specific bucket.

NameDatatypeDescription
aclstringThe S3 predefined collection of grantees and permissions set for the bucket, also referred to as a Canned ACL. (private, public-read, authenticated-read, public-read-write, custom) (example: public-read)
acl_xmlstringThe full XML of the object's ACL policy. (example: <AccessControlPolicy>...</AccessControlPolicy>)
cors_enabledbooleanIf true, cross-origin resource sharing (CORS) is enabled for all origins in the bucket. Returned as null for E2 and E3 endpoint types because CORS is not supported.
cors_xmlstringThe full XML of the bucket's CORS policy. Returned as an empty object if cors_enabled is false, and null for E2 and E3 endpoint types. CORS is not supported with these endpoint types. (example: <CORSConfiguration>...</CORSConfiguration>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregionId, bucketView the cross-origin resource sharing (CORS) and S3 canned access control (ACL) settings for a specific Object Storage bucket.

> 📘
>
> You can use the S3 API to view more details on CORS or S3 canned ACL settings. OAuth scopes.

<br /> object_storage:read_only<br />

Learn more...
createinsertregionId, bucketApply basic cross-origin resource sharing (CORS) and S3 canned access control list (ACL) settings.

> 📘
>
> You can use the S3 API for more fine-grained control of the CORS or S3 canned ACL settings. OAuth scopes.

<br /> object_storage:read_write<br />

Learn more...
updatereplaceregionId, bucketUpdate basic cross-origin resource sharing (CORS) and S3 canned access control list (ACL) settings.

> 📘
>
> You can use the S3 API for more fine-grained control of the CORS or S3 canned ACL settings. OAuth scopes.

<br /> object_storage:read_write<br />

Learn more...

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
bucketstringThe bucket name. (example: {{bucket}})
regionIdstringIdentifies a region where this bucket lives. > 📘 > > You can use a clusterId in place of regionId in requests for buckets that you created using the legacy version of the API. Run List clusters to see each cluster id.

SELECT examples

View the cross-origin resource sharing (CORS) and S3 canned access control (ACL) settings for a specific Object Storage bucket.

> 📘
>
> You can use the S3 API to view more details on CORS or S3 canned ACL settings. OAuth scopes.

<br /> object_storage:read_only<br />

Learn more...

SELECT
acl,
acl_xml,
cors_enabled,
cors_xml
FROM linode.object_storage.bucket_access
WHERE regionId = '{{ regionId }}' -- required
AND bucket = '{{ bucket }}' -- required
;

INSERT examples

Apply basic cross-origin resource sharing (CORS) and S3 canned access control list (ACL) settings.

> 📘
>
> You can use the S3 API for more fine-grained control of the CORS or S3 canned ACL settings. OAuth scopes.

<br /> object_storage:read_write<br />

Learn more...

INSERT INTO linode.object_storage.bucket_access (
acl,
cors_enabled,
regionId,
bucket
)
SELECT
'{{ acl }}',
{{ cors_enabled }},
'{{ regionId }}',
'{{ bucket }}'
RETURNING
bucket,
message,
regionId
;

REPLACE examples

Update basic cross-origin resource sharing (CORS) and S3 canned access control list (ACL) settings.

> 📘
>
> You can use the S3 API for more fine-grained control of the CORS or S3 canned ACL settings. OAuth scopes.

<br /> object_storage:read_write<br />

Learn more...

REPLACE linode.object_storage.bucket_access
SET
acl = '{{ acl }}',
cors_enabled = {{ cors_enabled }}
WHERE
regionId = '{{ regionId }}' --required
AND bucket = '{{ bucket }}' --required
RETURNING
bucket,
message,
regionId;