amazonka-ec2-1.3.1: Amazon Elastic Compute Cloud SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <>
Portabilitynon-portable (GHC extensions)
Safe HaskellNone




Creates one or more flow logs to capture IP traffic for a specific network interface, subnet, or VPC. Flow logs are delivered to a specified log group in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, a log stream is created in CloudWatch Logs for each network interface in the subnet or VPC. Log streams can include information about accepted and rejected traffic to a network interface. You can view the data in your log streams using Amazon CloudWatch Logs.

In your request, you must also specify an IAM role that has permission to publish logs to CloudWatch Logs.

See: AWS API Reference for CreateFlowLogs.


Creating a Request

Request Lenses

cflClientToken :: Lens' CreateFlowLogs (Maybe Text) Source

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency.

cflResourceIds :: Lens' CreateFlowLogs [Text] Source

One or more subnet, network interface, or VPC IDs.

cflResourceType :: Lens' CreateFlowLogs FlowLogsResourceType Source

The type of resource on which to create the flow log.

cflTrafficType :: Lens' CreateFlowLogs TrafficType Source

The type of traffic to log.

cflLogGroupName :: Lens' CreateFlowLogs Text Source

The name of the CloudWatch log group.

cflDeliverLogsPermissionARN :: Lens' CreateFlowLogs Text Source

The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs log group.

Destructuring the Response

createFlowLogsResponse Source

Creates a value of CreateFlowLogsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

cflrsUnsuccessful :: Lens' CreateFlowLogsResponse [UnsuccessfulItem] Source

Information about the flow logs that could not be created successfully.

cflrsClientToken :: Lens' CreateFlowLogsResponse (Maybe Text) Source

Unique, case-sensitive identifier you provide to ensure the idempotency of the request.