{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.CloudTrail.Types
(
cloudTrail
, _InvalidTimeRangeException
, _InsufficientS3BucketPolicyException
, _MaximumNumberOfTrailsExceededException
, _UnsupportedOperationException
, _KMSKeyDisabledException
, _InsufficientEncryptionPolicyException
, _InsufficientSNSTopicPolicyException
, _InvalidCloudWatchLogsRoleARNException
, _TagsLimitExceededException
, _CloudTrailARNInvalidException
, _InvalidLookupAttributesException
, _InvalidTrailNameException
, _InvalidSNSTopicNameException
, _ResourceTypeNotSupportedException
, _CloudWatchLogsDeliveryUnavailableException
, _KMSKeyNotFoundException
, _TrailNotFoundException
, _InvalidEventSelectorsException
, _TrailNotProvidedException
, _InvalidS3BucketNameException
, _InvalidCloudWatchLogsLogGroupARNException
, _KMSException
, _S3BucketDoesNotExistException
, _InvalidNextTokenException
, _InvalidTagParameterException
, _OperationNotPermittedException
, _InvalidTokenException
, _InvalidMaxResultsException
, _TrailAlreadyExistsException
, _InvalidS3PrefixException
, _ResourceNotFoundException
, _InvalidParameterCombinationException
, _InvalidKMSKeyIdException
, _InvalidHomeRegionException
, LookupAttributeKey (..)
, ReadWriteType (..)
, DataResource
, dataResource
, drValues
, drType
, Event
, event
, eUsername
, eResources
, eEventTime
, eCloudTrailEvent
, eEventName
, eEventSource
, eEventId
, EventSelector
, eventSelector
, esDataResources
, esReadWriteType
, esIncludeManagementEvents
, LookupAttribute
, lookupAttribute
, laAttributeKey
, laAttributeValue
, PublicKey
, publicKey
, pkFingerprint
, pkValidityEndTime
, pkValue
, pkValidityStartTime
, Resource
, resource
, rResourceType
, rResourceName
, ResourceTag
, resourceTag
, rResourceId
, rTagsList
, Tag
, tag
, tagValue
, tagKey
, Trail
, trail
, tLogFileValidationEnabled
, tTrailARN
, tS3KeyPrefix
, tSNSTopicARN
, tSNSTopicName
, tCloudWatchLogsLogGroupARN
, tKMSKeyId
, tHomeRegion
, tName
, tIncludeGlobalServiceEvents
, tHasCustomEventSelectors
, tCloudWatchLogsRoleARN
, tS3BucketName
, tIsMultiRegionTrail
) where
import Network.AWS.CloudTrail.Types.Product
import Network.AWS.CloudTrail.Types.Sum
import Network.AWS.Lens
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 "CloudTrail"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottledException" . hasStatus 400) e =
Just "throttled_exception"
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| has (hasStatus 502) e = Just "bad_gateway"
| 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 =
_MatchServiceError cloudTrail "InvalidTimeRangeException"
_InsufficientS3BucketPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_InsufficientS3BucketPolicyException =
_MatchServiceError cloudTrail "InsufficientS3BucketPolicyException"
_MaximumNumberOfTrailsExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_MaximumNumberOfTrailsExceededException =
_MatchServiceError cloudTrail "MaximumNumberOfTrailsExceededException"
_UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedOperationException =
_MatchServiceError cloudTrail "UnsupportedOperationException"
_KMSKeyDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSKeyDisabledException =
_MatchServiceError cloudTrail "KmsKeyDisabledException"
_InsufficientEncryptionPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_InsufficientEncryptionPolicyException =
_MatchServiceError cloudTrail "InsufficientEncryptionPolicyException"
_InsufficientSNSTopicPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_InsufficientSNSTopicPolicyException =
_MatchServiceError cloudTrail "InsufficientSnsTopicPolicyException"
_InvalidCloudWatchLogsRoleARNException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidCloudWatchLogsRoleARNException =
_MatchServiceError cloudTrail "InvalidCloudWatchLogsRoleArnException"
_TagsLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_TagsLimitExceededException =
_MatchServiceError cloudTrail "TagsLimitExceededException"
_CloudTrailARNInvalidException :: AsError a => Getting (First ServiceError) a ServiceError
_CloudTrailARNInvalidException =
_MatchServiceError cloudTrail "CloudTrailARNInvalidException"
_InvalidLookupAttributesException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidLookupAttributesException =
_MatchServiceError cloudTrail "InvalidLookupAttributesException"
_InvalidTrailNameException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTrailNameException =
_MatchServiceError cloudTrail "InvalidTrailNameException"
_InvalidSNSTopicNameException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSNSTopicNameException =
_MatchServiceError cloudTrail "InvalidSnsTopicNameException"
_ResourceTypeNotSupportedException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceTypeNotSupportedException =
_MatchServiceError cloudTrail "ResourceTypeNotSupportedException"
_CloudWatchLogsDeliveryUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_CloudWatchLogsDeliveryUnavailableException =
_MatchServiceError cloudTrail "CloudWatchLogsDeliveryUnavailableException"
_KMSKeyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSKeyNotFoundException =
_MatchServiceError cloudTrail "KmsKeyNotFoundException"
_TrailNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_TrailNotFoundException = _MatchServiceError cloudTrail "TrailNotFoundException"
_InvalidEventSelectorsException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidEventSelectorsException =
_MatchServiceError cloudTrail "InvalidEventSelectorsException"
_TrailNotProvidedException :: AsError a => Getting (First ServiceError) a ServiceError
_TrailNotProvidedException =
_MatchServiceError cloudTrail "TrailNotProvidedException"
_InvalidS3BucketNameException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidS3BucketNameException =
_MatchServiceError cloudTrail "InvalidS3BucketNameException"
_InvalidCloudWatchLogsLogGroupARNException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidCloudWatchLogsLogGroupARNException =
_MatchServiceError cloudTrail "InvalidCloudWatchLogsLogGroupArnException"
_KMSException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSException = _MatchServiceError cloudTrail "KmsException"
_S3BucketDoesNotExistException :: AsError a => Getting (First ServiceError) a ServiceError
_S3BucketDoesNotExistException =
_MatchServiceError cloudTrail "S3BucketDoesNotExistException"
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextTokenException =
_MatchServiceError cloudTrail "InvalidNextTokenException"
_InvalidTagParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTagParameterException =
_MatchServiceError cloudTrail "InvalidTagParameterException"
_OperationNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError
_OperationNotPermittedException =
_MatchServiceError cloudTrail "OperationNotPermittedException"
_InvalidTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTokenException = _MatchServiceError cloudTrail "InvalidTokenException"
_InvalidMaxResultsException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidMaxResultsException =
_MatchServiceError cloudTrail "InvalidMaxResultsException"
_TrailAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_TrailAlreadyExistsException =
_MatchServiceError cloudTrail "TrailAlreadyExistsException"
_InvalidS3PrefixException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidS3PrefixException =
_MatchServiceError cloudTrail "InvalidS3PrefixException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_MatchServiceError cloudTrail "ResourceNotFoundException"
_InvalidParameterCombinationException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterCombinationException =
_MatchServiceError cloudTrail "InvalidParameterCombinationException"
_InvalidKMSKeyIdException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidKMSKeyIdException =
_MatchServiceError cloudTrail "InvalidKmsKeyIdException"
_InvalidHomeRegionException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidHomeRegionException =
_MatchServiceError cloudTrail "InvalidHomeRegionException"