directory_buckets
Creates, updates, deletes or gets a directory_bucket
resource or lists directory_buckets
in a region
Overview
Name | directory_buckets |
Type | Resource |
Description | Resource Type definition for AWS::S3Express::DirectoryBucket. |
Id | aws.s3express.directory_buckets |
Fields
Name | Datatype | Description |
---|---|---|
bucket_name | string | Specifies a name for the bucket. The bucket name must contain only lowercase letters, numbers, and hyphens (-). A directory bucket name must be unique in the chosen Availability Zone. The bucket name must also follow the format 'bucket_base_name--az_id--x-s3' (for example, 'DOC-EXAMPLE-BUCKET--usw2-az1--x-s3'). If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the bucket name. |
location_name | string | Specifies the AZ ID of the Availability Zone where the directory bucket will be created. An example AZ ID value is 'use1-az5'. |
data_redundancy | string | Specifies the number of Availability Zone that's used for redundancy for the bucket. |
arn | string | Returns the Amazon Resource Name (ARN) of the specified bucket. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | LocationName, DataRedundancy, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all directory_buckets
in a region.
SELECT
region,
bucket_name,
location_name,
data_redundancy,
arn
FROM aws.s3express.directory_buckets
WHERE region = 'us-east-1';
Gets all properties from an individual directory_bucket
.
SELECT
region,
bucket_name,
location_name,
data_redundancy,
arn
FROM aws.s3express.directory_buckets
WHERE region = 'us-east-1' AND data__Identifier = '<BucketName>';
INSERT
example
Use the following StackQL query and manifest file to create a new directory_bucket
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.s3express.directory_buckets (
LocationName,
DataRedundancy,
region
)
SELECT
'{{ LocationName }}',
'{{ DataRedundancy }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.s3express.directory_buckets (
BucketName,
LocationName,
DataRedundancy,
region
)
SELECT
'{{ BucketName }}',
'{{ LocationName }}',
'{{ DataRedundancy }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: directory_bucket
props:
- name: BucketName
value: '{{ BucketName }}'
- name: LocationName
value: '{{ LocationName }}'
- name: DataRedundancy
value: '{{ DataRedundancy }}'
DELETE
example
/*+ delete */
DELETE FROM aws.s3express.directory_buckets
WHERE data__Identifier = '<BucketName>'
AND region = 'us-east-1';
Permissions
To operate on the directory_buckets
resource, the following permissions are required:
Create
s3express:CreateBucket,
s3express:ListAllMyDirectoryBuckets
Read
s3express:ListAllMyDirectoryBuckets
Delete
s3express:DeleteBucket,
s3express:ListAllMyDirectoryBuckets
List
s3express:ListAllMyDirectoryBuckets