s3_bucket()

Read(1751) Label: s3, bucket,

Description:

Manage AWS S3 storage buckets.

Syntax:

s3_bucket(fd,bucket,[pool])

Note:

External library function (See External Library Guide). It manages storage buckets, including creating a bucket, deleting a bucket and checking if a bucket exists. The function checks if a storage bucket exists when no options are present.

Parameter:

fd

S3 connection object

bucket

Bucket name

pool

The storage pool a bucket belongs to (with Cloud macro storage); not configured for other remote storage services

Option:

@c

Create a storage bucket; won’t create it if a namesake bucket already exists

@d

 Delete storage bucket; cannot delete it if the bucket isn’t empty

Return value:

Boolean

Example:

 

A

 

1

=s3_open("ASIAVSPDUYZ7O7WTX7C3":"7/5xYPO7a+9Po+IE1ySbmu9UB2hWIkWek1Sqn6E4":"us-east-2":"https://s3.us-east-2.amazonaws.com")

Connect to AWS S3.

2

=s3_bucket(A1,"test2")

Check if test2 bucket exists.

3

=s3_bucket@d(A1,"test1")

Check if test1 bucket exists, and delete it if it exists (cannot delete test1 if the bucket isn’t empty.

4

=s3_bucket@c(A1,"test2")

Check if test2 bucket exists, and create one whose name is test2 if it does not exist.

5

>s3_close(A1)

Close AWS S3 connection.