Skip to main content

buckets

Creates, updates, deletes or gets a bucket resource or lists buckets in a region

Overview

Namebuckets
TypeResource
DescriptionResource Type Definition for AWS::S3Outposts::Bucket
Idawscc.s3outposts.buckets

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the specified bucket.
bucket_namestringA name for the bucket.
outpost_idstringThe id of the customer outpost on which the bucket resides.
tagsarrayAn arbitrary set of tags (key-value pairs) for this S3Outposts bucket.
lifecycle_configurationobjectRules that define how Amazon S3Outposts manages objects during their lifetime.
regionstringAWS region.

For more information, see AWS::S3Outposts::Bucket.

Methods

NameResourceAccessible byRequired Params
create_resourcebucketsINSERTBucketName, OutpostId, region
delete_resourcebucketsDELETEIdentifier, region
update_resourcebucketsUPDATEIdentifier, PatchDocument, region
list_resourcesbuckets_list_onlySELECTregion
get_resourcebucketsSELECTIdentifier, region

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new bucket resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.s3outposts.buckets (
BucketName,
OutpostId,
region
)
SELECT
'{{ bucket_name }}',
'{{ outpost_id }}',
'{{ region }}';

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:

s3-outposts:CreateBucket,
s3-outposts:PutBucketTagging,
s3-outposts:PutLifecycleConfiguration