Search in sources :

Example 1 with CreateFileSystemRequest

use of com.amazonaws.services.elasticfilesystem.model.CreateFileSystemRequest in project cloudbreak by hortonworks.

the class AwsEfsResourceBuilder method creatEfsRequest.

private CreateFileSystemRequest creatEfsRequest(CloudResource resource, CloudStack cloudStack, Map<String, CloudEfsAttributes> efsSetMap) {
    CloudEfsAttributes efsAttributes = resource.getParameter(CloudResource.ATTRIBUTES, CloudEfsAttributes.class);
    efsSetMap.put(resource.getName(), efsAttributes);
    efsAttributes.setTags(cloudStack.getTags());
    Collection<Tag> awsTags = awsTaggingService.prepareEfsTags(efsAttributes.getTags());
    CreateFileSystemRequest createFileSystemRequest = new CreateFileSystemRequest().withCreationToken(efsAttributes.getCreationToken()).withTags(awsTags).withPerformanceMode(efsAttributes.getPerformanceMode()).withThroughputMode(efsAttributes.getThroughputMode()).withProvisionedThroughputInMibps(efsAttributes.getProvisionedThroughputInMibps()).withEncrypted(efsAttributes.getEncrypted());
    if (!StringUtils.isEmpty(efsAttributes.getKmsKeyId())) {
        createFileSystemRequest.withKmsKeyId(efsAttributes.getKmsKeyId());
    }
    return createFileSystemRequest;
}
Also used : CloudEfsAttributes(com.sequenceiq.cloudbreak.cloud.model.CloudEfsAttributes) CreateFileSystemRequest(com.amazonaws.services.elasticfilesystem.model.CreateFileSystemRequest) Tag(com.amazonaws.services.elasticfilesystem.model.Tag)

Aggregations

CreateFileSystemRequest (com.amazonaws.services.elasticfilesystem.model.CreateFileSystemRequest)1 Tag (com.amazonaws.services.elasticfilesystem.model.Tag)1 CloudEfsAttributes (com.sequenceiq.cloudbreak.cloud.model.CloudEfsAttributes)1