{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Inspector.Types
(
inspector
, _AccessDeniedException
, _AssessmentRunInProgressException
, _NoSuchEntityException
, _UnsupportedFeatureException
, _AgentsAlreadyRunningAssessmentException
, _InvalidCrossAccountRoleException
, _InvalidInputException
, _InternalException
, _LimitExceededException
, AgentHealth (..)
, AgentHealthCode (..)
, AssessmentRunNotificationSNSStatusCode (..)
, AssessmentRunState (..)
, AssetType (..)
, FailedItemErrorCode (..)
, InspectorEvent (..)
, Locale (..)
, ReportFileFormat (..)
, ReportStatus (..)
, ReportType (..)
, Severity (..)
, StopAction (..)
, AgentFilter
, agentFilter
, afAgentHealths
, afAgentHealthCodes
, AgentPreview
, agentPreview
, apHostname
, apAutoScalingGroup
, apOperatingSystem
, apAgentVersion
, apKernelVersion
, apAgentHealth
, apIpv4Address
, apAgentId
, AssessmentRun
, assessmentRun
, arStartedAt
, arCompletedAt
, arArn
, arName
, arAssessmentTemplateARN
, arState
, arDurationInSeconds
, arRulesPackageARNs
, arUserAttributesForFindings
, arCreatedAt
, arStateChangedAt
, arDataCollected
, arStateChanges
, arNotifications
, arFindingCounts
, AssessmentRunAgent
, assessmentRunAgent
, araAutoScalingGroup
, araAgentHealthDetails
, araAgentId
, araAssessmentRunARN
, araAgentHealth
, araAgentHealthCode
, araTelemetryMetadata
, AssessmentRunFilter
, assessmentRunFilter
, arfStates
, arfNamePattern
, arfStartTimeRange
, arfStateChangeTimeRange
, arfRulesPackageARNs
, arfCompletionTimeRange
, arfDurationRange
, AssessmentRunNotification
, assessmentRunNotification
, arnSnsTopicARN
, arnSnsPublishStatusCode
, arnMessage
, arnDate
, arnEvent
, arnError
, AssessmentRunStateChange
, assessmentRunStateChange
, arscStateChangedAt
, arscState
, AssessmentTarget
, assessmentTarget
, aArn
, aName
, aResourceGroupARN
, aCreatedAt
, aUpdatedAt
, AssessmentTargetFilter
, assessmentTargetFilter
, atfAssessmentTargetNamePattern
, AssessmentTemplate
, assessmentTemplate
, atLastAssessmentRunARN
, atArn
, atName
, atAssessmentTargetARN
, atDurationInSeconds
, atRulesPackageARNs
, atUserAttributesForFindings
, atAssessmentRunCount
, atCreatedAt
, AssessmentTemplateFilter
, assessmentTemplateFilter
, atfNamePattern
, atfRulesPackageARNs
, atfDurationRange
, AssetAttributes
, assetAttributes
, aaHostname
, aaAutoScalingGroup
, aaIpv4Addresses
, aaAgentId
, aaAmiId
, aaSchemaVersion
, Attribute
, attribute
, aValue
, aKey
, DurationRange
, durationRange
, drMinSeconds
, drMaxSeconds
, EventSubscription
, eventSubscription
, esEvent
, esSubscribedAt
, FailedItemDetails
, failedItemDetails
, fidFailureCode
, fidRetryable
, Finding
, finding
, fService
, fSeverity
, fSchemaVersion
, fConfidence
, fAssetAttributes
, fServiceAttributes
, fId
, fNumericSeverity
, fAssetType
, fTitle
, fIndicatorOfCompromise
, fDescription
, fRecommendation
, fArn
, fAttributes
, fUserAttributes
, fCreatedAt
, fUpdatedAt
, FindingFilter
, findingFilter
, ffAgentIds
, ffRuleNames
, ffUserAttributes
, ffRulesPackageARNs
, ffAttributes
, ffSeverities
, ffCreationTimeRange
, ffAutoScalingGroups
, InspectorServiceAttributes
, inspectorServiceAttributes
, isaRulesPackageARN
, isaAssessmentRunARN
, isaSchemaVersion
, ResourceGroup
, resourceGroup
, rgArn
, rgTags
, rgCreatedAt
, ResourceGroupTag
, resourceGroupTag
, rgtValue
, rgtKey
, RulesPackage
, rulesPackage
, rpDescription
, rpArn
, rpName
, rpVersion
, rpProvider
, Subscription
, subscription
, sResourceARN
, sTopicARN
, sEventSubscriptions
, Tag
, tag
, tagValue
, tagKey
, TelemetryMetadata
, telemetryMetadata
, tmDataSize
, tmMessageType
, tmCount
, TimestampRange
, timestampRange
, trEndDate
, trBeginDate
) where
import Network.AWS.Inspector.Types.Product
import Network.AWS.Inspector.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
inspector :: Service
inspector =
Service
{ _svcAbbrev = "Inspector"
, _svcSigner = v4
, _svcPrefix = "inspector"
, _svcVersion = "2016-02-16"
, _svcEndpoint = defaultEndpoint inspector
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Inspector"
, _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
_AccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError
_AccessDeniedException = _MatchServiceError inspector "AccessDeniedException"
_AssessmentRunInProgressException :: AsError a => Getting (First ServiceError) a ServiceError
_AssessmentRunInProgressException =
_MatchServiceError inspector "AssessmentRunInProgressException"
_NoSuchEntityException :: AsError a => Getting (First ServiceError) a ServiceError
_NoSuchEntityException = _MatchServiceError inspector "NoSuchEntityException"
_UnsupportedFeatureException :: AsError a => Getting (First ServiceError) a ServiceError
_UnsupportedFeatureException =
_MatchServiceError inspector "UnsupportedFeatureException"
_AgentsAlreadyRunningAssessmentException :: AsError a => Getting (First ServiceError) a ServiceError
_AgentsAlreadyRunningAssessmentException =
_MatchServiceError inspector "AgentsAlreadyRunningAssessmentException"
_InvalidCrossAccountRoleException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidCrossAccountRoleException =
_MatchServiceError inspector "InvalidCrossAccountRoleException"
_InvalidInputException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidInputException = _MatchServiceError inspector "InvalidInputException"
_InternalException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalException = _MatchServiceError inspector "InternalException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _MatchServiceError inspector "LimitExceededException"