/** * @param regionName the region name. * @return the region with the id given, if it exists. Otherwise, returns * null. */ public static Region getRegion(String regionName) { for (Region r : getRegions()) { if (r.getName().equals(regionName)) { return r; } } return null; }
/** * @param serviceAbbreviation the service abbreviation. * @return a list of the regions that support the service given. * * @see ServiceAbbreviations */ @SuppressWarnings("checkstyle:hiddenfield") public static synchronized List<Region> getRegionsForService(String serviceAbbreviation) { List<Region> regions = new LinkedList<Region>(); for (Region r : getRegions()) { if (r.isServiceSupported(serviceAbbreviation)) { regions.add(r); } } return regions; }
/** * Searches through all known regions to find one with any service at the * specified endpoint. If no region is found with a service at that * endpoint, an exception is thrown. * * @param endpoint The endpoint for any service residing in the desired * region. * @return The region containing any service running at the specified * endpoint, otherwise an exception is thrown if no region is found * with a service at the specified endpoint. * @throws MalformedURLException If the given URL is malformed, or if the * one of the service URLs on record is malformed. */ public static Region getRegionByEndpoint(String endpoint) { URI targetEndpointUri = getUriByEndpoint(endpoint); String targetHost = targetEndpointUri.getHost(); for (Region region : getRegions()) { for (String serviceEndpoint : region.getServiceEndpoints().values()) { URI serviceEndpointUrl = getUriByEndpoint(serviceEndpoint); if (serviceEndpointUrl.getHost().equals(targetHost)) return region; } } throw new IllegalArgumentException("No region found with any service for endpoint " + endpoint); }
/** * @param regionName the region name. * @return the region with the id given, if it exists. Otherwise, returns * null. */ public static Region getRegion(String regionName) { for (Region r : getRegions()) { if (r.getName().equals(regionName)) { return r; } } return null; }
/** * @param regionName the region name. * @return the region with the id given, if it exists. Otherwise, returns * null. */ public static Region getRegion(String regionName) { for (Region r : getRegions()) { if (r.getName().equals(regionName)) { return r; } } return null; }
/** * @param serviceAbbreviation the service abbreviation. * @return a list of the regions that support the service given. * * @see ServiceAbbreviations */ @SuppressWarnings("checkstyle:hiddenfield") public static synchronized List<Region> getRegionsForService(String serviceAbbreviation) { List<Region> regions = new LinkedList<Region>(); for (Region r : getRegions()) { if (r.isServiceSupported(serviceAbbreviation)) { regions.add(r); } } return regions; }
/** * @param serviceAbbreviation the service abbreviation. * @return a list of the regions that support the service given. * * @see ServiceAbbreviations */ @SuppressWarnings("checkstyle:hiddenfield") public static synchronized List<Region> getRegionsForService(String serviceAbbreviation) { List<Region> regions = new LinkedList<Region>(); for (Region r : getRegions()) { if (r.isServiceSupported(serviceAbbreviation)) { regions.add(r); } } return regions; }
public ListBoxModel doFillRegionNameItems() { final ListBoxModel options = new ListBoxModel(); for (Region region : RegionUtils.getRegions()) { options.add(region.getName()); } return options; }
String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + InventoryConstants.ERROR_PREFIX_EC2 ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"dhcpoption\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"customergateway\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"vpngateway\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + InventoryConstants.ERROR_PREFIX_EC2 ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"internetgateway\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + InventoryConstants.ERROR_PREFIX_EC2 ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"peeringconnection\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
AmazonEC2 ec2Client ; String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"Subnet\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()){ try{ if(!skipRegions.contains(region.getName())){
AmazonEC2 ec2Client ; String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"Network Interface\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"egressgateway\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){
AmazonEC2 ec2Client ; String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+account + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"Nat Gateway\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()){ try{ if(!skipRegions.contains(region.getName())){