AWSInstanceType¶
This parser simply reads the output of command
curl -s http://169.254.169.254/latest/meta-data/instance-type
,
which is used to check the type of the AWS instance on the host.
-
class
insights.parsers.aws_instance_type.
AWSInstanceType
(context, extra_bad_lines=[])[source]¶ Bases:
insights.core.CommandParser
Class for parsing the AWS Instance type returned by command
curl -s http://169.254.169.254/latest/meta-data/instance-type
Typical output of this command is:
r3.xlarge
- Raises
SkipException -- When content is empty or no parse-able content.
ParseException -- When type cannot be recognized.
-
type
¶ The name of AWS instance type in all uppercase letters. E.g. R3, R4, R5, or X1.
- Type
str
-
raw
¶ The fully type string returned by the
curl
command.- Type
str
Examples
>>> aws_inst.type 'R3' >>> aws_inst.raw 'r3.xlarge'