module Network.AWS.S3.Types
(
s3
, _BucketAlreadyOwnedByYou
, _ObjectAlreadyInActiveTierError
, _BucketAlreadyExists
, _ObjectNotInActiveTierError
, _NoSuchUpload
, _NoSuchBucket
, _NoSuchKey
, module Network.AWS.S3.Internal
, AnalyticsS3ExportFileFormat (..)
, BucketAccelerateStatus (..)
, BucketCannedACL (..)
, BucketLogsPermission (..)
, BucketVersioningStatus (..)
, EncodingType (..)
, Event (..)
, ExpirationStatus (..)
, FilterRuleName (..)
, InventoryFormat (..)
, InventoryFrequency (..)
, InventoryIncludedObjectVersions (..)
, InventoryOptionalField (..)
, MFADelete (..)
, MFADeleteStatus (..)
, MetadataDirective (..)
, ObjectCannedACL (..)
, ObjectStorageClass (..)
, ObjectVersionStorageClass (..)
, OwnerOverride (..)
, Payer (..)
, Permission (..)
, Protocol (..)
, ReplicationRuleStatus (..)
, ReplicationStatus (..)
, RequestCharged (..)
, RequestPayer (..)
, ServerSideEncryption (..)
, SseKMSEncryptedObjectsStatus (..)
, StorageClass (..)
, StorageClassAnalysisSchemaVersion (..)
, TaggingDirective (..)
, Tier (..)
, TransitionStorageClass (..)
, Type (..)
, AbortIncompleteMultipartUpload
, abortIncompleteMultipartUpload
, aimuDaysAfterInitiation
, AccelerateConfiguration
, accelerateConfiguration
, acStatus
, AccessControlPolicy
, accessControlPolicy
, acpGrants
, acpOwner
, AccessControlTranslation
, accessControlTranslation
, actOwner
, AnalyticsAndOperator
, analyticsAndOperator
, aaoPrefix
, aaoTags
, AnalyticsConfiguration
, analyticsConfiguration
, acFilter
, acId
, acStorageClassAnalysis
, AnalyticsExportDestination
, analyticsExportDestination
, aedS3BucketDestination
, AnalyticsFilter
, analyticsFilter
, afTag
, afPrefix
, afAnd
, AnalyticsS3BucketDestination
, analyticsS3BucketDestination
, asbdBucketAccountId
, asbdPrefix
, asbdFormat
, asbdBucket
, Bucket
, bucket
, bCreationDate
, bName
, BucketLifecycleConfiguration
, bucketLifecycleConfiguration
, blcRules
, BucketLoggingStatus
, bucketLoggingStatus
, blsLoggingEnabled
, CORSConfiguration
, corsConfiguration
, ccCORSRules
, CORSRule
, corsRule
, crMaxAgeSeconds
, crAllowedHeaders
, crExposeHeaders
, crAllowedMethods
, crAllowedOrigins
, CommonPrefix
, commonPrefix
, cpPrefix
, CompletedMultipartUpload
, completedMultipartUpload
, cmuParts
, CompletedPart
, completedPart
, cpPartNumber
, cpETag
, Condition
, condition
, cKeyPrefixEquals
, cHTTPErrorCodeReturnedEquals
, CopyObjectResult
, copyObjectResult
, corETag
, corLastModified
, CopyPartResult
, copyPartResult
, cprETag
, cprLastModified
, CreateBucketConfiguration
, createBucketConfiguration
, cbcLocationConstraint
, Delete
, delete'
, dQuiet
, dObjects
, DeleteMarkerEntry
, deleteMarkerEntry
, dmeVersionId
, dmeIsLatest
, dmeOwner
, dmeKey
, dmeLastModified
, DeletedObject
, deletedObject
, dVersionId
, dDeleteMarker
, dDeleteMarkerVersionId
, dKey
, Destination
, destination
, dAccessControlTranslation
, dAccount
, dStorageClass
, dEncryptionConfiguration
, dBucket
, EncryptionConfiguration
, encryptionConfiguration
, ecReplicaKMSKeyId
, ErrorDocument
, errorDocument
, edKey
, FilterRule
, filterRule
, frValue
, frName
, GlacierJobParameters
, glacierJobParameters
, gjpTier
, Grant
, grant
, gPermission
, gGrantee
, Grantee
, grantee
, gURI
, gEmailAddress
, gDisplayName
, gId
, gType
, IndexDocument
, indexDocument
, idSuffix
, Initiator
, initiator
, iDisplayName
, iId
, InventoryConfiguration
, inventoryConfiguration
, icOptionalFields
, icFilter
, icDestination
, icIsEnabled
, icId
, icIncludedObjectVersions
, icSchedule
, InventoryDestination
, inventoryDestination
, idS3BucketDestination
, InventoryEncryption
, inventoryEncryption
, ieSSES3
, ieSSEKMS
, InventoryFilter
, inventoryFilter
, ifPrefix
, InventoryS3BucketDestination
, inventoryS3BucketDestination
, isbdPrefix
, isbdAccountId
, isbdEncryption
, isbdBucket
, isbdFormat
, InventorySchedule
, inventorySchedule
, isFrequency
, LambdaFunctionConfiguration
, lambdaFunctionConfiguration
, lfcId
, lfcFilter
, lfcLambdaFunctionARN
, lfcEvents
, LifecycleExpiration
, lifecycleExpiration
, leDays
, leDate
, leExpiredObjectDeleteMarker
, LifecycleRule
, lifecycleRule
, lrTransitions
, lrNoncurrentVersionExpiration
, lrPrefix
, lrNoncurrentVersionTransitions
, lrExpiration
, lrId
, lrFilter
, lrAbortIncompleteMultipartUpload
, lrStatus
, LifecycleRuleAndOperator
, lifecycleRuleAndOperator
, lraoPrefix
, lraoTags
, LifecycleRuleFilter
, lifecycleRuleFilter
, lrfTag
, lrfPrefix
, lrfAnd
, LoggingEnabled
, loggingEnabled
, leTargetBucket
, leTargetGrants
, leTargetPrefix
, MetricsAndOperator
, metricsAndOperator
, maoPrefix
, maoTags
, MetricsConfiguration
, metricsConfiguration
, mcFilter
, mcId
, MetricsFilter
, metricsFilter
, mfTag
, mfPrefix
, mfAnd
, MultipartUpload
, multipartUpload
, muInitiated
, muInitiator
, muOwner
, muKey
, muStorageClass
, muUploadId
, NoncurrentVersionExpiration
, noncurrentVersionExpiration
, nveNoncurrentDays
, NoncurrentVersionTransition
, noncurrentVersionTransition
, nvtNoncurrentDays
, nvtStorageClass
, NotificationConfiguration
, notificationConfiguration
, ncQueueConfigurations
, ncTopicConfigurations
, ncLambdaFunctionConfigurations
, NotificationConfigurationFilter
, notificationConfigurationFilter
, ncfKey
, Object
, object'
, oOwner
, oETag
, oSize
, oKey
, oStorageClass
, oLastModified
, ObjectIdentifier
, objectIdentifier
, oiVersionId
, oiKey
, ObjectVersion
, objectVersion
, ovETag
, ovVersionId
, ovSize
, ovIsLatest
, ovOwner
, ovKey
, ovStorageClass
, ovLastModified
, Owner
, owner
, oDisplayName
, oId
, Part
, part
, pETag
, pSize
, pPartNumber
, pLastModified
, QueueConfiguration
, queueConfiguration
, qcId
, qcFilter
, qcQueueARN
, qcEvents
, Redirect
, redirect
, rHostName
, rProtocol
, rHTTPRedirectCode
, rReplaceKeyWith
, rReplaceKeyPrefixWith
, RedirectAllRequestsTo
, redirectAllRequestsTo
, rartProtocol
, rartHostName
, ReplicationConfiguration
, replicationConfiguration
, rcRole
, rcRules
, ReplicationRule
, replicationRule
, rrId
, rrSourceSelectionCriteria
, rrPrefix
, rrStatus
, rrDestination
, RequestPaymentConfiguration
, requestPaymentConfiguration
, rpcPayer
, RestoreRequest
, restoreRequest
, rrGlacierJobParameters
, rrDays
, RoutingRule
, routingRule
, rrCondition
, rrRedirect
, S3KeyFilter
, s3KeyFilter
, skfFilterRules
, S3ServiceError
, s3ServiceError
, sseVersionId
, sseKey
, sseCode
, sseMessage
, SSEKMS
, sSEKMS
, ssekKeyId
, SSES3
, sSES3
, ServerSideEncryptionByDefault
, serverSideEncryptionByDefault
, ssebdKMSMasterKeyId
, ssebdSSEAlgorithm
, ServerSideEncryptionConfiguration
, serverSideEncryptionConfiguration
, ssecRules
, ServerSideEncryptionRule
, serverSideEncryptionRule
, sserApplyServerSideEncryptionByDefault
, SourceSelectionCriteria
, sourceSelectionCriteria
, sscSseKMSEncryptedObjects
, SseKMSEncryptedObjects
, sseKMSEncryptedObjects
, skeoStatus
, StorageClassAnalysis
, storageClassAnalysis
, scaDataExport
, StorageClassAnalysisDataExport
, storageClassAnalysisDataExport
, scadeOutputSchemaVersion
, scadeDestination
, Tag
, tag
, tagKey
, tagValue
, Tagging
, tagging
, tTagSet
, TargetGrant
, targetGrant
, tgPermission
, tgGrantee
, TopicConfiguration
, topicConfiguration
, tcId
, tcFilter
, tcTopicARN
, tcEvents
, Transition
, transition
, tDays
, tDate
, tStorageClass
, VersioningConfiguration
, versioningConfiguration
, vcStatus
, vcMFADelete
, WebsiteConfiguration
, websiteConfiguration
, wcRedirectAllRequestsTo
, wcErrorDocument
, wcIndexDocument
, wcRoutingRules
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.S3.Internal
import Network.AWS.S3.Types.Product
import Network.AWS.S3.Types.Sum
import Network.AWS.Sign.V4
s3 :: Service
s3 =
Service
{ _svcAbbrev = "S3"
, _svcSigner = v4
, _svcPrefix = "s3"
, _svcVersion = "2006-03-01"
, _svcEndpoint = defaultEndpoint s3
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseXMLError "S3"
, _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 "BadDigest" . hasStatus 400) e = Just "contentmd5"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasCode "RequestTimeout" . hasStatus 400) e = Just "timeouts"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_BucketAlreadyOwnedByYou :: AsError a => Getting (First ServiceError) a ServiceError
_BucketAlreadyOwnedByYou = _MatchServiceError s3 "BucketAlreadyOwnedByYou"
_ObjectAlreadyInActiveTierError :: AsError a => Getting (First ServiceError) a ServiceError
_ObjectAlreadyInActiveTierError =
_MatchServiceError s3 "ObjectAlreadyInActiveTierError"
_BucketAlreadyExists :: AsError a => Getting (First ServiceError) a ServiceError
_BucketAlreadyExists = _MatchServiceError s3 "BucketAlreadyExists"
_ObjectNotInActiveTierError :: AsError a => Getting (First ServiceError) a ServiceError
_ObjectNotInActiveTierError = _MatchServiceError s3 "ObjectNotInActiveTierError"
_NoSuchUpload :: AsError a => Getting (First ServiceError) a ServiceError
_NoSuchUpload = _MatchServiceError s3 "NoSuchUpload"
_NoSuchBucket :: AsError a => Getting (First ServiceError) a ServiceError
_NoSuchBucket = _MatchServiceError s3 "NoSuchBucket"
_NoSuchKey :: AsError a => Getting (First ServiceError) a ServiceError
_NoSuchKey = _MatchServiceError s3 "NoSuchKey"