def _put_bucket_encryption(self):
        """Adds bucket encryption configuration."""
        if self.s3props['encryption']['enabled']:
            encryption_config = {'Rules': [{}]}
            encryption_config = {
                'Rules': self.s3props['encryption']['encryption_rules']
            }
            LOG.debug(encryption_config)
            _response = self.s3client.put_bucket_encryption(Bucket=self.bucket,
                                                            ServerSideEncryptionConfiguration=encryption_config)
        else:
            _response = self.s3client.delete_bucket_encryption(Bucket=self.bucket)
        LOG.debug('Response setting up S3 encryption: %s', _response)
        LOG.info('S3 encryption configuration updated')
Adds bucket encryption configuration.