buckets
Creates, updates, deletes or gets a bucket resource or lists buckets in a region
Overview
| Name | buckets |
| Type | Resource |
| Description | Resource Type Definition for AWS::S3Outposts::Bucket |
| Id | awscc.s3outposts.buckets |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the specified bucket. |
bucket_name | string | A name for the bucket. |
outpost_id | string | The id of the customer outpost on which the bucket resides. |
tags | array | An arbitrary set of tags (key-value pairs) for this S3Outposts bucket. |
lifecycle_configuration | object | Rules that define how Amazon S3Outposts manages objects during their lifetime. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the specified bucket. |
region | string | AWS region. |
For more information, see AWS::S3Outposts::Bucket.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | buckets | INSERT | BucketName, OutpostId, region |
delete_resource | buckets | DELETE | Identifier, region |
update_resource | buckets | UPDATE | Identifier, PatchDocument, region |
list_resources | buckets_list_only | SELECT | region |
get_resource | buckets | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual bucket.
SELECT
region,
arn,
bucket_name,
outpost_id,
tags,
lifecycle_configuration
FROM awscc.s3outposts.buckets
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all buckets in a region.
SELECT
region,
arn
FROM awscc.s3outposts.buckets_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new bucket resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.s3outposts.buckets (
BucketName,
OutpostId,
region
)
SELECT
'{{ bucket_name }}',
'{{ outpost_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.s3outposts.buckets (
BucketName,
OutpostId,
Tags,
LifecycleConfiguration,
region
)
SELECT
'{{ bucket_name }}',
'{{ outpost_id }}',
'{{ tags }}',
'{{ lifecycle_configuration }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: bucket
props:
- name: bucket_name
value: '{{ bucket_name }}'
- name: outpost_id
value: '{{ outpost_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: lifecycle_configuration
value:
rules:
- status: '{{ status }}'
id: '{{ id }}'
abort_incomplete_multipart_upload:
days_after_initiation: '{{ days_after_initiation }}'
expiration_date: '{{ expiration_date }}'
expiration_in_days: '{{ expiration_in_days }}'
filter:
prefix: '{{ prefix }}'
tag:
key: '{{ key }}'
value: '{{ value }}'
and_operator: null
UPDATE example
Use the following StackQL query and manifest file to update a bucket resource, using stack-deploy.
/*+ update */
UPDATE awscc.s3outposts.buckets
SET PatchDocument = string('{{ {
"Tags": tags,
"LifecycleConfiguration": lifecycle_configuration
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.s3outposts.buckets
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the buckets resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
s3-outposts:CreateBucket,
s3-outposts:PutBucketTagging,
s3-outposts:PutLifecycleConfiguration
s3-outposts:GetBucket,
s3-outposts:GetBucketTagging,
s3-outposts:GetLifecycleConfiguration
s3-outposts:PutBucketTagging,
s3-outposts:DeleteBucketTagging,
s3-outposts:PutLifecycleConfiguration
s3-outposts:DeleteBucket
s3-outposts:ListRegionalBuckets