bucket_access
Creates, updates, deletes, gets or lists a bucket_access resource.
Overview
| Name | bucket_access |
| Type | Resource |
| Id | linode.object_storage.bucket_access |
Fields
The following fields are returned by SELECT queries:
- get
Access settings for the specific bucket.
| Name | Datatype | Description |
|---|---|---|
acl | string | The 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_xml | string | The full XML of the object's ACL policy. (example: <AccessControlPolicy>...</AccessControlPolicy>) |
cors_enabled | boolean | If 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_xml | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | regionId, bucket | 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... | |
create | insert | regionId, bucket | 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... | |
update | replace | regionId, bucket | 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... |
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.
| Name | Datatype | Description |
|---|---|---|
bucket | string | The bucket name. (example: {{bucket}}) |
regionId | string | Identifies 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
- get
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
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: bucket_access
props:
- name: regionId
value: "{{ regionId }}"
description: Required parameter for the bucket_access resource.
- name: bucket
value: "{{ bucket }}"
description: Required parameter for the bucket_access resource.
- name: acl
value: "{{ acl }}"
description: |
The S3 predefined collection of grantees and permissions set for the bucket, also referred to as a [Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl).
valid_values: ['private', 'public-read', 'authenticated-read', 'public-read-write', 'custom']
- name: cors_enabled
value: {{ cors_enabled }}
description: |
If `true`, cross-origin resource sharing (CORS) is enabled for all origins in the bucket.
REPLACE examples
- update
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;