os_detector#

Detect the OS type of an AMI.

class simple_aws_ec2.os_detector.ImageOSTypeEnum(value)[source]#

Reference:

simple_aws_ec2.os_detector.is_os_type(text: str, os_type: ImageOSTypeEnum) bool[source]#

Identify if the text only contains the keyword of the given OS type.

simple_aws_ec2.os_detector.detect_os_type(name: str, description: Optional[str] = None) ImageOSTypeEnum[source]#

Try to use the image name and description to determine the OS type. If the OS type cannot be determined, raise CannotDetectOSTypeError.

See https://docs.google.com/spreadsheets/d/1m4MNzkUBm5c8RgZLqIcn277jk_AQOUJC71PEQf9ShjE/edit?gid=0#gid=0

Parameters:
  • name – ami name

  • description – ami description

Returns:

an ImageOSTypeEnum object.