Fugue.AWS.EC2.FlowLog

This is the preferred interface for making Flow Log resources with Fugue. If you want to manage a Flow Log with Fugue, the new and batch functions are the right place to start.

Module Members

batch

(Function)

Use this function to simultaneously create Flow Logs on multiple resources with the same settings. Example usage:

flow-logs: FlowLog.batch {
    resources: [
        FlowLog.vpc(my-vpc),
        FlowLog.networkInterface(my-ni),
        FlowLog.subnet(my-subnet)
        ],
    logGroup: my-log-group,
    role: my-role,
    trafficType: EC2.Accept
}

Type Signature

 fun { resources: List<FlowLogResource>,
       logGroup: LogGroup,
       role: Role,
       trafficType: FlowLogTrafficType} -> List<FlowLog>
Argument: resources

A list of Network Interfaces, Subnets, and/or VPCs.

Type: List<FlowLogResource>

Argument: logGroup

The CloudWatch Log Group.

Type: LogGroup

Argument: role

The IAM Role that’s used to post flow logs to the CloudWatch Logs Log Group.

Type: Role

Argument: trafficType

The type of traffic to log.

Type: FlowLogTrafficType

Returns:

A List of Fugue.Core.AWS.EC2.FlowLog values.

Type: List<FlowLog>

new

(Function)

new EC2 FlowLog (Constructor)

Call this constructor to create a new Fugue.Core.AWS.EC2.FlowLog value. To use the same Flow Log settings on multiple EC2 resources simultaneously, consider using batch

Type Signature

 fun { resource: FlowLogResource,
       logGroup: LogGroup,
       role: Role,
       trafficType: FlowLogTrafficType,
       resourceId: Optional<String> } -> FlowLog
Argument: resource

A Network Interface, Subnet, or VPC.

Type: FlowLogResource

Argument: logGroup

The CloudWatch Log Group.

Type: LogGroup

Argument: role

The IAM Role that’s used to post flow logs to the CloudWatch Logs Log Group.

Type: Role

Argument: trafficType

The type of traffic to log.

Type: FlowLogTrafficType

Argument: resourceId

Resource ID of the resource to import with Fugue Import. This field is only honored on fugue run. The resource ID is the AWS ID. Mutable. Example: fl-1234abcd

Type: Optional<String>

Returns:

A Fugue.Core.AWS.EC2.FlowLog value.

Type: FlowLog