{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.StorageGateway.Types
(
storageGateway
, _InvalidGatewayRequestException
, _ServiceUnavailableError
, _InternalServerError
, ObjectACL (..)
, CachediSCSIVolume
, cachediSCSIVolume
, cscsivVolumeiSCSIAttributes
, cscsivVolumeStatus
, cscsivSourceSnapshotId
, cscsivVolumeARN
, cscsivVolumeProgress
, cscsivVolumeSizeInBytes
, cscsivVolumeUsedInBytes
, cscsivCreatedDate
, cscsivVolumeId
, cscsivVolumeType
, ChapInfo
, chapInfo
, ciTargetARN
, ciSecretToAuthenticateInitiator
, ciInitiatorName
, ciSecretToAuthenticateTarget
, DeviceiSCSIAttributes
, deviceiSCSIAttributes
, dscsiaTargetARN
, dscsiaChapEnabled
, dscsiaNetworkInterfaceId
, dscsiaNetworkInterfacePort
, Disk
, disk
, dDiskAllocationResource
, dDiskAllocationType
, dDiskNode
, dDiskPath
, dDiskSizeInBytes
, dDiskStatus
, dDiskId
, FileShareInfo
, fileShareInfo
, fsiFileShareStatus
, fsiGatewayARN
, fsiFileShareId
, fsiFileShareARN
, GatewayInfo
, gatewayInfo
, giGatewayARN
, giGatewayOperationalState
, giGatewayName
, giGatewayId
, giGatewayType
, NFSFileShareDefaults
, nFSFileShareDefaults
, nfsfsdFileMode
, nfsfsdOwnerId
, nfsfsdDirectoryMode
, nfsfsdGroupId
, NFSFileShareInfo
, nFSFileShareInfo
, nfsfsiFileShareStatus
, nfsfsiKMSKey
, nfsfsiGatewayARN
, nfsfsiPath
, nfsfsiObjectACL
, nfsfsiKMSEncrypted
, nfsfsiFileShareId
, nfsfsiFileShareARN
, nfsfsiDefaultStorageClass
, nfsfsiRole
, nfsfsiSquash
, nfsfsiRequesterPays
, nfsfsiNFSFileShareDefaults
, nfsfsiLocationARN
, nfsfsiClientList
, nfsfsiGuessMIMETypeEnabled
, nfsfsiReadOnly
, NetworkInterface
, networkInterface
, niIPv6Address
, niMACAddress
, niIPv4Address
, StorediSCSIVolume
, storediSCSIVolume
, sscsivVolumeiSCSIAttributes
, sscsivVolumeStatus
, sscsivSourceSnapshotId
, sscsivPreservedExistingData
, sscsivVolumeARN
, sscsivVolumeProgress
, sscsivVolumeSizeInBytes
, sscsivVolumeUsedInBytes
, sscsivCreatedDate
, sscsivVolumeId
, sscsivVolumeDiskId
, sscsivVolumeType
, Tag
, tag
, tagKey
, tagValue
, Tape
, tape
, tTapeBarcode
, tTapeStatus
, tTapeARN
, tProgress
, tTapeSizeInBytes
, tVTLDevice
, tTapeUsedInBytes
, tTapeCreatedDate
, TapeArchive
, tapeArchive
, taTapeBarcode
, taTapeStatus
, taTapeARN
, taTapeSizeInBytes
, taCompletionTime
, taTapeUsedInBytes
, taTapeCreatedDate
, taRetrievedTo
, TapeInfo
, tapeInfo
, tiTapeBarcode
, tiTapeStatus
, tiTapeARN
, tiGatewayARN
, tiTapeSizeInBytes
, TapeRecoveryPointInfo
, tapeRecoveryPointInfo
, trpiTapeStatus
, trpiTapeRecoveryPointTime
, trpiTapeARN
, trpiTapeSizeInBytes
, VTLDevice
, vTLDevice
, vtldDeviceiSCSIAttributes
, vtldVTLDeviceVendor
, vtldVTLDeviceARN
, vtldVTLDeviceType
, vtldVTLDeviceProductIdentifier
, VolumeInfo
, volumeInfo
, viGatewayARN
, viVolumeARN
, viVolumeSizeInBytes
, viVolumeId
, viGatewayId
, viVolumeType
, VolumeRecoveryPointInfo
, volumeRecoveryPointInfo
, vrpiVolumeRecoveryPointTime
, vrpiVolumeARN
, vrpiVolumeSizeInBytes
, vrpiVolumeUsageInBytes
, VolumeiSCSIAttributes
, volumeiSCSIAttributes
, vscsiaLunNumber
, vscsiaTargetARN
, vscsiaChapEnabled
, vscsiaNetworkInterfaceId
, vscsiaNetworkInterfacePort
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
import Network.AWS.StorageGateway.Types.Product
import Network.AWS.StorageGateway.Types.Sum
storageGateway :: Service
storageGateway =
Service
{ _svcAbbrev = "StorageGateway"
, _svcSigner = v4
, _svcPrefix = "storagegateway"
, _svcVersion = "2013-06-30"
, _svcEndpoint = defaultEndpoint storageGateway
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "StorageGateway"
, _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
_InvalidGatewayRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidGatewayRequestException =
_MatchServiceError storageGateway "InvalidGatewayRequestException"
_ServiceUnavailableError :: AsError a => Getting (First ServiceError) a ServiceError
_ServiceUnavailableError =
_MatchServiceError storageGateway "ServiceUnavailableError"
_InternalServerError :: AsError a => Getting (First ServiceError) a ServiceError
_InternalServerError = _MatchServiceError storageGateway "InternalServerError"