encryption: Bucket encryption

Description Usage Arguments Details Value References Examples

Description

Get/Put/Delete bucket-level encryption settings.

Usage

1
2
3
4
5
get_encryption(bucket, ...)

put_encryption(bucket, algorithm = c("AES256", "KMS"), kms_arn = NULL, ...)

delete_encryption(bucket, ...)

Arguments

bucket

Character string with the name of the bucket, or an object of class “s3_bucket”.

...

Additional arguments passed to s3HTTP.

algorithm

A character string specifying whether to use “AES256” or “KMS” encryption.

kms_arn

If algorithm = "KMS", a KMS ARN.

Details

get_encryption returns the default encryption of a bucket; put_encryption sets the default encryption. delete_encryption deletes the encryption status.

Value

For get_encryption: if encryption has never been set, the value is NULL. Otherwise, the encryption type is returned as a charater string. For put_encryption or delete_encryption: a logical TRUE

References

API Documentation API Documentation API Documentation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
 # example bucket
 put_bucket("mybucket")

 # set and check encryption
 put_encryption("mybucket", "AES256")
 get_encryption("mybucket")

 # delete encryption
 delete_encryption("mybucket")

## End(Not run)

aws.s3 documentation built on April 14, 2020, 5:15 p.m.