{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Firehose.Types
(
firehose
, _InvalidArgumentException
, _ConcurrentModificationException
, _ServiceUnavailableException
, _ResourceNotFoundException
, _LimitExceededException
, _ResourceInUseException
, CompressionFormat (..)
, DeliveryStreamStatus (..)
, ElasticsearchIndexRotationPeriod (..)
, ElasticsearchS3BackupMode (..)
, NoEncryptionConfig (..)
, BufferingHints
, bufferingHints
, bhSizeInMBs
, bhIntervalInSeconds
, CloudWatchLoggingOptions
, cloudWatchLoggingOptions
, cwloEnabled
, cwloLogGroupName
, cwloLogStreamName
, CopyCommand
, copyCommand
, ccCopyOptions
, ccDataTableColumns
, ccDataTableName
, DeliveryStreamDescription
, deliveryStreamDescription
, dsdCreateTimestamp
, dsdLastUpdateTimestamp
, dsdDeliveryStreamName
, dsdDeliveryStreamARN
, dsdDeliveryStreamStatus
, dsdVersionId
, dsdDestinations
, dsdHasMoreDestinations
, DestinationDescription
, destinationDescription
, ddS3DestinationDescription
, ddElasticsearchDestinationDescription
, ddRedshiftDestinationDescription
, ddDestinationId
, ElasticsearchBufferingHints
, elasticsearchBufferingHints
, ebhSizeInMBs
, ebhIntervalInSeconds
, ElasticsearchDestinationConfiguration
, elasticsearchDestinationConfiguration
, edcIndexRotationPeriod
, edcS3BackupMode
, edcCloudWatchLoggingOptions
, edcBufferingHints
, edcRetryOptions
, edcRoleARN
, edcDomainARN
, edcIndexName
, edcTypeName
, edcS3Configuration
, ElasticsearchDestinationDescription
, elasticsearchDestinationDescription
, eddIndexRotationPeriod
, eddTypeName
, eddS3BackupMode
, eddDomainARN
, eddCloudWatchLoggingOptions
, eddS3DestinationDescription
, eddBufferingHints
, eddRetryOptions
, eddRoleARN
, eddIndexName
, ElasticsearchDestinationUpdate
, elasticsearchDestinationUpdate
, eduIndexRotationPeriod
, eduTypeName
, eduDomainARN
, eduCloudWatchLoggingOptions
, eduS3Update
, eduBufferingHints
, eduRetryOptions
, eduRoleARN
, eduIndexName
, ElasticsearchRetryOptions
, elasticsearchRetryOptions
, eroDurationInSeconds
, EncryptionConfiguration
, encryptionConfiguration
, ecNoEncryptionConfig
, ecKMSEncryptionConfig
, KMSEncryptionConfig
, kmsEncryptionConfig
, kecAWSKMSKeyARN
, PutRecordBatchResponseEntry
, putRecordBatchResponseEntry
, prbreRecordId
, prbreErrorCode
, prbreErrorMessage
, Record
, record
, rData
, RedshiftDestinationConfiguration
, redshiftDestinationConfiguration
, rdcCloudWatchLoggingOptions
, rdcRetryOptions
, rdcRoleARN
, rdcClusterJDBCURL
, rdcCopyCommand
, rdcUsername
, rdcPassword
, rdcS3Configuration
, RedshiftDestinationDescription
, redshiftDestinationDescription
, rddCloudWatchLoggingOptions
, rddRetryOptions
, rddRoleARN
, rddClusterJDBCURL
, rddCopyCommand
, rddUsername
, rddS3DestinationDescription
, RedshiftDestinationUpdate
, redshiftDestinationUpdate
, rduCloudWatchLoggingOptions
, rduUsername
, rduS3Update
, rduPassword
, rduCopyCommand
, rduRetryOptions
, rduClusterJDBCURL
, rduRoleARN
, RedshiftRetryOptions
, redshiftRetryOptions
, rroDurationInSeconds
, S3DestinationConfiguration
, s3DestinationConfiguration
, sdcPrefix
, sdcCloudWatchLoggingOptions
, sdcEncryptionConfiguration
, sdcCompressionFormat
, sdcBufferingHints
, sdcRoleARN
, sdcBucketARN
, S3DestinationDescription
, s3DestinationDescription
, sddPrefix
, sddCloudWatchLoggingOptions
, sddRoleARN
, sddBucketARN
, sddBufferingHints
, sddCompressionFormat
, sddEncryptionConfiguration
, S3DestinationUpdate
, s3DestinationUpdate
, sduPrefix
, sduCloudWatchLoggingOptions
, sduEncryptionConfiguration
, sduCompressionFormat
, sduBufferingHints
, sduBucketARN
, sduRoleARN
) where
import Network.AWS.Firehose.Types.Product
import Network.AWS.Firehose.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
firehose :: Service
firehose =
Service
{ _svcAbbrev = "Firehose"
, _svcSigner = v4
, _svcPrefix = "firehose"
, _svcVersion = "2015-08-04"
, _svcEndpoint = defaultEndpoint firehose
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Firehose"
, _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
_InvalidArgumentException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidArgumentException = _ServiceError . hasCode "InvalidArgumentException"
_ConcurrentModificationException :: AsError a => Getting (First ServiceError) a ServiceError
_ConcurrentModificationException =
_ServiceError . hasCode "ConcurrentModificationException"
_ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceUnavailableException =
_ServiceError . hasCode "ServiceUnavailableException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasCode "ResourceNotFoundException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _ServiceError . hasCode "LimitExceededException"
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUseException = _ServiceError . hasCode "ResourceInUseException"