Hi,

I use below code snippet to fetch images with filters by owners and
virtualization-type,

Any thought how can i add filters with operating system.

I did searched from which platform filter helps in doing so but only for
windows machine,

How can i do it for ubuntu and  centOS images ?

Also how can i fetch community images

Please let me know if there are any other filters by any chance

```
EC2Api ec2 = computeServiceContext.unwrapApi(EC2Api.class);
Optional<? extends AMIApi> amiApiforRegion= ec2.getAMIApiForRegion(region);

Multimap<String, String> filterMap = ArrayListMultimap.create();
filterMap.put("virtualization-type", "hvm");
filterMap.put("owner-alias", owner);

AMIApi amiapi = amiApiforRegion.get();
Set<? extends Image> imageList =
amiapi.describeImagesInRegionWithFilter(region, ImmutableMultimap.<String,
String>builder()
.putAll(filterMap)
.build());
ListImagesRes imageResObj;
for (Image img : imageList) {
                                    }

```

Thanks and Regards,
Poornima.BS

Reply via email to