Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstanceWithIAMRole ¶ added in v0.0.8
type InstanceWithIAMRole struct { Instance types.Instance `json:"instance" yaml:"instance"` IAMRoles []string `json:"iam_roles,omitempty" yaml:"iam_roles,omitempty"` }
InstanceWithIAMRole represents an EC2 instance along with its associated IAM role
type Instances ¶
type Instances struct {
EC2Instances []InstanceWithIAMRole `json:"ec2_instances" yaml:"ec2_instances"`
}
Instances represents all of the EC2 instances that were returned during the reporting process
type ResourceReport ¶
type ResourceReport struct { AccountID string `json:"account_id" yaml:"account_id"` Resources Instances `json:"resources" yaml:"resources"` Errors []string `json:"errors" yaml:"errors"` }
ResourceReport contains the EC2 instances and any errors that occurred during the execution of the `methodaws ec2 enumerate` subcommand. Non-fatal errors are stored in the Errors field.
func EnumerateEc2 ¶
EnumerateEc2 enumerates all of the EC2 instances that the caller has access to. It returns a ResourceReport struct that contains the EC2 instances and any non-fatal errors that occurred during the execution of the subcommand.
type SecurityGroupReport ¶
type SecurityGroupReport struct { AccountID string `json:"account_id" yaml:"account_id"` SecurityGroups []types.SecurityGroup `json:"security_groups" yaml:"security_groups"` Errors []string `json:"errors" yaml:"errors"` }
SecurityGroupReport contains the security groups and any errors that occurred during the execution of the `methodaws securitygroup enumerate` subcommand. Non-fatal errors are stored in the Errors field.
func EnumerateSecurityGroups ¶
func EnumerateSecurityGroups(ctx context.Context, cfg aws.Config, vpcID *string) (SecurityGroupReport, error)
EnumerateSecurityGroups lists all of the security groups available to the caller alongside any non-fatal errors that occurred during the execution of the `methodaws securitygroup enumerate` subcommand. If vpcID is not nil, it will only return security groups associated with that VPC.