{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.SecretsManager.Types
(
secretsManager
, _MalformedPolicyDocumentException
, _InvalidParameterException
, _InvalidRequestException
, _DecryptionFailure
, _EncryptionFailure
, _InvalidNextTokenException
, _InternalServiceError
, _ResourceExistsException
, _ResourceNotFoundException
, _LimitExceededException
, RotationRulesType
, rotationRulesType
, rrtAutomaticallyAfterDays
, SecretListEntry
, secretListEntry
, sleLastChangedDate
, sleARN
, sleSecretVersionsToStages
, sleRotationRules
, sleDeletedDate
, sleRotationEnabled
, sleKMSKeyId
, sleName
, sleLastRotatedDate
, sleLastAccessedDate
, sleDescription
, sleRotationLambdaARN
, sleTags
, SecretVersionsListEntry
, secretVersionsListEntry
, svleVersionId
, svleVersionStages
, svleCreatedDate
, svleLastAccessedDate
, Tag
, tag
, tagValue
, tagKey
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.SecretsManager.Types.Product
import Network.AWS.SecretsManager.Types.Sum
import Network.AWS.Sign.V4
secretsManager :: Service
secretsManager =
Service
{ _svcAbbrev = "SecretsManager"
, _svcSigner = v4
, _svcPrefix = "secretsmanager"
, _svcVersion = "2017-10-17"
, _svcEndpoint = defaultEndpoint secretsManager
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "SecretsManager"
, _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
_MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError
_MalformedPolicyDocumentException =
_MatchServiceError secretsManager "MalformedPolicyDocumentException"
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterException =
_MatchServiceError secretsManager "InvalidParameterException"
_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidRequestException =
_MatchServiceError secretsManager "InvalidRequestException"
_DecryptionFailure :: AsError a => Getting (First ServiceError) a ServiceError
_DecryptionFailure = _MatchServiceError secretsManager "DecryptionFailure"
_EncryptionFailure :: AsError a => Getting (First ServiceError) a ServiceError
_EncryptionFailure = _MatchServiceError secretsManager "EncryptionFailure"
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextTokenException =
_MatchServiceError secretsManager "InvalidNextTokenException"
_InternalServiceError :: AsError a => Getting (First ServiceError) a ServiceError
_InternalServiceError = _MatchServiceError secretsManager "InternalServiceError"
_ResourceExistsException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceExistsException =
_MatchServiceError secretsManager "ResourceExistsException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_MatchServiceError secretsManager "ResourceNotFoundException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException =
_MatchServiceError secretsManager "LimitExceededException"