module Network.AWS.Glacier.Types
(
Glacier
, _PolicyEnforcedException
, _InvalidParameterValueException
, _RequestTimeoutException
, _ServiceUnavailableException
, _ResourceNotFoundException
, _LimitExceededException
, _MissingParameterValueException
, ActionCode (..)
, StatusCode (..)
, ArchiveCreationOutput
, archiveCreationOutput
, acoArchiveId
, acoChecksum
, acoLocation
, DataRetrievalPolicy
, dataRetrievalPolicy
, drpRules
, DataRetrievalRule
, dataRetrievalRule
, drrStrategy
, drrBytesPerHour
, DescribeVaultOutput
, describeVaultOutput
, dvoVaultName
, dvoSizeInBytes
, dvoLastInventoryDate
, dvoVaultARN
, dvoCreationDate
, dvoNumberOfArchives
, GlacierJobDescription
, glacierJobDescription
, gjdArchiveId
, gjdSHA256TreeHash
, gjdJobId
, gjdRetrievalByteRange
, gjdInventoryRetrievalParameters
, gjdAction
, gjdJobDescription
, gjdSNSTopic
, gjdVaultARN
, gjdStatusMessage
, gjdArchiveSHA256TreeHash
, gjdCreationDate
, gjdCompleted
, gjdCompletionDate
, gjdArchiveSizeInBytes
, gjdStatusCode
, gjdInventorySizeInBytes
, InventoryRetrievalJobDescription
, inventoryRetrievalJobDescription
, irjdFormat
, irjdEndDate
, irjdStartDate
, irjdMarker
, irjdLimit
, InventoryRetrievalJobInput
, inventoryRetrievalJobInput
, irjiEndDate
, irjiStartDate
, irjiMarker
, irjiLimit
, JobParameters
, jobParameters
, jpArchiveId
, jpRetrievalByteRange
, jpFormat
, jpInventoryRetrievalParameters
, jpSNSTopic
, jpType
, jpDescription
, PartListElement
, partListElement
, pleSHA256TreeHash
, pleRangeInBytes
, UploadListElement
, uploadListElement
, uleMultipartUploadId
, uleArchiveDescription
, ulePartSizeInBytes
, uleVaultARN
, uleCreationDate
, VaultAccessPolicy
, vaultAccessPolicy
, vapPolicy
, VaultLockPolicy
, vaultLockPolicy
, vlpPolicy
, VaultNotificationConfig
, vaultNotificationConfig
, vncSNSTopic
, vncEvents
) where
import Network.AWS.Glacier.Types.Product
import Network.AWS.Glacier.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
data Glacier
instance AWSService Glacier where
type Sg Glacier = V4
service = const svc
where
svc =
Service
{ _svcAbbrev = "Glacier"
, _svcPrefix = "glacier"
, _svcVersion = "2012-06-01"
, _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
_PolicyEnforcedException :: AsError a => Getting (First ServiceError) a ServiceError
_PolicyEnforcedException =
_ServiceError . hasStatus 400 . hasCode "PolicyEnforcedException"
_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterValueException =
_ServiceError . hasStatus 400 . hasCode "InvalidParameterValueException"
_RequestTimeoutException :: AsError a => Getting (First ServiceError) a ServiceError
_RequestTimeoutException =
_ServiceError . hasStatus 408 . hasCode "RequestTimeoutException"
_ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceUnavailableException =
_ServiceError . hasStatus 500 . hasCode "ServiceUnavailableException"
_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 400 . hasCode "LimitExceededException"
_MissingParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
_MissingParameterValueException =
_ServiceError . hasStatus 400 . hasCode "MissingParameterValueException"