module Network.AWS.IoT.Types
(
ioT
, _CertificateConflictException
, _SqlParseException
, _InvalidRequestException
, _TransferConflictException
, _CertificateStateException
, _RegistrationCodeValidationException
, _MalformedPolicyException
, _DeleteConflictException
, _ResourceAlreadyExistsException
, _CertificateValidationException
, _TransferAlreadyCompletedException
, _ThrottlingException
, _InternalFailureException
, _VersionsLimitExceededException
, _ServiceUnavailableException
, _InternalException
, _UnauthorizedException
, _ResourceNotFoundException
, _LimitExceededException
, CACertificateStatus (..)
, CertificateStatus (..)
, LogLevel (..)
, MessageFormat (..)
, Action
, action
, aCloudwatchMetric
, aCloudwatchAlarm
, aSns
, aDynamoDB
, aFirehose
, aLambda
, aKinesis
, aS3
, aElasticsearch
, aRepublish
, aSqs
, AttributePayload
, attributePayload
, apAttributes
, CACertificate
, cACertificate
, cacStatus
, cacCertificateARN
, cacCertificateId
, cacCreationDate
, CACertificateDescription
, cACertificateDescription
, cacdStatus
, cacdOwnedBy
, cacdCertificatePem
, cacdCertificateARN
, cacdCertificateId
, cacdCreationDate
, Certificate
, certificate
, cStatus
, cCertificateARN
, cCertificateId
, cCreationDate
, CertificateDescription
, certificateDescription
, cdStatus
, cdOwnedBy
, cdLastModifiedDate
, cdCaCertificateId
, cdPreviousOwnedBy
, cdCertificatePem
, cdCertificateARN
, cdCertificateId
, cdCreationDate
, cdTransferData
, CloudwatchAlarmAction
, cloudwatchAlarmAction
, caaRoleARN
, caaAlarmName
, caaStateReason
, caaStateValue
, CloudwatchMetricAction
, cloudwatchMetricAction
, cmaMetricTimestamp
, cmaRoleARN
, cmaMetricNamespace
, cmaMetricName
, cmaMetricValue
, cmaMetricUnit
, DynamoDBAction
, dynamoDBAction
, ddaPayloadField
, ddaTableName
, ddaRoleARN
, ddaHashKeyField
, ddaHashKeyValue
, ddaRangeKeyField
, ddaRangeKeyValue
, ElasticsearchAction
, elasticsearchAction
, eaRoleARN
, eaEndpoint
, eaIndex
, eaType
, eaId
, FirehoseAction
, firehoseAction
, faRoleARN
, faDeliveryStreamName
, KeyPair
, keyPair
, kpPrivateKey
, kpPublicKey
, KinesisAction
, kinesisAction
, kaPartitionKey
, kaRoleARN
, kaStreamName
, LambdaAction
, lambdaAction
, laFunctionARN
, LoggingOptionsPayload
, loggingOptionsPayload
, lopLogLevel
, lopRoleARN
, Policy
, policy
, pPolicyName
, pPolicyARN
, PolicyVersion
, policyVersion
, pvVersionId
, pvCreateDate
, pvIsDefaultVersion
, RepublishAction
, republishAction
, raRoleARN
, raTopic
, S3Action
, s3Action
, sRoleARN
, sBucketName
, sKey
, SNSAction
, snsAction
, snsaMessageFormat
, snsaTargetARN
, snsaRoleARN
, SqsAction
, sqsAction
, saUseBase64
, saRoleARN
, saQueueURL
, ThingAttribute
, thingAttribute
, taAttributes
, taThingName
, TopicRule
, topicRule
, trCreatedAt
, trActions
, trAwsIotSqlVersion
, trRuleDisabled
, trRuleName
, trSql
, trDescription
, TopicRuleListItem
, topicRuleListItem
, trliCreatedAt
, trliRuleDisabled
, trliRuleName
, trliRuleARN
, trliTopicPattern
, TopicRulePayload
, topicRulePayload
, trpAwsIotSqlVersion
, trpRuleDisabled
, trpDescription
, trpSql
, trpActions
, TransferData
, transferData
, tdTransferDate
, tdAcceptDate
, tdTransferMessage
, tdRejectDate
, tdRejectReason
) where
import Network.AWS.IoT.Types.Product
import Network.AWS.IoT.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
ioT :: Service
ioT =
Service
{ _svcAbbrev = "IoT"
, _svcSigner = v4
, _svcPrefix = "iot"
, _svcVersion = "2015-05-28"
, _svcEndpoint = defaultEndpoint ioT
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "IoT"
, _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 504) e = Just "gateway_timeout"
| 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
_CertificateConflictException :: AsError a => Getting (First ServiceError) a ServiceError
_CertificateConflictException =
_ServiceError . hasStatus 409 . hasCode "CertificateConflictException"
_SqlParseException :: AsError a => Getting (First ServiceError) a ServiceError
_SqlParseException =
_ServiceError . hasStatus 400 . hasCode "SqlParseException"
_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidRequestException =
_ServiceError . hasStatus 400 . hasCode "InvalidRequestException"
_TransferConflictException :: AsError a => Getting (First ServiceError) a ServiceError
_TransferConflictException =
_ServiceError . hasStatus 409 . hasCode "TransferConflictException"
_CertificateStateException :: AsError a => Getting (First ServiceError) a ServiceError
_CertificateStateException =
_ServiceError . hasStatus 406 . hasCode "CertificateStateException"
_RegistrationCodeValidationException :: AsError a => Getting (First ServiceError) a ServiceError
_RegistrationCodeValidationException =
_ServiceError .
hasStatus 400 . hasCode "RegistrationCodeValidationException"
_MalformedPolicyException :: AsError a => Getting (First ServiceError) a ServiceError
_MalformedPolicyException =
_ServiceError . hasStatus 400 . hasCode "MalformedPolicyException"
_DeleteConflictException :: AsError a => Getting (First ServiceError) a ServiceError
_DeleteConflictException =
_ServiceError . hasStatus 409 . hasCode "DeleteConflictException"
_ResourceAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceAlreadyExistsException =
_ServiceError . hasStatus 409 . hasCode "ResourceAlreadyExistsException"
_CertificateValidationException :: AsError a => Getting (First ServiceError) a ServiceError
_CertificateValidationException =
_ServiceError . hasStatus 400 . hasCode "CertificateValidationException"
_TransferAlreadyCompletedException :: AsError a => Getting (First ServiceError) a ServiceError
_TransferAlreadyCompletedException =
_ServiceError . hasStatus 410 . hasCode "TransferAlreadyCompletedException"
_ThrottlingException :: AsError a => Getting (First ServiceError) a ServiceError
_ThrottlingException =
_ServiceError . hasStatus 429 . hasCode "ThrottlingException"
_InternalFailureException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalFailureException =
_ServiceError . hasStatus 500 . hasCode "InternalFailureException"
_VersionsLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_VersionsLimitExceededException =
_ServiceError . hasStatus 409 . hasCode "VersionsLimitExceededException"
_ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceUnavailableException =
_ServiceError . hasStatus 503 . hasCode "ServiceUnavailableException"
_InternalException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalException =
_ServiceError . hasStatus 500 . hasCode "InternalException"
_UnauthorizedException :: AsError a => Getting (First ServiceError) a ServiceError
_UnauthorizedException =
_ServiceError . hasStatus 401 . hasCode "UnauthorizedException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasStatus 404 . hasCode "ResourceNotFoundException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException =
_ServiceError . hasStatus 410 . hasCode "LimitExceededException"