{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MachineLearning.Types
(
defaultService,
_InvalidTagException,
_InternalServerException,
_InvalidInputException,
_IdempotentParameterMismatchException,
_TagLimitExceededException,
_PredictorNotMountedException,
_ResourceNotFoundException,
_LimitExceededException,
Algorithm (..),
BatchPredictionFilterVariable (..),
DataSourceFilterVariable (..),
DetailsAttributes (..),
EntityStatus (..),
EvaluationFilterVariable (..),
MLModelFilterVariable (..),
MLModelType (..),
RealtimeEndpointStatus (..),
SortOrder (..),
TaggableResourceType (..),
BatchPrediction (..),
newBatchPrediction,
batchPrediction_status,
batchPrediction_lastUpdatedAt,
batchPrediction_createdAt,
batchPrediction_computeTime,
batchPrediction_inputDataLocationS3,
batchPrediction_mLModelId,
batchPrediction_batchPredictionDataSourceId,
batchPrediction_totalRecordCount,
batchPrediction_startedAt,
batchPrediction_batchPredictionId,
batchPrediction_finishedAt,
batchPrediction_invalidRecordCount,
batchPrediction_createdByIamUser,
batchPrediction_name,
batchPrediction_message,
batchPrediction_outputUri,
DataSource (..),
newDataSource,
dataSource_status,
dataSource_numberOfFiles,
dataSource_lastUpdatedAt,
dataSource_createdAt,
dataSource_computeTime,
dataSource_dataSourceId,
dataSource_rDSMetadata,
dataSource_dataSizeInBytes,
dataSource_startedAt,
dataSource_finishedAt,
dataSource_createdByIamUser,
dataSource_name,
dataSource_dataLocationS3,
dataSource_computeStatistics,
dataSource_message,
dataSource_redshiftMetadata,
dataSource_dataRearrangement,
dataSource_roleARN,
Evaluation (..),
newEvaluation,
evaluation_status,
evaluation_performanceMetrics,
evaluation_lastUpdatedAt,
evaluation_createdAt,
evaluation_computeTime,
evaluation_inputDataLocationS3,
evaluation_mLModelId,
evaluation_startedAt,
evaluation_finishedAt,
evaluation_createdByIamUser,
evaluation_name,
evaluation_evaluationId,
evaluation_message,
evaluation_evaluationDataSourceId,
MLModel (..),
newMLModel,
mLModel_status,
mLModel_lastUpdatedAt,
mLModel_trainingParameters,
mLModel_scoreThresholdLastUpdatedAt,
mLModel_createdAt,
mLModel_computeTime,
mLModel_inputDataLocationS3,
mLModel_mLModelId,
mLModel_sizeInBytes,
mLModel_startedAt,
mLModel_scoreThreshold,
mLModel_finishedAt,
mLModel_algorithm,
mLModel_createdByIamUser,
mLModel_name,
mLModel_endpointInfo,
mLModel_trainingDataSourceId,
mLModel_message,
mLModel_mLModelType,
PerformanceMetrics (..),
newPerformanceMetrics,
performanceMetrics_properties,
Prediction (..),
newPrediction,
prediction_predictedValue,
prediction_predictedLabel,
prediction_predictedScores,
prediction_details,
RDSDataSpec (..),
newRDSDataSpec,
rDSDataSpec_dataSchemaUri,
rDSDataSpec_dataSchema,
rDSDataSpec_dataRearrangement,
rDSDataSpec_databaseInformation,
rDSDataSpec_selectSqlQuery,
rDSDataSpec_databaseCredentials,
rDSDataSpec_s3StagingLocation,
rDSDataSpec_resourceRole,
rDSDataSpec_serviceRole,
rDSDataSpec_subnetId,
rDSDataSpec_securityGroupIds,
RDSDatabase (..),
newRDSDatabase,
rDSDatabase_instanceIdentifier,
rDSDatabase_databaseName,
RDSDatabaseCredentials (..),
newRDSDatabaseCredentials,
rDSDatabaseCredentials_username,
rDSDatabaseCredentials_password,
RDSMetadata (..),
newRDSMetadata,
rDSMetadata_selectSqlQuery,
rDSMetadata_dataPipelineId,
rDSMetadata_database,
rDSMetadata_databaseUserName,
rDSMetadata_resourceRole,
rDSMetadata_serviceRole,
RealtimeEndpointInfo (..),
newRealtimeEndpointInfo,
realtimeEndpointInfo_createdAt,
realtimeEndpointInfo_endpointUrl,
realtimeEndpointInfo_endpointStatus,
realtimeEndpointInfo_peakRequestsPerSecond,
RedshiftDataSpec (..),
newRedshiftDataSpec,
redshiftDataSpec_dataSchemaUri,
redshiftDataSpec_dataSchema,
redshiftDataSpec_dataRearrangement,
redshiftDataSpec_databaseInformation,
redshiftDataSpec_selectSqlQuery,
redshiftDataSpec_databaseCredentials,
redshiftDataSpec_s3StagingLocation,
RedshiftDatabase (..),
newRedshiftDatabase,
redshiftDatabase_databaseName,
redshiftDatabase_clusterIdentifier,
RedshiftDatabaseCredentials (..),
newRedshiftDatabaseCredentials,
redshiftDatabaseCredentials_username,
redshiftDatabaseCredentials_password,
RedshiftMetadata (..),
newRedshiftMetadata,
redshiftMetadata_selectSqlQuery,
redshiftMetadata_redshiftDatabase,
redshiftMetadata_databaseUserName,
S3DataSpec (..),
newS3DataSpec,
s3DataSpec_dataSchema,
s3DataSpec_dataSchemaLocationS3,
s3DataSpec_dataRearrangement,
s3DataSpec_dataLocationS3,
Tag (..),
newTag,
tag_value,
tag_key,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MachineLearning.Types.Algorithm
import Amazonka.MachineLearning.Types.BatchPrediction
import Amazonka.MachineLearning.Types.BatchPredictionFilterVariable
import Amazonka.MachineLearning.Types.DataSource
import Amazonka.MachineLearning.Types.DataSourceFilterVariable
import Amazonka.MachineLearning.Types.DetailsAttributes
import Amazonka.MachineLearning.Types.EntityStatus
import Amazonka.MachineLearning.Types.Evaluation
import Amazonka.MachineLearning.Types.EvaluationFilterVariable
import Amazonka.MachineLearning.Types.MLModel
import Amazonka.MachineLearning.Types.MLModelFilterVariable
import Amazonka.MachineLearning.Types.MLModelType
import Amazonka.MachineLearning.Types.PerformanceMetrics
import Amazonka.MachineLearning.Types.Prediction
import Amazonka.MachineLearning.Types.RDSDataSpec
import Amazonka.MachineLearning.Types.RDSDatabase
import Amazonka.MachineLearning.Types.RDSDatabaseCredentials
import Amazonka.MachineLearning.Types.RDSMetadata
import Amazonka.MachineLearning.Types.RealtimeEndpointInfo
import Amazonka.MachineLearning.Types.RealtimeEndpointStatus
import Amazonka.MachineLearning.Types.RedshiftDataSpec
import Amazonka.MachineLearning.Types.RedshiftDatabase
import Amazonka.MachineLearning.Types.RedshiftDatabaseCredentials
import Amazonka.MachineLearning.Types.RedshiftMetadata
import Amazonka.MachineLearning.Types.S3DataSpec
import Amazonka.MachineLearning.Types.SortOrder
import Amazonka.MachineLearning.Types.Tag
import Amazonka.MachineLearning.Types.TaggableResourceType
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
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
"MachineLearning",
$sel:_serviceSigner:Service :: Signer
Core._serviceSigner = Signer
Sign.v4,
$sel:_serviceEndpointPrefix:Service :: ByteString
Core._serviceEndpointPrefix = ByteString
"machinelearning",
$sel:_serviceSigningName:Service :: ByteString
Core._serviceSigningName = ByteString
"machinelearning",
$sel:_serviceVersion:Service :: ByteString
Core._serviceVersion = ByteString
"2014-12-12",
$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
"MachineLearning",
$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
_InvalidTagException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InvalidTagException :: Getting (First ServiceError) a ServiceError
_InvalidTagException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidTagException"
_InternalServerException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InternalServerException :: Getting (First ServiceError) a ServiceError
_InternalServerException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerException"
_InvalidInputException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_InvalidInputException :: Getting (First ServiceError) a ServiceError
_InvalidInputException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidInputException"
_IdempotentParameterMismatchException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_IdempotentParameterMismatchException :: Getting (First ServiceError) a ServiceError
_IdempotentParameterMismatchException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"IdempotentParameterMismatchException"
_TagLimitExceededException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_TagLimitExceededException :: Getting (First ServiceError) a ServiceError
_TagLimitExceededException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"TagLimitExceededException"
_PredictorNotMountedException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_PredictorNotMountedException :: Getting (First ServiceError) a ServiceError
_PredictorNotMountedException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"PredictorNotMountedException"
_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"
_LimitExceededException :: Core.AsError a => Lens.Getting (Prelude.First Core.ServiceError) a Core.ServiceError
_LimitExceededException :: Getting (First ServiceError) a ServiceError
_LimitExceededException =
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
forall a.
AsError a =>
Service -> ErrorCode -> Getting (First ServiceError) a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LimitExceededException"