{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.EC2.CreateFlowLogs
(
CreateFlowLogs (..),
newCreateFlowLogs,
createFlowLogs_clientToken,
createFlowLogs_deliverCrossAccountRole,
createFlowLogs_deliverLogsPermissionArn,
createFlowLogs_destinationOptions,
createFlowLogs_dryRun,
createFlowLogs_logDestination,
createFlowLogs_logDestinationType,
createFlowLogs_logFormat,
createFlowLogs_logGroupName,
createFlowLogs_maxAggregationInterval,
createFlowLogs_tagSpecifications,
createFlowLogs_trafficType,
createFlowLogs_resourceIds,
createFlowLogs_resourceType,
CreateFlowLogsResponse (..),
newCreateFlowLogsResponse,
createFlowLogsResponse_clientToken,
createFlowLogsResponse_flowLogIds,
createFlowLogsResponse_unsuccessful,
createFlowLogsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateFlowLogs = CreateFlowLogs'
{
CreateFlowLogs -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateFlowLogs -> Maybe Text
deliverCrossAccountRole :: Prelude.Maybe Prelude.Text,
CreateFlowLogs -> Maybe Text
deliverLogsPermissionArn :: Prelude.Maybe Prelude.Text,
CreateFlowLogs -> Maybe DestinationOptionsRequest
destinationOptions :: Prelude.Maybe DestinationOptionsRequest,
CreateFlowLogs -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
CreateFlowLogs -> Maybe Text
logDestination :: Prelude.Maybe Prelude.Text,
CreateFlowLogs -> Maybe LogDestinationType
logDestinationType :: Prelude.Maybe LogDestinationType,
CreateFlowLogs -> Maybe Text
logFormat :: Prelude.Maybe Prelude.Text,
CreateFlowLogs -> Maybe Text
logGroupName :: Prelude.Maybe Prelude.Text,
CreateFlowLogs -> Maybe Int
maxAggregationInterval :: Prelude.Maybe Prelude.Int,
CreateFlowLogs -> Maybe [TagSpecification]
tagSpecifications :: Prelude.Maybe [TagSpecification],
CreateFlowLogs -> Maybe TrafficType
trafficType :: Prelude.Maybe TrafficType,
CreateFlowLogs -> [Text]
resourceIds :: [Prelude.Text],
CreateFlowLogs -> FlowLogsResourceType
resourceType :: FlowLogsResourceType
}
deriving (CreateFlowLogs -> CreateFlowLogs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFlowLogs -> CreateFlowLogs -> Bool
$c/= :: CreateFlowLogs -> CreateFlowLogs -> Bool
== :: CreateFlowLogs -> CreateFlowLogs -> Bool
$c== :: CreateFlowLogs -> CreateFlowLogs -> Bool
Prelude.Eq, ReadPrec [CreateFlowLogs]
ReadPrec CreateFlowLogs
Int -> ReadS CreateFlowLogs
ReadS [CreateFlowLogs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFlowLogs]
$creadListPrec :: ReadPrec [CreateFlowLogs]
readPrec :: ReadPrec CreateFlowLogs
$creadPrec :: ReadPrec CreateFlowLogs
readList :: ReadS [CreateFlowLogs]
$creadList :: ReadS [CreateFlowLogs]
readsPrec :: Int -> ReadS CreateFlowLogs
$creadsPrec :: Int -> ReadS CreateFlowLogs
Prelude.Read, Int -> CreateFlowLogs -> ShowS
[CreateFlowLogs] -> ShowS
CreateFlowLogs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFlowLogs] -> ShowS
$cshowList :: [CreateFlowLogs] -> ShowS
show :: CreateFlowLogs -> String
$cshow :: CreateFlowLogs -> String
showsPrec :: Int -> CreateFlowLogs -> ShowS
$cshowsPrec :: Int -> CreateFlowLogs -> ShowS
Prelude.Show, forall x. Rep CreateFlowLogs x -> CreateFlowLogs
forall x. CreateFlowLogs -> Rep CreateFlowLogs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFlowLogs x -> CreateFlowLogs
$cfrom :: forall x. CreateFlowLogs -> Rep CreateFlowLogs x
Prelude.Generic)
newCreateFlowLogs ::
FlowLogsResourceType ->
CreateFlowLogs
newCreateFlowLogs :: FlowLogsResourceType -> CreateFlowLogs
newCreateFlowLogs FlowLogsResourceType
pResourceType_ =
CreateFlowLogs'
{ $sel:clientToken:CreateFlowLogs' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
$sel:deliverCrossAccountRole:CreateFlowLogs' :: Maybe Text
deliverCrossAccountRole = forall a. Maybe a
Prelude.Nothing,
$sel:deliverLogsPermissionArn:CreateFlowLogs' :: Maybe Text
deliverLogsPermissionArn = forall a. Maybe a
Prelude.Nothing,
$sel:destinationOptions:CreateFlowLogs' :: Maybe DestinationOptionsRequest
destinationOptions = forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:CreateFlowLogs' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:logDestination:CreateFlowLogs' :: Maybe Text
logDestination = forall a. Maybe a
Prelude.Nothing,
$sel:logDestinationType:CreateFlowLogs' :: Maybe LogDestinationType
logDestinationType = forall a. Maybe a
Prelude.Nothing,
$sel:logFormat:CreateFlowLogs' :: Maybe Text
logFormat = forall a. Maybe a
Prelude.Nothing,
$sel:logGroupName:CreateFlowLogs' :: Maybe Text
logGroupName = forall a. Maybe a
Prelude.Nothing,
$sel:maxAggregationInterval:CreateFlowLogs' :: Maybe Int
maxAggregationInterval = forall a. Maybe a
Prelude.Nothing,
$sel:tagSpecifications:CreateFlowLogs' :: Maybe [TagSpecification]
tagSpecifications = forall a. Maybe a
Prelude.Nothing,
$sel:trafficType:CreateFlowLogs' :: Maybe TrafficType
trafficType = forall a. Maybe a
Prelude.Nothing,
$sel:resourceIds:CreateFlowLogs' :: [Text]
resourceIds = forall a. Monoid a => a
Prelude.mempty,
$sel:resourceType:CreateFlowLogs' :: FlowLogsResourceType
resourceType = FlowLogsResourceType
pResourceType_
}
createFlowLogs_clientToken :: Lens.Lens' CreateFlowLogs (Prelude.Maybe Prelude.Text)
createFlowLogs_clientToken :: Lens' CreateFlowLogs (Maybe Text)
createFlowLogs_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe Text
a -> CreateFlowLogs
s {$sel:clientToken:CreateFlowLogs' :: Maybe Text
clientToken = Maybe Text
a} :: CreateFlowLogs)
createFlowLogs_deliverCrossAccountRole :: Lens.Lens' CreateFlowLogs (Prelude.Maybe Prelude.Text)
createFlowLogs_deliverCrossAccountRole :: Lens' CreateFlowLogs (Maybe Text)
createFlowLogs_deliverCrossAccountRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe Text
deliverCrossAccountRole :: Maybe Text
$sel:deliverCrossAccountRole:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
deliverCrossAccountRole} -> Maybe Text
deliverCrossAccountRole) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe Text
a -> CreateFlowLogs
s {$sel:deliverCrossAccountRole:CreateFlowLogs' :: Maybe Text
deliverCrossAccountRole = Maybe Text
a} :: CreateFlowLogs)
createFlowLogs_deliverLogsPermissionArn :: Lens.Lens' CreateFlowLogs (Prelude.Maybe Prelude.Text)
createFlowLogs_deliverLogsPermissionArn :: Lens' CreateFlowLogs (Maybe Text)
createFlowLogs_deliverLogsPermissionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe Text
deliverLogsPermissionArn :: Maybe Text
$sel:deliverLogsPermissionArn:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
deliverLogsPermissionArn} -> Maybe Text
deliverLogsPermissionArn) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe Text
a -> CreateFlowLogs
s {$sel:deliverLogsPermissionArn:CreateFlowLogs' :: Maybe Text
deliverLogsPermissionArn = Maybe Text
a} :: CreateFlowLogs)
createFlowLogs_destinationOptions :: Lens.Lens' CreateFlowLogs (Prelude.Maybe DestinationOptionsRequest)
createFlowLogs_destinationOptions :: Lens' CreateFlowLogs (Maybe DestinationOptionsRequest)
createFlowLogs_destinationOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe DestinationOptionsRequest
destinationOptions :: Maybe DestinationOptionsRequest
$sel:destinationOptions:CreateFlowLogs' :: CreateFlowLogs -> Maybe DestinationOptionsRequest
destinationOptions} -> Maybe DestinationOptionsRequest
destinationOptions) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe DestinationOptionsRequest
a -> CreateFlowLogs
s {$sel:destinationOptions:CreateFlowLogs' :: Maybe DestinationOptionsRequest
destinationOptions = Maybe DestinationOptionsRequest
a} :: CreateFlowLogs)
createFlowLogs_dryRun :: Lens.Lens' CreateFlowLogs (Prelude.Maybe Prelude.Bool)
createFlowLogs_dryRun :: Lens' CreateFlowLogs (Maybe Bool)
createFlowLogs_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:CreateFlowLogs' :: CreateFlowLogs -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe Bool
a -> CreateFlowLogs
s {$sel:dryRun:CreateFlowLogs' :: Maybe Bool
dryRun = Maybe Bool
a} :: CreateFlowLogs)
createFlowLogs_logDestination :: Lens.Lens' CreateFlowLogs (Prelude.Maybe Prelude.Text)
createFlowLogs_logDestination :: Lens' CreateFlowLogs (Maybe Text)
createFlowLogs_logDestination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe Text
logDestination :: Maybe Text
$sel:logDestination:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
logDestination} -> Maybe Text
logDestination) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe Text
a -> CreateFlowLogs
s {$sel:logDestination:CreateFlowLogs' :: Maybe Text
logDestination = Maybe Text
a} :: CreateFlowLogs)
createFlowLogs_logDestinationType :: Lens.Lens' CreateFlowLogs (Prelude.Maybe LogDestinationType)
createFlowLogs_logDestinationType :: Lens' CreateFlowLogs (Maybe LogDestinationType)
createFlowLogs_logDestinationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe LogDestinationType
logDestinationType :: Maybe LogDestinationType
$sel:logDestinationType:CreateFlowLogs' :: CreateFlowLogs -> Maybe LogDestinationType
logDestinationType} -> Maybe LogDestinationType
logDestinationType) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe LogDestinationType
a -> CreateFlowLogs
s {$sel:logDestinationType:CreateFlowLogs' :: Maybe LogDestinationType
logDestinationType = Maybe LogDestinationType
a} :: CreateFlowLogs)
createFlowLogs_logFormat :: Lens.Lens' CreateFlowLogs (Prelude.Maybe Prelude.Text)
createFlowLogs_logFormat :: Lens' CreateFlowLogs (Maybe Text)
createFlowLogs_logFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe Text
logFormat :: Maybe Text
$sel:logFormat:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
logFormat} -> Maybe Text
logFormat) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe Text
a -> CreateFlowLogs
s {$sel:logFormat:CreateFlowLogs' :: Maybe Text
logFormat = Maybe Text
a} :: CreateFlowLogs)
createFlowLogs_logGroupName :: Lens.Lens' CreateFlowLogs (Prelude.Maybe Prelude.Text)
createFlowLogs_logGroupName :: Lens' CreateFlowLogs (Maybe Text)
createFlowLogs_logGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe Text
logGroupName :: Maybe Text
$sel:logGroupName:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
logGroupName} -> Maybe Text
logGroupName) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe Text
a -> CreateFlowLogs
s {$sel:logGroupName:CreateFlowLogs' :: Maybe Text
logGroupName = Maybe Text
a} :: CreateFlowLogs)
createFlowLogs_maxAggregationInterval :: Lens.Lens' CreateFlowLogs (Prelude.Maybe Prelude.Int)
createFlowLogs_maxAggregationInterval :: Lens' CreateFlowLogs (Maybe Int)
createFlowLogs_maxAggregationInterval = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe Int
maxAggregationInterval :: Maybe Int
$sel:maxAggregationInterval:CreateFlowLogs' :: CreateFlowLogs -> Maybe Int
maxAggregationInterval} -> Maybe Int
maxAggregationInterval) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe Int
a -> CreateFlowLogs
s {$sel:maxAggregationInterval:CreateFlowLogs' :: Maybe Int
maxAggregationInterval = Maybe Int
a} :: CreateFlowLogs)
createFlowLogs_tagSpecifications :: Lens.Lens' CreateFlowLogs (Prelude.Maybe [TagSpecification])
createFlowLogs_tagSpecifications :: Lens' CreateFlowLogs (Maybe [TagSpecification])
createFlowLogs_tagSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe [TagSpecification]
tagSpecifications :: Maybe [TagSpecification]
$sel:tagSpecifications:CreateFlowLogs' :: CreateFlowLogs -> Maybe [TagSpecification]
tagSpecifications} -> Maybe [TagSpecification]
tagSpecifications) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe [TagSpecification]
a -> CreateFlowLogs
s {$sel:tagSpecifications:CreateFlowLogs' :: Maybe [TagSpecification]
tagSpecifications = Maybe [TagSpecification]
a} :: CreateFlowLogs) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFlowLogs_trafficType :: Lens.Lens' CreateFlowLogs (Prelude.Maybe TrafficType)
createFlowLogs_trafficType :: Lens' CreateFlowLogs (Maybe TrafficType)
createFlowLogs_trafficType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {Maybe TrafficType
trafficType :: Maybe TrafficType
$sel:trafficType:CreateFlowLogs' :: CreateFlowLogs -> Maybe TrafficType
trafficType} -> Maybe TrafficType
trafficType) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} Maybe TrafficType
a -> CreateFlowLogs
s {$sel:trafficType:CreateFlowLogs' :: Maybe TrafficType
trafficType = Maybe TrafficType
a} :: CreateFlowLogs)
createFlowLogs_resourceIds :: Lens.Lens' CreateFlowLogs [Prelude.Text]
createFlowLogs_resourceIds :: Lens' CreateFlowLogs [Text]
createFlowLogs_resourceIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {[Text]
resourceIds :: [Text]
$sel:resourceIds:CreateFlowLogs' :: CreateFlowLogs -> [Text]
resourceIds} -> [Text]
resourceIds) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} [Text]
a -> CreateFlowLogs
s {$sel:resourceIds:CreateFlowLogs' :: [Text]
resourceIds = [Text]
a} :: CreateFlowLogs) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFlowLogs_resourceType :: Lens.Lens' CreateFlowLogs FlowLogsResourceType
createFlowLogs_resourceType :: Lens' CreateFlowLogs FlowLogsResourceType
createFlowLogs_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogs' {FlowLogsResourceType
resourceType :: FlowLogsResourceType
$sel:resourceType:CreateFlowLogs' :: CreateFlowLogs -> FlowLogsResourceType
resourceType} -> FlowLogsResourceType
resourceType) (\s :: CreateFlowLogs
s@CreateFlowLogs' {} FlowLogsResourceType
a -> CreateFlowLogs
s {$sel:resourceType:CreateFlowLogs' :: FlowLogsResourceType
resourceType = FlowLogsResourceType
a} :: CreateFlowLogs)
instance Core.AWSRequest CreateFlowLogs where
type
AWSResponse CreateFlowLogs =
CreateFlowLogsResponse
request :: (Service -> Service) -> CreateFlowLogs -> Request CreateFlowLogs
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateFlowLogs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFlowLogs)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text
-> Maybe [Text]
-> Maybe [UnsuccessfulItem]
-> Int
-> CreateFlowLogsResponse
CreateFlowLogsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"clientToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"flowLogIdSet"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"unsuccessful"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateFlowLogs where
hashWithSalt :: Int -> CreateFlowLogs -> Int
hashWithSalt Int
_salt CreateFlowLogs' {[Text]
Maybe Bool
Maybe Int
Maybe [TagSpecification]
Maybe Text
Maybe DestinationOptionsRequest
Maybe LogDestinationType
Maybe TrafficType
FlowLogsResourceType
resourceType :: FlowLogsResourceType
resourceIds :: [Text]
trafficType :: Maybe TrafficType
tagSpecifications :: Maybe [TagSpecification]
maxAggregationInterval :: Maybe Int
logGroupName :: Maybe Text
logFormat :: Maybe Text
logDestinationType :: Maybe LogDestinationType
logDestination :: Maybe Text
dryRun :: Maybe Bool
destinationOptions :: Maybe DestinationOptionsRequest
deliverLogsPermissionArn :: Maybe Text
deliverCrossAccountRole :: Maybe Text
clientToken :: Maybe Text
$sel:resourceType:CreateFlowLogs' :: CreateFlowLogs -> FlowLogsResourceType
$sel:resourceIds:CreateFlowLogs' :: CreateFlowLogs -> [Text]
$sel:trafficType:CreateFlowLogs' :: CreateFlowLogs -> Maybe TrafficType
$sel:tagSpecifications:CreateFlowLogs' :: CreateFlowLogs -> Maybe [TagSpecification]
$sel:maxAggregationInterval:CreateFlowLogs' :: CreateFlowLogs -> Maybe Int
$sel:logGroupName:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:logFormat:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:logDestinationType:CreateFlowLogs' :: CreateFlowLogs -> Maybe LogDestinationType
$sel:logDestination:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:dryRun:CreateFlowLogs' :: CreateFlowLogs -> Maybe Bool
$sel:destinationOptions:CreateFlowLogs' :: CreateFlowLogs -> Maybe DestinationOptionsRequest
$sel:deliverLogsPermissionArn:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:deliverCrossAccountRole:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:clientToken:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deliverCrossAccountRole
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deliverLogsPermissionArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DestinationOptionsRequest
destinationOptions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logDestination
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LogDestinationType
logDestinationType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logFormat
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxAggregationInterval
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [TagSpecification]
tagSpecifications
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TrafficType
trafficType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
resourceIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` FlowLogsResourceType
resourceType
instance Prelude.NFData CreateFlowLogs where
rnf :: CreateFlowLogs -> ()
rnf CreateFlowLogs' {[Text]
Maybe Bool
Maybe Int
Maybe [TagSpecification]
Maybe Text
Maybe DestinationOptionsRequest
Maybe LogDestinationType
Maybe TrafficType
FlowLogsResourceType
resourceType :: FlowLogsResourceType
resourceIds :: [Text]
trafficType :: Maybe TrafficType
tagSpecifications :: Maybe [TagSpecification]
maxAggregationInterval :: Maybe Int
logGroupName :: Maybe Text
logFormat :: Maybe Text
logDestinationType :: Maybe LogDestinationType
logDestination :: Maybe Text
dryRun :: Maybe Bool
destinationOptions :: Maybe DestinationOptionsRequest
deliverLogsPermissionArn :: Maybe Text
deliverCrossAccountRole :: Maybe Text
clientToken :: Maybe Text
$sel:resourceType:CreateFlowLogs' :: CreateFlowLogs -> FlowLogsResourceType
$sel:resourceIds:CreateFlowLogs' :: CreateFlowLogs -> [Text]
$sel:trafficType:CreateFlowLogs' :: CreateFlowLogs -> Maybe TrafficType
$sel:tagSpecifications:CreateFlowLogs' :: CreateFlowLogs -> Maybe [TagSpecification]
$sel:maxAggregationInterval:CreateFlowLogs' :: CreateFlowLogs -> Maybe Int
$sel:logGroupName:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:logFormat:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:logDestinationType:CreateFlowLogs' :: CreateFlowLogs -> Maybe LogDestinationType
$sel:logDestination:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:dryRun:CreateFlowLogs' :: CreateFlowLogs -> Maybe Bool
$sel:destinationOptions:CreateFlowLogs' :: CreateFlowLogs -> Maybe DestinationOptionsRequest
$sel:deliverLogsPermissionArn:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:deliverCrossAccountRole:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:clientToken:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deliverCrossAccountRole
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deliverLogsPermissionArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DestinationOptionsRequest
destinationOptions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logDestination
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LogDestinationType
logDestinationType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logFormat
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxAggregationInterval
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [TagSpecification]
tagSpecifications
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TrafficType
trafficType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
resourceIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf FlowLogsResourceType
resourceType
instance Data.ToHeaders CreateFlowLogs where
toHeaders :: CreateFlowLogs -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath CreateFlowLogs where
toPath :: CreateFlowLogs -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateFlowLogs where
toQuery :: CreateFlowLogs -> QueryString
toQuery CreateFlowLogs' {[Text]
Maybe Bool
Maybe Int
Maybe [TagSpecification]
Maybe Text
Maybe DestinationOptionsRequest
Maybe LogDestinationType
Maybe TrafficType
FlowLogsResourceType
resourceType :: FlowLogsResourceType
resourceIds :: [Text]
trafficType :: Maybe TrafficType
tagSpecifications :: Maybe [TagSpecification]
maxAggregationInterval :: Maybe Int
logGroupName :: Maybe Text
logFormat :: Maybe Text
logDestinationType :: Maybe LogDestinationType
logDestination :: Maybe Text
dryRun :: Maybe Bool
destinationOptions :: Maybe DestinationOptionsRequest
deliverLogsPermissionArn :: Maybe Text
deliverCrossAccountRole :: Maybe Text
clientToken :: Maybe Text
$sel:resourceType:CreateFlowLogs' :: CreateFlowLogs -> FlowLogsResourceType
$sel:resourceIds:CreateFlowLogs' :: CreateFlowLogs -> [Text]
$sel:trafficType:CreateFlowLogs' :: CreateFlowLogs -> Maybe TrafficType
$sel:tagSpecifications:CreateFlowLogs' :: CreateFlowLogs -> Maybe [TagSpecification]
$sel:maxAggregationInterval:CreateFlowLogs' :: CreateFlowLogs -> Maybe Int
$sel:logGroupName:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:logFormat:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:logDestinationType:CreateFlowLogs' :: CreateFlowLogs -> Maybe LogDestinationType
$sel:logDestination:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:dryRun:CreateFlowLogs' :: CreateFlowLogs -> Maybe Bool
$sel:destinationOptions:CreateFlowLogs' :: CreateFlowLogs -> Maybe DestinationOptionsRequest
$sel:deliverLogsPermissionArn:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:deliverCrossAccountRole:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
$sel:clientToken:CreateFlowLogs' :: CreateFlowLogs -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateFlowLogs" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"ClientToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientToken,
ByteString
"DeliverCrossAccountRole"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
deliverCrossAccountRole,
ByteString
"DeliverLogsPermissionArn"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
deliverLogsPermissionArn,
ByteString
"DestinationOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe DestinationOptionsRequest
destinationOptions,
ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
ByteString
"LogDestination" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
logDestination,
ByteString
"LogDestinationType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe LogDestinationType
logDestinationType,
ByteString
"LogFormat" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
logFormat,
ByteString
"LogGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
logGroupName,
ByteString
"MaxAggregationInterval"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxAggregationInterval,
forall a. ToQuery a => a -> QueryString
Data.toQuery
( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"TagSpecification"
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagSpecification]
tagSpecifications
),
ByteString
"TrafficType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe TrafficType
trafficType,
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"ResourceId" [Text]
resourceIds,
ByteString
"ResourceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: FlowLogsResourceType
resourceType
]
data CreateFlowLogsResponse = CreateFlowLogsResponse'
{
CreateFlowLogsResponse -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateFlowLogsResponse -> Maybe [Text]
flowLogIds :: Prelude.Maybe [Prelude.Text],
CreateFlowLogsResponse -> Maybe [UnsuccessfulItem]
unsuccessful :: Prelude.Maybe [UnsuccessfulItem],
CreateFlowLogsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateFlowLogsResponse -> CreateFlowLogsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFlowLogsResponse -> CreateFlowLogsResponse -> Bool
$c/= :: CreateFlowLogsResponse -> CreateFlowLogsResponse -> Bool
== :: CreateFlowLogsResponse -> CreateFlowLogsResponse -> Bool
$c== :: CreateFlowLogsResponse -> CreateFlowLogsResponse -> Bool
Prelude.Eq, ReadPrec [CreateFlowLogsResponse]
ReadPrec CreateFlowLogsResponse
Int -> ReadS CreateFlowLogsResponse
ReadS [CreateFlowLogsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFlowLogsResponse]
$creadListPrec :: ReadPrec [CreateFlowLogsResponse]
readPrec :: ReadPrec CreateFlowLogsResponse
$creadPrec :: ReadPrec CreateFlowLogsResponse
readList :: ReadS [CreateFlowLogsResponse]
$creadList :: ReadS [CreateFlowLogsResponse]
readsPrec :: Int -> ReadS CreateFlowLogsResponse
$creadsPrec :: Int -> ReadS CreateFlowLogsResponse
Prelude.Read, Int -> CreateFlowLogsResponse -> ShowS
[CreateFlowLogsResponse] -> ShowS
CreateFlowLogsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFlowLogsResponse] -> ShowS
$cshowList :: [CreateFlowLogsResponse] -> ShowS
show :: CreateFlowLogsResponse -> String
$cshow :: CreateFlowLogsResponse -> String
showsPrec :: Int -> CreateFlowLogsResponse -> ShowS
$cshowsPrec :: Int -> CreateFlowLogsResponse -> ShowS
Prelude.Show, forall x. Rep CreateFlowLogsResponse x -> CreateFlowLogsResponse
forall x. CreateFlowLogsResponse -> Rep CreateFlowLogsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFlowLogsResponse x -> CreateFlowLogsResponse
$cfrom :: forall x. CreateFlowLogsResponse -> Rep CreateFlowLogsResponse x
Prelude.Generic)
newCreateFlowLogsResponse ::
Prelude.Int ->
CreateFlowLogsResponse
newCreateFlowLogsResponse :: Int -> CreateFlowLogsResponse
newCreateFlowLogsResponse Int
pHttpStatus_ =
CreateFlowLogsResponse'
{ $sel:clientToken:CreateFlowLogsResponse' :: Maybe Text
clientToken =
forall a. Maybe a
Prelude.Nothing,
$sel:flowLogIds:CreateFlowLogsResponse' :: Maybe [Text]
flowLogIds = forall a. Maybe a
Prelude.Nothing,
$sel:unsuccessful:CreateFlowLogsResponse' :: Maybe [UnsuccessfulItem]
unsuccessful = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateFlowLogsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createFlowLogsResponse_clientToken :: Lens.Lens' CreateFlowLogsResponse (Prelude.Maybe Prelude.Text)
createFlowLogsResponse_clientToken :: Lens' CreateFlowLogsResponse (Maybe Text)
createFlowLogsResponse_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogsResponse' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateFlowLogsResponse' :: CreateFlowLogsResponse -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateFlowLogsResponse
s@CreateFlowLogsResponse' {} Maybe Text
a -> CreateFlowLogsResponse
s {$sel:clientToken:CreateFlowLogsResponse' :: Maybe Text
clientToken = Maybe Text
a} :: CreateFlowLogsResponse)
createFlowLogsResponse_flowLogIds :: Lens.Lens' CreateFlowLogsResponse (Prelude.Maybe [Prelude.Text])
createFlowLogsResponse_flowLogIds :: Lens' CreateFlowLogsResponse (Maybe [Text])
createFlowLogsResponse_flowLogIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogsResponse' {Maybe [Text]
flowLogIds :: Maybe [Text]
$sel:flowLogIds:CreateFlowLogsResponse' :: CreateFlowLogsResponse -> Maybe [Text]
flowLogIds} -> Maybe [Text]
flowLogIds) (\s :: CreateFlowLogsResponse
s@CreateFlowLogsResponse' {} Maybe [Text]
a -> CreateFlowLogsResponse
s {$sel:flowLogIds:CreateFlowLogsResponse' :: Maybe [Text]
flowLogIds = Maybe [Text]
a} :: CreateFlowLogsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFlowLogsResponse_unsuccessful :: Lens.Lens' CreateFlowLogsResponse (Prelude.Maybe [UnsuccessfulItem])
createFlowLogsResponse_unsuccessful :: Lens' CreateFlowLogsResponse (Maybe [UnsuccessfulItem])
createFlowLogsResponse_unsuccessful = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogsResponse' {Maybe [UnsuccessfulItem]
unsuccessful :: Maybe [UnsuccessfulItem]
$sel:unsuccessful:CreateFlowLogsResponse' :: CreateFlowLogsResponse -> Maybe [UnsuccessfulItem]
unsuccessful} -> Maybe [UnsuccessfulItem]
unsuccessful) (\s :: CreateFlowLogsResponse
s@CreateFlowLogsResponse' {} Maybe [UnsuccessfulItem]
a -> CreateFlowLogsResponse
s {$sel:unsuccessful:CreateFlowLogsResponse' :: Maybe [UnsuccessfulItem]
unsuccessful = Maybe [UnsuccessfulItem]
a} :: CreateFlowLogsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFlowLogsResponse_httpStatus :: Lens.Lens' CreateFlowLogsResponse Prelude.Int
createFlowLogsResponse_httpStatus :: Lens' CreateFlowLogsResponse Int
createFlowLogsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowLogsResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateFlowLogsResponse' :: CreateFlowLogsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateFlowLogsResponse
s@CreateFlowLogsResponse' {} Int
a -> CreateFlowLogsResponse
s {$sel:httpStatus:CreateFlowLogsResponse' :: Int
httpStatus = Int
a} :: CreateFlowLogsResponse)
instance Prelude.NFData CreateFlowLogsResponse where
rnf :: CreateFlowLogsResponse -> ()
rnf CreateFlowLogsResponse' {Int
Maybe [Text]
Maybe [UnsuccessfulItem]
Maybe Text
httpStatus :: Int
unsuccessful :: Maybe [UnsuccessfulItem]
flowLogIds :: Maybe [Text]
clientToken :: Maybe Text
$sel:httpStatus:CreateFlowLogsResponse' :: CreateFlowLogsResponse -> Int
$sel:unsuccessful:CreateFlowLogsResponse' :: CreateFlowLogsResponse -> Maybe [UnsuccessfulItem]
$sel:flowLogIds:CreateFlowLogsResponse' :: CreateFlowLogsResponse -> Maybe [Text]
$sel:clientToken:CreateFlowLogsResponse' :: CreateFlowLogsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
flowLogIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [UnsuccessfulItem]
unsuccessful
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus