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. (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
get_object_storage_bucket_accessselectView 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...
post_object_storage_bucket_accessinsertApply 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...
put_storage_bucket_accessreplaceUpdate 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

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;

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 (
data__acl,
data__cors_enabled
)
SELECT
'{{ acl }}',
{{ cors_enabled }}
;

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
data__acl = '{{ acl }}',
data__cors_enabled = {{ cors_enabled }}
WHERE
;