class InventoryUtil {

	public static Map<String,List<DBClusterVH>> fetchRDSClusterInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName){
		Map<String,List<DBClusterVH>> rdsMap =  new LinkedHashMap<>();
		AmazonRDS rdsClient ;
		String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+accountId + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"RDS Cluster\" , \"region\":\"" ;
		for(Region region : RegionUtils.getRegions()){
			try{
				if(!skipRegions.contains(region.getName())){
					rdsClient = AmazonRDSClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(temporaryCredentials)).withRegion(region.getName()).build();
					DescribeDBClustersResult rslt ;
					String nextMarker = null;
					List<DBClusterVH> rdsList = new ArrayList<>();
					do{
						rslt = rdsClient.describeDBClusters( new DescribeDBClustersRequest().withMarker(nextMarker));
						List<DBCluster> rdsListTemp = rslt.getDBClusters();
						for(DBCluster cluster : rdsListTemp){
							DBClusterVH vh = new DBClusterVH(cluster,rdsClient.listTagsForResource(new ListTagsForResourceRequest().
									withResourceName(cluster.getDBClusterArn())).
									getTagList());
							rdsList.add(vh);
						}
						nextMarker = rslt.getMarker();
					}while(nextMarker!=null);

					if( !rdsList.isEmpty() ){
						log.debug(InventoryConstants.ACCOUNT + accountId +" Type : RDS Cluster "+region.getName() + " >> "+rdsList.size());
						rdsMap.put(accountId+delimiter+accountName+delimiter+region.getName(), rdsList);
					}
				}
			}catch(Exception e){
				if(region.isServiceSupported(AmazonRDS.ENDPOINT_PREFIX)){
					log.warn(expPrefix+ region.getName()+InventoryConstants.ERROR_CAUSE +e.getMessage()+"\"}");
					ErrorManageUtil.uploadError(accountId,region.getName(),"rdscluster",e.getMessage());
				}
			}
		}
		return rdsMap;
	}

	private  InventoryUtil();

}