{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Transfer.Types
(
defaultService,
_AccessDeniedException,
_InvalidRequestException,
_ConflictException,
_ThrottlingException,
_InvalidNextTokenException,
_InternalServiceError,
_ResourceExistsException,
_ServiceUnavailableException,
_ResourceNotFoundException,
CustomStepStatus (..),
Domain (..),
EndpointType (..),
ExecutionErrorType (..),
ExecutionStatus (..),
HomeDirectoryType (..),
IdentityProviderType (..),
OverwriteExisting (..),
Protocol (..),
State (..),
WorkflowStepType (..),
CopyStepDetails (..),
newCopyStepDetails,
copyStepDetails_destinationFileLocation,
copyStepDetails_overwriteExisting,
copyStepDetails_name,
CustomStepDetails (..),
newCustomStepDetails,
customStepDetails_name,
customStepDetails_timeoutSeconds,
customStepDetails_target,
DeleteStepDetails (..),
newDeleteStepDetails,
deleteStepDetails_name,
DescribedAccess (..),
newDescribedAccess,
describedAccess_homeDirectoryType,
describedAccess_posixProfile,
describedAccess_homeDirectoryMappings,
describedAccess_role,
describedAccess_policy,
describedAccess_externalId,
describedAccess_homeDirectory,
DescribedExecution (..),
newDescribedExecution,
describedExecution_status,
describedExecution_executionId,
describedExecution_results,
describedExecution_initialFileLocation,
describedExecution_posixProfile,
describedExecution_serviceMetadata,
describedExecution_loggingConfiguration,
describedExecution_executionRole,
DescribedSecurityPolicy (..),
newDescribedSecurityPolicy,
describedSecurityPolicy_fips,
describedSecurityPolicy_sshMacs,
describedSecurityPolicy_sshKexs,
describedSecurityPolicy_tlsCiphers,
describedSecurityPolicy_sshCiphers,
describedSecurityPolicy_securityPolicyName,
DescribedServer (..),
newDescribedServer,
describedServer_protocolDetails,
describedServer_loggingRole,
describedServer_state,
describedServer_identityProviderType,
describedServer_protocols,
describedServer_serverId,
describedServer_domain,
describedServer_endpointType,
describedServer_securityPolicyName,
describedServer_hostKeyFingerprint,
describedServer_userCount,
describedServer_certificate,
describedServer_identityProviderDetails,
describedServer_workflowDetails,
describedServer_tags,
describedServer_endpointDetails,
describedServer_arn,
DescribedUser (..),
newDescribedUser,
describedUser_sshPublicKeys,
describedUser_homeDirectoryType,
describedUser_userName,
describedUser_posixProfile,
describedUser_homeDirectoryMappings,
describedUser_role,
describedUser_policy,
describedUser_homeDirectory,
describedUser_tags,
describedUser_arn,
DescribedWorkflow (..),
newDescribedWorkflow,
describedWorkflow_onExceptionSteps,
describedWorkflow_steps,
describedWorkflow_workflowId,
describedWorkflow_description,
describedWorkflow_tags,
describedWorkflow_arn,
EfsFileLocation (..),
newEfsFileLocation,
efsFileLocation_path,
efsFileLocation_fileSystemId,
EndpointDetails (..),
newEndpointDetails,
endpointDetails_securityGroupIds,
endpointDetails_subnetIds,
endpointDetails_vpcId,
endpointDetails_addressAllocationIds,
endpointDetails_vpcEndpointId,
ExecutionError (..),
newExecutionError,
executionError_type,
executionError_message,
ExecutionResults (..),
newExecutionResults,
executionResults_onExceptionSteps,
executionResults_steps,
ExecutionStepResult (..),
newExecutionStepResult,
executionStepResult_stepType,
executionStepResult_error,
executionStepResult_outputs,
FileLocation (..),
newFileLocation,
fileLocation_efsFileLocation,
fileLocation_s3FileLocation,
HomeDirectoryMapEntry (..),
newHomeDirectoryMapEntry,
homeDirectoryMapEntry_entry,
homeDirectoryMapEntry_target,
IdentityProviderDetails (..),
newIdentityProviderDetails,
identityProviderDetails_invocationRole,
identityProviderDetails_directoryId,
identityProviderDetails_url,
InputFileLocation (..),
newInputFileLocation,
inputFileLocation_efsFileLocation,
inputFileLocation_s3FileLocation,
ListedAccess (..),
newListedAccess,
listedAccess_homeDirectoryType,
listedAccess_role,
listedAccess_externalId,
listedAccess_homeDirectory,
ListedExecution (..),
newListedExecution,
listedExecution_status,
listedExecution_executionId,
listedExecution_initialFileLocation,
listedExecution_serviceMetadata,
ListedServer (..),
newListedServer,
listedServer_loggingRole,
listedServer_state,
listedServer_identityProviderType,
listedServer_serverId,
listedServer_domain,
listedServer_endpointType,
listedServer_userCount,
listedServer_arn,
ListedUser (..),
newListedUser,
listedUser_homeDirectoryType,
listedUser_userName,
listedUser_role,
listedUser_sshPublicKeyCount,
listedUser_homeDirectory,
listedUser_arn,
ListedWorkflow (..),
newListedWorkflow,
listedWorkflow_arn,
listedWorkflow_workflowId,
listedWorkflow_description,
LoggingConfiguration (..),
newLoggingConfiguration,
loggingConfiguration_loggingRole,
loggingConfiguration_logGroupName,
PosixProfile (..),
newPosixProfile,
posixProfile_secondaryGids,
posixProfile_uid,
posixProfile_gid,
ProtocolDetails (..),
newProtocolDetails,
protocolDetails_passiveIp,
S3FileLocation (..),
newS3FileLocation,
s3FileLocation_versionId,
s3FileLocation_etag,
s3FileLocation_bucket,
s3FileLocation_key,
S3InputFileLocation (..),
newS3InputFileLocation,
s3InputFileLocation_bucket,
s3InputFileLocation_key,
S3Tag (..),
newS3Tag,
s3Tag_key,
s3Tag_value,
ServiceMetadata (..),
newServiceMetadata,
serviceMetadata_userDetails,
SshPublicKey (..),
newSshPublicKey,
sshPublicKey_dateImported,
sshPublicKey_sshPublicKeyBody,
sshPublicKey_sshPublicKeyId,
Tag (..),
newTag,
tag_key,
tag_value,
TagStepDetails (..),
newTagStepDetails,
tagStepDetails_name,
tagStepDetails_tags,
UserDetails (..),
newUserDetails,
userDetails_sessionId,
userDetails_userName,
userDetails_serverId,
WorkflowDetail (..),
newWorkflowDetail,
workflowDetail_workflowId,
workflowDetail_executionRole,
WorkflowDetails (..),
newWorkflowDetails,
workflowDetails_onUpload,
WorkflowStep (..),
newWorkflowStep,
workflowStep_tagStepDetails,
workflowStep_deleteStepDetails,
workflowStep_copyStepDetails,
workflowStep_type,
workflowStep_customStepDetails,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
import Amazonka.Transfer.Types.CopyStepDetails
import Amazonka.Transfer.Types.CustomStepDetails
import Amazonka.Transfer.Types.CustomStepStatus
import Amazonka.Transfer.Types.DeleteStepDetails
import Amazonka.Transfer.Types.DescribedAccess
import Amazonka.Transfer.Types.DescribedExecution
import Amazonka.Transfer.Types.DescribedSecurityPolicy
import Amazonka.Transfer.Types.DescribedServer
import Amazonka.Transfer.Types.DescribedUser
import Amazonka.Transfer.Types.DescribedWorkflow
import Amazonka.Transfer.Types.Domain
import Amazonka.Transfer.Types.EfsFileLocation
import Amazonka.Transfer.Types.EndpointDetails
import Amazonka.Transfer.Types.EndpointType
import Amazonka.Transfer.Types.ExecutionError
import Amazonka.Transfer.Types.ExecutionErrorType
import Amazonka.Transfer.Types.ExecutionResults
import Amazonka.Transfer.Types.ExecutionStatus
import Amazonka.Transfer.Types.ExecutionStepResult
import Amazonka.Transfer.Types.FileLocation
import Amazonka.Transfer.Types.HomeDirectoryMapEntry
import Amazonka.Transfer.Types.HomeDirectoryType
import Amazonka.Transfer.Types.IdentityProviderDetails
import Amazonka.Transfer.Types.IdentityProviderType
import Amazonka.Transfer.Types.InputFileLocation
import Amazonka.Transfer.Types.ListedAccess
import Amazonka.Transfer.Types.ListedExecution
import Amazonka.Transfer.Types.ListedServer
import Amazonka.Transfer.Types.ListedUser
import Amazonka.Transfer.Types.ListedWorkflow
import Amazonka.Transfer.Types.LoggingConfiguration
import Amazonka.Transfer.Types.OverwriteExisting
import Amazonka.Transfer.Types.PosixProfile
import Amazonka.Transfer.Types.Protocol
import Amazonka.Transfer.Types.ProtocolDetails
import Amazonka.Transfer.Types.S3FileLocation
import Amazonka.Transfer.Types.S3InputFileLocation
import Amazonka.Transfer.Types.S3Tag
import Amazonka.Transfer.Types.ServiceMetadata
import Amazonka.Transfer.Types.SshPublicKey
import Amazonka.Transfer.Types.State
import Amazonka.Transfer.Types.Tag
import Amazonka.Transfer.Types.TagStepDetails
import Amazonka.Transfer.Types.UserDetails
import Amazonka.Transfer.Types.WorkflowDetail
import Amazonka.Transfer.Types.WorkflowDetails
import Amazonka.Transfer.Types.WorkflowStep
import Amazonka.Transfer.Types.WorkflowStepType
defaultService :: Core.Service
defaultService :: Service
defaultService =
Service :: Abbrev
-> Signer
-> ByteString
-> ByteString
-> ByteString
-> (Region -> Endpoint)
-> Maybe Seconds
-> (Status -> Bool)
-> (Status -> [Header] -> ByteStringLazy -> Error)
-> Retry
-> Service
Core.Service
{ $sel:_serviceAbbrev:Service :: Abbrev
Core._serviceAbbrev = Abbrev
"Transfer",
$sel:_serviceSigner:Service :: Signer
Core._serviceSigner = Signer
Sign.v4,
$sel:_serviceEndpointPrefix:Service :: ByteString
Core._serviceEndpointPrefix = ByteString
"transfer",
$sel:_serviceSigningName:Service :: ByteString
Core._serviceSigningName = ByteString
"transfer",
$sel:_serviceVersion:Service :: ByteString
Core._serviceVersion = ByteString
"2018-11-05",
$sel:_serviceEndpoint:Service :: Region -> Endpoint
Core._serviceEndpoint =
Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:_serviceTimeout:Service :: Maybe Seconds
Core._serviceTimeout = Seconds -> Maybe Seconds
forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:_serviceCheck:Service :: Status -> Bool
Core._serviceCheck = Status -> Bool
Core.statusSuccess,
$sel:_serviceError:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core._serviceError = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"Transfer",
$sel:_serviceRetry:Service :: Retry
Core._serviceRetry = Retry
retry
}
where
retry :: Retry
retry =
Exponential :: Double -> Int -> Int -> (ServiceError -> Maybe Text) -> Retry
Core.Exponential
{ $sel:_retryBase:Exponential :: Double
Core._retryBase = Double
5.0e-2,
$sel:_retryGrowth:Exponential :: Int
Core._retryGrowth = Int
2,
$sel:_retryAttempts:Exponential :: Int
Core._retryAttempts = Int
5,
$sel:_retryCheck:Exponential :: ServiceError -> Maybe Text
Core._retryCheck = ServiceError -> Maybe Text
forall a. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has
( ErrorCode -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
-> Getting Any ServiceError ServiceError
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| Getting Any ServiceError ServiceError -> ServiceError -> Bool
forall s a. Getting Any s a -> s -> Bool
Lens.has (Int -> Getting Any ServiceError ServiceError
forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
a -> Maybe a
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| Bool
Prelude.otherwise = Maybe a
forall a. Maybe a
Prelude.Nothing
_AccessDeniedException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_AccessDeniedException :: Getting (First ServiceError) a ServiceError
_AccessDeniedException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
_InvalidRequestException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InvalidRequestException :: Getting (First ServiceError) a ServiceError
_InvalidRequestException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidRequestException"
_ConflictException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_ConflictException :: Getting (First ServiceError) a ServiceError
_ConflictException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
_ThrottlingException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_ThrottlingException :: Getting (First ServiceError) a ServiceError
_ThrottlingException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottlingException"
_InvalidNextTokenException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InvalidNextTokenException :: Getting (First ServiceError) a ServiceError
_InvalidNextTokenException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidNextTokenException"
_InternalServiceError :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InternalServiceError :: Getting (First ServiceError) a ServiceError
_InternalServiceError =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServiceError"
_ResourceExistsException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_ResourceExistsException :: Getting (First ServiceError) a ServiceError
_ResourceExistsException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceExistsException"
_ServiceUnavailableException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_ServiceUnavailableException :: Getting (First ServiceError) a ServiceError
_ServiceUnavailableException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceUnavailableException"
_ResourceNotFoundException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_ResourceNotFoundException :: Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFoundException"