@Override public DescribeRegionsResult describeRegions() { return describeRegions(new DescribeRegionsRequest()); }
/** * <p> * Describes one or more regions that are currently available to you. * </p> * <p> * For a list of the regions supported by Amazon EC2, see * <a href="http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region"> Regions and Endpoints </a> * . * </p> * * @return The response from the DescribeRegions service method, as * returned by AmazonEC2. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonEC2 indicating * either a problem with the data in the request, or a server side issue. */ public DescribeRegionsResult describeRegions() throws AmazonServiceException, AmazonClientException { return describeRegions(new DescribeRegionsRequest()); }
@Override public DescribeRegionsResult describeRegions() { return describeRegions(new DescribeRegionsRequest()); }
elasticacheClients = Maps.newHashMap(); final List<Region> ec2Regions = bootstrapEC2Client.describeRegions().getRegions(); for (Region region : ec2Regions) { final String regionName = region.getRegionName();
@Override protected void doScan() { GraphNodeGarbageCollector gc = newGarbageCollector().label("AwsRegion").bindScannerContext(); rateLimit(); DescribeRegionsResult result = getClient().describeRegions(); result.getRegions().forEach(it -> { try { ObjectNode n = convertAwsObject(it, getRegion()); n.remove(AccountScanner.ACCOUNT_ATTRIBUTE); String cypher = "merge (x:AwsRegion {aws_regionName:{aws_regionName}}) set x+={props} remove x.aws_region,x.aws_account set x.updateTs=timestamp() return x"; NeoRxClient neoRx = getNeoRxClient(); Preconditions.checkNotNull(neoRx); neoRx.execCypher(cypher, "aws_regionName", n.path("aws_regionName").asText(), AWSScanner.AWS_REGION_ATTRIBUTE, n.path(AWSScanner.AWS_REGION_ATTRIBUTE).asText(), "props", n) .forEach(gc.MERGE_ACTION); ScannerContext.getScannerContext().ifPresent(sc -> { sc.incrementEntityCount(); }); } catch (RuntimeException e) { maybeThrow(e, "problem scanning regions"); } }); }