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 | aws.s3outposts.buckets |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | BucketName, OutpostId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all buckets
in a region.
SELECT
region,
arn,
bucket_name,
outpost_id,
tags,
lifecycle_configuration
FROM aws.s3outposts.buckets
WHERE region = 'us-east-1';
Gets all properties from an individual bucket
.
SELECT
region,
arn,
bucket_name,
outpost_id,
tags,
lifecycle_configuration
FROM aws.s3outposts.buckets
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
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 aws.s3outposts.buckets (
BucketName,
OutpostId,
region
)
SELECT
'{{ BucketName }}',
'{{ OutpostId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.s3outposts.buckets (
BucketName,
OutpostId,
Tags,
LifecycleConfiguration,
region
)
SELECT
'{{ BucketName }}',
'{{ OutpostId }}',
'{{ Tags }}',
'{{ LifecycleConfiguration }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: bucket
props:
- name: BucketName
value: '{{ BucketName }}'
- name: OutpostId
value: '{{ OutpostId }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: LifecycleConfiguration
value:
Rules:
- Status: '{{ Status }}'
Id: '{{ Id }}'
AbortIncompleteMultipartUpload:
DaysAfterInitiation: '{{ DaysAfterInitiation }}'
ExpirationDate: '{{ ExpirationDate }}'
ExpirationInDays: '{{ ExpirationInDays }}'
Filter:
Prefix: '{{ Prefix }}'
Tag:
Key: '{{ Key }}'
Value: '{{ Value }}'
AndOperator: null
DELETE
example
/*+ delete */
DELETE FROM aws.s3outposts.buckets
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the buckets
resource, the following permissions are required:
Create
s3-outposts:CreateBucket,
s3-outposts:PutBucketTagging,
s3-outposts:PutLifecycleConfiguration
Read
s3-outposts:GetBucket,
s3-outposts:GetBucketTagging,
s3-outposts:GetLifecycleConfiguration
Update
s3-outposts:PutBucketTagging,
s3-outposts:DeleteBucketTagging,
s3-outposts:PutLifecycleConfiguration
Delete
s3-outposts:DeleteBucket
List
s3-outposts:ListRegionalBuckets