class InventoryUtil {

	public static Map<String,List<RestApi>> fetchApiGateways(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName) {
		Map<String,List<RestApi>> apiGateWays = new LinkedHashMap<>();

		AmazonApiGateway apiGatWayClient ;
		String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+accountId + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"API\" , \"region\":\"" ;
		for(Region region : RegionUtils.getRegions()){
			try{
				if(!skipRegions.contains(region.getName())){
					apiGatWayClient = AmazonApiGatewayClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(temporaryCredentials)).withRegion(region.getName()).build();
					List<RestApi> apiGateWaysList = new ArrayList<>();
					String position = null;
					GetRestApisResult rslt ;
					do{
						rslt = apiGatWayClient.getRestApis(new GetRestApisRequest().withPosition(position));
						apiGateWaysList.addAll(rslt.getItems());
						position = rslt.getPosition();
					}while(position!=null);

					if( !apiGateWaysList.isEmpty() ) {
						log.debug(InventoryConstants.ACCOUNT + accountId +" Type : ApiGateway "+region.getName() + " >> "+apiGateWaysList.size());
						apiGateWays.put(accountId+delimiter+accountName+delimiter+region.getName(),apiGateWaysList);
					}

				}
			}catch(Exception e){
				log.warn(expPrefix+ region.getName()+InventoryConstants.ERROR_CAUSE +e.getMessage()+"\"}");
				ErrorManageUtil.uploadError(accountId,region.getName(),"api",e.getMessage());
			}
		}
		return apiGateWays;
	}

	private  InventoryUtil();

}