@SuppressWarnings({ "static-access", "unchecked" }) @Test public void fetchKMSKeysTest() throws Exception { mockStatic(AWSKMSClientBuilder.class); AWSKMS awskms = PowerMockito.mock(AWSKMS.class); AWSKMSClientBuilder awsKMSClientBuilder = PowerMockito.mock(AWSKMSClientBuilder.class); AWSStaticCredentialsProvider awsStaticCredentialsProvider = PowerMockito.mock(AWSStaticCredentialsProvider.class); PowerMockito.whenNew(AWSStaticCredentialsProvider.class).withAnyArguments().thenReturn(awsStaticCredentialsProvider); when(awsKMSClientBuilder.standard()).thenReturn(awsKMSClientBuilder); when(awsKMSClientBuilder.withCredentials(anyObject())).thenReturn(awsKMSClientBuilder); when(awsKMSClientBuilder.withRegion(anyString())).thenReturn(awsKMSClientBuilder); when(awsKMSClientBuilder.build()).thenReturn(awskms); ListKeysResult listKeysResult = new ListKeysResult(); List<KeyListEntry> regionKeys = new ArrayList<>(); KeyListEntry keyListEntry = new KeyListEntry(); keyListEntry.setKeyId("keyId"); regionKeys.add(keyListEntry); listKeysResult.setKeys(regionKeys); when(awskms.listKeys()).thenReturn(listKeysResult); ListAliasesResult listAliasesResult = new ListAliasesResult(); List<AliasListEntry> regionKeyAliases = new ArrayList<>(); AliasListEntry aliasListEntry = new AliasListEntry(); aliasListEntry.setTargetKeyId("keyId"); regionKeyAliases.add(aliasListEntry); listAliasesResult.setAliases(regionKeyAliases); when(awskms.listAliases()).thenReturn(listAliasesResult); DescribeKeyResult describeKeyResult = new DescribeKeyResult(); describeKeyResult.setKeyMetadata(new KeyMetadata()); when(awskms.describeKey(anyObject())).thenReturn(describeKeyResult ); ListResourceTagsResult listResourceTagsResult = new ListResourceTagsResult(); listResourceTagsResult.setTags(new ArrayList<>()); when(awskms.listResourceTags(anyObject())).thenReturn(listResourceTagsResult); GetKeyRotationStatusResult getKeyRotationStatusResult = new GetKeyRotationStatusResult(); getKeyRotationStatusResult.setKeyRotationEnabled(true); when(awskms.getKeyRotationStatus(anyObject())).thenReturn(getKeyRotationStatusResult); assertThat(inventoryUtil.fetchKMSKeys(new BasicSessionCredentials("awsAccessKey", "awsSecretKey", "sessionToken"), "skipRegions", "account","accountName").size(), is(1)); listAliasesResult = new ListAliasesResult(); listAliasesResult.setAliases(new ArrayList<>()); when(awskms.listAliases()).thenReturn(listAliasesResult); when(awskms.describeKey(anyObject())).thenThrow(Exception.class ); listResourceTagsResult = new ListResourceTagsResult(); listResourceTagsResult.setTags(new ArrayList<>()); when(awskms.listResourceTags(anyObject())).thenReturn(listResourceTagsResult); when(awskms.getKeyRotationStatus(anyObject())).thenThrow(Exception.class ); assertThat(inventoryUtil.fetchKMSKeys(new BasicSessionCredentials("awsAccessKey", "awsSecretKey", "sessionToken"), "skipRegions", "account","accountName").size(), is(1)); listAliasesResult = new ListAliasesResult(); regionKeyAliases = new ArrayList<>(); aliasListEntry = new AliasListEntry(); aliasListEntry.setTargetKeyId("id"); regionKeyAliases.add(aliasListEntry); listAliasesResult.setAliases(regionKeyAliases); when(awskms.listAliases()).thenReturn(listAliasesResult); assertThat(inventoryUtil.fetchKMSKeys(new BasicSessionCredentials("awsAccessKey", "awsSecretKey", "sessionToken"), "skipRegions", "account","accountName").size(), is(1)); }
public static Map<String,List<KMSKeyVH>> fetchKMSKeys(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName) { Map<String,List<KMSKeyVH>> kmsKeys = new LinkedHashMap<>(); AWSKMS awskms; String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+accountId + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"KMS\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){ awskms = AWSKMSClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(temporaryCredentials)).withRegion(region.getName()).build(); List<KeyListEntry> regionKeys = awskms.listKeys().getKeys(); List<AliasListEntry> regionKeyAliases = awskms.listAliases().getAliases(); if(!regionKeys.isEmpty()) { List<KMSKeyVH> kmsKeysList = new ArrayList<>(); for(KeyListEntry key : regionKeys) { KMSKeyVH kmsKey = new KMSKeyVH(); try { DescribeKeyResult result = awskms.describeKey(new DescribeKeyRequest().withKeyId(key.getKeyId())); kmsKey.setKey(result.getKeyMetadata()); kmsKey.setTags(awskms.listResourceTags(new ListResourceTagsRequest().withKeyId(key.getKeyId())).getTags()); } catch (Exception e) { log.debug(e.getMessage()); } try { kmsKey.setRotationStatus(awskms.getKeyRotationStatus(new GetKeyRotationStatusRequest().withKeyId(key.getKeyId())).getKeyRotationEnabled()); } catch (Exception e) { log.debug(e.getMessage()); } if(!regionKeyAliases.isEmpty() ) { for(AliasListEntry alias: regionKeyAliases) { if(key.getKeyId().equals(alias.getTargetKeyId())) { kmsKey.setAlias(alias); break; } } } kmsKeysList.add(kmsKey); } log.debug(InventoryConstants.ACCOUNT + accountId +" Type : KMSKey "+region.getName() + " >> "+kmsKeysList.size()); kmsKeys.put(accountId+delimiter+accountName+delimiter+region.getName(),kmsKeysList); } } }catch(Exception e){ log.warn(expPrefix+ region.getName()+InventoryConstants.ERROR_CAUSE +e.getMessage()+"\"}"); ErrorManageUtil.uploadError(accountId,region.getName(),"kms",e.getMessage()); } } return kmsKeys; }
InventoryUtil { public static Map<String,List<KMSKeyVH>> fetchKMSKeys(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName) { Map<String,List<KMSKeyVH>> kmsKeys = new LinkedHashMap<>(); AWSKMS awskms; String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+accountId + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"KMS\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){ awskms = AWSKMSClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(temporaryCredentials)).withRegion(region.getName()).build(); List<KeyListEntry> regionKeys = awskms.listKeys().getKeys(); List<AliasListEntry> regionKeyAliases = awskms.listAliases().getAliases(); if(!regionKeys.isEmpty()) { List<KMSKeyVH> kmsKeysList = new ArrayList<>(); for(KeyListEntry key : regionKeys) { KMSKeyVH kmsKey = new KMSKeyVH(); try { DescribeKeyResult result = awskms.describeKey(new DescribeKeyRequest().withKeyId(key.getKeyId())); kmsKey.setKey(result.getKeyMetadata()); kmsKey.setTags(awskms.listResourceTags(new ListResourceTagsRequest().withKeyId(key.getKeyId())).getTags()); } catch (Exception e) { log.debug(e.getMessage()); } try { kmsKey.setRotationStatus(awskms.getKeyRotationStatus(new GetKeyRotationStatusRequest().withKeyId(key.getKeyId())).getKeyRotationEnabled()); } catch (Exception e) { log.debug(e.getMessage()); } if(!regionKeyAliases.isEmpty() ) { for(AliasListEntry alias: regionKeyAliases) { if(key.getKeyId().equals(alias.getTargetKeyId())) { kmsKey.setAlias(alias); break; } } } kmsKeysList.add(kmsKey); } log.debug(InventoryConstants.ACCOUNT + accountId +" Type : KMSKey "+region.getName() + " >> "+kmsKeysList.size()); kmsKeys.put(accountId+delimiter+accountName+delimiter+region.getName(),kmsKeysList); } } }catch(Exception e){ log.warn(expPrefix+ region.getName()+InventoryConstants.ERROR_CAUSE +e.getMessage()+"\"}"); ErrorManageUtil.uploadError(accountId,region.getName(),"kms",e.getMessage()); } } return kmsKeys; } }
InventoryUtil { public static Map<String,List<KMSKeyVH>> fetchKMSKeys(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName) { Map<String,List<KMSKeyVH>> kmsKeys = new LinkedHashMap<>(); AWSKMS awskms; String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+accountId + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"KMS\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){ awskms = AWSKMSClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(temporaryCredentials)).withRegion(region.getName()).build(); List<KeyListEntry> regionKeys = awskms.listKeys().getKeys(); List<AliasListEntry> regionKeyAliases = awskms.listAliases().getAliases(); if(!regionKeys.isEmpty()) { List<KMSKeyVH> kmsKeysList = new ArrayList<>(); for(KeyListEntry key : regionKeys) { KMSKeyVH kmsKey = new KMSKeyVH(); try { DescribeKeyResult result = awskms.describeKey(new DescribeKeyRequest().withKeyId(key.getKeyId())); kmsKey.setKey(result.getKeyMetadata()); kmsKey.setTags(awskms.listResourceTags(new ListResourceTagsRequest().withKeyId(key.getKeyId())).getTags()); } catch (Exception e) { log.debug(e.getMessage()); } try { kmsKey.setRotationStatus(awskms.getKeyRotationStatus(new GetKeyRotationStatusRequest().withKeyId(key.getKeyId())).getKeyRotationEnabled()); } catch (Exception e) { log.debug(e.getMessage()); } if(!regionKeyAliases.isEmpty() ) { for(AliasListEntry alias: regionKeyAliases) { if(key.getKeyId().equals(alias.getTargetKeyId())) { kmsKey.setAlias(alias); break; } } } kmsKeysList.add(kmsKey); } log.debug(InventoryConstants.ACCOUNT + accountId +" Type : KMSKey "+region.getName() + " >> "+kmsKeysList.size()); kmsKeys.put(accountId+delimiter+accountName+delimiter+region.getName(),kmsKeysList); } } }catch(Exception e){ log.warn(expPrefix+ region.getName()+InventoryConstants.ERROR_CAUSE +e.getMessage()+"\"}"); ErrorManageUtil.uploadError(accountId,region.getName(),"kms",e.getMessage()); } } return kmsKeys; } private  InventoryUtil(); }
InventoryUtil { public static Map<String,List<KMSKeyVH>> fetchKMSKeys(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName) { Map<String,List<KMSKeyVH>> kmsKeys = new LinkedHashMap<>(); AWSKMS awskms; String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+accountId + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"KMS\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){ awskms = AWSKMSClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(temporaryCredentials)).withRegion(region.getName()).build(); List<KeyListEntry> regionKeys = awskms.listKeys().getKeys(); List<AliasListEntry> regionKeyAliases = awskms.listAliases().getAliases(); if(!regionKeys.isEmpty()) { List<KMSKeyVH> kmsKeysList = new ArrayList<>(); for(KeyListEntry key : regionKeys) { KMSKeyVH kmsKey = new KMSKeyVH(); try { DescribeKeyResult result = awskms.describeKey(new DescribeKeyRequest().withKeyId(key.getKeyId())); kmsKey.setKey(result.getKeyMetadata()); kmsKey.setTags(awskms.listResourceTags(new ListResourceTagsRequest().withKeyId(key.getKeyId())).getTags()); } catch (Exception e) { log.debug(e.getMessage()); } try { kmsKey.setRotationStatus(awskms.getKeyRotationStatus(new GetKeyRotationStatusRequest().withKeyId(key.getKeyId())).getKeyRotationEnabled()); } catch (Exception e) { log.debug(e.getMessage()); } if(!regionKeyAliases.isEmpty() ) { for(AliasListEntry alias: regionKeyAliases) { if(key.getKeyId().equals(alias.getTargetKeyId())) { kmsKey.setAlias(alias); break; } } } kmsKeysList.add(kmsKey); } log.debug(InventoryConstants.ACCOUNT + accountId +" Type : KMSKey "+region.getName() + " >> "+kmsKeysList.size()); kmsKeys.put(accountId+delimiter+accountName+delimiter+region.getName(),kmsKeysList); } } }catch(Exception e){ log.warn(expPrefix+ region.getName()+InventoryConstants.ERROR_CAUSE +e.getMessage()+"\"}"); ErrorManageUtil.uploadError(accountId,region.getName(),"kms",e.getMessage()); } } return kmsKeys; } private  InventoryUtil(); static Map<String,List<Instance>> fetchInstances(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName,String ec2Filters); static Map<String,List<NetworkInterface>> fetchNetworkIntefaces(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<SecurityGroup>> fetchSecurityGroups(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<AutoScalingGroup>> fetchAsg(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<Stack>> fetchCloudFormationStack(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<DynamoVH>> fetchDynamoDBTables(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<EfsVH>> fetchEFSInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<Cluster>> fetchEMRInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<LambdaVH>> fetchLambdaInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<ClassicELBVH>> fetchClassicElbInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<LoadBalancerVH>> fetchElbInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<TargetGroupVH>> fetchTargetGroups(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<NatGateway>> fetchNATGatewayInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<DBClusterVH>> fetchRDSClusterInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<DBInstanceVH>> fetchRDSInstanceInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<BucketVH>> fetchS3Info(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<Subnet>> fetchSubnets(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<CheckVH>> fetchTrusterdAdvisorsChecks(BasicSessionCredentials temporaryCredentials,String accountId,String accountName ); static Map<String,List<RedshiftVH>> fetchRedshiftInfo(BasicSessionCredentials temporaryCredentials,String skipRegions,String accountId,String accountName); static Map<String,List<Volume>> fetchVolumetInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<Snapshot>> fetchSnapshots(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); @SuppressWarnings("rawtypes") static Map<String,List<VpcVH>> fetchVpcInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<RestApi>> fetchApiGateways(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<UserVH>> fetchIAMUsers(BasicSessionCredentials temporaryCredentials,String accountId,String accountName); static Map<String,List<Role>> fetchIAMRoles(BasicSessionCredentials temporaryCredentials,String accountId,String accountName); static Map<String,List<DBSnapshot>> fetchRDSDBSnapshots(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<KMSKeyVH>> fetchKMSKeys(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<CloudFrontVH>> fetchCloudFrontInfo(BasicSessionCredentials temporaryCredentials,String accountId,String accountName); static Map<String,List<EbsVH>> fetchEBSInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<PhdVH>> fetchPHDInfo(BasicSessionCredentials temporaryCredentials,String accountId,String accountName); static Map<String,List<SQSVH>> fetchSQSInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<SSLCertificateVH>> fetchACMCertficateInfo(BasicSessionCredentials temporaryCredentials, String skipRegions, String account, String accountName); static Map<String,List<IAMCertificateVH>> fetchIAMCertificateInfo(BasicSessionCredentials temporaryCredentials, String skipRegions, String account, String accountName); static Map<String,List<AccountVH>> fetchAccountsInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,
			String account, String accountName); static Map<String,List<GroupVH>> fetchIAMGroups(BasicSessionCredentials temporaryCredentials,String account, String accountName); static Map<String,List<Trail>> fetchCloudTrails(BasicSessionCredentials temporaryCredentials, String skipRegions,String account, String accountName); }
InventoryUtil { public static Map<String,List<KMSKeyVH>> fetchKMSKeys(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName) { Map<String,List<KMSKeyVH>> kmsKeys = new LinkedHashMap<>(); AWSKMS awskms; String expPrefix = InventoryConstants.ERROR_PREFIX_CODE+accountId + "\",\"Message\": \"Exception in fetching info for resource in specific region\" ,\"type\": \"KMS\" , \"region\":\"" ; for(Region region : RegionUtils.getRegions()) { try{ if(!skipRegions.contains(region.getName())){ awskms = AWSKMSClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(temporaryCredentials)).withRegion(region.getName()).build(); List<KeyListEntry> regionKeys = awskms.listKeys().getKeys(); List<AliasListEntry> regionKeyAliases = awskms.listAliases().getAliases(); if(!regionKeys.isEmpty()) { List<KMSKeyVH> kmsKeysList = new ArrayList<>(); for(KeyListEntry key : regionKeys) { KMSKeyVH kmsKey = new KMSKeyVH(); try { DescribeKeyResult result = awskms.describeKey(new DescribeKeyRequest().withKeyId(key.getKeyId())); kmsKey.setKey(result.getKeyMetadata()); kmsKey.setTags(awskms.listResourceTags(new ListResourceTagsRequest().withKeyId(key.getKeyId())).getTags()); } catch (Exception e) { log.debug(e.getMessage()); } try { kmsKey.setRotationStatus(awskms.getKeyRotationStatus(new GetKeyRotationStatusRequest().withKeyId(key.getKeyId())).getKeyRotationEnabled()); } catch (Exception e) { log.debug(e.getMessage()); } if(!regionKeyAliases.isEmpty() ) { for(AliasListEntry alias: regionKeyAliases) { if(key.getKeyId().equals(alias.getTargetKeyId())) { kmsKey.setAlias(alias); break; } } } kmsKeysList.add(kmsKey); } log.debug(InventoryConstants.ACCOUNT + accountId +" Type : KMSKey "+region.getName() + " >> "+kmsKeysList.size()); kmsKeys.put(accountId+delimiter+accountName+delimiter+region.getName(),kmsKeysList); } } }catch(Exception e){ log.warn(expPrefix+ region.getName()+InventoryConstants.ERROR_CAUSE +e.getMessage()+"\"}"); ErrorManageUtil.uploadError(accountId,region.getName(),"kms",e.getMessage()); } } return kmsKeys; } private  InventoryUtil(); static Map<String,List<Instance>> fetchInstances(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName,String ec2Filters); static Map<String,List<NetworkInterface>> fetchNetworkIntefaces(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<SecurityGroup>> fetchSecurityGroups(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<AutoScalingGroup>> fetchAsg(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<Stack>> fetchCloudFormationStack(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<DynamoVH>> fetchDynamoDBTables(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<EfsVH>> fetchEFSInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<Cluster>> fetchEMRInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<LambdaVH>> fetchLambdaInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<ClassicELBVH>> fetchClassicElbInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<LoadBalancerVH>> fetchElbInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<TargetGroupVH>> fetchTargetGroups(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<NatGateway>> fetchNATGatewayInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<DBClusterVH>> fetchRDSClusterInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<DBInstanceVH>> fetchRDSInstanceInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<BucketVH>> fetchS3Info(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<Subnet>> fetchSubnets(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<CheckVH>> fetchTrusterdAdvisorsChecks(BasicSessionCredentials temporaryCredentials,String accountId,String accountName ); static Map<String,List<RedshiftVH>> fetchRedshiftInfo(BasicSessionCredentials temporaryCredentials,String skipRegions,String accountId,String accountName); static Map<String,List<Volume>> fetchVolumetInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<Snapshot>> fetchSnapshots(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); @SuppressWarnings("rawtypes") static Map<String,List<VpcVH>> fetchVpcInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<RestApi>> fetchApiGateways(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<UserVH>> fetchIAMUsers(BasicSessionCredentials temporaryCredentials,String accountId,String accountName); static Map<String,List<Role>> fetchIAMRoles(BasicSessionCredentials temporaryCredentials,String accountId,String accountName); static Map<String,List<DBSnapshot>> fetchRDSDBSnapshots(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<KMSKeyVH>> fetchKMSKeys(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<CloudFrontVH>> fetchCloudFrontInfo(BasicSessionCredentials temporaryCredentials,String accountId,String accountName); static Map<String,List<EbsVH>> fetchEBSInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<PhdVH>> fetchPHDInfo(BasicSessionCredentials temporaryCredentials,String accountId,String accountName); static Map<String,List<SQSVH>> fetchSQSInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,String accountId,String accountName); static Map<String,List<SSLCertificateVH>> fetchACMCertficateInfo(BasicSessionCredentials temporaryCredentials, String skipRegions, String account, String accountName); static Map<String,List<IAMCertificateVH>> fetchIAMCertificateInfo(BasicSessionCredentials temporaryCredentials, String skipRegions, String account, String accountName); static Map<String,List<AccountVH>> fetchAccountsInfo(BasicSessionCredentials temporaryCredentials, String skipRegions,
			String account, String accountName); static Map<String,List<GroupVH>> fetchIAMGroups(BasicSessionCredentials temporaryCredentials,String account, String accountName); static Map<String,List<Trail>> fetchCloudTrails(BasicSessionCredentials temporaryCredentials, String skipRegions,String account, String accountName);  }