@SuppressWarnings("static-access") @Test public void initialiseTest() throws Exception{ File file = PowerMockito.mock(File.class); PowerMockito.whenNew(File.class).withAnyArguments().thenReturn(file); when(file,"mkdirs").thenReturn(true); mockStatic(FileGenerator.class); PowerMockito.doNothing().when(FileGenerator.class,"writeToFile",anyString(),anyString(),anyBoolean()); fileManager.initialise("src/test/resources/testfolder"); }
public static void initialise(String folderName) throws IOException{ FileGenerator.folderName = folderName; new File(folderName).mkdirs(); FileGenerator.writeToFile("aws-ec2.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-ec2-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-productcodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-blockdevices.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-nwinterfaces.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-ipv6.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-privateipaddr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-elb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-appelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-targetgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-targetgroup-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat-addresses.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-rules.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks-resources.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-endpoints.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-api.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser-keys.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdssnapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamrole.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk-instance.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-asg.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-elb.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-phd.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-phd-entities.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-propagatingvgws.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-entries.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticip.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig-blockdevicemappings.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-vpcattachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-tags.data",InventoryConstants.OPEN_ARRAY, false ); FileGenerator.writeToFile("aws-asgpolicy.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-stepadjustments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-alarms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snstopic.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-egressgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-telemetry.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-directconnect.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-virtualinterface.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-ssminfo.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-nodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-acmcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-account.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudtrail.data",InventoryConstants.OPEN_ARRAY, false); }
FileManager { public static void initialise(String folderName) throws IOException{ FileGenerator.folderName = folderName; new File(folderName).mkdirs(); FileGenerator.writeToFile("aws-ec2.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-ec2-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-productcodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-blockdevices.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-nwinterfaces.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-ipv6.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-privateipaddr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-elb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-appelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-targetgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-targetgroup-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat-addresses.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-rules.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks-resources.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-endpoints.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-api.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser-keys.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdssnapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamrole.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk-instance.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-asg.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-elb.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-phd.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-phd-entities.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-propagatingvgws.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-entries.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticip.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig-blockdevicemappings.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-vpcattachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-tags.data",InventoryConstants.OPEN_ARRAY, false ); FileGenerator.writeToFile("aws-asgpolicy.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-stepadjustments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-alarms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snstopic.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-egressgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-telemetry.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-directconnect.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-virtualinterface.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-ssminfo.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-nodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-acmcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-account.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudtrail.data",InventoryConstants.OPEN_ARRAY, false); } }
FileManager { public static void initialise(String folderName) throws IOException{ FileGenerator.folderName = folderName; new File(folderName).mkdirs(); FileGenerator.writeToFile("aws-ec2.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-ec2-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-productcodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-blockdevices.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-nwinterfaces.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-ipv6.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-privateipaddr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-elb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-appelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-targetgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-targetgroup-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat-addresses.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-rules.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks-resources.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-endpoints.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-api.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser-keys.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdssnapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamrole.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk-instance.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-asg.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-elb.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-phd.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-phd-entities.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-propagatingvgws.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-entries.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticip.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig-blockdevicemappings.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-vpcattachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-tags.data",InventoryConstants.OPEN_ARRAY, false ); FileGenerator.writeToFile("aws-asgpolicy.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-stepadjustments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-alarms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snstopic.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-egressgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-telemetry.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-directconnect.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-virtualinterface.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-ssminfo.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-nodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-acmcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-account.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudtrail.data",InventoryConstants.OPEN_ARRAY, false); } private  FileManager(); }
FileManager { public static void initialise(String folderName) throws IOException{ FileGenerator.folderName = folderName; new File(folderName).mkdirs(); FileGenerator.writeToFile("aws-ec2.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-ec2-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-productcodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-blockdevices.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-nwinterfaces.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-ipv6.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-privateipaddr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-elb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-appelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-targetgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-targetgroup-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat-addresses.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-rules.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks-resources.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-endpoints.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-api.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser-keys.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdssnapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamrole.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk-instance.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-asg.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-elb.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-phd.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-phd-entities.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-propagatingvgws.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-entries.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticip.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig-blockdevicemappings.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-vpcattachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-tags.data",InventoryConstants.OPEN_ARRAY, false ); FileGenerator.writeToFile("aws-asgpolicy.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-stepadjustments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-alarms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snstopic.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-egressgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-telemetry.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-directconnect.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-virtualinterface.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-ssminfo.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-nodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-acmcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-account.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudtrail.data",InventoryConstants.OPEN_ARRAY, false); } private  FileManager(); static void initialise(String folderName); static void finalise(); static void generateInstanceFiles(Map<String,List<Instance>> instanceMap); static void generateNwInterfaceFiles(Map<String,List<NetworkInterface>> nwIntfcMap); static void generateAsgFiles(Map<String,List<AutoScalingGroup>> instanceMap); static void generateCloudFormationStackFiles(Map<String,List<Stack>> fileInofMap); static void generateDynamoDbFiles(Map<String,List<DynamoVH>> dynamoMap); static void generateEfsFiles(Map<String,List<EfsVH>> efsfMap); static void generateEmrFiles(Map<String,List<Cluster>> fileInofMap); static void generateLamdaFiles(Map<String,List<LambdaVH>> fileInofMap); static void generateClassicElbFiles(Map<String, List<ClassicELBVH>> elbMap); static void generateApplicationElbFiles(Map<String, List<LoadBalancerVH>> elbMap); static void generateTargetGroupFiles(Map<String, List<TargetGroupVH>> targetGrpMap); static void generateNatGatewayFiles(Map<String, List<NatGateway>> gateWayMap); static void generateRDSClusterFiles(Map<String, List<DBClusterVH>> rdsclusterMap); static void generateRDSInstanceFiles(Map<String, List<DBInstanceVH>> rdsIntncMap); static void generateS3Files(Map<String, List<BucketVH>> bucketMap); static void generateSecGroupFile(Map<String, List<SecurityGroup>> secGrpMap); static void generateSubnetFiles(Map<String, List<Subnet>> subNetMap); static void generateTrustedAdvisorFiles(Map<String, List<CheckVH>> checksMap); static void generateRedshiftFiles(Map<String, List<RedshiftVH>> map); static void generatefetchVolumeFiles(Map<String, List<Volume>> volumeMap); static void generateSnapshotFiles(Map<String, List<Snapshot>> snapshotMap); static void generateVpcFiles(Map<String, List<VpcVH>> vpcMap); static void generateApiGatewayFiles(Map<String, List<RestApi>> apiGatewayMap); static void generateIamUserFiles(Map<String,List<UserVH>> userMap); static void generateRDSSnapshotFiles(Map<String,List<DBSnapshot>> dbSnapShots); static void generateIamRoleFiles(Map<String, List<Role>> iamRoleMap); static void generateKMSFiles(Map<String, List<KMSKeyVH>> kmsKeyMap); static void generateCloudFrontFiles(Map<String, List<CloudFrontVH>> cfMap); static void generateEBSFiles(Map<String, List<EbsVH>> ebsMap); static void generatePHDFiles(Map<String, List<PhdVH>> phdMap); static synchronized void generateErrorFile(Map<String, List<ErrorVH>> errorMap); static void generateEC2RouteTableFiles(Map<String, List<RouteTable>> routeTableMap); static void generateNetworkAclFiles(Map<String, List<NetworkAcl>> networkAclMap); static void generateElasticIPFiles(Map<String, List<Address>> elasticIPMap); static void generateLaunchConfigurationsFiles(Map<String, List<LaunchConfiguration>> launchConfigurationMap); static void generateInternetGatewayFiles(Map<String, List<InternetGateway>> internetGatewayMap); static void generateVPNGatewayFiles(Map<String, List<VpnGateway>> vpnGatewayMap); static void generateScalingPolicies(Map<String, List<ScalingPolicy>> scalingPolicyMap); static void generateSNSTopics(Map<String, List<Topic>> topicMap); static void generateEgressGateway(Map<String, List<EgressOnlyInternetGateway>> egressGatewayMap); static void generateDhcpOptions(Map<String, List<DhcpOptions>> dhcpOptionsMap); static void generatePeeringConnections(Map<String, List<VpcPeeringConnection>> peeringConnectionMap); static void generateCustomerGateway(Map<String, List<CustomerGateway>> customerGatewayMap); static void generateVpnConnection(Map<String, List<VpnConnection>> vpnConnectionMap); static void generateDirectConnection(Map<String, List<Connection>> directConnectionMap); static void generateDirectConnectionVirtualInterfaces(Map<String, List<VirtualInterface>> directConnectionVirtualInterfacesMap); static void generateESDomain(Map<String, List<ElasticsearchDomainVH>> esDomainMap); static void generateReservedInstances(Map<String, List<ReservedInstances>> reservedInstancesMap); static void generateSsmFiles(Map<String,List<InstanceInformation>> ssmMap); static void generateElastiCacheFiles(Map<String,List<ElastiCacheVH>> elastiCacheMap); static void generateKinesisDataStreamFiles(Map<String,List<DataStreamVH>> kinesisDataStreamMap); static void generateSQSFiles(Map<String,List<SQSVH>> sqsMap); static void generateKinesisDeliveryStreamFiles(Map<String,List<DeliveryStreamVH>> kinesisDeliveryStreamMap); static void generateKinesisVideoStreamFiles(Map<String,List<VideoStreamVH>> kinesisVideoStreamMap); static void generateACMCertificateFiles(Map<String,List<SSLCertificateVH>> acmCertificate); static void generateIAMCertificateFiles(Map<String,List<IAMCertificateVH>> iamCertificate); static void generateAccountFiles(Map<String,List<AccountVH>> account); static void generateIamGroupFiles(Map<String, List<GroupVH>> iamGroupMap); static void generateCloudTrailFiles(Map<String,List<Trail>> dbSnapShots); }
FileManager { public static void initialise(String folderName) throws IOException{ FileGenerator.folderName = folderName; new File(folderName).mkdirs(); FileGenerator.writeToFile("aws-ec2.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-ec2-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-productcodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-blockdevices.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-nwinterfaces.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-ipv6.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-eni-privateipaddr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-elb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-stack-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dynamodb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-efs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-emr-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-lambda-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-classicelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-appelb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-appelb-secgroups.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-targetgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-targetgroup-instances.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-nat-addresses.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdscluster-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdsdb-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-s3-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sg-rules.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-subnet-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-checks-resources.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-secgroups.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-redshift-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-volume-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snapshot-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpc-endpoints.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-api.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamuser-keys.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-rdssnapshot.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamrole.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-kms-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudfront-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-beanstalk-instance.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-asg.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-beanstalk-elb.data",InventoryConstants.OPEN_ARRAY,false); FileGenerator.writeToFile("aws-phd.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-phd-entities.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-propagatingvgws.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-routetable-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-entries.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-associations.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-networkacl-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticip.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-launchconfig-blockdevicemappings.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-attachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-internetgateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-vpcattachments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpngateway-tags.data",InventoryConstants.OPEN_ARRAY, false ); FileGenerator.writeToFile("aws-asgpolicy.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-stepadjustments.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-asgpolicy-alarms.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-snstopic.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-egressgateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-dhcpoption-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-peeringconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-customergateway-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-routes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-telemetry.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-vpnconnection-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-directconnect.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-virtualinterface.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticsearch-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-reservedinstance-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-ec2-ssminfo.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-datastream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-sqs-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-deliverystream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-videostream-tags.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-elasticache-nodes.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-acmcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamcertificate.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-account.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-iamgroup.data",InventoryConstants.OPEN_ARRAY, false); FileGenerator.writeToFile("aws-cloudtrail.data",InventoryConstants.OPEN_ARRAY, false); } private  FileManager(); static void initialise(String folderName); static void finalise(); static void generateInstanceFiles(Map<String,List<Instance>> instanceMap); static void generateNwInterfaceFiles(Map<String,List<NetworkInterface>> nwIntfcMap); static void generateAsgFiles(Map<String,List<AutoScalingGroup>> instanceMap); static void generateCloudFormationStackFiles(Map<String,List<Stack>> fileInofMap); static void generateDynamoDbFiles(Map<String,List<DynamoVH>> dynamoMap); static void generateEfsFiles(Map<String,List<EfsVH>> efsfMap); static void generateEmrFiles(Map<String,List<Cluster>> fileInofMap); static void generateLamdaFiles(Map<String,List<LambdaVH>> fileInofMap); static void generateClassicElbFiles(Map<String, List<ClassicELBVH>> elbMap); static void generateApplicationElbFiles(Map<String, List<LoadBalancerVH>> elbMap); static void generateTargetGroupFiles(Map<String, List<TargetGroupVH>> targetGrpMap); static void generateNatGatewayFiles(Map<String, List<NatGateway>> gateWayMap); static void generateRDSClusterFiles(Map<String, List<DBClusterVH>> rdsclusterMap); static void generateRDSInstanceFiles(Map<String, List<DBInstanceVH>> rdsIntncMap); static void generateS3Files(Map<String, List<BucketVH>> bucketMap); static void generateSecGroupFile(Map<String, List<SecurityGroup>> secGrpMap); static void generateSubnetFiles(Map<String, List<Subnet>> subNetMap); static void generateTrustedAdvisorFiles(Map<String, List<CheckVH>> checksMap); static void generateRedshiftFiles(Map<String, List<RedshiftVH>> map); static void generatefetchVolumeFiles(Map<String, List<Volume>> volumeMap); static void generateSnapshotFiles(Map<String, List<Snapshot>> snapshotMap); static void generateVpcFiles(Map<String, List<VpcVH>> vpcMap); static void generateApiGatewayFiles(Map<String, List<RestApi>> apiGatewayMap); static void generateIamUserFiles(Map<String,List<UserVH>> userMap); static void generateRDSSnapshotFiles(Map<String,List<DBSnapshot>> dbSnapShots); static void generateIamRoleFiles(Map<String, List<Role>> iamRoleMap); static void generateKMSFiles(Map<String, List<KMSKeyVH>> kmsKeyMap); static void generateCloudFrontFiles(Map<String, List<CloudFrontVH>> cfMap); static void generateEBSFiles(Map<String, List<EbsVH>> ebsMap); static void generatePHDFiles(Map<String, List<PhdVH>> phdMap); static synchronized void generateErrorFile(Map<String, List<ErrorVH>> errorMap); static void generateEC2RouteTableFiles(Map<String, List<RouteTable>> routeTableMap); static void generateNetworkAclFiles(Map<String, List<NetworkAcl>> networkAclMap); static void generateElasticIPFiles(Map<String, List<Address>> elasticIPMap); static void generateLaunchConfigurationsFiles(Map<String, List<LaunchConfiguration>> launchConfigurationMap); static void generateInternetGatewayFiles(Map<String, List<InternetGateway>> internetGatewayMap); static void generateVPNGatewayFiles(Map<String, List<VpnGateway>> vpnGatewayMap); static void generateScalingPolicies(Map<String, List<ScalingPolicy>> scalingPolicyMap); static void generateSNSTopics(Map<String, List<Topic>> topicMap); static void generateEgressGateway(Map<String, List<EgressOnlyInternetGateway>> egressGatewayMap); static void generateDhcpOptions(Map<String, List<DhcpOptions>> dhcpOptionsMap); static void generatePeeringConnections(Map<String, List<VpcPeeringConnection>> peeringConnectionMap); static void generateCustomerGateway(Map<String, List<CustomerGateway>> customerGatewayMap); static void generateVpnConnection(Map<String, List<VpnConnection>> vpnConnectionMap); static void generateDirectConnection(Map<String, List<Connection>> directConnectionMap); static void generateDirectConnectionVirtualInterfaces(Map<String, List<VirtualInterface>> directConnectionVirtualInterfacesMap); static void generateESDomain(Map<String, List<ElasticsearchDomainVH>> esDomainMap); static void generateReservedInstances(Map<String, List<ReservedInstances>> reservedInstancesMap); static void generateSsmFiles(Map<String,List<InstanceInformation>> ssmMap); static void generateElastiCacheFiles(Map<String,List<ElastiCacheVH>> elastiCacheMap); static void generateKinesisDataStreamFiles(Map<String,List<DataStreamVH>> kinesisDataStreamMap); static void generateSQSFiles(Map<String,List<SQSVH>> sqsMap); static void generateKinesisDeliveryStreamFiles(Map<String,List<DeliveryStreamVH>> kinesisDeliveryStreamMap); static void generateKinesisVideoStreamFiles(Map<String,List<VideoStreamVH>> kinesisVideoStreamMap); static void generateACMCertificateFiles(Map<String,List<SSLCertificateVH>> acmCertificate); static void generateIAMCertificateFiles(Map<String,List<IAMCertificateVH>> iamCertificate); static void generateAccountFiles(Map<String,List<AccountVH>> account); static void generateIamGroupFiles(Map<String, List<GroupVH>> iamGroupMap); static void generateCloudTrailFiles(Map<String,List<Trail>> dbSnapShots);  }