class InventoryUtil {

	public static Map<String,List<DBSnapshot>> fetchRDSDBSnapshots(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName){
		Map<String,List<DBSnapshot>> snapshots =  new LinkedHashMap<>();
		String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+accountId + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"RDS Snapshot\" , \"region\":\"" ;
		for(Region region : RegionUtils.getRegions()){
			try{
				if(!skipRegions.contains(region.getName())){
					AmazonRDS rdsClient = AmazonRDSClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(temporaryCredentials)).withRegion(region.getName()).build();
					DescribeDBSnapshotsResult rslt ;
					List<DBSnapshot> snapshotsTemp = new ArrayList<>();
					String marker = null;
					do{
						rslt = rdsClient.describeDBSnapshots(new DescribeDBSnapshotsRequest().withIncludePublic(false).withIncludeShared(false).withMarker(marker));
						snapshotsTemp.addAll(rslt.getDBSnapshots());
						marker = rslt.getMarker();
					}while(marker!=null);

					if(! snapshotsTemp.isEmpty() ){
						log.debug(InventoryConstants.ACCOUNT + accountId +" Type : RDS Snapshot" +region.getName() + " >> "+snapshotsTemp.size());
						snapshots.put(accountId+delimiter+accountName+delimiter+region.getName(),  snapshotsTemp);
					}
				}

			}catch(Exception e){
				if(region.isServiceSupported(AmazonRDS.ENDPOINT_PREFIX)){
					log.warn(expPrefix+ region.getName()+InventoryConstants.ERROR_CAUSE +e.getMessage()+"\"}");
					ErrorManageUtil.uploadError(accountId,region.getName(),"rdssnapshot",e.getMessage());
				}
			}
		}
		return snapshots;
	}

	private  InventoryUtil();

}