module Network.AWS.SSM.Types
    (
    
      SSM
    
    , _AssociatedInstances
    , _InvalidNextToken
    , _InvalidInstanceId
    , _StatusUnchanged
    , _DuplicateInstanceId
    , _InvalidDocument
    , _AssociationLimitExceeded
    , _InvalidDocumentContent
    , _AssociationAlreadyExists
    , _AssociationDoesNotExist
    , _InternalServerError
    , _MaxDocumentSizeExceeded
    , _TooManyUpdates
    , _DocumentAlreadyExists
    , _DocumentLimitExceeded
    
    , AssociationFilterKey (..)
    
    , AssociationStatusName (..)
    
    , DocumentFilterKey (..)
    
    , DocumentStatus (..)
    
    , Fault (..)
    
    , Association
    , association
    , aInstanceId
    , aName
    
    , AssociationDescription
    , associationDescription
    , adInstanceId
    , adStatus
    , adDate
    , adName
    
    , AssociationFilter
    , associationFilter
    , afKey
    , afValue
    
    , AssociationStatus
    , associationStatus
    , asAdditionalInfo
    , asDate
    , asName
    , asMessage
    
    , CreateAssociationBatchRequestEntry
    , createAssociationBatchRequestEntry
    , cabreInstanceId
    , cabreName
    
    , DocumentDescription
    , documentDescription
    , dStatus
    , dSha1
    , dCreatedDate
    , dName
    
    , DocumentFilter
    , documentFilter
    , dfKey
    , dfValue
    
    , DocumentIdentifier
    , documentIdentifier
    , diName
    
    , FailedCreateAssociation
    , failedCreateAssociation
    , fcaEntry
    , fcaFault
    , fcaMessage
    ) where
import           Network.AWS.Prelude
import           Network.AWS.Sign.V4
import           Network.AWS.SSM.Types.Product
import           Network.AWS.SSM.Types.Sum
data SSM
instance AWSService SSM where
    type Sg SSM = V4
    service = const svc
      where
        svc =
            Service
            { _svcAbbrev = "SSM"
            , _svcPrefix = "ssm"
            , _svcVersion = "2014-11-06"
            , _svcEndpoint = defaultEndpoint svc
            , _svcTimeout = Just 70
            , _svcStatus = statusSuccess
            , _svcError = parseJSONError
            , _svcRetry = retry
            }
        retry =
            Exponential
            { _retryBase = 5.0e-2
            , _retryGrowth = 2
            , _retryAttempts = 5
            , _retryCheck = check
            }
        check e
          | has (hasCode "ThrottlingException" . hasStatus 400) e =
              Just "throttling_exception"
          | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
          | has (hasStatus 503) e = Just "service_unavailable"
          | has (hasStatus 500) e = Just "general_server_error"
          | has (hasStatus 509) e = Just "limit_exceeded"
          | otherwise = Nothing
_AssociatedInstances :: AsError a => Getting (First ServiceError) a ServiceError
_AssociatedInstances =
    _ServiceError . hasStatus 400 . hasCode "AssociatedInstances"
_InvalidNextToken :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextToken = _ServiceError . hasStatus 400 . hasCode "InvalidNextToken"
_InvalidInstanceId :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidInstanceId =
    _ServiceError . hasStatus 404 . hasCode "InvalidInstanceId"
_StatusUnchanged :: AsError a => Getting (First ServiceError) a ServiceError
_StatusUnchanged = _ServiceError . hasStatus 400 . hasCode "StatusUnchanged"
_DuplicateInstanceId :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateInstanceId =
    _ServiceError . hasStatus 404 . hasCode "DuplicateInstanceId"
_InvalidDocument :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidDocument = _ServiceError . hasStatus 404 . hasCode "InvalidDocument"
_AssociationLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_AssociationLimitExceeded =
    _ServiceError . hasStatus 400 . hasCode "AssociationLimitExceeded"
_InvalidDocumentContent :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidDocumentContent =
    _ServiceError . hasStatus 400 . hasCode "InvalidDocumentContent"
_AssociationAlreadyExists :: AsError a => Getting (First ServiceError) a ServiceError
_AssociationAlreadyExists =
    _ServiceError . hasStatus 400 . hasCode "AssociationAlreadyExists"
_AssociationDoesNotExist :: AsError a => Getting (First ServiceError) a ServiceError
_AssociationDoesNotExist =
    _ServiceError . hasStatus 404 . hasCode "AssociationDoesNotExist"
_InternalServerError :: AsError a => Getting (First ServiceError) a ServiceError
_InternalServerError =
    _ServiceError . hasStatus 500 . hasCode "InternalServerError"
_MaxDocumentSizeExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_MaxDocumentSizeExceeded =
    _ServiceError . hasStatus 400 . hasCode "MaxDocumentSizeExceeded"
_TooManyUpdates :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyUpdates = _ServiceError . hasStatus 429 . hasCode "TooManyUpdates"
_DocumentAlreadyExists :: AsError a => Getting (First ServiceError) a ServiceError
_DocumentAlreadyExists =
    _ServiceError . hasStatus 400 . hasCode "DocumentAlreadyExists"
_DocumentLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_DocumentLimitExceeded =
    _ServiceError . hasStatus 400 . hasCode "DocumentLimitExceeded"