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

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

Introduction

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

Prototype

public void setStorageMode(CryptoStorageMode storageMode) 

Source Link

Document

Sets the storage mode to the specified mode.

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  www  .j  a va  2s.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;
}