vpc_flow_log

package
v0.10.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const VpcFlowLogTableIdentifier = "aws_vpc_flow_log"

Variables

This section is empty.

Functions

func ConvertToMapSlice

func ConvertToMapSlice(data string) ([]map[string]string, error)

ConvertToMapSlice converts space-separated string data into a slice of map[string]string

func NewVPCFlowLogExtractor

func NewVPCFlowLogExtractor() artifact_source.Extractor

NewVPCFlowLogExtractor creates a new VPCFlowLogExtractor

Types

type VPCFlowLogExtractor

type VPCFlowLogExtractor struct {
}

VPCFlowLogExtractor is an extractor that receives JSON serialised VPCFlowLogBatch objects and extracts VPCFlowLog records from them

func (*VPCFlowLogExtractor) Extract

func (c *VPCFlowLogExtractor) Extract(_ context.Context, a any) ([]any, error)

Extract unmarshalls the artifact data as an VPCFlowLogBatch and returns the VPCFlowLog records

func (*VPCFlowLogExtractor) Identifier

func (c *VPCFlowLogExtractor) Identifier() string

type VpcFlowLog

type VpcFlowLog struct {
	// embed required enrichment fields
	schema.CommonFields

	AccountID               *string    `json:"account_id,omitempty"`
	Action                  *string    `json:"action,omitempty"`
	AzID                    *string    `json:"az_id,omitempty"`
	Bytes                   *int64     `json:"bytes,omitempty"`
	DstAddr                 *string    `json:"dst_addr,omitempty"`
	DstPort                 *int32     `json:"dst_port,omitempty"`
	ECSClusterARN           *string    `json:"ecs_cluster_arn,omitempty"`
	ECSClusterName          *string    `json:"ecs_cluster_name,omitempty"`
	ECSContainerID          *string    `json:"ecs_container_id,omitempty"`
	ECSContainerInstanceARN *string    `json:"ecs_container_instance_arn,omitempty"`
	ECSContainerInstanceID  *string    `json:"ecs_container_instance_id,omitempty"`
	ECSSecondContainerID    *string    `json:"ecs_second_container_id,omitempty"`
	ECSServiceName          *string    `json:"ecs_service_name,omitempty"`
	ECSTaskARN              *string    `json:"ecs_task_arn,omitempty"`
	ECSTaskDefinitionARN    *string    `json:"ecs_task_definition_arn,omitempty"`
	ECSTaskID               *string    `json:"ecs_task_id,omitempty"`
	End                     *time.Time `json:"end_time,omitempty"`
	FlowDirection           *string    `json:"flow_direction,omitempty"`
	InstanceID              *string    `json:"instance_id,omitempty"`
	InterfaceID             *string    `json:"interface_id,omitempty"`
	LogStatus               *string    `json:"log_status,omitempty"`
	Packets                 *int64     `json:"packets,omitempty"`
	PktDstAddr              *string    `json:"pkt_dst_addr,omitempty"`
	PktDstAWSService        *string    `json:"pkt_dst_aws_service,omitempty"`
	PktSrcAddr              *string    `json:"pkt_src_addr,omitempty"`
	PktSrcAWSService        *string    `json:"pkt_src_aws_service,omitempty"`
	Protocol                *int32     `json:"protocol,omitempty"`
	Region                  *string    `json:"region,omitempty"`
	RejectReason            *string    `json:"reject_reason,omitempty"`
	SrcAddr                 *string    `json:"src_addr,omitempty"`
	SrcPort                 *int32     `json:"src_port,omitempty"`
	Start                   *time.Time `json:"start_time,omitempty"`
	SublocationID           *string    `json:"sublocation_id,omitempty"`
	SublocationType         *string    `json:"sublocation_type,omitempty"`
	SubnetID                *string    `json:"subnet_id,omitempty"`
	TCPFlags                *int32     `json:"tcp_flags,omitempty"`
	TrafficPath             *int32     `json:"traffic_path,omitempty"`
	Type                    *string    `json:"type,omitempty"`
	Version                 *int32     `json:"version,omitempty"`
	VPCID                   *string    `json:"vpc_id,omitempty"`
}

func (*VpcFlowLog) GetColumnDescriptions

func (c *VpcFlowLog) GetColumnDescriptions() map[string]string

func (*VpcFlowLog) MapValues

func (flowLog *VpcFlowLog) MapValues(input map[string]string) error

MapValues splits the input string and assigns each word to a corresponding key in the slice

type VpcFlowLogTable

type VpcFlowLogTable struct{}

VpcFlowLogTable - table for VPC Flow Logs

func (*VpcFlowLogTable) EnrichRow

func (c *VpcFlowLogTable) EnrichRow(row *VpcFlowLog, sourceEnrichmentFields schema.SourceEnrichment) (*VpcFlowLog, error)

EnrichRow implements table.Table

func (*VpcFlowLogTable) GetDescription added in v0.8.0

func (c *VpcFlowLogTable) GetDescription() string

func (*VpcFlowLogTable) GetSourceMetadata

func (c *VpcFlowLogTable) GetSourceMetadata() ([]*table.SourceMetadata[*VpcFlowLog], error)

func (*VpcFlowLogTable) Identifier

func (c *VpcFlowLogTable) Identifier() string

Identifier implements table.Table

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL