Example usage for com.amazonaws.services.s3.internal BucketNameUtils isValidV2BucketName

List of usage examples for com.amazonaws.services.s3.internal BucketNameUtils isValidV2BucketName

Introduction

In this page you can find the example usage for com.amazonaws.services.s3.internal BucketNameUtils isValidV2BucketName.

Prototype

public static boolean isValidV2BucketName(String bucketName) 

Source Link

Document

Returns true if the specified bucket name can be addressed using V2, virtual host style, addressing.

Usage

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");
}