class RegionValidator implements IParameterValidator {

  @Override
  public void validate(String name, String value) throws ParameterException {
    try {
      Region.fromValue(value);
    } catch (IllegalArgumentException e) {
      throw new ParameterException("Parameter " + name + " is not a valid AWS region (found " + value + ")", e);
    }
  }

}