{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Snowball.Types
(
defaultService,
_ClusterLimitExceededException,
_ConflictException,
_Ec2RequestFailedException,
_InvalidAddressException,
_InvalidInputCombinationException,
_InvalidJobStateException,
_InvalidNextTokenException,
_InvalidResourceException,
_KMSRequestFailedException,
_ReturnShippingLabelAlreadyExistsException,
_UnsupportedAddressException,
ClusterState (..),
DeviceServiceName (..),
JobState (..),
JobType (..),
LongTermPricingType (..),
RemoteManagement (..),
ShipmentState (..),
ShippingLabelStatus (..),
ShippingOption (..),
SnowballCapacity (..),
SnowballType (..),
StorageUnit (..),
TransferOption (..),
Address (..),
newAddress,
address_addressId,
address_city,
address_company,
address_country,
address_isRestricted,
address_landmark,
address_name,
address_phoneNumber,
address_postalCode,
address_prefectureOrDistrict,
address_stateOrProvince,
address_street1,
address_street2,
address_street3,
ClusterListEntry (..),
newClusterListEntry,
clusterListEntry_clusterId,
clusterListEntry_clusterState,
clusterListEntry_creationDate,
clusterListEntry_description,
ClusterMetadata (..),
newClusterMetadata,
clusterMetadata_addressId,
clusterMetadata_clusterId,
clusterMetadata_clusterState,
clusterMetadata_creationDate,
clusterMetadata_description,
clusterMetadata_forwardingAddressId,
clusterMetadata_jobType,
clusterMetadata_kmsKeyARN,
clusterMetadata_notification,
clusterMetadata_onDeviceServiceConfiguration,
clusterMetadata_resources,
clusterMetadata_roleARN,
clusterMetadata_shippingOption,
clusterMetadata_snowballType,
clusterMetadata_taxDocuments,
CompatibleImage (..),
newCompatibleImage,
compatibleImage_amiId,
compatibleImage_name,
DataTransfer (..),
newDataTransfer,
dataTransfer_bytesTransferred,
dataTransfer_objectsTransferred,
dataTransfer_totalBytes,
dataTransfer_totalObjects,
DeviceConfiguration (..),
newDeviceConfiguration,
deviceConfiguration_snowconeDeviceConfiguration,
Ec2AmiResource (..),
newEc2AmiResource,
ec2AmiResource_snowballAmiId,
ec2AmiResource_amiId,
EventTriggerDefinition (..),
newEventTriggerDefinition,
eventTriggerDefinition_eventResourceARN,
INDTaxDocuments (..),
newINDTaxDocuments,
iNDTaxDocuments_gstin,
JobListEntry (..),
newJobListEntry,
jobListEntry_creationDate,
jobListEntry_description,
jobListEntry_isMaster,
jobListEntry_jobId,
jobListEntry_jobState,
jobListEntry_jobType,
jobListEntry_snowballType,
JobLogs (..),
newJobLogs,
jobLogs_jobCompletionReportURI,
jobLogs_jobFailureLogURI,
jobLogs_jobSuccessLogURI,
JobMetadata (..),
newJobMetadata,
jobMetadata_addressId,
jobMetadata_clusterId,
jobMetadata_creationDate,
jobMetadata_dataTransferProgress,
jobMetadata_description,
jobMetadata_deviceConfiguration,
jobMetadata_forwardingAddressId,
jobMetadata_jobId,
jobMetadata_jobLogInfo,
jobMetadata_jobState,
jobMetadata_jobType,
jobMetadata_kmsKeyARN,
jobMetadata_longTermPricingId,
jobMetadata_notification,
jobMetadata_onDeviceServiceConfiguration,
jobMetadata_remoteManagement,
jobMetadata_resources,
jobMetadata_roleARN,
jobMetadata_shippingDetails,
jobMetadata_snowballCapacityPreference,
jobMetadata_snowballType,
jobMetadata_taxDocuments,
JobResource (..),
newJobResource,
jobResource_ec2AmiResources,
jobResource_lambdaResources,
jobResource_s3Resources,
KeyRange (..),
newKeyRange,
keyRange_beginMarker,
keyRange_endMarker,
LambdaResource (..),
newLambdaResource,
lambdaResource_eventTriggers,
lambdaResource_lambdaArn,
LongTermPricingListEntry (..),
newLongTermPricingListEntry,
longTermPricingListEntry_currentActiveJob,
longTermPricingListEntry_isLongTermPricingAutoRenew,
longTermPricingListEntry_jobIds,
longTermPricingListEntry_longTermPricingEndDate,
longTermPricingListEntry_longTermPricingId,
longTermPricingListEntry_longTermPricingStartDate,
longTermPricingListEntry_longTermPricingStatus,
longTermPricingListEntry_longTermPricingType,
longTermPricingListEntry_replacementJob,
longTermPricingListEntry_snowballType,
NFSOnDeviceServiceConfiguration (..),
newNFSOnDeviceServiceConfiguration,
nFSOnDeviceServiceConfiguration_storageLimit,
nFSOnDeviceServiceConfiguration_storageUnit,
Notification (..),
newNotification,
notification_jobStatesToNotify,
notification_notifyAll,
notification_snsTopicARN,
OnDeviceServiceConfiguration (..),
newOnDeviceServiceConfiguration,
onDeviceServiceConfiguration_nFSOnDeviceService,
onDeviceServiceConfiguration_tGWOnDeviceService,
S3Resource (..),
newS3Resource,
s3Resource_bucketArn,
s3Resource_keyRange,
s3Resource_targetOnDeviceServices,
Shipment (..),
newShipment,
shipment_status,
shipment_trackingNumber,
ShippingDetails (..),
newShippingDetails,
shippingDetails_inboundShipment,
shippingDetails_outboundShipment,
shippingDetails_shippingOption,
SnowconeDeviceConfiguration (..),
newSnowconeDeviceConfiguration,
snowconeDeviceConfiguration_wirelessConnection,
TGWOnDeviceServiceConfiguration (..),
newTGWOnDeviceServiceConfiguration,
tGWOnDeviceServiceConfiguration_storageLimit,
tGWOnDeviceServiceConfiguration_storageUnit,
TargetOnDeviceService (..),
newTargetOnDeviceService,
targetOnDeviceService_serviceName,
targetOnDeviceService_transferOption,
TaxDocuments (..),
newTaxDocuments,
taxDocuments_ind,
WirelessConnection (..),
newWirelessConnection,
wirelessConnection_isWifiEnabled,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
import Amazonka.Snowball.Types.Address
import Amazonka.Snowball.Types.ClusterListEntry
import Amazonka.Snowball.Types.ClusterMetadata
import Amazonka.Snowball.Types.ClusterState
import Amazonka.Snowball.Types.CompatibleImage
import Amazonka.Snowball.Types.DataTransfer
import Amazonka.Snowball.Types.DeviceConfiguration
import Amazonka.Snowball.Types.DeviceServiceName
import Amazonka.Snowball.Types.Ec2AmiResource
import Amazonka.Snowball.Types.EventTriggerDefinition
import Amazonka.Snowball.Types.INDTaxDocuments
import Amazonka.Snowball.Types.JobListEntry
import Amazonka.Snowball.Types.JobLogs
import Amazonka.Snowball.Types.JobMetadata
import Amazonka.Snowball.Types.JobResource
import Amazonka.Snowball.Types.JobState
import Amazonka.Snowball.Types.JobType
import Amazonka.Snowball.Types.KeyRange
import Amazonka.Snowball.Types.LambdaResource
import Amazonka.Snowball.Types.LongTermPricingListEntry
import Amazonka.Snowball.Types.LongTermPricingType
import Amazonka.Snowball.Types.NFSOnDeviceServiceConfiguration
import Amazonka.Snowball.Types.Notification
import Amazonka.Snowball.Types.OnDeviceServiceConfiguration
import Amazonka.Snowball.Types.RemoteManagement
import Amazonka.Snowball.Types.S3Resource
import Amazonka.Snowball.Types.Shipment
import Amazonka.Snowball.Types.ShipmentState
import Amazonka.Snowball.Types.ShippingDetails
import Amazonka.Snowball.Types.ShippingLabelStatus
import Amazonka.Snowball.Types.ShippingOption
import Amazonka.Snowball.Types.SnowballCapacity
import Amazonka.Snowball.Types.SnowballType
import Amazonka.Snowball.Types.SnowconeDeviceConfiguration
import Amazonka.Snowball.Types.StorageUnit
import Amazonka.Snowball.Types.TGWOnDeviceServiceConfiguration
import Amazonka.Snowball.Types.TargetOnDeviceService
import Amazonka.Snowball.Types.TaxDocuments
import Amazonka.Snowball.Types.TransferOption
import Amazonka.Snowball.Types.WirelessConnection
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"Snowball",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"snowball",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"snowball",
$sel:version:Service :: ByteString
Core.version = ByteString
"2016-06-30",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"Snowball",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_ClusterLimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ClusterLimitExceededException :: forall a. AsError a => Fold a ServiceError
_ClusterLimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ClusterLimitExceededException"
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
_Ec2RequestFailedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_Ec2RequestFailedException :: forall a. AsError a => Fold a ServiceError
_Ec2RequestFailedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"Ec2RequestFailedException"
_InvalidAddressException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidAddressException :: forall a. AsError a => Fold a ServiceError
_InvalidAddressException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidAddressException"
_InvalidInputCombinationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidInputCombinationException :: forall a. AsError a => Fold a ServiceError
_InvalidInputCombinationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidInputCombinationException"
_InvalidJobStateException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidJobStateException :: forall a. AsError a => Fold a ServiceError
_InvalidJobStateException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidJobStateException"
_InvalidNextTokenException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidNextTokenException :: forall a. AsError a => Fold a ServiceError
_InvalidNextTokenException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidNextTokenException"
_InvalidResourceException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidResourceException :: forall a. AsError a => Fold a ServiceError
_InvalidResourceException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidResourceException"
_KMSRequestFailedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_KMSRequestFailedException :: forall a. AsError a => Fold a ServiceError
_KMSRequestFailedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"KMSRequestFailedException"
_ReturnShippingLabelAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ReturnShippingLabelAlreadyExistsException :: forall a. AsError a => Fold a ServiceError
_ReturnShippingLabelAlreadyExistsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ReturnShippingLabelAlreadyExistsException"
_UnsupportedAddressException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_UnsupportedAddressException :: forall a. AsError a => Fold a ServiceError
_UnsupportedAddressException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"UnsupportedAddressException"