-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathec2Test.html
2141 lines (1998 loc) · 76.8 KB
/
ec2Test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<script type="text/javascript" language="javascript" src="js/d3/d3.js"></script>
<script language="Javascript" src="js/jutzPath.js" type="text/javascript"></script>
<style>
.node {
cursor: pointer;
}
.nodes circle {
fill: #fff;
stroke: steelblue;
stroke-width: 1.5px;
}
.node text {
font: 10px sans-serif;
}
.link {
fill: none;
stroke: #ccc;
stroke-width: 1.5px;
}
.leaf circle{
fill: #fff;
stroke: steelblue;
stroke-width: 1.5px;
}
.branch circle{
fill: lightsteelblue;
stroke: steelblue;
stroke-width: 1.5px;
}
.data-link circle{
fill: #green;
stroke: steelblue;
stroke-width: 1.5px;
}
.jp {
margin-left: 100px;
width: 50em;
}
</style>
</head>
<body>
<select id="selectDescribe" onchange="newQuery()">
<option value="ec2Regions">Regions</option>
<option value="ec2Instances" selected="true">Instances</option>
<option value="ec2Tags">Tags</option>
<option value="ec2Vpcs">VPCs</option>
<option value="ec2Accts">Account</option>
<option value="ec2Subnets">Subnets</option>
<option value="ec2SubnetsFiltered">Filtered Subnets</option>
<option value="ec2InstancesFiltered">Filtered instances</option>
<option value="ec2TagsFiltered">Filtered tags</option>
<option value="randomTestData">random test data</option>
</select>
<input type="text" id="jutzPath" class="jp" value="Reservations/*/Instances/*/PublicIpAddress@""></input>
<input type="button" id="btnJutzPath" value="evaluate" onclick="evaluateJutzPath()"></input>
<script>
/*
Using the UI
- Drop down list changes data set
- Any data set with the word "filtered" in it applies a template (filter) to the relevant data set.
- left click on blue circle to toggle expansion (expands to whatever was already opened)
- right click on blue circle to toggle expansion of all children (collapse sets all child nodes to 'collapsed' state so left click would only open one level after that.
- right click on text to expand all leaf nodes that descend from the selected node by one level.
- dbl click on text to make that node the root node in the display. If the node dbl clicked on has been designated a link node (it will be an id and have a dark filled circle), the referenced node is displayed as root.
- Doing this (dbl-click) places the current tree onto a history stack) dbl-click on the new root to go back to the previous data tree
to link a field to external data
The function 'traverse' re-shapes json data for display in a d3 tree (more on that below).
If an attribute node (string, number) is being created it checks if the name of the attribute is known to be a link field (looks in link_fields dictionary)
If it is it adds a link object to the current data element
displayObj["link"] = {link_data: link.link_data, path: p}; (where link is the link_fields dictionary and path is the full path, including id, to the linked to data)
zoomData (called on the dbl click) checks to see if the clicked on data node has a link element (may want to change this name as it could occur 'naturally')
If it does, it gets the path, compiles and executes it and uses the found data as the new root.
For an example of this, select subnets data set and expand. Dark circles denote link fields.
The link_fields dictionary looks like this:
link_fields["VpcId"] = {link_data: "ec2Vpcs", path: "Vpcs/*[VpcId@ = '$']"};
with explanation..
link_fields["Name_of_field_in_source_data"] = {link_data: "name_of_data_stored_in_variable_ec2_query_dict", path: "path_from_root_of_data_to_linked_data_with_placeholder$"};
Empty data
The data set may contain empty arrays and attributes with no value which can clutter the display. Use the following variables to omit/keep.
showEmptyAttributes = true|false;
showEmptyArrays = true|false;
One advantage of keeping showEmptyAttributes = true is that array lengths are automatically displayed at the bottom of a list - probably because I am not checking for hasOwnProperty. I have left this behaviour in.
Evaluate text box.
Clicking evaluate button will evaluate jutPath on the selected data set (from the root node). It does not execute against filtered data sets, not because it can't, but because filtered data has a
different data structure to the original, which might be confusing.
*/
//Examples for Instance data
// Reservations/*/Instances/*/PublicDnsName@
// Reservations/*/Instances/*/LaunchTime@
// Reservations/*/Instances/*/PublicIpAddress@
// Reservations/*/Instances/*/InstanceType@
// Reservations/*/Instances/*/Tags/*[Key@ = 'Name']/Value@
// //Instances/*/Tags/*[Key@ = 'Name']/Value@
// //Instances/*/Tags/*/Key@[. = 'Name'] --not sure why you would do this, but you can. Equivalent to //Instances/*/Tags/*/[Key@ = 'Name']/@Key
// //Instances/*/Tags/*[Key@ = Name@] --this won't return anything but illustrates that both operands can be attributes.
// //Tags/*[Key@ = 'Name']/Value@
// #/Tags/*[Key@ = 'Name']/Value@
// Reservations/*[Instances/*/State/Name@ = 'terminated'] --predicate operands can be full paths
// Reservations/*[Instances/*/State/Name@ != 'terminated']
// Reservations/*/Instances/*/Tags/*/[Key@ = '?'] -- wildcard value for predicate
//Examples for Tags data
// Tags/*[ResourceType@ = 'security-group'][Key@ = 'Name']/Value@
// Tags/*[ResourceType@ = 'instance'][Key@ = 'Name']
// Tags/*/[ResourceType@ = 'internet-gateway']
/*Watch out for
// this returns all objects that are NOT arrays. Attributes (strings, numbers) are ignored.
// this gets replaced with '#', so you can sort of use # whereever // occurs
// in xpath //*[//@attr = 'val'], the context of predicate is root of the doc. In JutzPath (at the moment anyway) the predicate would be assumed to be [.//@attr = 'val']
attr@ @ is at the end of the attr name, not beginning as in xpath
*@ Attribute wildcards are not implemented
* If you want to navigate through an array you need a * as in "//Tags/ * /@Key" (but with no spaces)
* * can operate with an object as context. * on its own returns all child objects of current context.
//* This returns all nodes (not arrays) that have parents. Equivaent to #*
// The context for the // must be an object - which can make use of this axis confusing.
If the context is an array, you first need to select array members with *, then you can add //.
In random test data,Y is an array so you can have //Y//j@ which gives all j attributes underneath a Y object
However X is an array, and //X//j@ yields nothing. We need //X/ * //j@ (no spaces)
ALSO NOTE: the d3 tree is not an exact representation of the underlying data in as much as elements in a json array have no names as in {Instances: [{instance_id: 'a'}, {instance_id: 'b'}]}
this is represented in the d3 tree as
Instance
instance_id: 'a'
Instance
instance_id: 'b'
The text 'Instance' in this case simply comes from lopping off the last letter of the name of the array - without even checking if this is an 's'. This is done in function traverse(obj, new_obj, instance)
When searching the data, however, there is no Object called 'Instance' so do not include it in the path. Here we would use Instances/*
The same goes for Tag elements in ec2Tags
/*
NOT possible (yet)
attribute wildcards It might be useful to be able to retrieve more than one attribute in a given select.
aggregation functions. The plan was at some point to allow an 'axis' such as : to denote a following function name (as in :myFunc), calling myFunc(cx) and that function,
which could be a count function for example, would return a new context eg {count: 123} or inject a value into cx. name(.) might be useful.
parent / ancestral axes. There are various possibilities here, none of which have been explored yet. If you use d3, a parent reference is added to each node, in which case you can treat parents
as if they were children.
grouping The ec2Tags data set is essentially a flat list of tags, which is not ideal for display purposes. It would be nice to group on both resource type and resource id
and list all tags as children of the resource. At the moment the resourceId is duplicated. One would need both aggregation functions (distinct list) and parental axes
parameterised queries. [@attr = $myVar]. It would be nice to compile a curried search function that could take a parameter - at the moment any unique expression needs its own compilation.
An alternative would be to pass an array of parameters (pproperty bag) into the query - this array would be passed to each context and the functions there could help themselves to any data they needed.
indexed searches For large data sets, instead of [@key = 'value'] you could have a predicate such as {@key = $myVar} which would instruct the compiler to build eg a btree index on @key and use that
for subsequent parameterised queries. Haven't come across a use case yet for such offline queries
xpath style testing for attributes. Tags[Key@ = '?'] would be more nicely expressed as Tags[Key@]
*/
/*
d3 tree
Source of this comes from https://bl.ocks.org/mbostock/4339083 and changed to suit - mainly in adding click events and css classes for circles.
Structure that the tree expects is
container
display attribute
children array of containers (optional)
for example
{
"display": "Subnets",
"children": [
{
"display": "vpc-a2d0acc7",
"children": [
{
"display": "State: available",
},
{
"display": "CidrBlock: 172.32.0.0\/22",
}
]
},
{ ...more children...}
]
}
where a container does not have children, a children array can be present - but this will affect the colour of the circle representing the node in the d3 tree - it will think there are children.
It could do a count, but does not at the moment.
EC2 data is converted into this format by function traverse(obj, new_obj, instance)
where
obj = source data
new_obj = d3-tree ready data
instance - the text to use as place holder for objects found in an array. The traverse function simply assumes that array names have an 's' on the end and knocks it off when processing children
source data is housed in dictionary: ec2_query_dict
the dictionary a stores reference to data set and also to a template to use where necessary.
ec2_query_dict["ec2Subnets"] = {data: ec2Subnets, template: subNetTemplate};
The dictionary links to the top left select via the select box value attribute.
onChange, the select box calls newQuery
When rendered, the root element in each of the non-filtered data sets is hard coded to "eu-west-1 (in function getQuery). You will need to change this
*/
/*
Creating templates
There are 3 example templates here search for:
var subNetTemplate = [ ...
var instanceTemplate = [...
var tagTemplate = [...
processing is done by function transformData(data, template, new_obj)
where
data = source data
template = array - one for each child node ot be created
new_obj = array in which into insert new data item (this is an accumulator)
When new_obj has been created it will be an array
Structure for template is
Array of
Container
label and_or key
children array of containers
For every container a node in the tree is created
If label attribute is present, that text is used as is.
if key attribute is present the attribute text is compiled and executed against current data contextt and the result used
if both key and label attributes are present the 2 are concatenated as in label: key_text
The data context is then changed by compiling and executing the text found in path attribute. This results in an array.
Each element of the result array is recursively processed against the template found in template.children (we are stepping down 2 trees at the same time).
[
{
label: "Subnets", path: ".", children: [
{
key: "VpcId@", path: "Subnets/*",
children: [{label: "State", key: "State@"}, {label: "CidrBlock", key: "CidrBlock@"}]
}
]
},
{..maybe more along the same lines..}
]
when finished, the data for the d3 tree will be in new_obj. The d3 tree seems to cope fine being passed either an array oor an object, but I seuspect that
if the root is an array it should only have one member otherwise the tree will have more than one root.
*/
var showEmptyAttributes = true;
var showEmptyArrays = true;
//var cp = compileJutzPath("//*");
var margin = {top: 20, right: 120, bottom: 20, left: 120},
width = 3000 - margin.right - margin.left,
height = 900 - margin.top - margin.bottom;
var i = 0,
duration = 750,
root,
data_history = [],
ec2_query_dict = {};
var tree = d3.layout.tree()
.size([height, width]);
var diagonal = d3.svg.diagonal()
.projection(function(d) { return [d.y, d.x]; });
var svg = d3.select("body").append("svg")
.attr("width", width + margin.right + margin.left)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
var randomTestData = {j:"root", A : {j : "hello", Q : {j : "hi", W : {j : "qaz"}}, R : {j : "ho"}, X : [{j : "jambo", k : "hello", Y : {j : "bonjour", Z : {j : "kilimanjaro"}}},{j : "henry", Y : {j : "charles", Z : {j : "guten tag"}}},{j : "alastair", Y : {j : "david", Z : {j : "hola"}}},{j : "Gerald", Y : {j : "kelly", Z : {j : "que tal"}}}] }};
var ec2Subnets = {
"Subnets": [
{
"VpcId": "vpc-a2d0acc7",
"Tags": [
{
"Value": "MEE Encoder Subnet v1.0.723-mee",
"Key": "Name"
}
],
"CidrBlock": "172.32.0.0/22",
"MapPublicIpOnLaunch": true,
"DefaultForAz": false,
"State": "available",
"AvailabilityZone": "eu-west-1a",
"SubnetId": "subnet-26527143",
"AvailableIpAddressCount": 1019
},
{
"VpcId": "vpc-30998e58",
"CidrBlock": "172.31.32.0/20",
"MapPublicIpOnLaunch": true,
"DefaultForAz": true,
"State": "available",
"AvailabilityZone": "eu-west-1b",
"SubnetId": "subnet-32998e5a",
"AvailableIpAddressCount": 4090
},
{
"VpcId": "vpc-c983c9ac",
"Tags": [
{
"Value": "MEE Encoder Subnet v1.0.816-mee",
"Key": "Name"
},
{
"Value": "2015-11-26:06:58:34",
"Key": "CreationDate"
}
],
"CidrBlock": "172.32.8.0/22",
"MapPublicIpOnLaunch": true,
"DefaultForAz": false,
"State": "available",
"AvailabilityZone": "eu-west-1c",
"SubnetId": "subnet-ed502cb4",
"AvailableIpAddressCount": 1019
}
]
}
var ec2Regions = {
"Regions": [
{
"Endpoint": "ec2.eu-west-1.amazonaws.com",
"RegionName": "eu-west-1"
},
{
"Endpoint": "ec2.ap-southeast-1.amazonaws.com",
"RegionName": "ap-southeast-1"
},
{
"Endpoint": "ec2.ap-southeast-2.amazonaws.com",
"RegionName": "ap-southeast-2"
},
{
"Endpoint": "ec2.eu-central-1.amazonaws.com",
"RegionName": "eu-central-1"
},
{
"Endpoint": "ec2.ap-northeast-2.amazonaws.com",
"RegionName": "ap-northeast-2"
},
{
"Endpoint": "ec2.ap-northeast-1.amazonaws.com",
"RegionName": "ap-northeast-1"
},
{
"Endpoint": "ec2.us-east-1.amazonaws.com",
"RegionName": "us-east-1"
},
{
"Endpoint": "ec2.sa-east-1.amazonaws.com",
"RegionName": "sa-east-1"
},
{
"Endpoint": "ec2.us-west-1.amazonaws.com",
"RegionName": "us-west-1"
},
{
"Endpoint": "ec2.us-west-2.amazonaws.com",
"RegionName": "us-west-2"
}
]
}
var ec2Vpcs = {
"Vpcs": [
{
"VpcId": "vpc-ee2e658b",
"InstanceTenancy": "default",
"Tags": [
{
"Value": "2015-11-23:19:43:32",
"Key": "CreationDate"
},
{
"Value": "MEE Encoder VPC v1.0.802-mee",
"Key": "Name"
}
],
"State": "available",
"DhcpOptionsId": "dopt-0b998e63",
"CidrBlock": "172.32.0.0/16",
"IsDefault": false
},
{
"VpcId": "vpc-fe94819b",
"InstanceTenancy": "default",
"Tags": [
{
"Value": "MEE Encoder VPC v1.0.817-mee",
"Key": "Name"
},
{
"Value": "2016-03-17:15:20:58",
"Key": "CreationDate"
}
],
"State": "available",
"DhcpOptionsId": "dopt-0b998e63",
"CidrBlock": "172.32.0.0/16",
"IsDefault": false
},
{
"VpcId": "vpc-a2d0acc7",
"InstanceTenancy": "default",
"Tags": [
{
"Value": "2015-10-20:18:33:56",
"Key": "CreationDate"
},
{
"Value": "MEE Encoder VPC v1.0.723-mee",
"Key": "Name"
}
],
"State": "available",
"DhcpOptionsId": "dopt-0b998e63",
"CidrBlock": "172.32.0.0/16",
"IsDefault": false
},
{
"VpcId": "vpc-30998e58",
"InstanceTenancy": "default",
"State": "available",
"DhcpOptionsId": "dopt-0b998e63",
"CidrBlock": "172.31.0.0/16",
"IsDefault": true
},
{
"VpcId": "vpc-c983c9ac",
"InstanceTenancy": "default",
"Tags": [
{
"Value": "2015-11-26:06:58:34",
"Key": "CreationDate"
},
{
"Value": "MEE Encoder VPC v1.0.816-mee",
"Key": "Name"
}
],
"State": "available",
"DhcpOptionsId": "dopt-0b998e63",
"CidrBlock": "172.32.0.0/16",
"IsDefault": false
}
]
}
var ec2AcctAttributes = {
"AccountAttributes": [
{
"AttributeName": "supported-platforms",
"AttributeValues": [
{
"AttributeValue": "VPC"
}
]
},
{
"AttributeName": "vpc-max-security-groups-per-interface",
"AttributeValues": [
{
"AttributeValue": "5"
}
]
},
{
"AttributeName": "max-elastic-ips",
"AttributeValues": [
{
"AttributeValue": "5"
}
]
},
{
"AttributeName": "max-instances",
"AttributeValues": [
{
"AttributeValue": "200"
}
]
},
{
"AttributeName": "vpc-max-elastic-ips",
"AttributeValues": [
{
"AttributeValue": "5"
}
]
},
{
"AttributeName": "default-vpc",
"AttributeValues": [
{
"AttributeValue": "vpc-30998e58"
}
]
}
]
}
var ec2Instances = {
"Reservations": [
{
"OwnerId": "922162411906",
"ReservationId": "r-ea9e114b",
"Groups": [],
"Instances": [
{
"Monitoring": {
"State": "disabled"
},
"PublicDnsName": "ec2-54-229-23-60.eu-west-1.compute.amazonaws.com",
"State": {
"Code": 16,
"Name": "running"
},
"EbsOptimized": false,
"LaunchTime": "2015-11-02T17:19:33.000Z",
"PublicIpAddress": "54.229.23.60",
"PrivateIpAddress": "172.31.44.218",
"ProductCodes": [
{
"ProductCodeId": "6x5jmcajty9edm3f211pqjfn2",
"ProductCodeType": "marketplace"
}
],
"VpcId": "vpc-30998e58",
"StateTransitionReason": "",
"InstanceId": "i-2c94c195",
"ImageId": "ami-7b033f0c",
"PrivateDnsName": "ip-172-31-44-218.eu-west-1.compute.internal",
"KeyName": "LinuxEncoder",
"SecurityGroups": [
{
"GroupName": "playlist_proxy",
"GroupId": "sg-f90cbf9d"
}
],
"ClientToken": "LoyoD1446484772417",
"SubnetId": "subnet-32998e5a",
"InstanceType": "t2.micro",
"NetworkInterfaces": [
{
"Status": "in-use",
"MacAddress": "06:9c:5c:fe:4e:d7",
"SourceDestCheck": true,
"VpcId": "vpc-30998e58",
"Description": "",
"Association": {
"PublicIp": "54.229.23.60",
"PublicDnsName": "ec2-54-229-23-60.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "922162411906"
},
"NetworkInterfaceId": "eni-e6926bae",
"PrivateIpAddresses": [
{
"PrivateDnsName": "ip-172-31-44-218.eu-west-1.compute.internal",
"Association": {
"PublicIp": "54.229.23.60",
"PublicDnsName": "ec2-54-229-23-60.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "922162411906"
},
"Primary": true,
"PrivateIpAddress": "172.31.44.218"
}
],
"PrivateDnsName": "ip-172-31-44-218.eu-west-1.compute.internal",
"Attachment": {
"Status": "attached",
"DeviceIndex": 0,
"DeleteOnTermination": true,
"AttachmentId": "eni-attach-22204f0e",
"AttachTime": "2015-11-02T17:19:33.000Z"
},
"Groups": [
{
"GroupName": "playlist_proxy",
"GroupId": "sg-f90cbf9d"
}
],
"SubnetId": "subnet-32998e5a",
"OwnerId": "922162411906",
"PrivateIpAddress": "172.31.44.218"
}
],
"SourceDestCheck": true,
"Placement": {
"Tenancy": "default",
"GroupName": "",
"AvailabilityZone": "eu-west-1b"
},
"Hypervisor": "xen",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Ebs": {
"Status": "attached",
"DeleteOnTermination": true,
"VolumeId": "vol-8948a27a",
"AttachTime": "2015-11-02T17:19:35.000Z"
}
}
],
"Architecture": "x86_64",
"RootDeviceType": "ebs",
"IamInstanceProfile": {
"Id": "AIPAJ3WY6DL3JB4BJQF4K",
"Arn": "arn:aws:iam::922162411906:instance-profile/vee_encoder"
},
"RootDeviceName": "/dev/sda1",
"VirtualizationType": "hvm",
"Tags": [
{
"Value": "HLS Playlist Proxy",
"Key": "Name"
}
],
"AmiLaunchIndex": 0
}
]
},
{
"OwnerId": "922162411906",
"ReservationId": "r-cd1c166b",
"Groups": [],
"Instances": [
{
"Monitoring": {
"State": "disabled"
},
"PublicDnsName": "ec2-52-16-253-139.eu-west-1.compute.amazonaws.com",
"State": {
"Code": 16,
"Name": "running"
},
"EbsOptimized": false,
"LaunchTime": "2016-04-08T08:50:09.000Z",
"PublicIpAddress": "52.16.253.139",
"PrivateIpAddress": "172.32.1.156",
"ProductCodes": [
{
"ProductCodeId": "6x5jmcajty9edm3f211pqjfn2",
"ProductCodeType": "marketplace"
}
],
"VpcId": "vpc-fe94819b",
"StateTransitionReason": "",
"InstanceId": "i-2a0877a2",
"ImageId": "ami-63850510",
"PrivateDnsName": "ip-172-32-1-156.eu-west-1.compute.internal",
"SecurityGroups": [
{
"GroupName": "default",
"GroupId": "sg-324d5856"
}
],
"ClientToken": "468757-105401-1460",
"SubnetId": "subnet-e78c7383",
"InstanceType": "c4.4xlarge",
"NetworkInterfaces": [
{
"Status": "in-use",
"MacAddress": "02:9a:92:7f:40:27",
"SourceDestCheck": true,
"VpcId": "vpc-fe94819b",
"Description": "",
"Association": {
"PublicIp": "52.16.253.139",
"PublicDnsName": "ec2-52-16-253-139.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "amazon"
},
"NetworkInterfaceId": "eni-c33c4aba",
"PrivateIpAddresses": [
{
"PrivateDnsName": "ip-172-32-1-156.eu-west-1.compute.internal",
"Association": {
"PublicIp": "52.16.253.139",
"PublicDnsName": "ec2-52-16-253-139.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "amazon"
},
"Primary": true,
"PrivateIpAddress": "172.32.1.156"
}
],
"PrivateDnsName": "ip-172-32-1-156.eu-west-1.compute.internal",
"Attachment": {
"Status": "attached",
"DeviceIndex": 0,
"DeleteOnTermination": true,
"AttachmentId": "eni-attach-17ae9df3",
"AttachTime": "2016-04-08T08:50:09.000Z"
},
"Groups": [
{
"GroupName": "default",
"GroupId": "sg-324d5856"
}
],
"SubnetId": "subnet-e78c7383",
"OwnerId": "922162411906",
"PrivateIpAddress": "172.32.1.156"
}
],
"SourceDestCheck": true,
"Placement": {
"Tenancy": "default",
"GroupName": "",
"AvailabilityZone": "eu-west-1a"
},
"Hypervisor": "xen",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Ebs": {
"Status": "attached",
"DeleteOnTermination": true,
"VolumeId": "vol-66d0efa4",
"AttachTime": "2016-04-08T08:50:09.000Z"
}
}
],
"Architecture": "x86_64",
"RootDeviceType": "ebs",
"IamInstanceProfile": {
"Id": "AIPAJ3WY6DL3JB4BJQF4K",
"Arn": "arn:aws:iam::922162411906:instance-profile/vee_encoder"
},
"RootDeviceName": "/dev/sda1",
"VirtualizationType": "hvm",
"Tags": [
{
"Value": "468757-105401-1460",
"Key": "Host"
},
{
"Value": "QA-A MEE Encoder",
"Key": "Name"
}
],
"AmiLaunchIndex": 0
}
]
},
{
"OwnerId": "922162411906",
"ReservationId": "r-fdf48c44",
"Groups": [],
"Instances": [
{
"Monitoring": {
"State": "disabled"
},
"PublicDnsName": "ec2-52-30-240-24.eu-west-1.compute.amazonaws.com",
"State": {
"Code": 16,
"Name": "running"
},
"EbsOptimized": false,
"LaunchTime": "2016-04-08T08:51:42.000Z",
"PublicIpAddress": "52.30.240.24",
"PrivateIpAddress": "172.32.4.126",
"ProductCodes": [
{
"ProductCodeId": "6x5jmcajty9edm3f211pqjfn2",
"ProductCodeType": "marketplace"
}
],
"VpcId": "vpc-fe94819b",
"StateTransitionReason": "",
"InstanceId": "i-a555da2f",
"ImageId": "ami-63850510",
"PrivateDnsName": "ip-172-32-4-126.eu-west-1.compute.internal",
"SecurityGroups": [
{
"GroupName": "default",
"GroupId": "sg-324d5856"
}
],
"ClientToken": "686600-105493-1460",
"SubnetId": "subnet-59789c2f",
"InstanceType": "c4.2xlarge",
"NetworkInterfaces": [
{
"Status": "in-use",
"MacAddress": "06:ca:44:8f:f4:f1",
"SourceDestCheck": true,
"VpcId": "vpc-fe94819b",
"Description": "",
"Association": {
"PublicIp": "52.30.240.24",
"PublicDnsName": "ec2-52-30-240-24.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "amazon"
},
"NetworkInterfaceId": "eni-2d2c2166",
"PrivateIpAddresses": [
{
"PrivateDnsName": "ip-172-32-4-126.eu-west-1.compute.internal",
"Association": {
"PublicIp": "52.30.240.24",
"PublicDnsName": "ec2-52-30-240-24.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "amazon"
},
"Primary": true,
"PrivateIpAddress": "172.32.4.126"
}
],
"PrivateDnsName": "ip-172-32-4-126.eu-west-1.compute.internal",
"Attachment": {
"Status": "attached",
"DeviceIndex": 0,
"DeleteOnTermination": true,
"AttachmentId": "eni-attach-9b461759",
"AttachTime": "2016-04-08T08:51:42.000Z"
},
"Groups": [
{
"GroupName": "default",
"GroupId": "sg-324d5856"
}
],
"SubnetId": "subnet-59789c2f",
"OwnerId": "922162411906",
"PrivateIpAddress": "172.32.4.126"
}
],
"SourceDestCheck": true,
"Placement": {
"Tenancy": "default",
"GroupName": "",
"AvailabilityZone": "eu-west-1b"
},
"Hypervisor": "xen",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Ebs": {
"Status": "attached",
"DeleteOnTermination": true,
"VolumeId": "vol-46c543b4",
"AttachTime": "2016-04-08T08:51:43.000Z"
}
}
],
"Architecture": "x86_64",
"RootDeviceType": "ebs",
"IamInstanceProfile": {
"Id": "AIPAJ3WY6DL3JB4BJQF4K",
"Arn": "arn:aws:iam::922162411906:instance-profile/vee_encoder"
},
"RootDeviceName": "/dev/sda1",
"VirtualizationType": "hvm",
"Tags": [
{
"Value": "QA-A MEE Encoder",
"Key": "Name"
},
{
"Value": "686600-105493-1460",
"Key": "Host"
}
],
"AmiLaunchIndex": 0
}
]
},
{
"OwnerId": "922162411906",
"ReservationId": "r-3ea80086",
"Groups": [],
"Instances": [
{
"Monitoring": {
"State": "disabled"
},
"PublicDnsName": "ec2-52-16-195-66.eu-west-1.compute.amazonaws.com",
"State": {
"Code": 16,
"Name": "running"
},
"EbsOptimized": false,
"LaunchTime": "2016-04-08T08:48:36.000Z",
"PublicIpAddress": "52.16.195.66",
"PrivateIpAddress": "172.32.8.123",
"ProductCodes": [
{
"ProductCodeId": "6x5jmcajty9edm3f211pqjfn2",
"ProductCodeType": "marketplace"
}
],
"VpcId": "vpc-fe94819b",
"StateTransitionReason": "",
"InstanceId": "i-efd10c63",
"ImageId": "ami-63850510",
"PrivateDnsName": "ip-172-32-8-123.eu-west-1.compute.internal",
"SecurityGroups": [
{
"GroupName": "default",
"GroupId": "sg-324d5856"
}
],
"ClientToken": "505051-105308-1460",
"SubnetId": "subnet-9bd5e9c2",
"InstanceType": "c4.4xlarge",
"NetworkInterfaces": [
{
"Status": "in-use",
"MacAddress": "0a:a3:cb:7c:23:61",
"SourceDestCheck": true,
"VpcId": "vpc-fe94819b",
"Description": "",
"Association": {
"PublicIp": "52.16.195.66",
"PublicDnsName": "ec2-52-16-195-66.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "amazon"
},
"NetworkInterfaceId": "eni-6f139532",
"PrivateIpAddresses": [
{
"PrivateDnsName": "ip-172-32-8-123.eu-west-1.compute.internal",
"Association": {
"PublicIp": "52.16.195.66",
"PublicDnsName": "ec2-52-16-195-66.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "amazon"
},
"Primary": true,
"PrivateIpAddress": "172.32.8.123"
}
],
"PrivateDnsName": "ip-172-32-8-123.eu-west-1.compute.internal",
"Attachment": {
"Status": "attached",
"DeviceIndex": 0,
"DeleteOnTermination": true,
"AttachmentId": "eni-attach-2cc40dd5",
"AttachTime": "2016-04-08T08:48:36.000Z"
},
"Groups": [
{
"GroupName": "default",
"GroupId": "sg-324d5856"
}
],
"SubnetId": "subnet-9bd5e9c2",
"OwnerId": "922162411906",
"PrivateIpAddress": "172.32.8.123"
}
],
"SourceDestCheck": true,
"Placement": {
"Tenancy": "default",
"GroupName": "",
"AvailabilityZone": "eu-west-1c"
},
"Hypervisor": "xen",