Learn R Programming

aws.s3 (version 0.3.21)

get_encryption: Bucket encryption

Description

Get/Put/Delete bucket-level encryption settings.

Usage

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.

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

Details

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

References

API Documentation API Documentation API Documentation

Examples

Run this code
# NOT RUN {
 # example bucket
 put_bucket("mybucket")

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

 # delete encryption
 delete_encryption("mybucket")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab