private static IMachineImage GetMachineImage(string machineImage, Dictionary <string, string> amiMap) { return((machineImage.ToLower()) switch { "genericlinux" => MachineImage.GenericLinux(amiMap), "genericwindows" => MachineImage.GenericWindows(amiMap), _ => throw new ArgumentException("No MachineImage argument was provided. Please put GenericLinux or GenericWindows"), });
internal static void LogObject(MachineImage image) { if (image == null) { return; } Console.WriteLine("Image Name:{0}", image.Name); Console.WriteLine("Image Uuid:{0}", image.Uuid); Console.WriteLine("Image Timestamp:{0}", image.Timestamp); Console.WriteLine("Image Label:{0}", image.Label); Console.WriteLine("Image Description:{0}", image.Description); Console.WriteLine("Image ParentImageName:{0}", image.ParentImageName); Console.WriteLine("Image ParentImageUuid:{0}", image.ParentUuid); Console.WriteLine("Image ParentImageTimestamp:{0}", image.ParentTimestamp); Console.WriteLine("Image Status:{0}", image.Status); Console.WriteLine("Image AffinityGroup:{0}", image.AffinityGroup); Console.WriteLine("Image Location:{0}", image.Location); Console.WriteLine("Image CompressedSizeInBytes:{0}", image.CompressedSizeInBytes); Console.WriteLine("Image MountedSizeInBytes:{0}", image.MountedSizeInBytes); }