module Network.AWS.CloudTrail.Types
(
cloudTrail
, _InvalidTimeRangeException
, _InsufficientS3BucketPolicyException
, _MaximumNumberOfTrailsExceededException
, _UnsupportedOperationException
, _KMSKeyDisabledException
, _InsufficientEncryptionPolicyException
, _InsufficientSNSTopicPolicyException
, _InvalidCloudWatchLogsRoleARNException
, _TagsLimitExceededException
, _CloudTrailARNInvalidException
, _InvalidLookupAttributesException
, _InvalidTrailNameException
, _InvalidSNSTopicNameException
, _ResourceTypeNotSupportedException
, _CloudWatchLogsDeliveryUnavailableException
, _KMSKeyNotFoundException
, _TrailNotFoundException
, _TrailNotProvidedException
, _InvalidS3BucketNameException
, _InvalidCloudWatchLogsLogGroupARNException
, _S3BucketDoesNotExistException
, _InvalidNextTokenException
, _InvalidTagParameterException
, _OperationNotPermittedException
, _InvalidTokenException
, _InvalidMaxResultsException
, _TrailAlreadyExistsException
, _InvalidS3PrefixException
, _ResourceNotFoundException
, _InvalidParameterCombinationException
, _InvalidKMSKeyIdException
, _InvalidHomeRegionException
, LookupAttributeKey (..)
, Event
, event
, eUsername
, eResources
, eEventTime
, eCloudTrailEvent
, eEventName
, eEventId
, 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
, tSNSTopicName
, tCloudWatchLogsLogGroupARN
, tKMSKeyId
, tHomeRegion
, tName
, tIncludeGlobalServiceEvents
, 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
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| 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 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 . hasCode "InvalidTimeRangeException"
_InsufficientS3BucketPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_InsufficientS3BucketPolicyException =
_ServiceError . hasCode "InsufficientS3BucketPolicyException"
_MaximumNumberOfTrailsExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_MaximumNumberOfTrailsExceededException =
_ServiceError . hasCode "MaximumNumberOfTrailsExceededException"
_UnsupportedOperationException :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedOperationException =
_ServiceError . hasCode "UnsupportedOperationException"
_KMSKeyDisabledException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSKeyDisabledException = _ServiceError . hasCode "KmsKeyDisabledException"
_InsufficientEncryptionPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_InsufficientEncryptionPolicyException =
_ServiceError . hasCode "InsufficientEncryptionPolicyException"
_InsufficientSNSTopicPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_InsufficientSNSTopicPolicyException =
_ServiceError . hasCode "InsufficientSnsTopicPolicyException"
_InvalidCloudWatchLogsRoleARNException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidCloudWatchLogsRoleARNException =
_ServiceError . hasCode "InvalidCloudWatchLogsRoleArnException"
_TagsLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_TagsLimitExceededException =
_ServiceError . hasCode "TagsLimitExceededException"
_CloudTrailARNInvalidException :: AsError a => Getting (First ServiceError) a ServiceError
_CloudTrailARNInvalidException =
_ServiceError . hasCode "CloudTrailARNInvalidException"
_InvalidLookupAttributesException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidLookupAttributesException =
_ServiceError . hasCode "InvalidLookupAttributesException"
_InvalidTrailNameException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTrailNameException =
_ServiceError . hasCode "InvalidTrailNameException"
_InvalidSNSTopicNameException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidSNSTopicNameException =
_ServiceError . hasCode "InvalidSnsTopicNameException"
_ResourceTypeNotSupportedException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceTypeNotSupportedException =
_ServiceError . hasCode "ResourceTypeNotSupportedException"
_CloudWatchLogsDeliveryUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_CloudWatchLogsDeliveryUnavailableException =
_ServiceError . hasCode "CloudWatchLogsDeliveryUnavailableException"
_KMSKeyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_KMSKeyNotFoundException = _ServiceError . hasCode "KmsKeyNotFoundException"
_TrailNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_TrailNotFoundException = _ServiceError . hasCode "TrailNotFoundException"
_TrailNotProvidedException :: AsError a => Getting (First ServiceError) a ServiceError
_TrailNotProvidedException =
_ServiceError . hasCode "TrailNotProvidedException"
_InvalidS3BucketNameException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidS3BucketNameException =
_ServiceError . hasCode "InvalidS3BucketNameException"
_InvalidCloudWatchLogsLogGroupARNException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidCloudWatchLogsLogGroupARNException =
_ServiceError . hasCode "InvalidCloudWatchLogsLogGroupArnException"
_S3BucketDoesNotExistException :: AsError a => Getting (First ServiceError) a ServiceError
_S3BucketDoesNotExistException =
_ServiceError . hasCode "S3BucketDoesNotExistException"
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextTokenException =
_ServiceError . hasCode "InvalidNextTokenException"
_InvalidTagParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTagParameterException =
_ServiceError . hasCode "InvalidTagParameterException"
_OperationNotPermittedException :: AsError a => Getting (First ServiceError) a ServiceError
_OperationNotPermittedException =
_ServiceError . hasCode "OperationNotPermittedException"
_InvalidTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTokenException = _ServiceError . hasCode "InvalidTokenException"
_InvalidMaxResultsException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidMaxResultsException =
_ServiceError . hasCode "InvalidMaxResultsException"
_TrailAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_TrailAlreadyExistsException =
_ServiceError . hasCode "TrailAlreadyExistsException"
_InvalidS3PrefixException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidS3PrefixException = _ServiceError . hasCode "InvalidS3PrefixException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasCode "ResourceNotFoundException"
_InvalidParameterCombinationException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterCombinationException =
_ServiceError . hasCode "InvalidParameterCombinationException"
_InvalidKMSKeyIdException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidKMSKeyIdException = _ServiceError . hasCode "InvalidKmsKeyIdException"
_InvalidHomeRegionException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidHomeRegionException =
_ServiceError . hasCode "InvalidHomeRegionException"