Search in sources :

Example 56 with Filter

use of com.amazonaws.services.s3.model.Filter in project photon-model by vmware.

the class AWSCostStatsService method insertEC2ServiceDetail.

private void insertEC2ServiceDetail(AwsAccountDetailDto awsAccountDetailDto) {
    AwsServiceDetailDto vm = awsAccountDetailDto.serviceDetailsMap.get(AwsServices.EC2_Instance_Usage.getName());
    AwsServiceDetailDto ebs = awsAccountDetailDto.serviceDetailsMap.get(AwsServices.EC2_EBS.getName());
    AwsServiceDetailDto others = awsAccountDetailDto.serviceDetailsMap.get(AwsServices.EC2_Others.getName());
    AwsServiceDetailDto ec2ServiceDetail = new AwsServiceDetailDto();
    ec2ServiceDetail.id = AwsServices.EC2.getName();
    ec2ServiceDetail.type = AwsServices.getTypeByName(AwsServices.EC2.getName()).toString();
    ec2ServiceDetail.directCosts = Stream.of(vm, ebs, others).filter(Objects::nonNull).map(dto -> dto.directCosts.entrySet()).flatMap(Set::stream).collect(Collectors.toMap(Entry::getKey, Entry::getValue, Double::sum));
    ec2ServiceDetail.otherCosts = Stream.of(vm, ebs, others).filter(Objects::nonNull).map(dto -> dto.otherCosts.entrySet()).flatMap(Set::stream).collect(Collectors.toMap(Entry::getKey, Entry::getValue, Double::sum));
    ec2ServiceDetail.remainingCosts = Stream.of(vm, ebs, others).filter(Objects::nonNull).map(dto -> dto.remainingCosts.entrySet()).flatMap(Set::stream).collect(Collectors.toMap(Entry::getKey, Entry::getValue, Double::sum));
    ec2ServiceDetail.reservedRecurringCosts = Stream.of(vm, ebs, others).filter(Objects::nonNull).map(dto -> dto.reservedRecurringCosts.entrySet()).flatMap(Set::stream).collect(Collectors.toMap(Entry::getKey, Entry::getValue, Double::sum));
    awsAccountDetailDto.serviceDetailsMap.put(AwsServices.EC2.getName(), ec2ServiceDetail);
}
Also used : AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState) Arrays(java.util.Arrays) DateTimeZone(org.joda.time.DateTimeZone) AWS_ACCOUNT_BILL_PROCESSED_TIME_MILLIS(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_ACCOUNT_BILL_PROCESSED_TIME_MILLIS) AWSCsvBillParser(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSCsvBillParser) ServiceTypeCluster(com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster) QueryTask(com.vmware.xenon.services.common.QueryTask) ServiceDocument(com.vmware.xenon.common.ServiceDocument) ComputeType(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription.ComputeType) EndpointAllocationTaskService(com.vmware.photon.controller.model.tasks.EndpointAllocationTaskService) SingleResourceStatsCollectionTaskState(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceStatsCollectionTaskState) ProgressListener(com.amazonaws.event.ProgressListener) STORAGE_TYPE_EBS(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.STORAGE_TYPE_EBS) Utils(com.vmware.xenon.common.Utils) STORAGE_TYPE_S3(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.STORAGE_TYPE_S3) ACCOUNT_IS_AUTO_DISCOVERED(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.ACCOUNT_IS_AUTO_DISCOVERED) Map(java.util.Map) URI(java.net.URI) ProgressEventType(com.amazonaws.event.ProgressEventType) AWSMissingResourcesEnumerationService(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSMissingResourcesEnumerationService) Path(java.nio.file.Path) AWSClientManager(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSClientManager) EndpointState(com.vmware.photon.controller.model.resources.EndpointService.EndpointState) PrintWriter(java.io.PrintWriter) ComputeStatsResponse(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse) ComputeStatsRequest(com.vmware.photon.controller.model.adapterapi.ComputeStatsRequest) StatelessService(com.vmware.xenon.common.StatelessService) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) TaskManager(com.vmware.photon.controller.model.adapters.util.TaskManager) Set(java.util.Set) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Occurance(com.vmware.xenon.services.common.QueryTask.Query.Occurance) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) AwsServiceDetailDto(com.vmware.photon.controller.model.adapters.aws.dto.AwsServiceDetailDto) Objects(java.util.Objects) List(java.util.List) AWS_LINKED_ACCOUNT_IDS(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_LINKED_ACCOUNT_IDS) Stream(java.util.stream.Stream) UriUtils(com.vmware.xenon.common.UriUtils) Entry(java.util.Map.Entry) QueryOption(com.vmware.xenon.services.common.QueryTask.QuerySpecification.QueryOption) AwsServices(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSCsvBillParser.AwsServices) ResourceMetrics(com.vmware.photon.controller.model.monitoring.ResourceMetricsService.ResourceMetrics) SingleResourceTaskCollectionStage(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceTaskCollectionStage) AwsAccountDetailDto(com.vmware.photon.controller.model.adapters.aws.dto.AwsAccountDetailDto) TransferManager(com.amazonaws.services.s3.transfer.TransferManager) QueryByPages(com.vmware.photon.controller.model.query.QueryUtils.QueryByPages) OperationContext(com.vmware.xenon.common.OperationContext) AWS_ACCOUNT_ID_KEY(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_ACCOUNT_ID_KEY) HashMap(java.util.HashMap) ComputeDescriptionService(com.vmware.photon.controller.model.resources.ComputeDescriptionService) GetObjectRequest(com.amazonaws.services.s3.model.GetObjectRequest) ResourceMetricsService(com.vmware.photon.controller.model.monitoring.ResourceMetricsService) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) ProgressEvent(com.amazonaws.event.ProgressEvent) HashSet(java.util.HashSet) AuthCredentialsService(com.vmware.xenon.services.common.AuthCredentialsService) Query(com.vmware.xenon.services.common.QueryTask.Query) UriPaths(com.vmware.photon.controller.model.UriPaths) CollectionUtils(org.apache.commons.collections.CollectionUtils) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) BiConsumer(java.util.function.BiConsumer) ComputeStats(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse.ComputeStats) AwsClientType(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AwsClientType) StatsUtil(com.vmware.photon.controller.model.tasks.monitoring.StatsUtil) ExecutorService(java.util.concurrent.ExecutorService) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) AmazonS3Exception(com.amazonaws.services.s3.model.AmazonS3Exception) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) Files(java.nio.file.Files) StringWriter(java.io.StringWriter) Operation(com.vmware.xenon.common.Operation) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) IOException(java.io.IOException) ServiceStat(com.vmware.xenon.common.ServiceStats.ServiceStat) AwsResourceDetailDto(com.vmware.photon.controller.model.adapters.aws.dto.AwsResourceDetailDto) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) LocalDate(org.joda.time.LocalDate) ConcurrentSkipListMap(java.util.concurrent.ConcurrentSkipListMap) Paths(java.nio.file.Paths) ClusterUtil(com.vmware.photon.controller.model.util.ClusterUtil) AWSStatsNormalizer(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSStatsNormalizer) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) PhotonModelConstants(com.vmware.photon.controller.model.constants.PhotonModelConstants) AWSClientManagerFactory(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSClientManagerFactory) ServiceDocumentDescription(com.vmware.xenon.common.ServiceDocumentDescription) Collections(java.util.Collections) OperationJoin(com.vmware.xenon.common.OperationJoin) PhotonModelUriUtils.createInventoryUri(com.vmware.photon.controller.model.util.PhotonModelUriUtils.createInventoryUri) AwsServiceDetailDto(com.vmware.photon.controller.model.adapters.aws.dto.AwsServiceDetailDto) Entry(java.util.Map.Entry) Set(java.util.Set) HashSet(java.util.HashSet) Objects(java.util.Objects)

Example 57 with Filter

use of com.amazonaws.services.s3.model.Filter in project photon-model by vmware.

the class AWSNetworkStateEnumerationAdapterService method getSubnetInformation.

/**
 * Gets the Subnets that are attached to the VPCs that were discovered during the enumeration
 * process.
 */
private void getSubnetInformation(AWSNetworkStateCreationContext context, AWSNetworkStateCreationStage next) {
    DescribeSubnetsRequest subnetRequest = new DescribeSubnetsRequest();
    List<String> vpcList = new ArrayList<>(context.vpcs.keySet());
    Filter filter = new Filter(AWS_VPC_ID_FILTER, vpcList);
    subnetRequest.getFilters().add(filter);
    AWSSubnetAsyncHandler asyncHandler = new AWSSubnetAsyncHandler(next, context);
    context.amazonEC2Client.describeSubnetsAsync(subnetRequest, asyncHandler);
}
Also used : Filter(com.amazonaws.services.ec2.model.Filter) ArrayList(java.util.ArrayList) DescribeSubnetsRequest(com.amazonaws.services.ec2.model.DescribeSubnetsRequest)

Example 58 with Filter

use of com.amazonaws.services.s3.model.Filter in project photon-model by vmware.

the class AWSNetworkStateEnumerationAdapterService method createNetworkStateOperations.

/**
 * Create the network state operations for all the VPCs that need to be created or updated in
 * the system.
 */
private void createNetworkStateOperations(AWSNetworkStateCreationContext context, AWSNetworkStateCreationStage next) {
    if (context.vpcs.isEmpty()) {
        logFine(() -> "No new VPCs have been discovered.");
        handleNetworkStateChanges(context, next);
        return;
    }
    final List<Operation> networkOperations = new ArrayList<>();
    for (String remoteVPCId : context.vpcs.keySet()) {
        NetworkState networkState = context.vpcs.get(remoteVPCId);
        final Operation networkStateOp;
        if (context.localNetworkStateMap.containsKey(remoteVPCId)) {
            // If the local network state already exists for the VPC -> Update it.
            networkState.documentSelfLink = context.localNetworkStateMap.get(remoteVPCId).documentSelfLink;
            // don't overwrite resourcePoolLink
            networkState.resourcePoolLink = null;
            if (networkState.tagLinks == null || networkState.tagLinks.isEmpty()) {
                setTagLinksToResourceState(networkState, context.networkInternalTagsMap, false);
            } else {
                context.networkInternalTagLinksSet.stream().filter(tagLink -> !networkState.tagLinks.contains(tagLink)).map(tagLink -> networkState.tagLinks.add(tagLink)).collect(Collectors.toSet());
            }
            networkStateOp = createPatchOperation(this, networkState, networkState.documentSelfLink);
        } else {
            Vpc awsVpc = context.awsVpcs.get(remoteVPCId);
            // Add both external and internal tags.
            setResourceTags(networkState, awsVpc.getTags());
            setTagLinksToResourceState(networkState, context.networkInternalTagsMap, false);
            networkStateOp = createPostOperation(this, networkState, NetworkService.FACTORY_LINK);
        }
        networkOperations.add(networkStateOp);
    }
    JoinedCompletionHandler joinCompletion = (ops, excs) -> {
        if (excs != null) {
            Entry<Long, Throwable> excEntry = excs.entrySet().iterator().next();
            Throwable exc = excEntry.getValue();
            Operation op = ops.get(excEntry.getKey());
            logSevere(() -> String.format("Error %s-ing a Network state: %s", op.getAction(), Utils.toString(excs)));
            finishWithFailure(context, exc);
            return;
        }
        logFine(() -> "Created/updated all network states.");
        ops.values().stream().filter(op -> op.getStatusCode() != Operation.STATUS_CODE_NOT_MODIFIED).forEach(op -> {
            NetworkState networkState = op.getBody(NetworkState.class);
            context.vpcs.put(networkState.id, networkState);
        });
        handleNetworkStateChanges(context, next);
    };
    OperationJoin.create(networkOperations).setCompletion(joinCompletion).sendWith(this);
}
Also used : Arrays(java.util.Arrays) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) AWSNetworkUtils.mapVPCToNetworkState(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSNetworkUtils.mapVPCToNetworkState) DescribeSubnetsRequest(com.amazonaws.services.ec2.model.DescribeSubnetsRequest) DescribeVpcsRequest(com.amazonaws.services.ec2.model.DescribeVpcsRequest) AWSResourceType(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWSResourceType) ServiceTypeCluster(com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster) QueryTask(com.vmware.xenon.services.common.QueryTask) LifecycleState(com.vmware.photon.controller.model.resources.ComputeService.LifecycleState) ServiceDocument(com.vmware.xenon.common.ServiceDocument) AWSNetworkUtils.createQueryToGetExistingNetworkStatesFilteredByDiscoveredVPCs(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSNetworkUtils.createQueryToGetExistingNetworkStatesFilteredByDiscoveredVPCs) DescribeSubnetsResult(com.amazonaws.services.ec2.model.DescribeSubnetsResult) Utils(com.vmware.xenon.common.Utils) SubnetState(com.vmware.photon.controller.model.resources.SubnetService.SubnetState) Map(java.util.Map) SubnetStateWithParentVpcId(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSNetworkStateEnumerationAdapterService.AWSNetworkStateCreationContext.SubnetStateWithParentVpcId) AWS_ATTACHMENT_VPC_FILTER(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_ATTACHMENT_VPC_FILTER) InternetGatewayAttachment(com.amazonaws.services.ec2.model.InternetGatewayAttachment) AdapterUtils.createPatchOperation(com.vmware.photon.controller.model.adapters.util.AdapterUtils.createPatchOperation) URI(java.net.URI) TagsUtil.newTagState(com.vmware.photon.controller.model.adapters.util.TagsUtil.newTagState) AWSClientManager(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSClientManager) SubnetService(com.vmware.photon.controller.model.resources.SubnetService) AWS_MAIN_ROUTE_ASSOCIATION(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_MAIN_ROUTE_ASSOCIATION) AWSAsyncHandler(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSAsyncHandler) StatelessService(com.vmware.xenon.common.StatelessService) AWSNetworkUtils.mapSubnetToSubnetState(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSNetworkUtils.mapSubnetToSubnetState) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) DescribeInternetGatewaysResult(com.amazonaws.services.ec2.model.DescribeInternetGatewaysResult) Set(java.util.Set) Occurance(com.vmware.xenon.services.common.QueryTask.Query.Occurance) AdapterUtils.getDeletionState(com.vmware.photon.controller.model.adapters.util.AdapterUtils.getDeletionState) Collectors(java.util.stream.Collectors) AWS_GATEWAY_ID(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_GATEWAY_ID) List(java.util.List) AWS_FILTER_VPC_ID(com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils.AWS_FILTER_VPC_ID) DescribeRouteTablesRequest(com.amazonaws.services.ec2.model.DescribeRouteTablesRequest) TagService(com.vmware.photon.controller.model.resources.TagService) CompletionHandler(com.vmware.xenon.common.Operation.CompletionHandler) Tag(com.amazonaws.services.ec2.model.Tag) DeferredResult(com.vmware.xenon.common.DeferredResult) TAG_KEY_TYPE(com.vmware.photon.controller.model.constants.PhotonModelConstants.TAG_KEY_TYPE) Entry(java.util.Map.Entry) TagsUtil.setTagLinksToResourceState(com.vmware.photon.controller.model.adapters.util.TagsUtil.setTagLinksToResourceState) DescribeRouteTablesResult(com.amazonaws.services.ec2.model.DescribeRouteTablesResult) QueryByPages(com.vmware.photon.controller.model.query.QueryUtils.QueryByPages) HashMap(java.util.HashMap) PhotonModelUtils(com.vmware.photon.controller.model.resources.util.PhotonModelUtils) JoinedCompletionHandler(com.vmware.xenon.common.OperationJoin.JoinedCompletionHandler) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) HashSet(java.util.HashSet) AWSConstants(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants) TagState(com.vmware.photon.controller.model.resources.TagService.TagState) DescribeVpcsResult(com.amazonaws.services.ec2.model.DescribeVpcsResult) AuthCredentialsService(com.vmware.xenon.services.common.AuthCredentialsService) Query(com.vmware.xenon.services.common.QueryTask.Query) UriPaths(com.vmware.photon.controller.model.UriPaths) TagsUtil.updateLocalTagStates(com.vmware.photon.controller.model.adapters.util.TagsUtil.updateLocalTagStates) AdapterUtils.createPostOperation(com.vmware.photon.controller.model.adapters.util.AdapterUtils.createPostOperation) BiConsumer(java.util.function.BiConsumer) Filter(com.amazonaws.services.ec2.model.Filter) RouteTable(com.amazonaws.services.ec2.model.RouteTable) Subnet(com.amazonaws.services.ec2.model.Subnet) AWS_VPC_ROUTE_TABLE_ID(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_VPC_ROUTE_TABLE_ID) AmazonWebServiceRequest(com.amazonaws.AmazonWebServiceRequest) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) Vpc(com.amazonaws.services.ec2.model.Vpc) AdapterUriUtil(com.vmware.photon.controller.model.adapters.util.AdapterUriUtil) Operation(com.vmware.xenon.common.Operation) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) AWSNetworkUtils.createQueryToGetExistingSubnetStatesFilteredByDiscoveredSubnets(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSNetworkUtils.createQueryToGetExistingSubnetStatesFilteredByDiscoveredSubnets) NumericRange.createLessThanRange(com.vmware.xenon.services.common.QueryTask.NumericRange.createLessThanRange) AWSUtils(com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils) AWS_VPC_ID_FILTER(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_VPC_ID_FILTER) InternetGateway(com.amazonaws.services.ec2.model.InternetGateway) NetworkService(com.vmware.photon.controller.model.resources.NetworkService) PhotonModelConstants(com.vmware.photon.controller.model.constants.PhotonModelConstants) AWSClientManagerFactory(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSClientManagerFactory) NetworkState(com.vmware.photon.controller.model.resources.NetworkService.NetworkState) DescribeInternetGatewaysRequest(com.amazonaws.services.ec2.model.DescribeInternetGatewaysRequest) AWSUriPaths(com.vmware.photon.controller.model.adapters.awsadapter.AWSUriPaths) OperationJoin(com.vmware.xenon.common.OperationJoin) AmazonEC2AsyncClient(com.amazonaws.services.ec2.AmazonEC2AsyncClient) JoinedCompletionHandler(com.vmware.xenon.common.OperationJoin.JoinedCompletionHandler) Entry(java.util.Map.Entry) ArrayList(java.util.ArrayList) Vpc(com.amazonaws.services.ec2.model.Vpc) AdapterUtils.createPatchOperation(com.vmware.photon.controller.model.adapters.util.AdapterUtils.createPatchOperation) AdapterUtils.createPostOperation(com.vmware.photon.controller.model.adapters.util.AdapterUtils.createPostOperation) Operation(com.vmware.xenon.common.Operation) AWSNetworkUtils.mapVPCToNetworkState(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSNetworkUtils.mapVPCToNetworkState) NetworkState(com.vmware.photon.controller.model.resources.NetworkService.NetworkState)

Example 59 with Filter

use of com.amazonaws.services.s3.model.Filter in project photon-model by vmware.

the class AWSNetworkStateEnumerationAdapterService method getInternetGatewayInformation.

/**
 * Gets the Internet gateways that are attached to the VPCs that were discovered during the
 * enumeration process.
 */
private void getInternetGatewayInformation(AWSNetworkStateCreationContext context, AWSNetworkStateCreationStage next) {
    DescribeInternetGatewaysRequest internetGatewayRequest = new DescribeInternetGatewaysRequest();
    List<String> vpcList = new ArrayList<>(context.vpcs.keySet());
    Filter filter = new Filter(AWS_ATTACHMENT_VPC_FILTER, vpcList);
    internetGatewayRequest.getFilters().add(filter);
    AWSInternetGatewayAsyncHandler asyncHandler = new AWSInternetGatewayAsyncHandler(next, context);
    context.amazonEC2Client.describeInternetGatewaysAsync(internetGatewayRequest, asyncHandler);
}
Also used : Filter(com.amazonaws.services.ec2.model.Filter) ArrayList(java.util.ArrayList) DescribeInternetGatewaysRequest(com.amazonaws.services.ec2.model.DescribeInternetGatewaysRequest)

Example 60 with Filter

use of com.amazonaws.services.s3.model.Filter in project photon-model by vmware.

the class AWSNetworkClient method getMainRouteTable.

/**
 * Get the main route table for a given VPC
 */
public RouteTable getMainRouteTable(String vpcId) {
    // build filter list
    List<Filter> filters = new ArrayList<>();
    filters.add(AWSUtils.getFilter(AWSUtils.AWS_FILTER_VPC_ID, vpcId));
    filters.add(AWSUtils.getFilter(AWS_MAIN_ROUTE_ASSOCIATION, "true"));
    DescribeRouteTablesRequest req = new DescribeRouteTablesRequest().withFilters(filters);
    DescribeRouteTablesResult res = this.client.describeRouteTables(req);
    List<RouteTable> routeTables = res.getRouteTables();
    return routeTables.isEmpty() ? null : routeTables.get(0);
}
Also used : RouteTable(com.amazonaws.services.ec2.model.RouteTable) DescribeRouteTablesRequest(com.amazonaws.services.ec2.model.DescribeRouteTablesRequest) Filter(com.amazonaws.services.ec2.model.Filter) ArrayList(java.util.ArrayList) DescribeRouteTablesResult(com.amazonaws.services.ec2.model.DescribeRouteTablesResult)

Aggregations

Filter (com.amazonaws.services.ec2.model.Filter)96 ArrayList (java.util.ArrayList)70 List (java.util.List)52 Collectors (java.util.stream.Collectors)46 IOException (java.io.IOException)41 HashMap (java.util.HashMap)38 Map (java.util.Map)35 AmazonS3 (com.amazonaws.services.s3.AmazonS3)34 Set (java.util.Set)31 DescribeInstancesRequest (com.amazonaws.services.ec2.model.DescribeInstancesRequest)30 S3ObjectSummary (com.amazonaws.services.s3.model.S3ObjectSummary)27 Instance (com.amazonaws.services.ec2.model.Instance)26 HashSet (java.util.HashSet)26 Reservation (com.amazonaws.services.ec2.model.Reservation)24 Collections (java.util.Collections)23 DescribeInstancesResult (com.amazonaws.services.ec2.model.DescribeInstancesResult)21 ObjectListing (com.amazonaws.services.s3.model.ObjectListing)21 DescribeSubnetsRequest (com.amazonaws.services.ec2.model.DescribeSubnetsRequest)20 Entry (java.util.Map.Entry)20 Tag (com.amazonaws.services.ec2.model.Tag)18