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;
}
Aggregations