{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Glacier.Types
(
glacier
, _PolicyEnforcedException
, _InvalidParameterValueException
, _RequestTimeoutException
, _ServiceUnavailableException
, _InsufficientCapacityException
, _ResourceNotFoundException
, _LimitExceededException
, _MissingParameterValueException
, ActionCode (..)
, CannedACL (..)
, EncryptionType (..)
, ExpressionType (..)
, FileHeaderInfo (..)
, Permission (..)
, QuoteFields (..)
, StatusCode (..)
, StorageClass (..)
, Type (..)
, ArchiveCreationOutput
, archiveCreationOutput
, acoArchiveId
, acoChecksum
, acoLocation
, CSVInput
, csvInput
, ciQuoteCharacter
, ciRecordDelimiter
, ciFileHeaderInfo
, ciQuoteEscapeCharacter
, ciComments
, ciFieldDelimiter
, CSVOutput
, csvOutput
, coQuoteCharacter
, coQuoteFields
, coRecordDelimiter
, coQuoteEscapeCharacter
, coFieldDelimiter
, DataRetrievalPolicy
, dataRetrievalPolicy
, drpRules
, DataRetrievalRule
, dataRetrievalRule
, drrStrategy
, drrBytesPerHour
, DescribeVaultOutput
, describeVaultOutput
, dvoVaultName
, dvoSizeInBytes
, dvoLastInventoryDate
, dvoVaultARN
, dvoCreationDate
, dvoNumberOfArchives
, Encryption
, encryption
, eEncryptionType
, eKMSKeyId
, eKMSContext
, GlacierJobDescription
, glacierJobDescription
, gjdSHA256TreeHash
, gjdArchiveId
, gjdSelectParameters
, gjdJobId
, gjdJobOutputPath
, gjdRetrievalByteRange
, gjdInventoryRetrievalParameters
, gjdAction
, gjdJobDescription
, gjdSNSTopic
, gjdStatusMessage
, gjdVaultARN
, gjdOutputLocation
, gjdTier
, gjdArchiveSHA256TreeHash
, gjdCreationDate
, gjdCompleted
, gjdCompletionDate
, gjdInventorySizeInBytes
, gjdArchiveSizeInBytes
, gjdStatusCode
, Grant
, grant
, gPermission
, gGrantee
, Grantee
, grantee
, gURI
, gEmailAddress
, gDisplayName
, gId
, gType
, InputSerialization
, inputSerialization
, isCsv
, InventoryRetrievalJobDescription
, inventoryRetrievalJobDescription
, irjdFormat
, irjdEndDate
, irjdStartDate
, irjdMarker
, irjdLimit
, InventoryRetrievalJobInput
, inventoryRetrievalJobInput
, irjiEndDate
, irjiStartDate
, irjiMarker
, irjiLimit
, JobParameters
, jobParameters
, jpArchiveId
, jpSelectParameters
, jpFormat
, jpRetrievalByteRange
, jpInventoryRetrievalParameters
, jpSNSTopic
, jpOutputLocation
, jpTier
, jpType
, jpDescription
, OutputLocation
, outputLocation
, olS3
, OutputSerialization
, outputSerialization
, osCsv
, PartListElement
, partListElement
, pleSHA256TreeHash
, pleRangeInBytes
, ProvisionedCapacityDescription
, provisionedCapacityDescription
, pcdCapacityId
, pcdStartDate
, pcdExpirationDate
, S3Location
, s3Location
, slCannedACL
, slPrefix
, slBucketName
, slAccessControlList
, slUserMetadata
, slEncryption
, slStorageClass
, slTagging
, SelectParameters
, selectParameters
, spExpressionType
, spOutputSerialization
, spExpression
, spInputSerialization
, UploadListElement
, uploadListElement
, uleMultipartUploadId
, ulePartSizeInBytes
, uleArchiveDescription
, 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.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
glacier :: Service
glacier =
Service
{ _svcAbbrev = "Glacier"
, _svcSigner = v4
, _svcPrefix = "glacier"
, _svcVersion = "2012-06-01"
, _svcEndpoint = defaultEndpoint glacier
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Glacier"
, _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 (hasCode "RequestTimeoutException" . hasStatus 408) e =
Just "timeouts"
| 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 =
_MatchServiceError glacier "PolicyEnforcedException" . hasStatus 400
_InvalidParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParameterValueException =
_MatchServiceError glacier "InvalidParameterValueException" . hasStatus 400
_RequestTimeoutException :: AsError a => Getting (First ServiceError) a ServiceError
_RequestTimeoutException =
_MatchServiceError glacier "RequestTimeoutException" . hasStatus 408
_ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceUnavailableException =
_MatchServiceError glacier "ServiceUnavailableException" . hasStatus 500
_InsufficientCapacityException :: AsError a => Getting (First ServiceError) a ServiceError
_InsufficientCapacityException =
_MatchServiceError glacier "InsufficientCapacityException" . hasStatus 400
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_MatchServiceError glacier "ResourceNotFoundException" . hasStatus 404
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException =
_MatchServiceError glacier "LimitExceededException" . hasStatus 400
_MissingParameterValueException :: AsError a => Getting (First ServiceError) a ServiceError
_MissingParameterValueException =
_MatchServiceError glacier "MissingParameterValueException" . hasStatus 400