{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.IoTAnalytics.Types
(
ioTAnalytics
, _InvalidRequestException
, _ResourceAlreadyExistsException
, _ThrottlingException
, _InternalFailureException
, _ServiceUnavailableException
, _ResourceNotFoundException
, _LimitExceededException
, ChannelStatus (..)
, DatasetContentState (..)
, DatasetStatus (..)
, DatastoreStatus (..)
, LoggingLevel (..)
, ReprocessingStatus (..)
, AddAttributesActivity
, addAttributesActivity
, aaaNext
, aaaName
, aaaAttributes
, BatchPutMessageErrorEntry
, batchPutMessageErrorEntry
, bpmeeErrorCode
, bpmeeErrorMessage
, bpmeeMessageId
, Channel
, channel
, cCreationTime
, cStatus
, cArn
, cRetentionPeriod
, cName
, cLastUpdateTime
, ChannelActivity
, channelActivity
, caNext
, caName
, caChannelName
, ChannelSummary
, channelSummary
, csCreationTime
, csStatus
, csChannelName
, csLastUpdateTime
, Dataset
, dataset
, dCreationTime
, dStatus
, dArn
, dActions
, dTriggers
, dName
, dLastUpdateTime
, DatasetAction
, datasetAction
, daQueryAction
, daActionName
, DatasetContentStatus
, datasetContentStatus
, dcsState
, dcsReason
, DatasetEntry
, datasetEntry
, deEntryName
, deDataURI
, DatasetSummary
, datasetSummary
, dssCreationTime
, dssStatus
, dssDatasetName
, dssLastUpdateTime
, DatasetTrigger
, datasetTrigger
, dtSchedule
, Datastore
, datastore
, datCreationTime
, datStatus
, datArn
, datRetentionPeriod
, datName
, datLastUpdateTime
, DatastoreActivity
, datastoreActivity
, daName
, daDatastoreName
, DatastoreSummary
, datastoreSummary
, dsCreationTime
, dsStatus
, dsDatastoreName
, dsLastUpdateTime
, DeviceRegistryEnrichActivity
, deviceRegistryEnrichActivity
, dreaNext
, dreaName
, dreaAttribute
, dreaThingName
, dreaRoleARN
, DeviceShadowEnrichActivity
, deviceShadowEnrichActivity
, dseaNext
, dseaName
, dseaAttribute
, dseaThingName
, dseaRoleARN
, FilterActivity
, filterActivity
, faNext
, faName
, faFilter
, LambdaActivity
, lambdaActivity
, laNext
, laName
, laLambdaName
, laBatchSize
, LoggingOptions
, loggingOptions
, loRoleARN
, loLevel
, loEnabled
, MathActivity
, mathActivity
, maNext
, maName
, maAttribute
, maMath
, Message
, message
, mMessageId
, mPayload
, Pipeline
, pipeline
, pCreationTime
, pArn
, pActivities
, pName
, pReprocessingSummaries
, pLastUpdateTime
, PipelineActivity
, pipelineActivity
, paSelectAttributes
, paChannel
, paAddAttributes
, paDeviceRegistryEnrich
, paRemoveAttributes
, paLambda
, paDatastore
, paDeviceShadowEnrich
, paFilter
, paMath
, PipelineSummary
, pipelineSummary
, psCreationTime
, psPipelineName
, psReprocessingSummaries
, psLastUpdateTime
, RemoveAttributesActivity
, removeAttributesActivity
, raaNext
, raaName
, raaAttributes
, ReprocessingSummary
, reprocessingSummary
, rsCreationTime
, rsStatus
, rsId
, RetentionPeriod
, retentionPeriod
, rpUnlimited
, rpNumberOfDays
, Schedule
, schedule
, sExpression
, SelectAttributesActivity
, selectAttributesActivity
, saaNext
, saaName
, saaAttributes
, SqlQueryDatasetAction
, sqlQueryDatasetAction
, sqdaSqlQuery
) where
import Network.AWS.IoTAnalytics.Types.Product
import Network.AWS.IoTAnalytics.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
ioTAnalytics :: Service
ioTAnalytics =
Service
{ _svcAbbrev = "IoTAnalytics"
, _svcSigner = v4
, _svcPrefix = "iotanalytics"
, _svcVersion = "2017-11-27"
, _svcEndpoint = defaultEndpoint ioTAnalytics
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "IoTAnalytics"
, _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
_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidRequestException =
_MatchServiceError ioTAnalytics "InvalidRequestException" . hasStatus 400
_ResourceAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceAlreadyExistsException =
_MatchServiceError ioTAnalytics "ResourceAlreadyExistsException" .
hasStatus 409
_ThrottlingException :: AsError a => Getting (First ServiceError) a ServiceError
_ThrottlingException =
_MatchServiceError ioTAnalytics "ThrottlingException" . hasStatus 429
_InternalFailureException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalFailureException =
_MatchServiceError ioTAnalytics "InternalFailureException" . hasStatus 500
_ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceUnavailableException =
_MatchServiceError ioTAnalytics "ServiceUnavailableException" . hasStatus 503
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_MatchServiceError ioTAnalytics "ResourceNotFoundException" . hasStatus 404
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException =
_MatchServiceError ioTAnalytics "LimitExceededException" . hasStatus 410