{-# 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.CloudTrail.CreateTrail
(
CreateTrail (..),
newCreateTrail,
createTrail_s3KeyPrefix,
createTrail_snsTopicName,
createTrail_enableLogFileValidation,
createTrail_cloudWatchLogsLogGroupArn,
createTrail_kmsKeyId,
createTrail_includeGlobalServiceEvents,
createTrail_tagsList,
createTrail_isOrganizationTrail,
createTrail_cloudWatchLogsRoleArn,
createTrail_isMultiRegionTrail,
createTrail_name,
createTrail_s3BucketName,
CreateTrailResponse (..),
newCreateTrailResponse,
createTrailResponse_logFileValidationEnabled,
createTrailResponse_trailARN,
createTrailResponse_s3KeyPrefix,
createTrailResponse_snsTopicARN,
createTrailResponse_snsTopicName,
createTrailResponse_cloudWatchLogsLogGroupArn,
createTrailResponse_kmsKeyId,
createTrailResponse_name,
createTrailResponse_includeGlobalServiceEvents,
createTrailResponse_isOrganizationTrail,
createTrailResponse_cloudWatchLogsRoleArn,
createTrailResponse_s3BucketName,
createTrailResponse_isMultiRegionTrail,
createTrailResponse_httpStatus,
)
where
import Amazonka.CloudTrail.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateTrail = CreateTrail'
{
CreateTrail -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
CreateTrail -> Maybe Text
snsTopicName :: Prelude.Maybe Prelude.Text,
CreateTrail -> Maybe Bool
enableLogFileValidation :: Prelude.Maybe Prelude.Bool,
CreateTrail -> Maybe Text
cloudWatchLogsLogGroupArn :: Prelude.Maybe Prelude.Text,
CreateTrail -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
CreateTrail -> Maybe Bool
includeGlobalServiceEvents :: Prelude.Maybe Prelude.Bool,
CreateTrail -> Maybe [Tag]
tagsList :: Prelude.Maybe [Tag],
CreateTrail -> Maybe Bool
isOrganizationTrail :: Prelude.Maybe Prelude.Bool,
CreateTrail -> Maybe Text
cloudWatchLogsRoleArn :: Prelude.Maybe Prelude.Text,
CreateTrail -> Maybe Bool
isMultiRegionTrail :: Prelude.Maybe Prelude.Bool,
CreateTrail -> Text
name :: Prelude.Text,
CreateTrail -> Text
s3BucketName :: Prelude.Text
}
deriving (CreateTrail -> CreateTrail -> Bool
(CreateTrail -> CreateTrail -> Bool)
-> (CreateTrail -> CreateTrail -> Bool) -> Eq CreateTrail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTrail -> CreateTrail -> Bool
$c/= :: CreateTrail -> CreateTrail -> Bool
== :: CreateTrail -> CreateTrail -> Bool
$c== :: CreateTrail -> CreateTrail -> Bool
Prelude.Eq, ReadPrec [CreateTrail]
ReadPrec CreateTrail
Int -> ReadS CreateTrail
ReadS [CreateTrail]
(Int -> ReadS CreateTrail)
-> ReadS [CreateTrail]
-> ReadPrec CreateTrail
-> ReadPrec [CreateTrail]
-> Read CreateTrail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTrail]
$creadListPrec :: ReadPrec [CreateTrail]
readPrec :: ReadPrec CreateTrail
$creadPrec :: ReadPrec CreateTrail
readList :: ReadS [CreateTrail]
$creadList :: ReadS [CreateTrail]
readsPrec :: Int -> ReadS CreateTrail
$creadsPrec :: Int -> ReadS CreateTrail
Prelude.Read, Int -> CreateTrail -> ShowS
[CreateTrail] -> ShowS
CreateTrail -> String
(Int -> CreateTrail -> ShowS)
-> (CreateTrail -> String)
-> ([CreateTrail] -> ShowS)
-> Show CreateTrail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTrail] -> ShowS
$cshowList :: [CreateTrail] -> ShowS
show :: CreateTrail -> String
$cshow :: CreateTrail -> String
showsPrec :: Int -> CreateTrail -> ShowS
$cshowsPrec :: Int -> CreateTrail -> ShowS
Prelude.Show, (forall x. CreateTrail -> Rep CreateTrail x)
-> (forall x. Rep CreateTrail x -> CreateTrail)
-> Generic CreateTrail
forall x. Rep CreateTrail x -> CreateTrail
forall x. CreateTrail -> Rep CreateTrail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTrail x -> CreateTrail
$cfrom :: forall x. CreateTrail -> Rep CreateTrail x
Prelude.Generic)
newCreateTrail ::
Prelude.Text ->
Prelude.Text ->
CreateTrail
newCreateTrail :: Text -> Text -> CreateTrail
newCreateTrail Text
pName_ Text
pS3BucketName_ =
CreateTrail' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe [Tag]
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Text
-> Text
-> CreateTrail
CreateTrail'
{ $sel:s3KeyPrefix:CreateTrail' :: Maybe Text
s3KeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:snsTopicName:CreateTrail' :: Maybe Text
snsTopicName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enableLogFileValidation:CreateTrail' :: Maybe Bool
enableLogFileValidation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLogsLogGroupArn:CreateTrail' :: Maybe Text
cloudWatchLogsLogGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:CreateTrail' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:includeGlobalServiceEvents:CreateTrail' :: Maybe Bool
includeGlobalServiceEvents = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:tagsList:CreateTrail' :: Maybe [Tag]
tagsList = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:isOrganizationTrail:CreateTrail' :: Maybe Bool
isOrganizationTrail = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLogsRoleArn:CreateTrail' :: Maybe Text
cloudWatchLogsRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isMultiRegionTrail:CreateTrail' :: Maybe Bool
isMultiRegionTrail = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateTrail' :: Text
name = Text
pName_,
$sel:s3BucketName:CreateTrail' :: Text
s3BucketName = Text
pS3BucketName_
}
createTrail_s3KeyPrefix :: Lens.Lens' CreateTrail (Prelude.Maybe Prelude.Text)
createTrail_s3KeyPrefix :: (Maybe Text -> f (Maybe Text)) -> CreateTrail -> f CreateTrail
createTrail_s3KeyPrefix = (CreateTrail -> Maybe Text)
-> (CreateTrail -> Maybe Text -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:CreateTrail' :: CreateTrail -> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: CreateTrail
s@CreateTrail' {} Maybe Text
a -> CreateTrail
s {$sel:s3KeyPrefix:CreateTrail' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: CreateTrail)
createTrail_snsTopicName :: Lens.Lens' CreateTrail (Prelude.Maybe Prelude.Text)
createTrail_snsTopicName :: (Maybe Text -> f (Maybe Text)) -> CreateTrail -> f CreateTrail
createTrail_snsTopicName = (CreateTrail -> Maybe Text)
-> (CreateTrail -> Maybe Text -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe Text
snsTopicName :: Maybe Text
$sel:snsTopicName:CreateTrail' :: CreateTrail -> Maybe Text
snsTopicName} -> Maybe Text
snsTopicName) (\s :: CreateTrail
s@CreateTrail' {} Maybe Text
a -> CreateTrail
s {$sel:snsTopicName:CreateTrail' :: Maybe Text
snsTopicName = Maybe Text
a} :: CreateTrail)
createTrail_enableLogFileValidation :: Lens.Lens' CreateTrail (Prelude.Maybe Prelude.Bool)
createTrail_enableLogFileValidation :: (Maybe Bool -> f (Maybe Bool)) -> CreateTrail -> f CreateTrail
createTrail_enableLogFileValidation = (CreateTrail -> Maybe Bool)
-> (CreateTrail -> Maybe Bool -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe Bool
enableLogFileValidation :: Maybe Bool
$sel:enableLogFileValidation:CreateTrail' :: CreateTrail -> Maybe Bool
enableLogFileValidation} -> Maybe Bool
enableLogFileValidation) (\s :: CreateTrail
s@CreateTrail' {} Maybe Bool
a -> CreateTrail
s {$sel:enableLogFileValidation:CreateTrail' :: Maybe Bool
enableLogFileValidation = Maybe Bool
a} :: CreateTrail)
createTrail_cloudWatchLogsLogGroupArn :: Lens.Lens' CreateTrail (Prelude.Maybe Prelude.Text)
createTrail_cloudWatchLogsLogGroupArn :: (Maybe Text -> f (Maybe Text)) -> CreateTrail -> f CreateTrail
createTrail_cloudWatchLogsLogGroupArn = (CreateTrail -> Maybe Text)
-> (CreateTrail -> Maybe Text -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe Text
cloudWatchLogsLogGroupArn :: Maybe Text
$sel:cloudWatchLogsLogGroupArn:CreateTrail' :: CreateTrail -> Maybe Text
cloudWatchLogsLogGroupArn} -> Maybe Text
cloudWatchLogsLogGroupArn) (\s :: CreateTrail
s@CreateTrail' {} Maybe Text
a -> CreateTrail
s {$sel:cloudWatchLogsLogGroupArn:CreateTrail' :: Maybe Text
cloudWatchLogsLogGroupArn = Maybe Text
a} :: CreateTrail)
createTrail_kmsKeyId :: Lens.Lens' CreateTrail (Prelude.Maybe Prelude.Text)
createTrail_kmsKeyId :: (Maybe Text -> f (Maybe Text)) -> CreateTrail -> f CreateTrail
createTrail_kmsKeyId = (CreateTrail -> Maybe Text)
-> (CreateTrail -> Maybe Text -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateTrail' :: CreateTrail -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateTrail
s@CreateTrail' {} Maybe Text
a -> CreateTrail
s {$sel:kmsKeyId:CreateTrail' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateTrail)
createTrail_includeGlobalServiceEvents :: Lens.Lens' CreateTrail (Prelude.Maybe Prelude.Bool)
createTrail_includeGlobalServiceEvents :: (Maybe Bool -> f (Maybe Bool)) -> CreateTrail -> f CreateTrail
createTrail_includeGlobalServiceEvents = (CreateTrail -> Maybe Bool)
-> (CreateTrail -> Maybe Bool -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe Bool
includeGlobalServiceEvents :: Maybe Bool
$sel:includeGlobalServiceEvents:CreateTrail' :: CreateTrail -> Maybe Bool
includeGlobalServiceEvents} -> Maybe Bool
includeGlobalServiceEvents) (\s :: CreateTrail
s@CreateTrail' {} Maybe Bool
a -> CreateTrail
s {$sel:includeGlobalServiceEvents:CreateTrail' :: Maybe Bool
includeGlobalServiceEvents = Maybe Bool
a} :: CreateTrail)
createTrail_tagsList :: Lens.Lens' CreateTrail (Prelude.Maybe [Tag])
createTrail_tagsList :: (Maybe [Tag] -> f (Maybe [Tag])) -> CreateTrail -> f CreateTrail
createTrail_tagsList = (CreateTrail -> Maybe [Tag])
-> (CreateTrail -> Maybe [Tag] -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe [Tag]
tagsList :: Maybe [Tag]
$sel:tagsList:CreateTrail' :: CreateTrail -> Maybe [Tag]
tagsList} -> Maybe [Tag]
tagsList) (\s :: CreateTrail
s@CreateTrail' {} Maybe [Tag]
a -> CreateTrail
s {$sel:tagsList:CreateTrail' :: Maybe [Tag]
tagsList = Maybe [Tag]
a} :: CreateTrail) ((Maybe [Tag] -> f (Maybe [Tag])) -> CreateTrail -> f CreateTrail)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTrail
-> f CreateTrail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTrail_isOrganizationTrail :: Lens.Lens' CreateTrail (Prelude.Maybe Prelude.Bool)
createTrail_isOrganizationTrail :: (Maybe Bool -> f (Maybe Bool)) -> CreateTrail -> f CreateTrail
createTrail_isOrganizationTrail = (CreateTrail -> Maybe Bool)
-> (CreateTrail -> Maybe Bool -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe Bool
isOrganizationTrail :: Maybe Bool
$sel:isOrganizationTrail:CreateTrail' :: CreateTrail -> Maybe Bool
isOrganizationTrail} -> Maybe Bool
isOrganizationTrail) (\s :: CreateTrail
s@CreateTrail' {} Maybe Bool
a -> CreateTrail
s {$sel:isOrganizationTrail:CreateTrail' :: Maybe Bool
isOrganizationTrail = Maybe Bool
a} :: CreateTrail)
createTrail_cloudWatchLogsRoleArn :: Lens.Lens' CreateTrail (Prelude.Maybe Prelude.Text)
createTrail_cloudWatchLogsRoleArn :: (Maybe Text -> f (Maybe Text)) -> CreateTrail -> f CreateTrail
createTrail_cloudWatchLogsRoleArn = (CreateTrail -> Maybe Text)
-> (CreateTrail -> Maybe Text -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe Text
cloudWatchLogsRoleArn :: Maybe Text
$sel:cloudWatchLogsRoleArn:CreateTrail' :: CreateTrail -> Maybe Text
cloudWatchLogsRoleArn} -> Maybe Text
cloudWatchLogsRoleArn) (\s :: CreateTrail
s@CreateTrail' {} Maybe Text
a -> CreateTrail
s {$sel:cloudWatchLogsRoleArn:CreateTrail' :: Maybe Text
cloudWatchLogsRoleArn = Maybe Text
a} :: CreateTrail)
createTrail_isMultiRegionTrail :: Lens.Lens' CreateTrail (Prelude.Maybe Prelude.Bool)
createTrail_isMultiRegionTrail :: (Maybe Bool -> f (Maybe Bool)) -> CreateTrail -> f CreateTrail
createTrail_isMultiRegionTrail = (CreateTrail -> Maybe Bool)
-> (CreateTrail -> Maybe Bool -> CreateTrail)
-> Lens CreateTrail CreateTrail (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Maybe Bool
isMultiRegionTrail :: Maybe Bool
$sel:isMultiRegionTrail:CreateTrail' :: CreateTrail -> Maybe Bool
isMultiRegionTrail} -> Maybe Bool
isMultiRegionTrail) (\s :: CreateTrail
s@CreateTrail' {} Maybe Bool
a -> CreateTrail
s {$sel:isMultiRegionTrail:CreateTrail' :: Maybe Bool
isMultiRegionTrail = Maybe Bool
a} :: CreateTrail)
createTrail_name :: Lens.Lens' CreateTrail Prelude.Text
createTrail_name :: (Text -> f Text) -> CreateTrail -> f CreateTrail
createTrail_name = (CreateTrail -> Text)
-> (CreateTrail -> Text -> CreateTrail)
-> Lens CreateTrail CreateTrail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Text
name :: Text
$sel:name:CreateTrail' :: CreateTrail -> Text
name} -> Text
name) (\s :: CreateTrail
s@CreateTrail' {} Text
a -> CreateTrail
s {$sel:name:CreateTrail' :: Text
name = Text
a} :: CreateTrail)
createTrail_s3BucketName :: Lens.Lens' CreateTrail Prelude.Text
createTrail_s3BucketName :: (Text -> f Text) -> CreateTrail -> f CreateTrail
createTrail_s3BucketName = (CreateTrail -> Text)
-> (CreateTrail -> Text -> CreateTrail)
-> Lens CreateTrail CreateTrail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrail' {Text
s3BucketName :: Text
$sel:s3BucketName:CreateTrail' :: CreateTrail -> Text
s3BucketName} -> Text
s3BucketName) (\s :: CreateTrail
s@CreateTrail' {} Text
a -> CreateTrail
s {$sel:s3BucketName:CreateTrail' :: Text
s3BucketName = Text
a} :: CreateTrail)
instance Core.AWSRequest CreateTrail where
type AWSResponse CreateTrail = CreateTrailResponse
request :: CreateTrail -> Request CreateTrail
request = Service -> CreateTrail -> Request CreateTrail
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateTrail
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTrail)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateTrail))
-> Logger
-> Service
-> Proxy CreateTrail
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTrail)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse
CreateTrailResponse'
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LogFileValidationEnabled")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TrailARN")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"S3KeyPrefix")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SnsTopicARN")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SnsTopicName")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CloudWatchLogsLogGroupArn")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"KmsKeyId")
Either
String
(Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
Either
String
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IncludeGlobalServiceEvents")
Either
String
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Bool -> Int -> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IsOrganizationTrail")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Bool -> Int -> CreateTrailResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Bool -> Int -> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CloudWatchLogsRoleArn")
Either
String (Maybe Text -> Maybe Bool -> Int -> CreateTrailResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Bool -> Int -> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"S3BucketName")
Either String (Maybe Bool -> Int -> CreateTrailResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> CreateTrailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IsMultiRegionTrail")
Either String (Int -> CreateTrailResponse)
-> Either String Int -> Either String CreateTrailResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateTrail
instance Prelude.NFData CreateTrail
instance Core.ToHeaders CreateTrail where
toHeaders :: CreateTrail -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateTrail -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.CreateTrail" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateTrail where
toJSON :: CreateTrail -> Value
toJSON CreateTrail' {Maybe Bool
Maybe [Tag]
Maybe Text
Text
s3BucketName :: Text
name :: Text
isMultiRegionTrail :: Maybe Bool
cloudWatchLogsRoleArn :: Maybe Text
isOrganizationTrail :: Maybe Bool
tagsList :: Maybe [Tag]
includeGlobalServiceEvents :: Maybe Bool
kmsKeyId :: Maybe Text
cloudWatchLogsLogGroupArn :: Maybe Text
enableLogFileValidation :: Maybe Bool
snsTopicName :: Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3BucketName:CreateTrail' :: CreateTrail -> Text
$sel:name:CreateTrail' :: CreateTrail -> Text
$sel:isMultiRegionTrail:CreateTrail' :: CreateTrail -> Maybe Bool
$sel:cloudWatchLogsRoleArn:CreateTrail' :: CreateTrail -> Maybe Text
$sel:isOrganizationTrail:CreateTrail' :: CreateTrail -> Maybe Bool
$sel:tagsList:CreateTrail' :: CreateTrail -> Maybe [Tag]
$sel:includeGlobalServiceEvents:CreateTrail' :: CreateTrail -> Maybe Bool
$sel:kmsKeyId:CreateTrail' :: CreateTrail -> Maybe Text
$sel:cloudWatchLogsLogGroupArn:CreateTrail' :: CreateTrail -> Maybe Text
$sel:enableLogFileValidation:CreateTrail' :: CreateTrail -> Maybe Bool
$sel:snsTopicName:CreateTrail' :: CreateTrail -> Maybe Text
$sel:s3KeyPrefix:CreateTrail' :: CreateTrail -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"S3KeyPrefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3KeyPrefix,
(Text
"SnsTopicName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
snsTopicName,
(Text
"EnableLogFileValidation" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableLogFileValidation,
(Text
"CloudWatchLogsLogGroupArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
cloudWatchLogsLogGroupArn,
(Text
"KmsKeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKeyId,
(Text
"IncludeGlobalServiceEvents" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeGlobalServiceEvents,
(Text
"TagsList" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tagsList,
(Text
"IsOrganizationTrail" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isOrganizationTrail,
(Text
"CloudWatchLogsRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
cloudWatchLogsRoleArn,
(Text
"IsMultiRegionTrail" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isMultiRegionTrail,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"S3BucketName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
s3BucketName)
]
)
instance Core.ToPath CreateTrail where
toPath :: CreateTrail -> ByteString
toPath = ByteString -> CreateTrail -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateTrail where
toQuery :: CreateTrail -> QueryString
toQuery = QueryString -> CreateTrail -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateTrailResponse = CreateTrailResponse'
{
CreateTrailResponse -> Maybe Bool
logFileValidationEnabled :: Prelude.Maybe Prelude.Bool,
CreateTrailResponse -> Maybe Text
trailARN :: Prelude.Maybe Prelude.Text,
CreateTrailResponse -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
CreateTrailResponse -> Maybe Text
snsTopicARN :: Prelude.Maybe Prelude.Text,
CreateTrailResponse -> Maybe Text
snsTopicName :: Prelude.Maybe Prelude.Text,
CreateTrailResponse -> Maybe Text
cloudWatchLogsLogGroupArn :: Prelude.Maybe Prelude.Text,
CreateTrailResponse -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
CreateTrailResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateTrailResponse -> Maybe Bool
includeGlobalServiceEvents :: Prelude.Maybe Prelude.Bool,
CreateTrailResponse -> Maybe Bool
isOrganizationTrail :: Prelude.Maybe Prelude.Bool,
CreateTrailResponse -> Maybe Text
cloudWatchLogsRoleArn :: Prelude.Maybe Prelude.Text,
CreateTrailResponse -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text,
CreateTrailResponse -> Maybe Bool
isMultiRegionTrail :: Prelude.Maybe Prelude.Bool,
CreateTrailResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateTrailResponse -> CreateTrailResponse -> Bool
(CreateTrailResponse -> CreateTrailResponse -> Bool)
-> (CreateTrailResponse -> CreateTrailResponse -> Bool)
-> Eq CreateTrailResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTrailResponse -> CreateTrailResponse -> Bool
$c/= :: CreateTrailResponse -> CreateTrailResponse -> Bool
== :: CreateTrailResponse -> CreateTrailResponse -> Bool
$c== :: CreateTrailResponse -> CreateTrailResponse -> Bool
Prelude.Eq, ReadPrec [CreateTrailResponse]
ReadPrec CreateTrailResponse
Int -> ReadS CreateTrailResponse
ReadS [CreateTrailResponse]
(Int -> ReadS CreateTrailResponse)
-> ReadS [CreateTrailResponse]
-> ReadPrec CreateTrailResponse
-> ReadPrec [CreateTrailResponse]
-> Read CreateTrailResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTrailResponse]
$creadListPrec :: ReadPrec [CreateTrailResponse]
readPrec :: ReadPrec CreateTrailResponse
$creadPrec :: ReadPrec CreateTrailResponse
readList :: ReadS [CreateTrailResponse]
$creadList :: ReadS [CreateTrailResponse]
readsPrec :: Int -> ReadS CreateTrailResponse
$creadsPrec :: Int -> ReadS CreateTrailResponse
Prelude.Read, Int -> CreateTrailResponse -> ShowS
[CreateTrailResponse] -> ShowS
CreateTrailResponse -> String
(Int -> CreateTrailResponse -> ShowS)
-> (CreateTrailResponse -> String)
-> ([CreateTrailResponse] -> ShowS)
-> Show CreateTrailResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTrailResponse] -> ShowS
$cshowList :: [CreateTrailResponse] -> ShowS
show :: CreateTrailResponse -> String
$cshow :: CreateTrailResponse -> String
showsPrec :: Int -> CreateTrailResponse -> ShowS
$cshowsPrec :: Int -> CreateTrailResponse -> ShowS
Prelude.Show, (forall x. CreateTrailResponse -> Rep CreateTrailResponse x)
-> (forall x. Rep CreateTrailResponse x -> CreateTrailResponse)
-> Generic CreateTrailResponse
forall x. Rep CreateTrailResponse x -> CreateTrailResponse
forall x. CreateTrailResponse -> Rep CreateTrailResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTrailResponse x -> CreateTrailResponse
$cfrom :: forall x. CreateTrailResponse -> Rep CreateTrailResponse x
Prelude.Generic)
newCreateTrailResponse ::
Prelude.Int ->
CreateTrailResponse
newCreateTrailResponse :: Int -> CreateTrailResponse
newCreateTrailResponse Int
pHttpStatus_ =
CreateTrailResponse' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Int
-> CreateTrailResponse
CreateTrailResponse'
{ $sel:logFileValidationEnabled:CreateTrailResponse' :: Maybe Bool
logFileValidationEnabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:trailARN:CreateTrailResponse' :: Maybe Text
trailARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3KeyPrefix:CreateTrailResponse' :: Maybe Text
s3KeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:snsTopicARN:CreateTrailResponse' :: Maybe Text
snsTopicARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:snsTopicName:CreateTrailResponse' :: Maybe Text
snsTopicName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLogsLogGroupArn:CreateTrailResponse' :: Maybe Text
cloudWatchLogsLogGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:CreateTrailResponse' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateTrailResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:includeGlobalServiceEvents:CreateTrailResponse' :: Maybe Bool
includeGlobalServiceEvents = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:isOrganizationTrail:CreateTrailResponse' :: Maybe Bool
isOrganizationTrail = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLogsRoleArn:CreateTrailResponse' :: Maybe Text
cloudWatchLogsRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3BucketName:CreateTrailResponse' :: Maybe Text
s3BucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:isMultiRegionTrail:CreateTrailResponse' :: Maybe Bool
isMultiRegionTrail = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateTrailResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createTrailResponse_logFileValidationEnabled :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Bool)
createTrailResponse_logFileValidationEnabled :: (Maybe Bool -> f (Maybe Bool))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_logFileValidationEnabled = (CreateTrailResponse -> Maybe Bool)
-> (CreateTrailResponse -> Maybe Bool -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Bool
logFileValidationEnabled :: Maybe Bool
$sel:logFileValidationEnabled:CreateTrailResponse' :: CreateTrailResponse -> Maybe Bool
logFileValidationEnabled} -> Maybe Bool
logFileValidationEnabled) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Bool
a -> CreateTrailResponse
s {$sel:logFileValidationEnabled:CreateTrailResponse' :: Maybe Bool
logFileValidationEnabled = Maybe Bool
a} :: CreateTrailResponse)
createTrailResponse_trailARN :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Text)
createTrailResponse_trailARN :: (Maybe Text -> f (Maybe Text))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_trailARN = (CreateTrailResponse -> Maybe Text)
-> (CreateTrailResponse -> Maybe Text -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Text
trailARN :: Maybe Text
$sel:trailARN:CreateTrailResponse' :: CreateTrailResponse -> Maybe Text
trailARN} -> Maybe Text
trailARN) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Text
a -> CreateTrailResponse
s {$sel:trailARN:CreateTrailResponse' :: Maybe Text
trailARN = Maybe Text
a} :: CreateTrailResponse)
createTrailResponse_s3KeyPrefix :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Text)
createTrailResponse_s3KeyPrefix :: (Maybe Text -> f (Maybe Text))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_s3KeyPrefix = (CreateTrailResponse -> Maybe Text)
-> (CreateTrailResponse -> Maybe Text -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:CreateTrailResponse' :: CreateTrailResponse -> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Text
a -> CreateTrailResponse
s {$sel:s3KeyPrefix:CreateTrailResponse' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: CreateTrailResponse)
createTrailResponse_snsTopicARN :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Text)
createTrailResponse_snsTopicARN :: (Maybe Text -> f (Maybe Text))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_snsTopicARN = (CreateTrailResponse -> Maybe Text)
-> (CreateTrailResponse -> Maybe Text -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Text
snsTopicARN :: Maybe Text
$sel:snsTopicARN:CreateTrailResponse' :: CreateTrailResponse -> Maybe Text
snsTopicARN} -> Maybe Text
snsTopicARN) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Text
a -> CreateTrailResponse
s {$sel:snsTopicARN:CreateTrailResponse' :: Maybe Text
snsTopicARN = Maybe Text
a} :: CreateTrailResponse)
createTrailResponse_snsTopicName :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Text)
createTrailResponse_snsTopicName :: (Maybe Text -> f (Maybe Text))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_snsTopicName = (CreateTrailResponse -> Maybe Text)
-> (CreateTrailResponse -> Maybe Text -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Text
snsTopicName :: Maybe Text
$sel:snsTopicName:CreateTrailResponse' :: CreateTrailResponse -> Maybe Text
snsTopicName} -> Maybe Text
snsTopicName) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Text
a -> CreateTrailResponse
s {$sel:snsTopicName:CreateTrailResponse' :: Maybe Text
snsTopicName = Maybe Text
a} :: CreateTrailResponse)
createTrailResponse_cloudWatchLogsLogGroupArn :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Text)
createTrailResponse_cloudWatchLogsLogGroupArn :: (Maybe Text -> f (Maybe Text))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_cloudWatchLogsLogGroupArn = (CreateTrailResponse -> Maybe Text)
-> (CreateTrailResponse -> Maybe Text -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Text
cloudWatchLogsLogGroupArn :: Maybe Text
$sel:cloudWatchLogsLogGroupArn:CreateTrailResponse' :: CreateTrailResponse -> Maybe Text
cloudWatchLogsLogGroupArn} -> Maybe Text
cloudWatchLogsLogGroupArn) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Text
a -> CreateTrailResponse
s {$sel:cloudWatchLogsLogGroupArn:CreateTrailResponse' :: Maybe Text
cloudWatchLogsLogGroupArn = Maybe Text
a} :: CreateTrailResponse)
createTrailResponse_kmsKeyId :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Text)
createTrailResponse_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_kmsKeyId = (CreateTrailResponse -> Maybe Text)
-> (CreateTrailResponse -> Maybe Text -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateTrailResponse' :: CreateTrailResponse -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Text
a -> CreateTrailResponse
s {$sel:kmsKeyId:CreateTrailResponse' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateTrailResponse)
createTrailResponse_name :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Text)
createTrailResponse_name :: (Maybe Text -> f (Maybe Text))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_name = (CreateTrailResponse -> Maybe Text)
-> (CreateTrailResponse -> Maybe Text -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateTrailResponse' :: CreateTrailResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Text
a -> CreateTrailResponse
s {$sel:name:CreateTrailResponse' :: Maybe Text
name = Maybe Text
a} :: CreateTrailResponse)
createTrailResponse_includeGlobalServiceEvents :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Bool)
createTrailResponse_includeGlobalServiceEvents :: (Maybe Bool -> f (Maybe Bool))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_includeGlobalServiceEvents = (CreateTrailResponse -> Maybe Bool)
-> (CreateTrailResponse -> Maybe Bool -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Bool
includeGlobalServiceEvents :: Maybe Bool
$sel:includeGlobalServiceEvents:CreateTrailResponse' :: CreateTrailResponse -> Maybe Bool
includeGlobalServiceEvents} -> Maybe Bool
includeGlobalServiceEvents) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Bool
a -> CreateTrailResponse
s {$sel:includeGlobalServiceEvents:CreateTrailResponse' :: Maybe Bool
includeGlobalServiceEvents = Maybe Bool
a} :: CreateTrailResponse)
createTrailResponse_isOrganizationTrail :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Bool)
createTrailResponse_isOrganizationTrail :: (Maybe Bool -> f (Maybe Bool))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_isOrganizationTrail = (CreateTrailResponse -> Maybe Bool)
-> (CreateTrailResponse -> Maybe Bool -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Bool
isOrganizationTrail :: Maybe Bool
$sel:isOrganizationTrail:CreateTrailResponse' :: CreateTrailResponse -> Maybe Bool
isOrganizationTrail} -> Maybe Bool
isOrganizationTrail) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Bool
a -> CreateTrailResponse
s {$sel:isOrganizationTrail:CreateTrailResponse' :: Maybe Bool
isOrganizationTrail = Maybe Bool
a} :: CreateTrailResponse)
createTrailResponse_cloudWatchLogsRoleArn :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Text)
createTrailResponse_cloudWatchLogsRoleArn :: (Maybe Text -> f (Maybe Text))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_cloudWatchLogsRoleArn = (CreateTrailResponse -> Maybe Text)
-> (CreateTrailResponse -> Maybe Text -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Text
cloudWatchLogsRoleArn :: Maybe Text
$sel:cloudWatchLogsRoleArn:CreateTrailResponse' :: CreateTrailResponse -> Maybe Text
cloudWatchLogsRoleArn} -> Maybe Text
cloudWatchLogsRoleArn) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Text
a -> CreateTrailResponse
s {$sel:cloudWatchLogsRoleArn:CreateTrailResponse' :: Maybe Text
cloudWatchLogsRoleArn = Maybe Text
a} :: CreateTrailResponse)
createTrailResponse_s3BucketName :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Text)
createTrailResponse_s3BucketName :: (Maybe Text -> f (Maybe Text))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_s3BucketName = (CreateTrailResponse -> Maybe Text)
-> (CreateTrailResponse -> Maybe Text -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:CreateTrailResponse' :: CreateTrailResponse -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Text
a -> CreateTrailResponse
s {$sel:s3BucketName:CreateTrailResponse' :: Maybe Text
s3BucketName = Maybe Text
a} :: CreateTrailResponse)
createTrailResponse_isMultiRegionTrail :: Lens.Lens' CreateTrailResponse (Prelude.Maybe Prelude.Bool)
createTrailResponse_isMultiRegionTrail :: (Maybe Bool -> f (Maybe Bool))
-> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_isMultiRegionTrail = (CreateTrailResponse -> Maybe Bool)
-> (CreateTrailResponse -> Maybe Bool -> CreateTrailResponse)
-> Lens
CreateTrailResponse CreateTrailResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Maybe Bool
isMultiRegionTrail :: Maybe Bool
$sel:isMultiRegionTrail:CreateTrailResponse' :: CreateTrailResponse -> Maybe Bool
isMultiRegionTrail} -> Maybe Bool
isMultiRegionTrail) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Maybe Bool
a -> CreateTrailResponse
s {$sel:isMultiRegionTrail:CreateTrailResponse' :: Maybe Bool
isMultiRegionTrail = Maybe Bool
a} :: CreateTrailResponse)
createTrailResponse_httpStatus :: Lens.Lens' CreateTrailResponse Prelude.Int
createTrailResponse_httpStatus :: (Int -> f Int) -> CreateTrailResponse -> f CreateTrailResponse
createTrailResponse_httpStatus = (CreateTrailResponse -> Int)
-> (CreateTrailResponse -> Int -> CreateTrailResponse)
-> Lens CreateTrailResponse CreateTrailResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrailResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateTrailResponse' :: CreateTrailResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateTrailResponse
s@CreateTrailResponse' {} Int
a -> CreateTrailResponse
s {$sel:httpStatus:CreateTrailResponse' :: Int
httpStatus = Int
a} :: CreateTrailResponse)
instance Prelude.NFData CreateTrailResponse