{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.ElasticSearch.Types
(
elasticSearch
, _ValidationException
, _ResourceAlreadyExistsException
, _BaseException
, _DisabledOperationException
, _InternalException
, _InvalidTypeException
, _ResourceNotFoundException
, _LimitExceededException
, ESPartitionInstanceType (..)
, LogType (..)
, OptionState (..)
, ReservedElasticsearchInstancePaymentOption (..)
, VolumeType (..)
, AccessPoliciesStatus
, accessPoliciesStatus
, apsOptions
, apsStatus
, AdditionalLimit
, additionalLimit
, alLimitName
, alLimitValues
, AdvancedOptionsStatus
, advancedOptionsStatus
, aosOptions
, aosStatus
, CognitoOptions
, cognitoOptions
, coIdentityPoolId
, coEnabled
, coUserPoolId
, coRoleARN
, CognitoOptionsStatus
, cognitoOptionsStatus
, cosOptions
, cosStatus
, DomainInfo
, domainInfo
, diDomainName
, EBSOptions
, ebsOptions
, eoVolumeSize
, eoIOPS
, eoVolumeType
, eoEBSEnabled
, EBSOptionsStatus
, ebsOptionsStatus
, eosOptions
, eosStatus
, ElasticsearchClusterConfig
, elasticsearchClusterConfig
, eccDedicatedMasterCount
, eccDedicatedMasterType
, eccDedicatedMasterEnabled
, eccInstanceCount
, eccZoneAwarenessEnabled
, eccInstanceType
, ElasticsearchClusterConfigStatus
, elasticsearchClusterConfigStatus
, eccsOptions
, eccsStatus
, ElasticsearchDomainConfig
, elasticsearchDomainConfig
, edcEBSOptions
, edcAccessPolicies
, edcLogPublishingOptions
, edcElasticsearchClusterConfig
, edcSnapshotOptions
, edcCognitoOptions
, edcEncryptionAtRestOptions
, edcVPCOptions
, edcAdvancedOptions
, edcElasticsearchVersion
, ElasticsearchDomainStatus
, elasticsearchDomainStatus
, edsEBSOptions
, edsAccessPolicies
, edsLogPublishingOptions
, edsCreated
, edsSnapshotOptions
, edsCognitoOptions
, edsEncryptionAtRestOptions
, edsDeleted
, edsVPCOptions
, edsEndpoints
, edsProcessing
, edsEndpoint
, edsAdvancedOptions
, edsElasticsearchVersion
, edsDomainId
, edsDomainName
, edsARN
, edsElasticsearchClusterConfig
, ElasticsearchVersionStatus
, elasticsearchVersionStatus
, evsOptions
, evsStatus
, EncryptionAtRestOptions
, encryptionAtRestOptions
, earoEnabled
, earoKMSKeyId
, EncryptionAtRestOptionsStatus
, encryptionAtRestOptionsStatus
, earosOptions
, earosStatus
, InstanceCountLimits
, instanceCountLimits
, iclMaximumInstanceCount
, iclMinimumInstanceCount
, InstanceLimits
, instanceLimits
, ilInstanceCountLimits
, Limits
, limits
, lInstanceLimits
, lAdditionalLimits
, lStorageTypes
, LogPublishingOption
, logPublishingOption
, lpoEnabled
, lpoCloudWatchLogsLogGroupARN
, LogPublishingOptionsStatus
, logPublishingOptionsStatus
, lposStatus
, lposOptions
, OptionStatus
, optionStatus
, osPendingDeletion
, osUpdateVersion
, osCreationDate
, osUpdateDate
, osState
, RecurringCharge
, recurringCharge
, rcRecurringChargeFrequency
, rcRecurringChargeAmount
, ReservedElasticsearchInstance
, reservedElasticsearchInstance
, reiState
, reiCurrencyCode
, reiStartTime
, reiReservedElasticsearchInstanceOfferingId
, reiReservedElasticsearchInstanceId
, reiElasticsearchInstanceCount
, reiReservationName
, reiElasticsearchInstanceType
, reiRecurringCharges
, reiUsagePrice
, reiFixedPrice
, reiDuration
, reiPaymentOption
, ReservedElasticsearchInstanceOffering
, reservedElasticsearchInstanceOffering
, reioCurrencyCode
, reioReservedElasticsearchInstanceOfferingId
, reioElasticsearchInstanceType
, reioRecurringCharges
, reioUsagePrice
, reioFixedPrice
, reioDuration
, reioPaymentOption
, SnapshotOptions
, snapshotOptions
, soAutomatedSnapshotStartHour
, SnapshotOptionsStatus
, snapshotOptionsStatus
, sosOptions
, sosStatus
, StorageType
, storageType
, stStorageTypeLimits
, stStorageSubTypeName
, stStorageTypeName
, StorageTypeLimit
, storageTypeLimit
, stlLimitName
, stlLimitValues
, Tag
, tag
, tagKey
, tagValue
, VPCDerivedInfo
, vpcDerivedInfo
, vdiSecurityGroupIds
, vdiSubnetIds
, vdiVPCId
, vdiAvailabilityZones
, VPCDerivedInfoStatus
, vpcDerivedInfoStatus
, vdisOptions
, vdisStatus
, VPCOptions
, vpcOptions
, voSecurityGroupIds
, voSubnetIds
) where
import Network.AWS.ElasticSearch.Types.Product
import Network.AWS.ElasticSearch.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
elasticSearch :: Service
elasticSearch =
Service
{ _svcAbbrev = "ElasticSearch"
, _svcSigner = v4
, _svcPrefix = "es"
, _svcVersion = "2015-01-01"
, _svcEndpoint = defaultEndpoint elasticSearch
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "ElasticSearch"
, _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
_ValidationException :: AsError a => Getting (First ServiceError) a ServiceError
_ValidationException =
_MatchServiceError elasticSearch "ValidationException" . hasStatus 400
_ResourceAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceAlreadyExistsException =
_MatchServiceError elasticSearch "ResourceAlreadyExistsException" .
hasStatus 409
_BaseException :: AsError a => Getting (First ServiceError) a ServiceError
_BaseException = _MatchServiceError elasticSearch "BaseException"
_DisabledOperationException :: AsError a => Getting (First ServiceError) a ServiceError
_DisabledOperationException =
_MatchServiceError elasticSearch "DisabledOperationException" . hasStatus 409
_InternalException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalException =
_MatchServiceError elasticSearch "InternalException" . hasStatus 500
_InvalidTypeException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidTypeException =
_MatchServiceError elasticSearch "InvalidTypeException" . hasStatus 409
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_MatchServiceError elasticSearch "ResourceNotFoundException" . hasStatus 409
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException =
_MatchServiceError elasticSearch "LimitExceededException" . hasStatus 409