Sample JSON Output Showing All Resources and SG Attributes of Each Instance

Updated 3 months ago by Totalcloud

Here's the JSON Output if you select EC2 instances as resources and Security Groups as Add-ons in Resource Node.



[

{

"AmiLaunchIndex": 0,

"ImageId": "ami-0c6b1d09930fac512",

"InstanceId": "i-0f8ae4d3e03c2f268",

"InstanceType": "t2.micro",

"KeyName": "prod-use1",

"LaunchTime": "2019-05-15T07:26:50.000Z",

"Monitoring": {

"State": "disabled"

},

"Placement": {

"AvailabilityZone": "us-east-1c",

"GroupName": "",

"Tenancy": "default"

},

"PrivateDnsName": "ip-172-31-43-6.ec2.internal",

"PrivateIpAddress": "172.31.43.6",

"ProductCodes": [



],

"PublicDnsName": "ec2-3-80-157-47.compute-1.amazonaws.com",

"PublicIpAddress": "3.80.157.47",

"State": {

"Code": 16,

"Name": "running"

},

"StateTransitionReason": "",

"SubnetId": "subnet-ef0b3ec7",

"VpcId": "vpc-a1b460c4",

"Architecture": "x86_64",

"BlockDeviceMappings": [

{

"DeviceName": "\/dev\/xvda",

"Ebs": {

"AttachTime": "2019-05-15T07:26:51.000Z",

"DeleteOnTermination": true,

"Status": "attached",

"VolumeId": "vol-0b2e04a824533bff1"

}

}

],

"ClientToken": "",

"EbsOptimized": false,

"EnaSupport": true,

"Hypervisor": "xen",

"ElasticGpuAssociations": [



],

"ElasticInferenceAcceleratorAssociations": [



],

"NetworkInterfaces": [

{

"Association": {

"IpOwnerId": "amazon",

"PublicDnsName": "ec2-3-80-157-47.compute-1.amazonaws.com",

"PublicIp": "3.80.157.47"

},

"Attachment": {

"AttachTime": "2019-05-15T07:26:50.000Z",

"AttachmentId": "eni-attach-06bb7020fd9ac56ba",

"DeleteOnTermination": true,

"DeviceIndex": 0,

"Status": "attached"

},

"Description": "",

"Groups": [

{

"GroupName": "webapp-engine",

"GroupId": "sg-032a671c258604803"

},

{

"GroupName": "test",

"GroupId": "sg-0d7c7ff7b34adaeeb"

},

{

"GroupName": "default",

"GroupId": "sg-c765fda2"

},

{

"GroupName": "redis-server",

"GroupId": "sg-051807de6d61c8414"

},

{

"GroupName": "cost-service",

"GroupId": "sg-0f0ac5ca1778a0764"

}

],

"Ipv6Addresses": [



],

"MacAddress": "12:22:de:f4:57:44",

"NetworkInterfaceId": "eni-051bb8544d041b191",

"OwnerId": "638806924683",

"PrivateDnsName": "ip-172-31-43-6.ec2.internal",

"PrivateIpAddress": "172.31.43.6",

"PrivateIpAddresses": [

{

"Association": {

"IpOwnerId": "amazon",

"PublicDnsName": "ec2-3-80-157-47.compute-1.amazonaws.com",

"PublicIp": "3.80.157.47"

},

"Primary": true,

"PrivateDnsName": "ip-172-31-43-6.ec2.internal",

"PrivateIpAddress": "172.31.43.6"

}

],

"SourceDestCheck": true,

"Status": "in-use",

"SubnetId": "subnet-ef0b3ec7",

"VpcId": "vpc-a1b460c4",

"InterfaceType": "interface"

}

],

"RootDeviceName": "\/dev\/xvda",

"RootDeviceType": "ebs",

"SecurityGroups": [

{

"GroupName": "webapp-engine",

"GroupId": "sg-032a671c258604803"

},

{

"GroupName": "test",

"GroupId": "sg-0d7c7ff7b34adaeeb"

},

{

"GroupName": "default",

"GroupId": "sg-c765fda2"

},

{

"GroupName": "redis-server",

"GroupId": "sg-051807de6d61c8414"

},

{

"GroupName": "cost-service",

"GroupId": "sg-0f0ac5ca1778a0764"

}

],

"SourceDestCheck": true,

"Tags": [

{

"Key": "Name",

"Value": "test"

}

],

"VirtualizationType": "hvm",

"CpuOptions": {

"CoreCount": 1,

"ThreadsPerCore": 1

},

"CapacityReservationSpecification": {

"CapacityReservationPreference": "open"

},

"HibernationOptions": {

"Configured": false

},

"Licenses": [



],

"addOns": {

"SecurityGroups": {

"data": [

{

"Description": "sg for lambda functions",

"GroupName": "webapp-engine",

"IpPermissions": [



],

"OwnerId": "638806924683",

"GroupId": "sg-032a671c258604803",

"IpPermissionsEgress": [

{

"IpProtocol": "-1",

"IpRanges": [

{

"CidrIp": "0.0.0.0\/0"

}

],

"Ipv6Ranges": [



],

"PrefixListIds": [



],

"UserIdGroupPairs": [



]

}

],

"Tags": [



],

"VpcId": "vpc-a1b460c4"

},

{

"Description": "test",

"GroupName": "test",

"IpPermissions": [

{

"FromPort": 22,

"IpProtocol": "tcp",

"IpRanges": [

{

"CidrIp": "0.0.0.0\/0"

}

],

"Ipv6Ranges": [



],

"PrefixListIds": [



],

"ToPort": 22,

"UserIdGroupPairs": [



]

},

{

"FromPort": 999,

"IpProtocol": "tcp",

"IpRanges": [

{

"CidrIp": "0.0.0.0\/0"

}

],

"Ipv6Ranges": [

{

"CidrIpv6": "::\/0"

}

],

"PrefixListIds": [



],

"ToPort": 999,

"UserIdGroupPairs": [



]

}

],

"OwnerId": "638806924683",

"GroupId": "sg-0d7c7ff7b34adaeeb",

"IpPermissionsEgress": [

{

"IpProtocol": "-1",

"IpRanges": [

{

"CidrIp": "0.0.0.0\/0"

}

],

"Ipv6Ranges": [



],

"PrefixListIds": [



],

"UserIdGroupPairs": [



]

}

],

"Tags": [



],

"VpcId": "vpc-a1b460c4"

},

{

"Description": "default VPC security group",

"GroupName": "default",

"IpPermissions": [



],

"OwnerId": "638806924683",

"GroupId": "sg-c765fda2",

"IpPermissionsEgress": [

{

"IpProtocol": "-1",

"IpRanges": [

{

"CidrIp": "0.0.0.0\/0"

}

],

"Ipv6Ranges": [



],

"PrefixListIds": [



],

"UserIdGroupPairs": [



]

}

],

"Tags": [



],

"VpcId": "vpc-a1b460c4"

},

{

"Description": "sg for redis server",

"GroupName": "redis-server",

"IpPermissions": [

{

"FromPort": 22,

"IpProtocol": "tcp",

"IpRanges": [

{

"CidrIp": "106.51.77.104\/32"

}

],

"Ipv6Ranges": [



],

"PrefixListIds": [



],

"ToPort": 22,

"UserIdGroupPairs": [



]

},

{

"FromPort": 6379,

"IpProtocol": "tcp",

"IpRanges": [

{

"CidrIp": "106.51.77.104\/32"

}

],

"Ipv6Ranges": [



],

"PrefixListIds": [



],

"ToPort": 6379,

"UserIdGroupPairs": [

{

"GroupId": "sg-032a671c258604803",

"UserId": "638806924683"

},

{

"GroupId": "sg-0f0ac5ca1778a0764",

"UserId": "638806924683"

}

]

}

],

"OwnerId": "638806924683",

"GroupId": "sg-051807de6d61c8414",

"IpPermissionsEgress": [

{

"IpProtocol": "-1",

"IpRanges": [

{

"CidrIp": "0.0.0.0\/0"

}

],

"Ipv6Ranges": [



],

"PrefixListIds": [



],

"UserIdGroupPairs": [



]

}

],

"Tags": [



]


How did we do?