module Network.AWS.CloudTrail.Types
(
cloudTrail
, _InvalidTimeRangeException
, _InsufficientS3BucketPolicyException
, _MaximumNumberOfTrailsExceededException
, _InsufficientSNSTopicPolicyException
, _InvalidCloudWatchLogsRoleARNException
, _InvalidLookupAttributesException
, _InvalidTrailNameException
, _InvalidSNSTopicNameException
, _CloudWatchLogsDeliveryUnavailableException
, _TrailNotFoundException
, _InvalidS3BucketNameException
, _InvalidCloudWatchLogsLogGroupARNException
, _S3BucketDoesNotExistException
, _InvalidNextTokenException
, _InvalidMaxResultsException
, _TrailAlreadyExistsException
, _InvalidS3PrefixException
, LookupAttributeKey (..)
, Event
, event
, eUsername
, eResources
, eEventTime
, eCloudTrailEvent
, eEventName
, eEventId
, LookupAttribute
, lookupAttribute
, laAttributeKey
, laAttributeValue
, Resource
, resource
, rResourceType
, rResourceName
, Trail
, trail
, tS3KeyPrefix
, tSNSTopicName
, tCloudWatchLogsLogGroupARN
, tName
, tIncludeGlobalServiceEvents
, tCloudWatchLogsRoleARN
, tS3BucketName
) where
import Network.AWS.CloudTrail.Types.Product
import Network.AWS.CloudTrail.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
cloudTrail :: Service
cloudTrail =
Service
{ _svcAbbrev = "CloudTrail"
, _svcSigner = v4
, _svcPrefix = "cloudtrail"
, _svcVersion = "2013-11-01"
, _svcEndpoint = defaultEndpoint cloudTrail
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_InvalidTimeRangeException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTimeRangeException =
_ServiceError . hasStatus 400 . hasCode "InvalidTimeRange"
_InsufficientS3BucketPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_InsufficientS3BucketPolicyException =
_ServiceError . hasStatus 403 . hasCode "InsufficientS3BucketPolicy"
_MaximumNumberOfTrailsExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_MaximumNumberOfTrailsExceededException =
_ServiceError . hasStatus 403 . hasCode "MaximumNumberOfTrailsExceeded"
_InsufficientSNSTopicPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_InsufficientSNSTopicPolicyException =
_ServiceError . hasStatus 403 . hasCode "InsufficientSnsTopicPolicy"
_InvalidCloudWatchLogsRoleARNException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidCloudWatchLogsRoleARNException =
_ServiceError . hasStatus 400 . hasCode "InvalidCloudWatchLogsRoleArn"
_InvalidLookupAttributesException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidLookupAttributesException =
_ServiceError . hasStatus 400 . hasCode "InvalidLookupAttributes"
_InvalidTrailNameException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTrailNameException =
_ServiceError . hasStatus 400 . hasCode "InvalidTrailName"
_InvalidSNSTopicNameException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSNSTopicNameException =
_ServiceError . hasStatus 400 . hasCode "InvalidSnsTopicName"
_CloudWatchLogsDeliveryUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_CloudWatchLogsDeliveryUnavailableException =
_ServiceError . hasStatus 400 . hasCode "CloudWatchLogsDeliveryUnavailable"
_TrailNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_TrailNotFoundException =
_ServiceError . hasStatus 404 . hasCode "TrailNotFound"
_InvalidS3BucketNameException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidS3BucketNameException =
_ServiceError . hasStatus 400 . hasCode "InvalidS3BucketName"
_InvalidCloudWatchLogsLogGroupARNException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidCloudWatchLogsLogGroupARNException =
_ServiceError . hasStatus 400 . hasCode "InvalidCloudWatchLogsLogGroupArn"
_S3BucketDoesNotExistException :: AsError a => Getting (First ServiceError) a ServiceError
_S3BucketDoesNotExistException =
_ServiceError . hasStatus 404 . hasCode "S3BucketDoesNotExist"
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextTokenException =
_ServiceError . hasStatus 400 . hasCode "InvalidNextToken"
_InvalidMaxResultsException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidMaxResultsException =
_ServiceError . hasStatus 400 . hasCode "InvalidMaxResults"
_TrailAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_TrailAlreadyExistsException =
_ServiceError . hasStatus 400 . hasCode "TrailAlreadyExists"
_InvalidS3PrefixException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidS3PrefixException =
_ServiceError . hasStatus 400 . hasCode "InvalidS3Prefix"