Example usage for com.amazonaws.services.s3.model CryptoConfiguration setCryptoMode

List of usage examples for com.amazonaws.services.s3.model CryptoConfiguration setCryptoMode

Introduction

In this page you can find the example usage for com.amazonaws.services.s3.model CryptoConfiguration setCryptoMode.

Prototype

public void setCryptoMode(CryptoMode cryptoMode) throws UnsupportedOperationException 

Source Link

Document

Sets the crypto mode; applicable only to the S3 encryption client.

Usage

From source file:org.apache.nifi.processors.aws.s3.encryption.service.StandardS3ClientSideEncryptionService.java

License:Apache License

private CryptoConfiguration cryptoConfiguration() {
    CryptoConfiguration config = new CryptoConfiguration();

    if (!StringUtils.isBlank(cryptoMode)) {
        config.setCryptoMode(CryptoMode.valueOf(cryptoMode));
    }/*from w  w  w .  j av  a2 s .c  o m*/

    if (!StringUtils.isBlank(cryptoStorageMode)) {
        config.setStorageMode(CryptoStorageMode.valueOf(cryptoStorageMode));
    }

    if (!StringUtils.isBlank(kmsRegion)) {
        config.setAwsKmsRegion(Region.getRegion(Regions.fromName(kmsRegion)));
    }

    config.setIgnoreMissingInstructionFile(ignoreMissingInstructionFile);
    return config;
}