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

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.CreateFlowLogs

Contents

Description

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.

For more information, see VPC Flow Logs in the Amazon Virtual Private Cloud User Guide .

Synopsis

Creating a Request

createFlowLogs #

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

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

data CreateFlowLogs #

Contains the parameters for CreateFlowLogs.

See: createFlowLogs smart constructor.

Instances
Eq CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Data CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateFlowLogs -> c CreateFlowLogs #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateFlowLogs #

toConstr :: CreateFlowLogs -> Constr #

dataTypeOf :: CreateFlowLogs -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CreateFlowLogs) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateFlowLogs) #

gmapT :: (forall b. Data b => b -> b) -> CreateFlowLogs -> CreateFlowLogs #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateFlowLogs -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateFlowLogs -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateFlowLogs -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateFlowLogs -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateFlowLogs -> m CreateFlowLogs #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFlowLogs -> m CreateFlowLogs #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFlowLogs -> m CreateFlowLogs #

Read CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Show CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Generic CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Associated Types

type Rep CreateFlowLogs :: Type -> Type #

Hashable CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

AWSRequest CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Associated Types

type Rs CreateFlowLogs :: Type #

ToHeaders CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

ToPath CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

ToQuery CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

NFData CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Methods

rnf :: CreateFlowLogs -> () #

type Rep CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

type Rep CreateFlowLogs = D1 (MetaData "CreateFlowLogs" "Network.AWS.EC2.CreateFlowLogs" "amazonka-ec2-1.6.1-H98Zd65xIYr2z4e5UhW9ck" False) (C1 (MetaCons "CreateFlowLogs'" PrefixI True) ((S1 (MetaSel (Just "_cflClientToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_cflDeliverLogsPermissionARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_cflLogGroupName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) :*: (S1 (MetaSel (Just "_cflResourceIds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Text]) :*: (S1 (MetaSel (Just "_cflResourceType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 FlowLogsResourceType) :*: S1 (MetaSel (Just "_cflTrafficType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 TrafficType)))))
type Rs CreateFlowLogs # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Request Lenses

cflClientToken :: Lens' CreateFlowLogs (Maybe Text) #

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

cflDeliverLogsPermissionARN :: Lens' CreateFlowLogs Text #

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

cflLogGroupName :: Lens' CreateFlowLogs Text #

The name of the CloudWatch log group.

cflResourceIds :: Lens' CreateFlowLogs [Text] #

One or more subnet, network interface, or VPC IDs. Constraints: Maximum of 1000 resources

cflResourceType :: Lens' CreateFlowLogs FlowLogsResourceType #

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

cflTrafficType :: Lens' CreateFlowLogs TrafficType #

The type of traffic to log.

Destructuring the Response

createFlowLogsResponse #

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:

data CreateFlowLogsResponse #

Contains the output of CreateFlowLogs.

See: createFlowLogsResponse smart constructor.

Instances
Eq CreateFlowLogsResponse # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Data CreateFlowLogsResponse # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateFlowLogsResponse -> c CreateFlowLogsResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateFlowLogsResponse #

toConstr :: CreateFlowLogsResponse -> Constr #

dataTypeOf :: CreateFlowLogsResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CreateFlowLogsResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateFlowLogsResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateFlowLogsResponse -> CreateFlowLogsResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateFlowLogsResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateFlowLogsResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateFlowLogsResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateFlowLogsResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateFlowLogsResponse -> m CreateFlowLogsResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFlowLogsResponse -> m CreateFlowLogsResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFlowLogsResponse -> m CreateFlowLogsResponse #

Read CreateFlowLogsResponse # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Show CreateFlowLogsResponse # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Generic CreateFlowLogsResponse # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Associated Types

type Rep CreateFlowLogsResponse :: Type -> Type #

NFData CreateFlowLogsResponse # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

Methods

rnf :: CreateFlowLogsResponse -> () #

type Rep CreateFlowLogsResponse # 
Instance details

Defined in Network.AWS.EC2.CreateFlowLogs

type Rep CreateFlowLogsResponse = D1 (MetaData "CreateFlowLogsResponse" "Network.AWS.EC2.CreateFlowLogs" "amazonka-ec2-1.6.1-H98Zd65xIYr2z4e5UhW9ck" False) (C1 (MetaCons "CreateFlowLogsResponse'" PrefixI True) ((S1 (MetaSel (Just "_cflrsUnsuccessful") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [UnsuccessfulItem])) :*: S1 (MetaSel (Just "_cflrsClientToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_cflrsFlowLogIds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 (MetaSel (Just "_cflrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

cflrsUnsuccessful :: Lens' CreateFlowLogsResponse [UnsuccessfulItem] #

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

cflrsClientToken :: Lens' CreateFlowLogsResponse (Maybe Text) #

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

cflrsFlowLogIds :: Lens' CreateFlowLogsResponse [Text] #

The IDs of the flow logs.

cflrsResponseStatus :: Lens' CreateFlowLogsResponse Int #

  • - | The response status code.