List of usage examples for com.amazonaws.services.s3.internal BucketNameUtils isValidV2BucketName
public static boolean isValidV2BucketName(String bucketName)
From source file:nl.nn.adapterframework.filesystem.AmazonS3FileSystem.java
License:Apache License
public void configure() throws ConfigurationException { if (StringUtils.isEmpty(getAccessKey()) || StringUtils.isEmpty(getSecretKey())) throw new ConfigurationException(" empty credential fields, please prodive aws credentials"); if (StringUtils.isEmpty(getClientRegion()) || !AVAILABLE_REGIONS.contains(getClientRegion())) throw new ConfigurationException(" invalid region [" + getClientRegion() + "] please use one of the following supported regions " + AVAILABLE_REGIONS.toString()); if (StringUtils.isEmpty(getBucketName()) || !BucketNameUtils.isValidV2BucketName(getBucketName())) throw new ConfigurationException(" invalid or empty bucketName [" + getBucketName() + "] please visit AWS to see correct bucket naming"); }