get_encryption {aws.s3}R Documentation

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.

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

## 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)


[Package aws.s3 version 0.3.21 Index]